bcgov / nr-spar

SPAR app from FDS (Forestry Digital Services)
https://www2.gov.bc.ca/gov/content/industry/forestry/managing-our-forest-resources/tree-seed/seed-planning-use/spar
Apache License 2.0
1 stars 0 forks source link

🏆 update smart save functionality to handle multiple users editing the same form #1301

Open SLDonnelly opened 4 days ago

SLDonnelly commented 4 days ago

Describe the task

Currently we are using the seedlot as the key for the smart save, but this needs to be enhanced to account for multiple users updating the same seedlot at once.

Before user saves the form, the FE needs to refer to the userID plus the seedlot number to be used as a key when saving seedlot progress.

At this point, we don't believe that we need to update the endpoint, but instead we can use the userid and seedlot number as unique combination in a string on the FE.

***We need to make sure that any updates in the seedlot table happen with the addition of the revision_count in the where clause.

Acceptance Criteria

Additional context

This ticket is related to #1300

Image