Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create product - move create variation logic to server #243

Closed
thiennn opened this issue Dec 17, 2022 · 0 comments
Closed

Create product - move create variation logic to server #243

thiennn opened this issue Dec 17, 2022 · 0 comments
Assignees

Comments

@thiennn
Copy link
Contributor

thiennn commented Dec 17, 2022

await createProduct(_product, option.optionThumbnail, option.optionImages);

The frontend should only render the UI, then capture the input of user and send to server together with product information
On server,

  • Save the main product with hasOptions = true
  • Insert into ProductOptionValue
  • For each variations, clone a new products, then override with variation specific information and finally insert to database
@khanhtrand khanhtrand self-assigned this Mar 6, 2023
@khoahd7621 khoahd7621 assigned khoahd7621 and unassigned khanhtrand Mar 13, 2023
khoahd7621 added a commit that referenced this issue Mar 15, 2023
khoahd7621 added a commit that referenced this issue Mar 16, 2023
khoahd7621 added a commit that referenced this issue Mar 17, 2023
* #243 - Update create and update product apis

* #243 - Update form and logic

* Refactor type for product form and payload apis

* Move create variant and its option to backend

* Remove unnecessary code

* Fix prettier error

* Remove dulicated codes

* Remove dulicated codes
kiettrangthuan pushed a commit that referenced this issue Mar 17, 2023
* #243 - Update create and update product apis

* #243 - Update form and logic

* Refactor type for product form and payload apis

* Move create variant and its option to backend

* Remove unnecessary code

* Fix prettier error

* Remove dulicated codes

* Remove dulicated codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants