Skip to content

[FEATURE REQUEST] add tables for managing prodcts/categories #27

@nagy-nabil

Description

@nagy-nabil
  • search
  • sorting
  • add new item
  • update item

please use productModal and categoryModal for inserting/update for a coherant user experience

we can postpone the delete operation for now, why? because I'm not sure what the fallback for the delete operation should be

  • if a user deletes a category, what should happen to the products in this category? on delete cascade hell nah

    • proposed solution: have default category and fallback to it, this category would be created by default like the admin and cannot be deleted
  • delete product and there's order contain this product, if we deleted the product and used on delete cascade would logically destroy the history of this order (the information when retrieving order won't be correct because it will be missing the amount of money of this deleted product)

    • proposed solution: make the delete user concept, how? add in the database isDeleted prop for the product and according to this prop don't return "deleted product" to order screen nor to the product page, but can get it from order history.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions