dfo-mar-odis / dart

DFO At-sea Reporting Template, collect Elog, CTD and sample data at sea to produce reports then upload to BioChem at the end of the mission
3 stars 1 forks source link

BioChemUpload Update status on Checkbox #161

Closed upsonp closed 3 months ago

upsonp commented 3 months ago

Related to issue #158

Locate the code called when the user checks a box to mark a [datatype] as requiring an upload.

When the user checks the upload checkbox: image

Check the BioChemUpload table
If an entry for the [datatype] exists updated otherwise make an entry an entry, set the modified date to now and set the status to BioChemUploadStatus.upload

upsonp commented 3 months ago

Testing will be in core.tests.TestBioChemUpload.TestBioChemUpload

upsonp commented 3 months ago

Checkbox url: 'core:mission_samples_add_sensor_to_upload' Checkbox function: core.view_mission_sample.add_sensor_to_upload(request, database, mission_id, sensor_id, **kwargs)

upsonp commented 3 months ago

If the sensor is in the BioChemUpload table and marked as 'upload' with no upload_date it should removed from the BioChemUpload Table

upsonp commented 3 months ago

If the sensor is in the BioChemUpload table and marked as 'upload' with an upload_date it should be marked as 'delete'

upsonp commented 3 months ago

If the sensor is in the BioChemUpload table and marked as 'uploaded' it should be marked as 'delete'