bcgov / bctw-ui

BC Telemetry Warehouse: UI
https://apps.nrs.gov.bc.ca/int/confluence/display/BCTW/BC+Telemetry+Warehouse
Apache License 2.0
3 stars 5 forks source link

894 taxon edit page #78

Closed GrahamS-Quartech closed 1 year ago

GrahamS-Quartech commented 1 year ago

This PR modifies the Edit Critter page to correctly handle the case where the taxon changes, which affects the validity of collection units and markings. If you try to change the taxon of a critter that has markings which have fields not inherited by the new taxon, a pop-up will show and you will be prevented from switching. Removing the offending markings allows you to switch. Switching taxons successfully will also change the available collection units now. There is a check in the payload builder that will add _delete keys to markings on the condition that they already have primary keys and the new payload has a different taxon_id from the existing critter entry.