This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f3f5946
to
4e08529
Compare
gciotola
previously approved these changes
Mar 11, 2024
gciotola
approved these changes
Mar 11, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Added the form related pages of the app to manage SKU list creation and update.
This task was completed by:
zod
schema able to manage bothmanual
andautomatic
SKUs management ways used insku_lists
resourcescreate
andupdate
procedureMore in detail
create
andupdate
actions share the same UI but need a slightly different treatment:sku_lists
resource is saved for creation at first it is created by saving its own data (likename
,manual
andsku_code_regex
(ifmanual
is set tofalse
)). Then, once the creation is ok, it is necessary to create relatedsku_list_items
only ifmanual
prop is set totrue
.sku_lists
resource is saved for update its relatedsku_list_items
, if present, need a particular treatment in order to remove the ones that are anymore need, update the ones that are changed and create the ones that were not existing.This two procedures were managed in
useCreateSkuList
anduseUpdateSkuList
hooks for a better readability and at the same time to keep separated the two tasks.Improvements
Pick a SKU
page to remove items the are already selected [waiting for newapp-elements
version to have the fix]hint
ofAutomatic
regex fieldChecklist