-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DDLS-7: New pages to add: Has there been any money into the client's account during the reporting period? (Money In) #1437
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1437 +/- ##
=========================================
+ Coverage 0 52.60% +52.60%
=========================================
Files 0 268 +268
Lines 0 8221 +8221
=========================================
+ Hits 0 4325 +4325
- Misses 0 3896 +3896
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -170,6 +170,10 @@ public function getMoneyInState() | |||
{ | |||
if ($this->report->hasMoneyIn()) { | |||
return ['state' => self::STATE_DONE, 'nOfRecords' => count($this->report->getMoneyTransactionsIn())]; | |||
} elseif ($this->report->getMoneyInExists() && $this->report->getReasonForNoMoneyIn()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you might have missed the !
before $this->report->getMoneyInExists()
.
I am assuming that we use the state done if they haven't put any money in but have provided a reason for no money in.
A similar issue for the last elseif statement where we mark it as incomplete if they haven't put any money in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the new pages are wired up, there will also be an answer for the 'getMoneyExists' property - it would be a 'yes' or 'no'.
- The first statement accounts for a deputy reporting money in items.
- The second statement accounts for when a deputy has an answer for the getMoneyExists (which would be 'no') question and getReasonForNoMoneyIn - the state would be marked as done.
- The final statement accounts for when a deputy answers the 'getMoneyExists' question but hasn't entered a reason yet - the state would be marked as incomplete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed to rename the 'getMoneyInExists' property to avoid confusion
$answer = $form['reasonForNoMoneyIn']->getData(); | ||
|
||
$report->setReasonForNoMoneyIn($answer); | ||
$report->getStatus()->setMoneyInState(Status::STATE_DONE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started looking into how we set and retrieve the states for the different sections, but wasn't able to find any place where we actually set the state of a section to incomplete or done.
Might need to figure out how this is done for other sections to make sure we are being consistent.
This isn't bad/wrong as far as I can tell though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Gugandeep , thanks for your feedback.
I haven’t actioned this as part of this ticket as I believe that me and Nil will action this as part of the wiring up ticket as my changes will tie in with the updated summary page which will complete the user flow and allow us to update the status update for that section.
I think I had to do a similar thing for the significant decisions work, so I’ll probably revisit that PR to check how the sections state is updated
Purpose
Add two new pages to money in section that gives deputies the option to report that there has been no money in to the clients account during the reporting period.
Fixes DDPB-4808
Approach
New twig files created for each page
Validation added to radio option and text box
Functions and routing added to MoneyInController and MoneyInShortController
New data persisted to the database
Applied these changes for 102 (High Assets) and 103 (Low Assets) reports
Bonus: Fixed validation issues on the significant decisions section
Learning
Any tips and tricks, blog posts or tools which helped you. Plus anything notable you've discovered about DigiDeps
Checklist
Frontend