instedd / cdx

Connected Diagnostics Platform
https://cdx.io
9 stars 7 forks source link

Keep batches/samples information if there is an error creating box #1943

Open leandroradusky opened 1 year ago

leandroradusky commented 1 year ago

When creating a new box, in select existing samples mode or upload CSV mode if there is an error in the form (for example if the user doesn't select a purpose or a media) the information about the samples is lost. This provokes that the user needs to define all the information about the batches/samples again, from scratch.

Before saving: image

After saving: image

This does not happen in select samples from inventory mode, where the information is correctly kept.

We should keep the information of the work done in the form in these other two modes as well.

ysbaddaden commented 1 year ago

@leandroradusky @devduarte That's a bug. It was implemented. Looking at boxes/_form.haml we do pass @box_form.samples_data to the SamplesSelector React component that does render all the samples it receives in this.props.samples.