Conversation
Sameera - finished routes and added columns to item model
…mplemented grid list
add 100vh and 100vw to the body
added BrowserRouter for routing
Cardlist grid and single page view minimum viable product
Created AddForm.js
…-router-dom in index.js
…ey to map each card; set link to url containing item.id as param; add StyledLink to styling
Feat/browser router adding routes
LaurieMV
left a comment
There was a problem hiding this comment.
Great job, team! You completed all tiers plus lots of bonus. You did a nice job with your design and wireframe. The app has consistent styling. You provided thoughtful filter and sort. You implemented navigation using React Router. You included a shopping cart, orders, and user management. Your README is very solid and includes useful build instructions.
| @@ -0,0 +1,148 @@ | |||
| import React, { useContext, useState } from 'react'; | |||
| import styled from "styled-components"; | |||
| setItems(itemsData); | ||
| setFilteredItems(itemsData); | ||
| } catch (err) { | ||
| console.log("Oh no an error! ", err); |
There was a problem hiding this comment.
Might the end user be interested in some info about this?
| <> | ||
| <h1>Inventory App</h1> | ||
| {/* Render the items */} | ||
| <AllStatesContext.Provider |
| <PartFont>#{item.id}</PartFont> | ||
| </TitleAndPart> | ||
| <QuantityNumber> | ||
| <h2>${Number(item.price).toFixed(2)}</h2> |
There was a problem hiding this comment.
This is a good approach to correct money formatting. Also take a look at Intl.NumberFormat if you want to write code that is more easily translatable (localized) to other countries.
| <QuantityNumber> | ||
| <h2>${Number(item.price).toFixed(2)}</h2> | ||
| <br /> | ||
| <p>in stock: {item.quantity}</p> |
There was a problem hiding this comment.
Love that you included the stock quantities, one of my favorite extensions!
| @@ -1,14 +1,18 @@ | |||
| * { | |||
There was a problem hiding this comment.
Are any of the styles of your components global, so they could go here rather than being repeated?
| name: { | ||
| type: DataTypes.STRING, | ||
| allowNull: false, | ||
| validate: { |
| if (!item) return res.status(404).json({ error: "Item not found" }); | ||
|
|
||
| await item.destroy(); | ||
| res.json({ message: "Item deleted" }); |
| @@ -0,0 +1,36 @@ | |||
| // routes/users.js | |||
| - cd inventory-app | ||
| 3. Install dependence | ||
| - npm install | ||
| - npm install react-router-dom@6.30.1 |
There was a problem hiding this comment.
This version is correctly included in your package and package-lock, so there should be no need to add the extra line here.
Don’t close or merge this pull request, unless you’re instructed to do so by your teacher.