Checks if sourceMetadatum is an object to allow mapping to a compound metadata in importer.

This commit is contained in:
mateuswetah 2024-05-10 09:17:39 -03:00
parent 22d2cd57b3
commit ea7484425c
1 changed files with 2 additions and 2 deletions

View File

@ -108,7 +108,7 @@
v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata"
:key="metadatumIndex"
:value="collectionMetadatum.id"
:disabled="checkIfMetadatumIsAvailable(collectionMetadatum.id)">
:disabled="checkIfMetadatumIsAvailable(collectionMetadatum.id) || ( checkIfMetadatumIsCompound(collectionMetadatum) && sourceMetadatum.indexOf('compound|(') < 0 )">
<span class="metadatum-name">
{{ collectionMetadatum.name }}
</span>
@ -139,7 +139,7 @@
v-for="(collectionMetadatum, metadatumIndex) of collectionNonChildMetadata"
:key="metadatumIndex"
:value="collectionMetadatum.id"
:disabled="!checkIfMetadatumIsCompound(collectionMetadatum) || checkIfMetadatumIsAvailable(collectionMetadatum.id)">
:disabled="!checkIfMetadatumIsCompound(collectionMetadatum) || checkIfMetadatumIsAvailable(collectionMetadatum.id) || typeof sourceMetadatum != 'object' || !Object.entries(sourceMetadatum)[0]">
<span class="metadatum-name">
{{ collectionMetadatum.name }}
</span>