Skip to content

Commit

Permalink
Redefine the value of an item, not if it exists (#127)
Browse files Browse the repository at this point in the history
Asking only if an ItemizedValueDict entry exists won't ask the user the right questions; specifically letting them change the value of their dict. In this case, I've been setting up interviews to automatically define exists if asked for in this way, since usually I've been using move_checks_to_list to make objects already exist, yes / no. This means having exists and value re-edited doesn't ask two questions of the user.

Additionally, adds a default revisit question for the ALIncomeList object; otherwise edit buttons on review screens do nothing.

* Add default ALIncomeList.revisit question
  • Loading branch information
BryceStevenWilley authored Nov 3, 2022
1 parent e3fa243 commit 0b480ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docassemble/ALToolbox/data/questions/al_income.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ subquestion: |
${ x.add_action() }
---
generic object: ALIncomeList
continue button field: x.revisit
question: |
Edit incomes
subquestion: |
${ x.table }
${ x.add_action() }
---
generic object: ALItemizedValueDict
table: x.table
rows: x
Expand All @@ -127,6 +136,7 @@ columns:
'$0' if hasattr(row_item, 'exists') and not row_item.exists else currency(row_item.value)
edit:
- exists
- value
---
generic object: ALExpenseList
table: x.table
Expand Down

0 comments on commit 0b480ec

Please sign in to comment.