This PR adds feature enabling people to delete photo attachments from observation draft.
Also corrected parameter name in draft observation store, as it was id previously which actually was original uri of a photo.
By accident I did little more than scope of the issue, as photos in already created observations are possible to delete too (including deleting them from attachments on backend). However everything that was unasked for is hidden, to enable deleting photos in already created observations just pass deletable: true when navigating to PhotoPreviewModal screen in Observation screen. Worth nothing there is no permission check, as currently deviceId everywhere is mocked, so this would need to be added too before enabling deleting in existing observations.
Closes #230
This PR adds feature enabling people to delete photo attachments from observation draft.
Also corrected parameter name in draft observation store, as it was
id
previously which actually was original uri of a photo.By accident I did little more than scope of the issue, as photos in already created observations are possible to delete too (including deleting them from attachments on backend). However everything that was unasked for is hidden, to enable deleting photos in already created observations just pass
deletable: true
when navigating toPhotoPreviewModal
screen inObservation
screen. Worth nothing there is no permission check, as currentlydeviceId
everywhere is mocked, so this would need to be added too before enabling deleting in existing observations.