Open rikukissa opened 5 months ago
This ticket can be closed when https://github.com/opencrvs/opencrvs-core/pull/7023 is merged @tahmidrahman-dsi @Zangetsu101.
@SyedaAfrida @jpye-finch we need to add a completely custom section to one of the Farajaland forms to ensure this works. Could you define one please?
@rikukissa Could the Witness pages in the Marriage form be considered as one?
@jpye-finch definitely. Now that I think about, we don't really have to even have a conceptual distinction between "custom sections" and "standard sections". They all could just be sections
Description
We've been asked for custom form sections in multiple projects now. In Burkina Faso, we were able to achieve custom sections doing a small core modification:
Country config
To test while developing as these two as what break the first:
There's a chance this is in reality to do with the section not shown as part of declaration but then shown as part of correction. When you come back to correct and change the fields value it doesn't activate the "Continue" button as it thinks you didn't change anything
Tasks
[ ] Refactor ReviewSection
hasChangesBeenMade
logic to be so that there is one pure functionhasChangesBeenMade(fields): boolean
[ ] After the refactor, focus on
and consider if it should be possible that one section, for instance custom "mentions" section is completely empty when the form is first submitted so
originalData = undefined
but is filled up in correction. Explore if it's possible to add more sections in the correction process.Implementation like
could also solve things without needing to add custom section transformers