microbiomedata / nmdc-field-notes

Mobile app for metadata collection on the go
https://fieldnotes.microbiomedata.org/
Other
1 stars 0 forks source link

App should respect the edit lock set by the backend #90

Open pkalita-lbl opened 3 months ago

pkalita-lbl commented 3 months ago

When a user edits a submission via the desktop submission portal, a few lock fields get set/cleared on the submission_metadata record, for example:

{
  ...
  lock_updated: "2024-03-21T23:07:09.397242"
  locked_by: {
    id: "2f836e03-c2ac-4494-a641-dae1b77f7ece"
    orcid: "0000-0002-6150-307X"'
    name: "Patrick Kalita"
    is_admin" true
  }
}

The app should respect the locks and not allow editing of a study that's already being edited elsewhere. Additionally it should attempt to claim a lock when a user starts editing a study.