Closed lbelmore-gc closed 3 years ago
@lbelmore-gc this has already been updated with slightly different text. I assume this can be closed?
I believe the only change that was required for the script is to have the employee amounts in the accordion summary update when the button is clicked the send data down - which has been completed.
@Michel-Tremblay yes thanks for clarifying. I believe this resolves the issue.
Just reopening this one until it goes live. Adding it to the Ready for approval list (in project view) so we can get it on AEM and then live
@Christopher-O @Michel-Tremblay - can you summarize the change made to the logic for the button? I was trying to compare the live site with test and want to make sure I understand the difference with the button functionality.
@lbelmore-gc I believe all it does is recalculate the values in the calculator for step 2a before reinputing the values into the next steps. Before all it did was just put the values into the next steps but did not re-calculate if an amount was changed above. @Michel-Tremblay I cannot recall if the function does anything more compared to it's current iteration.
I believe all it does is recalculate the values in the calculator for step 2a before reinputing the values into the next steps
This is correct. When the button is clicked to send data down, the blur (when element loses focus) event is triggered for each weekly wage input, so it's as if the user tabs through each week to update the calculations. Then those updated results are sent down.
@Michel-Tremblay can you outline the code changes for the recalculate functionality and send it to me so I can include it in the PubHub ticket? Mathieu will be working on the ticket. Thanks :)
if we're publishing #83 and #86 along with this, could we just copy all the javascript rather than doing this one bit at a time?
@Michel-Tremblay - Yes - so if I tell Mathieu to just copy all JS he won't pick up anything that isn't meant for this release? I wasn't sure what might be on the test page that isn't finalized or approved.
Correct. These three changes plus the validation change that was all that I had worked on. I think it's safe to copy all the JS.
Great, thanks Michel.
Mathieu has reminded me that there were some JS changes made for the French version in AEM. He's asking if he can copy and paste the JS from GitHub to the French version of the page. I assume no, that would overwrite the customization we need for French?
I double checked, all my code is written to support both languages. If Matthieu could point out the part that's specific, I would actually want to rewrite it so we never have to worry about this kind of difference again.
Calculator doesn't update with retroactive changes
If an amount is changed in the monthly revenue section, the summary of revenue drop will update when you tab out of the field. But to have the employee amounts update, you must click into the pre-crisis pay amount to have the employee update. This must be done with each individual employee listed.
Solution - update the button to "Calculate data and send to the form below"