Pages:
HOME page (index): Shows list of products (can visit each product from here)
-
all the products are displayed
-
the images link to the PRODUCT page
-
there should be a link to add a new product
PRODUCT page: Shows specific product and it's details
-
a link back to the HOME page
-
a link to edit the product (goes to the edit page)
-
a delete button that deletes
-
user can also search for a specific product from this page
-
Clicking buy button should lower remaining by 1
-
If the quantity of your item is zero, the show page should say 'OUT OF STOCK' instead of saying how many are remaining. (Hint: conditionals).
-
On the edit page, make sure you can set the quantity to zero if you want so that you can test if this is working.
-
The BUY button should also not be rendered if the quantity of the item is zero
EDIT page: Should allow you to edit the data of a specific product (using itβs product ID)
CREATE page - allows for creation of new products (users will include a URL for the image)
Redirects:
-
The create route should redirect to HOME after creation
-
The delete route should redirect to HOME after deletion
-
The edit route will redirect to the edited product's PRODUCT page after the object is changed in your collection.