Currently if user exits the task screen, only data for the component which are completed is saved and not for the current component which might have some partially filled data
Proposed Solution
I have setup a mechanism to save the output and recover it when the component reloads. Currently it is implemented only in OpenComponent, well need to implement that in each component's controller.
Steps
Override destroy method
Return the data and files so far from destroy
Load the initial data in when the controller is instantiated next time. Few components also have a prefill values associated with them. In these scenarios the preference would be initialValue from mtaOutput > prefill > null/empty/initial
Description
Currently if user exits the task screen, only data for the component which are completed is saved and not for the current component which might have some partially filled data
Proposed Solution
I have setup a mechanism to save the output and recover it when the component reloads. Currently it is implemented only in OpenComponent, well need to implement that in each component's controller.
Steps
destroy
methoddestroy
prefill
values associated with them. In these scenarios the preference would beinitialValue from mtaOutput
>prefill
>null/empty/initial
References
https://github.com/karya-inc/karya-android-client/pull/490