ootbdev / aobotracker-HAS-MOVED

Development Team's Time/Expenses Tracker as an RoR Exercise
0 stars 0 forks source link

"Add New Expense" on "My Work Expenses" Page #10

Open alvinslee opened 10 years ago

alvinslee commented 10 years ago

Above the table showing all of a user's expenses, there should be a link that says something like, "Add New Expense". When the user clicks this, the form for adding a new expense should appear via a slide down, pushing the table of expenses downward.

For now, the form should just contain the following:

This form should be submitted via AJAX.

The user can then add a new expense by completing the form. If the information provided does not pass the Expense model's validations, then an error message should be displayed to the user, letting him know what needs to be fixed.

When an expense is successfully added, the form should slide up and reset, so that it is usable again. The table displaying all expenses should have a new row for this newly added expense added to the top, highlighted in green. The new row should be added to the top regardless of where it would naturally show up in a date-sorted list, to indicate prominently to the user that this is a newly added row.

If the user immediately adds a new expense, the previously green-highlighted expense can be un-highlighted, and the new expense should be highlighted.