Loki-Code201 / foodwise

With this app one will be able to reduce food waste as well as track food purchases. It will enable a user to monitor their food inventory.
https://loki-code201.github.io/foodwise/
MIT License
1 stars 1 forks source link

Use Constructor Function and Objects for pantry food items #22

Closed KasonBraley closed 3 years ago

KasonBraley commented 3 years ago

Create one or more constructor functions to create objects for all of the food items that will be added to the inventory.

Some initial properties for the food item objects could be:

KasonBraley commented 3 years ago

This is a good first place to start adding on: https://github.com/Loki-Code201/PantryPal/commit/3996f2141e00ba6ba54c8012cacb03b5d79038ff

This commit now sets up the form so that upon input it stores the food item into Local Storage.

Also included in this is commit is the code needed to properly retrieve the data from the local storage and how to rehydrate the parsed JSON value back into a PantryItem object: https://github.com/Loki-Code201/PantryPal/blob/3996f2141e00ba6ba54c8012cacb03b5d79038ff/js/pantry.js#L78-L81

KasonBraley commented 3 years ago

Initial constructor function built