This is the repository of the final project of the neue fische Web Dev bootcamp. We had 4 weeks to create a web app optimized for Iphone SE, with a topic of our choice.
As a travel enthusiast
I want to add items to the packing list
so that I can efficiently plan my trip more in detail and i know what to pack for my trip.
Description
Acceptance criteria
[ ] On the details page is a button that opens the packing list page
[ ] if there is no item in the list, the following message will be displayed in the center of the display "Add your first item!" with a button beneath
[ ] if there are already items planned, the button will be found in the center on the bottom of the display
[ ] If the user clicks on the button
[ ] A styled input field appears beneath the last item on the display where the user can type in a new item in form of a text
[ ] If there aren't any items, the input field appears at the very top
[ ] The right hand side of the input fields contains two buttons, one with a cancel icon and one with a save icon
[ ] If the user wants to add the item they click on the save button and the entry will be added to the end of the items list
[ ] If the user clicks on the cancel button the action will be aborted and the item field disappears without adding the item
[ ] The user can't submit an empty form, if the user tries to submit an empty form, he receives the default message of the form element that this field is required
Tasks
[ ] Create a feature branch 'feat/create-packing-list'
[ ] Create new Schema and new collection at MongoDB that contains all packing list Items
[ ] Create the 'PackingList' page pages/PackingList/index.js that renders multiple components - ItemCards, ItemList, button addItem, FormAddItemForm and contains the state [isAddItemMode, setIsAddItemMode] = useState(false)
[ ] Create ItemCard component that renders the item and a checkbox to check and uncheck, a delete button
[ ] Create ItemList component that maps over all items in the packing list collection and renders the ItemCardsaccordingly
[ ] Create a 'AddItem' component that sets the isAddItemMode to true if it's clicked
Value proposition
As a
travel enthusiastI want to
add items to the packing listso that
I can efficiently plan my trip more in detail and i know what to pack for my trip.Description
Acceptance criteria
Tasks
pages/PackingList/index.js
that renders multiple components -ItemCards
,ItemList
, buttonaddItem
, FormAddItemForm
and contains the state[isAddItemMode, setIsAddItemMode] = useState(false)
ItemCard
component that renders the item and a checkbox to check and uncheck, a delete buttonItemList
component that maps over all items in the packing list collection and renders theItemCards
accordinglyisAddItemMode
to true if it's clickedAddItemForm
component that containsisAddItemMode
to falseisAddItemMode
to falseisAddItemMode
is true show theAddItemForm
component, if it's false set it to hiddenPOST
API route in a new pageapi/items/index.js
MongoDB Schema