New: adjusted functionality for the resource view
Compare changes
+ 69
− 55
@@ -3,49 +3,52 @@
@@ -3,49 +3,52 @@
v-bind:class="{ mandatory: checkField(formFieldInformation,'http://www.w3.org/ns/shacl#minCount') && formFieldInformation['http://www.w3.org/ns/shacl#minCount'][0]['value'] >= 1 }"
v-if="checkField(formFieldInformation,'http://www.w3.org/ns/shacl#maxCount') && formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0]['value'] === 1"
:required="checkField(formFieldInformation,'http://www.w3.org/ns/shacl#minCount') && formFieldInformation['http://www.w3.org/ns/shacl#minCount'][0]['value'] >= 1"
:max="this.formFieldInformation['http://www.w3.org/ns/shacl#maxCount'] !== undefined && this.formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0] !== undefined && formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0]['value'] !== undefined ? parseInt(formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0]['value']) : maxNumberOfSelectedObjects"
:required="checkField(formFieldInformation,'http://www.w3.org/ns/shacl#minCount') && formFieldInformation['http://www.w3.org/ns/shacl#minCount'][0]['value'] >= 1"
:max="this.formFieldInformation['http://www.w3.org/ns/shacl#maxCount'] !== undefined && this.formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0] !== undefined && formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0]['value'] !== undefined ? parseInt(formFieldInformation['http://www.w3.org/ns/shacl#maxCount'][0]['value']) : maxNumberOfSelectedObjects"
<b-button :disabled="disabledMode || !checkField(formData,nodeName) || (checkField(formData,nodeName) && formData[nodeName][0]['value'] ==='')" class="lockButton" variant="outline-secondary" @click.prevent="changeLockable()">
@@ -65,9 +68,22 @@ import { MetadataApi, defaultOnCatch } from '@coscine/api-connection';
@@ -65,9 +68,22 @@ import { MetadataApi, defaultOnCatch } from '@coscine/api-connection';
@@ -93,6 +109,10 @@ export default Vue.extend({
@@ -93,6 +109,10 @@ export default Vue.extend({
this.$set(this.formData,this.nodeName, [{'value': this.formFieldInformation['http://www.w3.org/ns/shacl#defaultValue'][0].value}]);
if (this.checkField(this.fixedValues[this.formFieldInformation['idForFixedValues']],'https://purl.org/coscine/defaultValue')) {
this.$set(this.formData,this.nodeName, [{'value': this.fixedValues[this.formFieldInformation['idForFixedValues']]['https://purl.org/coscine/defaultValue'][0].value}]);
@@ -109,7 +129,9 @@ export default Vue.extend({
@@ -109,7 +129,9 @@ export default Vue.extend({
@@ -129,7 +151,9 @@ export default Vue.extend({
@@ -129,7 +151,9 @@ export default Vue.extend({
@@ -190,7 +214,7 @@ export default Vue.extend({
@@ -190,7 +214,7 @@ export default Vue.extend({
if(this.fixedValues[this.formFieldInformation['idForFixedValues']] === undefined || this.fixedValues[this.formFieldInformation['idForFixedValues']]['https://purl.org/coscine/fixedValue'] === undefined){
this.$set(this.fixedValues,this.formFieldInformation['idForFixedValues'], {'https://purl.org/coscine/fixedValue': [{'value':this.formData[this.nodeName][0]['value'],'type': 'uri'}]});
@@ -204,7 +228,7 @@ export default Vue.extend({
@@ -204,7 +228,7 @@ export default Vue.extend({
@@ -220,7 +244,7 @@ export default Vue.extend({
@@ -220,7 +244,7 @@ export default Vue.extend({
@@ -261,14 +285,4 @@ export default Vue.extend({
@@ -261,14 +285,4 @@ export default Vue.extend({