USGS-WiM / whispers

Wildlife Health Information Sharing Partnership event reporting system(WHISPers) v2
Other
2 stars 1 forks source link

switching species to "captive" on event details page to trigger popup message and subsequent visibility change #1234

Closed JChipault closed 3 years ago

JChipault commented 3 years ago

Describe the bug When in create event and marking a species as "captive", it will show a pop up message and then switch event to private if user clicks "Ok" in pop up message. Same does NOT happen in event details page (when you switch to "captive", nothing special happens). Would like event details page to match create event page.

BlakeDraper commented 3 years ago

Internal WIM notes;

Needed for two components:

BlakeDraper commented 3 years ago

@JChipault I have updated the WHISPers client to prompt the user about turning the event to 'Not Visible to Public' if they select 'Captive'. But what this does not do is prevent a qualified user from subsequently changing the event back to 'Visible to Public' while the location species maintains its 'Captive' status which violates the business rule.

How would you like to handle this? We could A) Prevent the user from marking an event as Visible to Public if there is a Captive location species associated with the event (with a prompt explaining why) B) Allow the event visibility change, but prompt the user that the visibility for all associated location species will be changed.

I am assuming A is more what you would want, but also open to whatever other suggestions you have.

JChipault commented 3 years ago

Actually, what you've done so far is all I was expecting. And what you've done so far will make it match the performance on the create event page.

It's not a hard business rule that all events with captive animals have to be private, so it's ok if they flip the visibility back to public

BlakeDraper commented 3 years ago

Published in v2.16.10.