fall22_internship_app's People
fall22_internship_app's Issues
Item Index Page
As a user, when I visit /items
, I should see:
- A list of all item names as links to each item's show page in alphabetical order
- Each item's price
- Each item's inventory
Item new/update failure
As a user, when I visit either the new item or update item page and I leave the name field blank, I should be redirected back to the new/update page where I see a flash warning saying the name section cannot be blank.
When I leave the price or inventory section blank, I'm redirected to the item show page and I see that the inventory or price (which ever was left blank) is set to 0
Shipment Show Page
As a user, when I visit /shipments/:id
, where :id is a valid shipment id, I should see:
- This shipment's origin and destination
- Whether this shipment is incoming or outgoing
- Whether this shipment has arrived or not
- When that shipment was created and last updated
- A list of item names (which link to each item's show page), the number of each item in the shipment, each item's price, and the total price for this item within the shipment (calculate this using the quantity of this item * the price of the item, I.e. item.price * shipment_item.quantity)
- The total number of items in the shipment
- The total dollar value of this shipment (calculate this using the total item prices calculated in the step above)
Item Show Page
As a user, when I visit /items/:id
, where :id
is the id of a valid product, I should see:
- That items name and description
- That item's inventory
- That item's price
- The latest date a shipment of this item was recieved (incoming)
- The latest time a shipment of this item was sent (outgoing)
- All shipments including this item, in order showing the latest updated first, which should link to that shipment's show page, and I should see whether the shipment was incoming or outgoing
Create Tables and Database
This app's database should have a many-to-many relationship between Items and Shipments
Tables you'll need:
-
Items
With columns:- ID
- Name
- Price
- Description
- Inventory
- Timestamps
-
Shipments
With columns:- ID
- Origin
- Destination
- Description
- Outgoing (boolean)
- Arrived (boolean)
-
Shipment_Items
With columns:- ID
- Item_ID
- Shipment_ID
- Qunatity
These tables will be used to determine:
- The total inventory of all items
- Inventory of particular items
- If an item has been sent out or if a shipment is coming in
- Number of items in a shipment (incoming/outgoing)
- Where an item is going
- When the shipment was sent/received
Navigation
As a user, on every page, I should see:
- A link to the home page
- A link to the items index
- A link to the shipments index
Item Update Page
As a user, when I visit /items/:id/edit
, where :id is a valid item id, I should see a form with the following fields:
- Name
- Description
- Price
- Inventory
And each field should be auto-populated with the related info from that item.
And when I click submit, I should be taken back to that item's show page
Shipment Index Page
As a user, when I visit /shipments
, I should see 2 sections: incoming and outgoing
Under outgoing I should see:
- A list of all outgoing shipments which link to each shipment's show pages
- Whether that shipment has arrived or not
Under incoming I should see:
- A list of all incoming shipments which link to each shipment's show pages
- Whether that shipment has arrived or not
Shipment update page
As a user, when I visit shipments/:id/edit
where :id is a valid shipment id, I should see:
- A form that allows me to update the arrival status of the shipment
- A button to update the shipment
And when check the "arrived" box then I click "Update Shipment" I should be redirected to the shipment show page and I should see that the shipment has "Arrived"
Alternatively, if I do not check the arrived box, I should still be redirected to the shipment show page and see the shipment is "Still en route"
Shipment New Page
As a user, when I visit shipments/new
, I should see a form with the following fields:
- Origin (auto-populated with the companies address)
- Destination
- Outgoing checkbox
- A list of every item with a checkbox next to it and a number field to specify the number of the item to be added to the shipment
And when I click submit, I should be redirected to that shipments show page where I see all related information (see the shipment show page
story for more info)
And when I visit the show page for an item on this shipment, I should see the following updates:
- The item's inventory is updated (added to id incoming, subtracted if outgoing)
- A link to this shipment at the top of either of this item's shipments sections (outgoing or incoming)
New Item Page
As a user, when I visit /items/new, I should see a form to create an item with the following fields:
- Name
- Description
- Price
- Inventory
And when I click submit, I should be taken to that items show page and see the information entered displayed on the page (more info in the Item Show Page
story)
Welcome Page
As a user, when I first visit your website I should be taken to the welcome page
On this page, I should see:
- All navigation links (home, item index, shipment index)
- A button to create a new item
- A button to create a new shipment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.