diff --git a/CHANGELOG.md b/CHANGELOG.md index 8047c38b4..b401eea87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed --> +### Fixed +- Project feedback not working for all users +- Fixed model root bug with empty submissions (NS-62) +- Fixing paging issue when hiding completed Manifests (NS-59) + ## [v2.2.4](https://github.com/digirati-co-uk/madoc-platform/compare/v2.2.3...v2.2.4) - 14/05/2024 ### Fixed diff --git a/services/madoc-ts/__tests__/capture-models/helpers/capture-model-to-revision-list.test.ts b/services/madoc-ts/__tests__/capture-models/helpers/capture-model-to-revision-list.test.ts index 72f3ab104..b76282a7a 100644 --- a/services/madoc-ts/__tests__/capture-models/helpers/capture-model-to-revision-list.test.ts +++ b/services/madoc-ts/__tests__/capture-models/helpers/capture-model-to-revision-list.test.ts @@ -13,6 +13,8 @@ import single04 from '../../../fixtures/03-revisions/04-dual-transcription.json' import single05 from '../../../fixtures/03-revisions/05-allow-multiple-transcriptions.json'; // @ts-ignore import ames02 from '../../../fixtures/99-unrealistic/02-ames.json'; +// @ts-ignore +import ns62 from '../../../fixtures/97-bugs/06-model-root-filter.json'; describe('capture model to revision list', () => { test('single-field-with-revision', () => { @@ -663,4 +665,1746 @@ describe('capture model to revision list', () => { ] `); }); + + test('NS-62 bug', () => { + // captureModelToRevisionList + expect(captureModelToRevisionList(ns62 as any as CaptureModel)).toMatchInlineSnapshot(` + [ + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "bfd1afec-630a-418a-b9d9-ee9b7a8fdc5f", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "edb617aa-aa64-4983-b58f-1b441c911027", + "label": "Address", + "pluralField": "Addresses", + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "type": "text-field", + "value": "Police Station, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "5c204aed-e14d-47cd-b7c5-f54b7774cfbf", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "d974ef30-79cd-4348-854f-996ad0b27b37", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "95da2322-4439-4aff-bab2-9a4d03847c96", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "type": "text-field", + "value": "Elizabeth Jones", + }, + ], + }, + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "selector": { + "id": "9985cdce-0dab-4886-8e23-21b13cdb4fa6", + "revisedBy": [], + "state": { + "height": 381, + "width": 3065, + "x": 202, + "y": 600, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "257963c1-abce-4124-af8a-dba1d5b718ee", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "f88e78fe-585a-41cb-b8e0-be50f48a09af", + "label": "Address", + "pluralField": "Addresses", + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "type": "text-field", + "value": "Derlwyn, Drefach, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "aa8b3c37-83f8-4e12-b00a-fda42e1de0fb", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "cd4d0ba6-f663-4c51-b6ff-f62eac3003fc", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "e4d76498-0138-4acb-9f1b-0a54686e7dcb", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "type": "text-field", + "value": "Lizzie Jones", + }, + ], + }, + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "selector": { + "id": "b6355106-9332-48d4-bb86-f684495e2540", + "revisedBy": [], + "state": { + "height": 283, + "width": 3250, + "x": 185, + "y": 813, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "289f74d0-a291-4615-9fc0-227d1c183c00", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "297fdcb6-d94d-4b6d-994b-704a53ca4c08", + "label": "Address", + "pluralField": "Addresses", + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "type": "text-field", + "value": "Alltyblacca Farm, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "a1397db0-35d5-4879-8f55-6be9b576b7dc", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "3814677f-a913-4790-9b17-fb4d9cd551ea", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "df977dde-a1f9-40db-a484-f93eb95ff5ae", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "type": "text-field", + "value": "Gwennie A. Price", + }, + ], + }, + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "selector": { + "id": "6addb95a-cb9a-4525-8f23-4536250e3fc8", + "revisedBy": [], + "state": { + "height": 219, + "width": 3061, + "x": 151, + "y": 1504, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "6206fd11-6245-4ba8-99d0-baeebbe9a6e7", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "ebabf020-33fa-4f06-8800-659891386397", + "label": "Address", + "pluralField": "Addresses", + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "type": "text-field", + "value": "Nantfach, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "bdce663f-3009-4d56-81f6-842113583e54", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "eb6e86ca-2b88-42f5-8d91-f8b4dd28b234", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "587f45e9-3f77-4a92-84ac-4ab75dcc3ae4", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "type": "text-field", + "value": "Mary Evans", + }, + ], + }, + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "selector": { + "id": "3802d12a-181b-4063-9dac-36f9b25f8247", + "revisedBy": [], + "state": { + "height": 183, + "width": 3187, + "x": 168, + "y": 1789, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "577f7370-23cc-4a3b-bc61-2b3942ff03ad", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "1a45358e-8e97-4204-82be-fb8817ef7747", + "label": "Address", + "pluralField": "Addresses", + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "type": "text-field", + "value": "Awelfryn, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "e67aaa9e-2f64-4a88-a685-909b539fa1ed", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "00811184-f840-4b02-babd-97d005830b40", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "ba0416c1-daea-486e-8a49-c34bf35f510f", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "type": "text-field", + "value": "Jane Williams", + }, + ], + }, + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "selector": { + "id": "df3c8319-762e-4547-ba7d-91ff0092e513", + "revisedBy": [], + "state": { + "height": 206, + "width": 3218, + "x": 234, + "y": 1103, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "8968bdf2-86d9-4305-9f00-b19d483d6770", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "f7c52cc6-6e01-46d5-9a15-cb42f96d4814", + "label": "Address", + "pluralField": "Addresses", + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "type": "text-field", + "value": "Inglis Cottage, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "69948f18-7fe0-4d00-ac71-d13b4c457e3c", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "9077e220-645b-4d1e-a9c5-881e65fcec18", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "7e3b9464-4665-4869-a621-13f3d520ad9c", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "type": "text-field", + "value": "E. M. Williams", + }, + ], + }, + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "selector": { + "id": "92fa7fe7-2db2-4242-abf4-c9da50d010d2", + "revisedBy": [], + "state": { + "height": 205, + "width": 3054, + "x": 213, + "y": 1379, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "3cdaa4ac-28c0-4376-9140-cc9d27f903e2", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "120a4acf-f9f5-4cd1-a5b0-9764b70ab6b9", + "label": "Address", + "pluralField": "Addresses", + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "type": "text-field", + "value": "Pleasant View, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "62523231-7246-44a9-a7ac-1baa7dccfece", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "81ce3fce-1413-41e5-ada4-8439815ce2d1", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "c4f54cb3-8000-4268-8c29-452423b2fc41", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "type": "text-field", + "value": "W. M. Evans", + }, + ], + }, + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "selector": { + "id": "f975900e-077e-4079-83c1-1c86479539da", + "revisedBy": [], + "state": { + "height": 212, + "width": 3446, + "x": 141, + "y": 1899, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "ac47fec1-c9f0-48ea-984e-e29116fa58c8", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "16748905-f8b6-43b8-8ea2-0ab5e4b2342c", + "label": "Address", + "pluralField": "Addresses", + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "type": "text-field", + "value": "Alltyblacca Farm, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "4b3a306d-c3e5-4f0b-8db6-5b57af09df51", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "1727f355-4daa-4af9-9f54-fcd21e8c904e", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "5c7d97fe-eed7-418d-b2af-4ec8e21edbc0", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "type": "text-field", + "value": "Mary F. Price", + }, + ], + }, + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "selector": { + "id": "e19b67d5-a63e-41d9-9f2c-ff112eb507cb", + "revisedBy": [], + "state": { + "height": 189.26495344606178, + "width": 3180, + "x": 145, + "y": 1662.7350465539382, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "8b7cb1b2-2680-4b6b-8610-8423d703cc54", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "97c8e83f-deb5-4b5a-ac18-d97177cc4ae5", + "label": "Address", + "pluralField": "Addresses", + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "type": "text-field", + "value": "Derlwyn, Drefach, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "4c3701e5-ebab-4dd7-9092-9a9326f082e1", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "c2438bab-ceb9-4de1-a9b1-619fbf332c46", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "692b09d1-c887-49a8-8ca5-555560f1616b", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "type": "text-field", + "value": "Elizabeth Jones", + }, + ], + }, + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "selector": { + "id": "50c400f9-a81b-4cd3-9adc-91098f4ddc15", + "revisedBy": [], + "state": { + "height": 226, + "width": 3162, + "x": 234, + "y": 974, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "dd1b1a54-5518-43fb-be03-b259af715f2d", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "f9166dba-5179-44bb-ae96-8855a3f73d14", + "label": "Address", + "pluralField": "Addresses", + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "type": "text-field", + "value": "Teify View, Alltyblaca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "813c3812-0ea1-4213-af38-5b61768db47f", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "45c14221-b05f-48a1-acba-49dfe28dabad", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "18993d08-2889-4f1e-b71b-8de7f1caf3fe", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "type": "text-field", + "value": "Elizabeth Rees", + }, + ], + }, + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "selector": { + "id": "977d36af-aaee-4f44-8883-4038f323b673", + "revisedBy": [], + "state": { + "height": 220, + "width": 3316, + "x": 178, + "y": 1239, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "2dfdff73-47a8-4345-822a-cf05912a2997", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "e68a99e3-4e8e-423a-aabe-201cf360948d", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "a3aa9a0a-6160-4a56-8618-66f5efe8bd24", + "label": "Address", + "pluralField": "Addresses", + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "type": "text-field", + "value": "Pleasant View, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "6e32c9ea-03a8-462b-af0f-ea79cca6b6fd", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "942571df-d6ee-4602-ad85-ccba91839d91", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "792547a2-bb11-4b40-9bd3-54d9e1582721", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "type": "text-field", + "value": "Hannah Davies", + }, + ], + }, + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "selector": { + "id": "6fa3c739-4637-4c5f-ac17-a841464c330d", + "revisedBy": [], + "state": { + "height": 219, + "width": 3456, + "x": 181, + "y": 2021, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "8304bda8-57dc-4e11-9861-31a433ccc3e1", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "a18d73e0-11d8-4462-b03d-62d08803be52", + "label": "Address", + "pluralField": "Addresses", + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "type": "text-field", + "value": "Chapel House, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "4d634832-80fe-439c-bf26-9a62e7e55dca", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "b66ea404-8aa7-4312-9d2e-24bd68f666ff", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "6001af3a-8ae5-426c-8b22-b1a2eba70af7", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "type": "text-field", + "value": "Sarah Hannah Jones", + }, + ], + }, + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "selector": { + "id": "c1a0c260-2dd1-4447-ad5c-e55cc9f23718", + "revisedBy": [], + "state": { + "height": 252, + "width": 3342, + "x": 168, + "y": 2144, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "f2f51578-545e-40f3-9cae-86586a42f709", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "0fe6a5f1-a730-4fdf-ade0-d729aa3ca15a", + "label": "Address", + "pluralField": "Addresses", + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "type": "text-field", + "value": "Ffinnant Arms, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "1572fa6a-219a-4382-95f3-cb33592012a7", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "59e0742d-752b-4c86-8731-0292c1e8182b", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "cefdf63c-ac6c-4208-a5f5-5405e0fa4851", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "type": "text-field", + "value": "Catherine Evans", + }, + ], + }, + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "selector": { + "id": "7e3f2279-ad1c-49a6-a3d6-4a7f28e2e023", + "revisedBy": [], + "state": { + "height": 239, + "width": 3309, + "x": 178, + "y": 2290, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "409032b5-187e-46dd-9725-1a86442acdfd", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "a085ba3e-bd50-43a4-a138-e2524847b494", + "label": "Address", + "pluralField": "Addresses", + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "type": "text-field", + "value": "Brynderw, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "81d394d8-2859-408b-b940-06e19cbec7fb", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "4ad52df6-74e4-4e93-8fee-1defab60d678", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "3ae2b5ac-8fc9-4a34-96a7-1b83125bb5bf", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "type": "text-field", + "value": "Rachel Rees", + }, + ], + }, + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "selector": { + "id": "ebab08b3-3aab-46ac-a544-70b0cb3b6160", + "revisedBy": [], + "state": { + "height": 209, + "width": 3067, + "x": 148, + "y": 2423, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "a811e6c2-1800-471b-9a4a-81605a6b144e", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "361645bb-1b3a-4c48-a208-62aa1249bc91", + "label": "Address", + "pluralField": "Addresses", + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "type": "text-field", + "value": "Cartref, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "5f4a41bf-3a4f-4634-b87f-2201bab30aa2", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "bdaa5a05-65d3-4447-b000-f0075732c250", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "fbdf5794-5611-429a-b880-d0463ed52939", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "type": "text-field", + "value": "Jane Evans", + }, + ], + }, + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "selector": { + "id": "1f82c149-2be1-4452-97cf-7e4894f6c94f", + "revisedBy": [], + "state": { + "height": 219, + "width": 3226, + "x": 135, + "y": 2552, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "ced81f14-7be8-4fe2-90fe-d1a3c344fa9d", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "fe006fcb-df61-4f67-bd96-6779f448ec3c", + "label": "Address", + "pluralField": "Addresses", + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "type": "text-field", + "value": "Bryn-Teify, Alltyblacca, Llanybyther", + }, + ], + "pp2-difficult": [ + { + "id": "6f8b1fab-bf34-434c-b891-099a6b3645e2", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "0dd707ff-f705-4cd5-b0fa-72c4fb15e7a1", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "f57e995d-2bb8-43f6-b97c-a0cffad563c0", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "type": "text-field", + "value": "Anne Lewis", + }, + ], + }, + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "selector": { + "id": "e063d4bb-3d55-4b6f-8025-49c57d62daee", + "revisedBy": [], + "state": { + "height": 202, + "width": 3435, + "x": 208, + "y": 2701, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "f83d0160-64a7-436c-835f-02865da40eac", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + { + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "immutable": true, + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "allowMultiple": false, + "id": "3ba1f058-18a2-44d3-ba43-17eee700ac0c", + "label": "Transcription", + "labelledBy": "{pp2-name} @ {pp2-address}", + "pluralLabel": "Transcriptions", + "properties": { + "pp2-address": [ + { + "description": "Please transcribe the address next to the name", + "id": "0e33eada-915d-4ffd-aab0-e18d4c955ff4", + "label": "Address", + "pluralField": "Addresses", + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "type": "text-field", + "value": "Bryn-Teify, Alltyblacca, Llanwenog", + }, + ], + "pp2-difficult": [ + { + "id": "f4b532c8-ef53-4dd5-bb60-6b7314293125", + "inlineLabel": "Tick if you are not confident that your transcription is accurate.", + "label": "Text difficult to transcribe?", + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-empty": [ + { + "id": "e3c92682-12c3-4da4-8c53-31d9c0431232", + "inlineLabel": "Tick this box if the page contains no names to transcribe", + "label": "Is this an empty page?", + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "type": "checkbox-field", + "value": false, + }, + ], + "pp2-name": [ + { + "description": "Please transcribe the name you have selected", + "id": "4f5acead-14d9-436c-a6c5-3fba9141e8c5", + "label": "Name", + "pluralField": "Names", + "required": true, + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "type": "text-field", + "value": "Lizzie M. Williams", + }, + ], + }, + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "selector": { + "id": "f1d6215f-a72d-41ad-ac11-13d785115caa", + "revisedBy": [], + "state": { + "height": 255, + "width": 3565, + "x": 191, + "y": 2814, + }, + "type": "box-selector", + }, + "type": "entity", + }, + ], + }, + "type": "entity", + }, + "revision": { + "approved": true, + "authors": [ + "urn:madoc:user:216", + ], + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty", + ], + ], + ], + "id": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "label": "Peace Petition", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "status": "accepted", + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + }, + "source": "structure", + }, + ] + `); + }); }); diff --git a/services/madoc-ts/__tests__/capture-models/helpers/filter-capture-model.test.ts b/services/madoc-ts/__tests__/capture-models/helpers/filter-capture-model.test.ts index 6df941bb5..dcbf80d1b 100644 --- a/services/madoc-ts/__tests__/capture-models/helpers/filter-capture-model.test.ts +++ b/services/madoc-ts/__tests__/capture-models/helpers/filter-capture-model.test.ts @@ -1,3 +1,4 @@ +import { filterEmptyFields } from '../../../src/frontend/shared/capture-models/helpers/field-post-filters'; import { filterCaptureModel } from '../../../src/frontend/shared/capture-models/helpers/filter-capture-model'; import { CaptureModel } from '../../../src/frontend/shared/capture-models/types/capture-model'; @@ -132,4 +133,42 @@ describe('filterCaptureModel', () => { } `); }); + + test('filter entity model root bug', () => { + const rev = '63642c5e-5e37-4bba-af33-7e4b9dbf653e'; + const model = require(`../../../fixtures/97-bugs/06-model-root-filter.json`); + const flatFields = [ + ['pp2transcription', 'pp2-name'], + ['pp2transcription', 'pp2-address'], + ['pp2transcription', 'pp2-difficult'], + ['pp2transcription', 'pp2-empty'], + ]; + const allRevisions = ['63642c5e-5e37-4bba-af33-7e4b9dbf653e', '178fca6d-3624-4b8a-9af7-2c50e4034edc']; + + const filtered = filterCaptureModel( + rev, + model.document, + flatFields, + (field, parent, key) => { + if (field.revision) { + return allRevisions.indexOf(field.revision) !== -1; + } + + // This will show additional fields - but also empty entities. + return true; + }, + [ + // Filter empty fields. + filterEmptyFields, + ] + ); + + expect(filtered).toEqual(null); + + // console.log(JSON.stringify(filtered, null, 2)); + // + // expect(filtered?.properties.pp2transcription).not.toHaveLength(0); + // const keys = Object.keys((filtered?.properties.pp2transcription[0] as any).properties); + // expect(keys).toEqual(['pp2-name', 'pp2-address', 'pp2-difficult', 'pp2-empty']); + }); }); diff --git a/services/madoc-ts/fixtures/97-bugs/06-model-root-filter.json b/services/madoc-ts/fixtures/97-bugs/06-model-root-filter.json new file mode 100644 index 000000000..a948da47e --- /dev/null +++ b/services/madoc-ts/fixtures/97-bugs/06-model-root-filter.json @@ -0,0 +1,1638 @@ +{ + "id": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4", + "structure": { + "id": "d67cc46a-b549-4d24-9b79-7989c20b8e66", + "label": "Transcribe the Peace Petition 2", + "type": "choice", + "items": [ + { + "id": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "label": "Peace Petition", + "type": "model", + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "modelRoot": [ + "pp2transcription" + ], + "description": "", + "instructions": "Remember to draw a box around the name and address before you transcribe the text.\nPlease ensure that you have read the Guidelines and the FAQ’s before starting the transcription work." + } + ], + "description": "" + }, + "document": { + "id": "d8ddef02-b2c3-4e45-b424-36bc9797e0b1", + "type": "entity", + "label": "Transcribe the Peace Petition", + "properties": { + "pp2transcription": [ + { + "id": "27212153-bad2-49ba-a49c-0c8b60fef063", + "type": "entity", + "label": "Transcription", + "selector": { + "id": "b332f4aa-2a43-4495-8ba0-a7ff73f10153", + "type": "box-selector", + "state": null + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "cdffb45b-91e1-4119-ac56-5ace80d81a16", + "type": "text-field", + "label": "Name", + "value": "", + "required": true, + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "51504f3a-807c-481b-9210-eccd2d8b4de6", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "483287f5-2ccf-4c0a-926f-bcf90030b4bf", + "type": "text-field", + "label": "Address", + "value": "", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "a6dde1d3-92b2-4808-bad6-537bb27434d3", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": "", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "bfd1afec-630a-418a-b9d9-ee9b7a8fdc5f", + "type": "entity", + "label": "Transcription", + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "selector": { + "id": "9985cdce-0dab-4886-8e23-21b13cdb4fa6", + "type": "box-selector", + "state": { + "x": 202, + "y": 600, + "width": 3065, + "height": 381 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "95da2322-4439-4aff-bab2-9a4d03847c96", + "type": "text-field", + "label": "Name", + "value": "Elizabeth Jones", + "required": true, + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "d974ef30-79cd-4348-854f-996ad0b27b37", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "edb617aa-aa64-4983-b58f-1b441c911027", + "type": "text-field", + "label": "Address", + "value": "Police Station, Llanwenog", + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "5c204aed-e14d-47cd-b7c5-f54b7774cfbf", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "257963c1-abce-4124-af8a-dba1d5b718ee", + "type": "entity", + "label": "Transcription", + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "selector": { + "id": "b6355106-9332-48d4-bb86-f684495e2540", + "type": "box-selector", + "state": { + "x": 185, + "y": 813, + "width": 3250, + "height": 283 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "e4d76498-0138-4acb-9f1b-0a54686e7dcb", + "type": "text-field", + "label": "Name", + "value": "Lizzie Jones", + "required": true, + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "cd4d0ba6-f663-4c51-b6ff-f62eac3003fc", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "f88e78fe-585a-41cb-b8e0-be50f48a09af", + "type": "text-field", + "label": "Address", + "value": "Derlwyn, Drefach, Llanwenog", + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "aa8b3c37-83f8-4e12-b00a-fda42e1de0fb", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "8b7cb1b2-2680-4b6b-8610-8423d703cc54", + "type": "entity", + "label": "Transcription", + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "selector": { + "id": "50c400f9-a81b-4cd3-9adc-91098f4ddc15", + "type": "box-selector", + "state": { + "x": 234, + "y": 974, + "width": 3162, + "height": 226 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "692b09d1-c887-49a8-8ca5-555560f1616b", + "type": "text-field", + "label": "Name", + "value": "Elizabeth Jones", + "required": true, + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "c2438bab-ceb9-4de1-a9b1-619fbf332c46", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "97c8e83f-deb5-4b5a-ac18-d97177cc4ae5", + "type": "text-field", + "label": "Address", + "value": "Derlwyn, Drefach, Llanwenog", + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "4c3701e5-ebab-4dd7-9092-9a9326f082e1", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "577f7370-23cc-4a3b-bc61-2b3942ff03ad", + "type": "entity", + "label": "Transcription", + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "selector": { + "id": "df3c8319-762e-4547-ba7d-91ff0092e513", + "type": "box-selector", + "state": { + "x": 234, + "y": 1103, + "width": 3218, + "height": 206 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "ba0416c1-daea-486e-8a49-c34bf35f510f", + "type": "text-field", + "label": "Name", + "value": "Jane Williams", + "required": true, + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "00811184-f840-4b02-babd-97d005830b40", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "1a45358e-8e97-4204-82be-fb8817ef7747", + "type": "text-field", + "label": "Address", + "value": "Awelfryn, Alltyblacca, Llanwenog", + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "e67aaa9e-2f64-4a88-a685-909b539fa1ed", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "dd1b1a54-5518-43fb-be03-b259af715f2d", + "type": "entity", + "label": "Transcription", + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "selector": { + "id": "977d36af-aaee-4f44-8883-4038f323b673", + "type": "box-selector", + "state": { + "x": 178, + "y": 1239, + "width": 3316, + "height": 220 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "18993d08-2889-4f1e-b71b-8de7f1caf3fe", + "type": "text-field", + "label": "Name", + "value": "Elizabeth Rees", + "required": true, + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "45c14221-b05f-48a1-acba-49dfe28dabad", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "f9166dba-5179-44bb-ae96-8855a3f73d14", + "type": "text-field", + "label": "Address", + "value": "Teify View, Alltyblaca, Llanwenog", + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "813c3812-0ea1-4213-af38-5b61768db47f", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "2dfdff73-47a8-4345-822a-cf05912a2997", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "8968bdf2-86d9-4305-9f00-b19d483d6770", + "type": "entity", + "label": "Transcription", + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "selector": { + "id": "92fa7fe7-2db2-4242-abf4-c9da50d010d2", + "type": "box-selector", + "state": { + "x": 213, + "y": 1379, + "width": 3054, + "height": 205 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "7e3b9464-4665-4869-a621-13f3d520ad9c", + "type": "text-field", + "label": "Name", + "value": "E. M. Williams", + "required": true, + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "9077e220-645b-4d1e-a9c5-881e65fcec18", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "f7c52cc6-6e01-46d5-9a15-cb42f96d4814", + "type": "text-field", + "label": "Address", + "value": "Inglis Cottage, Llanwenog", + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "69948f18-7fe0-4d00-ac71-d13b4c457e3c", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "289f74d0-a291-4615-9fc0-227d1c183c00", + "type": "entity", + "label": "Transcription", + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "selector": { + "id": "6addb95a-cb9a-4525-8f23-4536250e3fc8", + "type": "box-selector", + "state": { + "x": 151, + "y": 1504, + "width": 3061, + "height": 219 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "df977dde-a1f9-40db-a484-f93eb95ff5ae", + "type": "text-field", + "label": "Name", + "value": "Gwennie A. Price", + "required": true, + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "3814677f-a913-4790-9b17-fb4d9cd551ea", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "297fdcb6-d94d-4b6d-994b-704a53ca4c08", + "type": "text-field", + "label": "Address", + "value": "Alltyblacca Farm, Llanwenog", + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "a1397db0-35d5-4879-8f55-6be9b576b7dc", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "ac47fec1-c9f0-48ea-984e-e29116fa58c8", + "type": "entity", + "label": "Transcription", + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "selector": { + "id": "e19b67d5-a63e-41d9-9f2c-ff112eb507cb", + "type": "box-selector", + "state": { + "x": 145, + "y": 1662.7350465539382, + "width": 3180, + "height": 189.26495344606178 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "5c7d97fe-eed7-418d-b2af-4ec8e21edbc0", + "type": "text-field", + "label": "Name", + "value": "Mary F. Price", + "required": true, + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "1727f355-4daa-4af9-9f54-fcd21e8c904e", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "16748905-f8b6-43b8-8ea2-0ab5e4b2342c", + "type": "text-field", + "label": "Address", + "value": "Alltyblacca Farm, Llanwenog", + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "4b3a306d-c3e5-4f0b-8db6-5b57af09df51", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "6206fd11-6245-4ba8-99d0-baeebbe9a6e7", + "type": "entity", + "label": "Transcription", + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "selector": { + "id": "3802d12a-181b-4063-9dac-36f9b25f8247", + "type": "box-selector", + "state": { + "x": 168, + "y": 1789, + "width": 3187, + "height": 183 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "587f45e9-3f77-4a92-84ac-4ab75dcc3ae4", + "type": "text-field", + "label": "Name", + "value": "Mary Evans", + "required": true, + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "eb6e86ca-2b88-42f5-8d91-f8b4dd28b234", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "ebabf020-33fa-4f06-8800-659891386397", + "type": "text-field", + "label": "Address", + "value": "Nantfach, Alltyblacca, Llanwenog", + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "bdce663f-3009-4d56-81f6-842113583e54", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "3cdaa4ac-28c0-4376-9140-cc9d27f903e2", + "type": "entity", + "label": "Transcription", + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "selector": { + "id": "f975900e-077e-4079-83c1-1c86479539da", + "type": "box-selector", + "state": { + "x": 141, + "y": 1899, + "width": 3446, + "height": 212 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "c4f54cb3-8000-4268-8c29-452423b2fc41", + "type": "text-field", + "label": "Name", + "value": "W. M. Evans", + "required": true, + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "81ce3fce-1413-41e5-ada4-8439815ce2d1", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "120a4acf-f9f5-4cd1-a5b0-9764b70ab6b9", + "type": "text-field", + "label": "Address", + "value": "Pleasant View, Alltyblacca, Llanwenog", + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "62523231-7246-44a9-a7ac-1baa7dccfece", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "e68a99e3-4e8e-423a-aabe-201cf360948d", + "type": "entity", + "label": "Transcription", + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "selector": { + "id": "6fa3c739-4637-4c5f-ac17-a841464c330d", + "type": "box-selector", + "state": { + "x": 181, + "y": 2021, + "width": 3456, + "height": 219 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "792547a2-bb11-4b40-9bd3-54d9e1582721", + "type": "text-field", + "label": "Name", + "value": "Hannah Davies", + "required": true, + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "942571df-d6ee-4602-ad85-ccba91839d91", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "a3aa9a0a-6160-4a56-8618-66f5efe8bd24", + "type": "text-field", + "label": "Address", + "value": "Pleasant View, Alltyblacca, Llanwenog", + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "6e32c9ea-03a8-462b-af0f-ea79cca6b6fd", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "8304bda8-57dc-4e11-9861-31a433ccc3e1", + "type": "entity", + "label": "Transcription", + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "selector": { + "id": "c1a0c260-2dd1-4447-ad5c-e55cc9f23718", + "type": "box-selector", + "state": { + "x": 168, + "y": 2144, + "width": 3342, + "height": 252 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "6001af3a-8ae5-426c-8b22-b1a2eba70af7", + "type": "text-field", + "label": "Name", + "value": "Sarah Hannah Jones", + "required": true, + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "b66ea404-8aa7-4312-9d2e-24bd68f666ff", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "a18d73e0-11d8-4462-b03d-62d08803be52", + "type": "text-field", + "label": "Address", + "value": "Chapel House, Alltyblacca, Llanwenog", + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "4d634832-80fe-439c-bf26-9a62e7e55dca", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "f2f51578-545e-40f3-9cae-86586a42f709", + "type": "entity", + "label": "Transcription", + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "selector": { + "id": "7e3f2279-ad1c-49a6-a3d6-4a7f28e2e023", + "type": "box-selector", + "state": { + "x": 178, + "y": 2290, + "width": 3309, + "height": 239 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "cefdf63c-ac6c-4208-a5f5-5405e0fa4851", + "type": "text-field", + "label": "Name", + "value": "Catherine Evans", + "required": true, + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "59e0742d-752b-4c86-8731-0292c1e8182b", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "0fe6a5f1-a730-4fdf-ade0-d729aa3ca15a", + "type": "text-field", + "label": "Address", + "value": "Ffinnant Arms, Alltyblacca, Llanwenog", + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "1572fa6a-219a-4382-95f3-cb33592012a7", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "409032b5-187e-46dd-9725-1a86442acdfd", + "type": "entity", + "label": "Transcription", + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "selector": { + "id": "ebab08b3-3aab-46ac-a544-70b0cb3b6160", + "type": "box-selector", + "state": { + "x": 148, + "y": 2423, + "width": 3067, + "height": 209 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "3ae2b5ac-8fc9-4a34-96a7-1b83125bb5bf", + "type": "text-field", + "label": "Name", + "value": "Rachel Rees", + "required": true, + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "4ad52df6-74e4-4e93-8fee-1defab60d678", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "a085ba3e-bd50-43a4-a138-e2524847b494", + "type": "text-field", + "label": "Address", + "value": "Brynderw, Llanwenog", + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "81d394d8-2859-408b-b940-06e19cbec7fb", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "a811e6c2-1800-471b-9a4a-81605a6b144e", + "type": "entity", + "label": "Transcription", + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "selector": { + "id": "1f82c149-2be1-4452-97cf-7e4894f6c94f", + "type": "box-selector", + "state": { + "x": 135, + "y": 2552, + "width": 3226, + "height": 219 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "fbdf5794-5611-429a-b880-d0463ed52939", + "type": "text-field", + "label": "Name", + "value": "Jane Evans", + "required": true, + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "bdaa5a05-65d3-4447-b000-f0075732c250", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "361645bb-1b3a-4c48-a208-62aa1249bc91", + "type": "text-field", + "label": "Address", + "value": "Cartref, Alltyblacca, Llanwenog", + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "5f4a41bf-3a4f-4634-b87f-2201bab30aa2", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "ced81f14-7be8-4fe2-90fe-d1a3c344fa9d", + "type": "entity", + "label": "Transcription", + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "selector": { + "id": "e063d4bb-3d55-4b6f-8025-49c57d62daee", + "type": "box-selector", + "state": { + "x": 208, + "y": 2701, + "width": 3435, + "height": 202 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "f57e995d-2bb8-43f6-b97c-a0cffad563c0", + "type": "text-field", + "label": "Name", + "value": "Anne Lewis", + "required": true, + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "0dd707ff-f705-4cd5-b0fa-72c4fb15e7a1", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "fe006fcb-df61-4f67-bd96-6779f448ec3c", + "type": "text-field", + "label": "Address", + "value": "Bryn-Teify, Alltyblacca, Llanybyther", + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "6f8b1fab-bf34-434c-b891-099a6b3645e2", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "f83d0160-64a7-436c-835f-02865da40eac", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + }, + { + "id": "3ba1f058-18a2-44d3-ba43-17eee700ac0c", + "type": "entity", + "label": "Transcription", + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "selector": { + "id": "f1d6215f-a72d-41ad-ac11-13d785115caa", + "type": "box-selector", + "state": { + "x": 191, + "y": 2814, + "width": 3565, + "height": 255 + }, + "revisedBy": [] + }, + "labelledBy": "{pp2-name} @ {pp2-address}", + "properties": { + "pp2-name": [ + { + "id": "4f5acead-14d9-436c-a6c5-3fba9141e8c5", + "type": "text-field", + "label": "Name", + "value": "Lizzie M. Williams", + "required": true, + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "description": "Please transcribe the name you have selected", + "pluralField": "Names" + } + ], + "pp2-empty": [ + { + "id": "e3c92682-12c3-4da4-8c53-31d9c0431232", + "type": "checkbox-field", + "label": "Is this an empty page?", + "value": false, + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "inlineLabel": "Tick this box if the page contains no names to transcribe" + } + ], + "pp2-address": [ + { + "id": "0e33eada-915d-4ffd-aab0-e18d4c955ff4", + "type": "text-field", + "label": "Address", + "value": "Bryn-Teify, Alltyblacca, Llanwenog", + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "description": "Please transcribe the address next to the name", + "pluralField": "Addresses" + } + ], + "pp2-difficult": [ + { + "id": "f4b532c8-ef53-4dd5-bb60-6b7314293125", + "type": "checkbox-field", + "label": "Text difficult to transcribe?", + "value": false, + "revision": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "inlineLabel": "Tick if you are not confident that your transcription is accurate." + } + ] + }, + "pluralLabel": "Transcriptions", + "allowMultiple": true + } + ] + } + }, + "revisions": [ + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "d37dde47-f2ed-4f73-8d11-966a6c69deff", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "d39d3d75-31e5-4a1a-894d-688063f89b6a", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "b4f24af9-3017-43e7-8e5b-48483da6d803", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "3a0a6aa4-5bca-4423-a6f2-7a50ee43b1dd", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "73c6e344-a6c0-4e2a-8564-3f4e9bd01d6f", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "ff1b4a45-b9f3-4676-90f0-f8707bf32258", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "5a5c651f-02eb-4b57-a788-fc5872025b4b", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "8693f234-bd9f-47a1-bc39-b3b1e34bd634", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "f51b1654-bcae-49cd-9f6c-a039d8207929", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "2dfdff73-47a8-4345-822a-cf05912a2997", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "425ffaba-ba7d-4f41-a400-1081ba2b10bb", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "1b82ccc6-a647-4fe2-be46-3de150066b60", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "2f667c9e-63cc-486f-afb8-bf465c4db975", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "ac782400-171b-4af3-83fe-4055e72f3f3f", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "3b39b2e5-934f-4f39-b6c9-64bb1ae91fab", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "f83d0160-64a7-436c-835f-02865da40eac", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "5625a661-a75b-4e1f-8258-1ca7ebd09e38", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + }, + { + "fields": [ + [ + "pp2transcription", + [ + "pp2-name", + "pp2-address", + "pp2-difficult", + "pp2-empty" + ] + ] + ], + "structureId": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "id": "63642c5e-5e37-4bba-af33-7e4b9dbf653e", + "revises": "178fca6d-3624-4b8a-9af7-2c50e4034edc", + "approved": true, + "status": "accepted", + "authors": [ + "urn:madoc:user:216" + ], + "label": "Peace Petition", + "captureModelId": "8a1a1d8e-fc2c-4dc9-901f-5d311253aae4" + } + ], + "derivedFrom": "c6db004f-c0d1-444f-bd6f-8889d8daba16", + "target": [ + { + "id": "urn:madoc:collection:15687", + "type": "Collection" + }, + { + "id": "urn:madoc:manifest:15734", + "type": "Manifest" + }, + { + "id": "urn:madoc:canvas:8697", + "type": "Canvas" + } + ], + "contributors": { + "urn:madoc:user:216": { + "id": "urn:madoc:user:216", + "type": "Person", + "name": "Mari Williams " + } + } +} diff --git a/services/madoc-ts/package.json b/services/madoc-ts/package.json index c699b3cde..3241a8ea9 100644 --- a/services/madoc-ts/package.json +++ b/services/madoc-ts/package.json @@ -277,7 +277,7 @@ "eslint-plugin-import": "^2.29.1", "eslint-plugin-jest": "^27.6.3", "eslint-plugin-json-format": "^2.0.1", - "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-storybook": "^0.6.15", @@ -288,7 +288,7 @@ "jsdom": "^16.5.1", "koa-connect": "^2.1.0", "postcss": "^8.4.27", - "prettier": "^3.2.4", + "prettier": "^2.8.8", "react-is": "^16.13.1", "react-query-devtools": "^2.4.7", "react-refresh": "^0.10.0", diff --git a/services/madoc-ts/src/database/queries/get-collection-snippets.ts b/services/madoc-ts/src/database/queries/get-collection-snippets.ts index 3eb83a726..6660f8962 100644 --- a/services/madoc-ts/src/database/queries/get-collection-snippets.ts +++ b/services/madoc-ts/src/database/queries/get-collection-snippets.ts @@ -33,7 +33,7 @@ type CollectionAggregate = TaggedTemplateLiteralInvocationType<{ export function getSingleCollection({ collectionId, siteId, - page = 0, + page = 1, perPage = 24, type, excludeManifests, @@ -45,6 +45,9 @@ export function getSingleCollection({ type?: 'manifest' | 'collection'; excludeManifests?: number[]; }) { + if (page < 1) { + page = 1; + } const offset = (page - 1) * perPage; const manifestExclusion = excludeManifests diff --git a/services/madoc-ts/src/frontend/admin/pages/sites/site-permissions.tsx b/services/madoc-ts/src/frontend/admin/pages/sites/site-permissions.tsx index a2f027827..ee7241b44 100644 --- a/services/madoc-ts/src/frontend/admin/pages/sites/site-permissions.tsx +++ b/services/madoc-ts/src/frontend/admin/pages/sites/site-permissions.tsx @@ -28,7 +28,7 @@ export const SitePermissions = () => { const [selectedUser, setSelectedUser] = useState(); const [selectedRole, setSelectedRole] = useState(''); const currentUser = useUserDetails(); - const [listOfBots, isBot] = useBots(); + const [, isBot] = useBots(); const isGlobalAdmin = currentUser && currentUser.user.role === 'global_admin'; const selectedUserExistingRole = data?.users.find(u => u.id === selectedUser?.id)?.site_role; diff --git a/services/madoc-ts/src/frontend/shared/capture-models/helpers/field-post-filters.ts b/services/madoc-ts/src/frontend/shared/capture-models/helpers/field-post-filters.ts index 10b2e9a92..87e5020c2 100644 --- a/services/madoc-ts/src/frontend/shared/capture-models/helpers/field-post-filters.ts +++ b/services/madoc-ts/src/frontend/shared/capture-models/helpers/field-post-filters.ts @@ -3,7 +3,6 @@ import { BaseField } from '../types/field-types'; import { isEntityEmpty } from '../utility/is-entity-empty'; import { isEmptyFieldList } from '../utility/is-field-list-empty'; import { isEntity, isEntityList } from './is-entity'; -import { traverseDocument } from './traverse-document'; type PostFilter = (fields: BaseField[]) => BaseField[]; @@ -15,7 +14,6 @@ export function filterEmptyFields(fields: BaseField[], parent?: CaptureModel['do if (isEntityList(fields) && fields.length > 1) { // 1st is this allowMultiple? const first = fields.find(f => !f.revision) || fields[0]; - // In this case, we have a list of entites - but the templated entity might be in there. // This is a rough "isEntityEmpty" if (first && first.allowMultiple) { diff --git a/services/madoc-ts/src/frontend/shared/capture-models/helpers/filter-capture-model.ts b/services/madoc-ts/src/frontend/shared/capture-models/helpers/filter-capture-model.ts index 46468b9a3..c6e48d356 100644 --- a/services/madoc-ts/src/frontend/shared/capture-models/helpers/filter-capture-model.ts +++ b/services/madoc-ts/src/frontend/shared/capture-models/helpers/filter-capture-model.ts @@ -114,6 +114,9 @@ export function filterCaptureModel( } else { newDocument.properties[rootFieldKey] = postFilter(newDocument.properties[rootFieldKey] as any[], newDocument); } + if (newDocument.properties[rootFieldKey].length === 0) { + delete newDocument.properties[rootFieldKey]; + } } } diff --git a/services/madoc-ts/src/frontend/site/pages/loaders/root-loader.tsx b/services/madoc-ts/src/frontend/site/pages/loaders/root-loader.tsx index 7afa9b8e8..6b2cc365e 100644 --- a/services/madoc-ts/src/frontend/site/pages/loaders/root-loader.tsx +++ b/services/madoc-ts/src/frontend/site/pages/loaders/root-loader.tsx @@ -121,10 +121,6 @@ export const RootLoader: UniversalComponent = createUniversalCom creator: () => [], name: 'getUserDetails', }, - { - creator: () => [], - name: 'getAutomatedUsers', - }, ], getKey: () => { return ['root-config', []]; diff --git a/services/madoc-ts/src/routes/iiif/collections/get-collection.ts b/services/madoc-ts/src/routes/iiif/collections/get-collection.ts index 2351bf8bd..f1dd0c3a4 100644 --- a/services/madoc-ts/src/routes/iiif/collections/get-collection.ts +++ b/services/madoc-ts/src/routes/iiif/collections/get-collection.ts @@ -28,7 +28,10 @@ export const getCollection: RouteMiddleware<{ id: number }> = async context => { const { total = 0 } = (await context.connection.maybeOne(getResourceCount(collectionId, siteId))) || { total: 0 }; const adjustedTotal = excluded ? total - excluded.length : total; - const totalPages = Math.ceil(adjustedTotal / manifestsPerPage) || 1; + let totalPages = Math.ceil(adjustedTotal / manifestsPerPage) || 1; + if (totalPages < 1) { + totalPages = 1; + } const requestedPage = Number(context.query.page) || 1; const page = requestedPage < totalPages ? requestedPage : totalPages; const type = adjustedTotal === 0 ? undefined : context.query.type || undefined; diff --git a/services/madoc-ts/src/routes/projects/project-feedback.ts b/services/madoc-ts/src/routes/projects/project-feedback.ts index 1d9e1609e..064377d8c 100644 --- a/services/madoc-ts/src/routes/projects/project-feedback.ts +++ b/services/madoc-ts/src/routes/projects/project-feedback.ts @@ -27,9 +27,10 @@ export const addProjectFeedback: RouteMiddleware<{ id: string | number }, { feed } // Only user members can add feedback. - if (!isAdmin && (await context.projects.isUserProjectMember(id, project.id))) { - throw new NotFound(); - } + // @todo this check does not seem to be working + // if (!isAdmin && (await context.projects.isUserProjectMember(id, project.id))) { + // throw new NotFound(); + // } const feedback = context.requestBody.feedback; diff --git a/services/madoc-ts/yarn.lock b/services/madoc-ts/yarn.lock index a2be6810b..67aca7cd0 100644 --- a/services/madoc-ts/yarn.lock +++ b/services/madoc-ts/yarn.lock @@ -3670,11 +3670,6 @@ resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6" integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw== -"@pkgr/core@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" - integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== - "@pm2/agent@~2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@pm2/agent/-/agent-2.0.1.tgz#0edffc54cd8ee2b12f90136264e7880f3f78c79d" @@ -11020,13 +11015,12 @@ eslint-plugin-json-format@^2.0.1: minimatch "^3.0.4" sort-package-json "^1.22.1" -eslint-plugin-prettier@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" - integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" - synckit "^0.8.6" eslint-plugin-react-hooks@^4.6.0: version "4.6.0" @@ -18910,10 +18904,10 @@ prettier@^2.8.0: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== -prettier@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283" - integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ== +prettier@^2.8.8: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== pretty-error@^2.1.1: version "2.1.2" @@ -22305,14 +22299,6 @@ synchronous-promise@^2.0.15: resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.15.tgz#07ca1822b9de0001f5ff73595f3d08c4f720eb8e" integrity sha512-k8uzYIkIVwmT+TcglpdN50pS2y1BDcUnBPK9iJeGu0Pl1lOI8pD6wtzgw91Pjpe+RxtTncw32tLxs/R0yNL2Mg== -synckit@^0.8.6: - version "0.8.8" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" - integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== - dependencies: - "@pkgr/core" "^0.1.0" - tslib "^2.6.2" - synthetic-dom@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/synthetic-dom/-/synthetic-dom-1.4.0.tgz#d988d7a4652458e2fc8706a875417af913e4dd34" @@ -22908,11 +22894,6 @@ tslib@^2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - tslib@~1.13.0: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"