oaregithub / oare_mono

1 stars 0 forks source link

Allow user (with permission) to link from instances of seals in a text to the seal list #1501

Closed edstratford closed 2 years ago

edstratford commented 2 years ago

For this issue, we'll start from the text page. When use with permission (new permission ADD_SEAL_LINK) clicks on Seal Impression (Currently does nothing) - to get a popu up to link that Seal Impression to a seal in the seal list.

This seal impression will have a text_epigraphy.uuid --> const refUuid = (that text_epigraphy.uuid) The seal impression will also have a corresponding item_property row with value_uuid = 'ec820e17-ecc7-492f-86a7-a01b379622e1'. -- the uuid of that row will = parentUuid for the row to be created as a result of the selection The pop-up will pull up the cached seal list (with or without photos), with checklists on the side and a filter at the top that allows the user to reduce the list to the one (and only one) seal that it will be linked to.

The seal that the user chooses will have a uuid in spatial_unit -- that spatial_unit.uuid for that seal will become objectUuid

The result of the selection in the front end will be to POST a new row that result from the following SQL command:

INSERT INTO item_properties (uuid, reference_uuid,parent_uuid,level,variable_uuid,object_uuid) VALUES (, refUuid, parentUuid, '1', 'f32e6903-67c9-41d8-840a-d933b8b3e719', objectUuid);

That's it.