From 89219852b9533e390f98b8ea4d83fa74baf8ae03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Rosenstr=C3=B6m?= Date: Wed, 19 Jun 2024 16:18:25 +0200 Subject: [PATCH] Show ID as a property --- vue-client/src/components/mixins/form-mixin.vue | 6 +++++- vue-client/src/settings.js | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vue-client/src/components/mixins/form-mixin.vue b/vue-client/src/components/mixins/form-mixin.vue index a3edc6819..9b72a65a1 100644 --- a/vue-client/src/components/mixins/form-mixin.vue +++ b/vue-client/src/components/mixins/form-mixin.vue @@ -99,7 +99,11 @@ export default { if (this.showTypeChanger === false) { delete fItem['@type']; } - delete fItem['@id']; + + const keepId = this.settings.showIdsForProps.includes(this.fieldKey); + if (!keepId) { + delete fItem['@id']; + } delete fItem['@reverse']; delete fItem._uid; diff --git a/vue-client/src/settings.js b/vue-client/src/settings.js index 96f83f792..d6c3d89bb 100644 --- a/vue-client/src/settings.js +++ b/vue-client/src/settings.js @@ -38,6 +38,9 @@ export default { 'CacheRecord', 'ComplexSubject.termComponentList', ], + showIdsForProps: [ + 'hasComponent', + ], keysToClear: { duplication: [ 'record.bibliography', @@ -75,12 +78,12 @@ export default { 'unstable', ], hiddenProperties: [ - '@id', 'created', 'modified', 'mainEntity', ], lockedProperties: [ + '@id', 'sameAs', 'controlNumber', 'systemNumber',