The budget creation step 2 should be an interactive form for creating ledgers.
The left side of the screen shows the tree structure of our budgeting project.
The right side allows us to create a ledger with the following info
The name
The parent ledger (displayed with the named, but the id of the parent ledger is sent to the APÌ)
When saving, the form should bind the budget id and then calls the API. The verb called is PUT when we create a new ledger and POST when we edit a new one.
Once the save has been successful, the ledger tree is refreshed.
There would be a estimates button that would only be active when :
There is a ledger created
There is no ledger being created nor modified.
Memos:
[ ] Remove demo Tree Set from index page.
[ ] Remove the "click a ledger and you cannot go to the next step"
TODOs:
[x] Make and display ledger form
[x] display tree set
[x] handle tree set item clicks
[x] make sure to handle tree set item click doesn't overwrite a ledger being created.
[x] next step button.
[x] Allow deletion of ledgers
[x] prevent next step when there is no child ledgers or a ledger is being created/edited
[x] Write tests
[ ] Do some manual testing
Things to test around.
[x] Arrive to ledger page. Have the form loaded and the treeset empty. Next step Button is disabled.
[x] Create one ledger. The form should be empty, the treeset shoud have one ledger. Next step button is enabled
[ ] Finish creation, specify a parent. The form should be empty, the tree set should have two ledgers. Next step button is enabled. Clicking on a created ledger should open it.
[ ] Open ledger, edit it. The selection of another ledger should be prevented.
[ ] Submit it. It should still have two ledgers.
[ ] Delete child ledger. It should still be possible to go to the next step.
The budget creation step 2 should be an interactive form for creating ledgers.
The left side of the screen shows the tree structure of our budgeting project. The right side allows us to create a ledger with the following info
When saving, the form should bind the budget id and then calls the API. The verb called is
PUT
when we create a new ledger andPOST when we edit a new one
.Once the save has been successful, the ledger tree is refreshed.
There would be a estimates button that would only be active when :
Memos:
TODOs:
Things to test around.