Closed keanacobarde closed 11 months ago
MODULARIZED POPUP TO FORM THROUGH THE USAGE OF PROPS:
Within index.js (Parent Component)
Declaring a variable and assigning it to the value of a component
// Setting Component to Pass as Prop - AddAnExpense
const createCategoryComponent = <Expense />;
Passing the variable in as a prop
<Popup buttonName="Add an Expense" formTitle="Add an Expense" formContent={createCategoryComponent} />
This functionality lets you snap components in and out wherever the dialog popup/modal is needed.
ALL FUNCTIONALITY IS TESTED AND CORRECT. CLOSING REQUEST.
User Story
I, as the hyper-committed individual who is looking to be more fiscally responsible, should be able to report an expense. This is an integral part of the application. Creating categories and categorizing expenses. Reporting expenses forces me, as the user, to be accountable for them and organize. The expense sheet should include the following: the name of the expense, the actual expense amount, a dropdown with the current categories, and a date picker. CREATE
Acceptance Criteria
WIREFRAME
The form should take into account the category ERD:
WHEN, the user selects on either 'Add an Expense' or the edit button on the expense card, a modal will appear which will allow for the creation or the editing of an expense.
Dependencies
8 - A mutual dependency. The home page isn't complete without the ability to produce this form, and the testing of this form isn't possible without at least the skeleton of this page.
10 - Another mutual dependency. The full functionality of this page isn't complete without this, and the testing of this form isn't complete without at least the part-way completion of this page.
Dev Notes
EXAMPLE FROM SIMPLY BOOKS
BOOKS > NEW.JS
BOOKFORM.JS
'EDIT' - SEEN WITHIN BOOKS > EDIT > [FIREBASEKEY].JS, DEPENDENT ON FORM COMPONENT FOR COMPLETION