Bind value on Collection Metadatum select at Importer Page.

This commit is contained in:
mateuswetah 2018-06-22 16:03:37 -03:00
parent 96d0058469
commit 72fba0ea5b
3 changed files with 7670 additions and 2538 deletions

10196
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"html-to-json": "^0.6.0",
"mdi": "^2.2.43",
"moment": "^2.22.1",
"npm": "^6.1.0",
"qs": "^6.5.2",
"v-mask": "^1.3.2",
"v-tooltip": "^2.0.0-rc.32",

View File

@ -107,6 +107,7 @@
v-if="collectionMetadata != undefined &&
collectionMetadata.length > 0 &&
!isFetchingCollectionMetadata"
:value="checkCurrentSelectedCollectionMetadatum(source_metadatum)"
@input="onSelectCollectionMetadata($event, source_metadatum)"
:placeholder="$i18n.get('label_select_metadatum')">
<option :value="undefined">
@ -340,6 +341,13 @@ export default {
checkIfMetadatumIsAvailable(metadatumId) {
return this.mappedCollection['mapping'][metadatumId] != undefined;
},
checkCurrentSelectedCollectionMetadatum(sourceMetadatum) {
for (let key in this.mappedCollection['mapping']) {
if(this.mappedCollection['mapping'][key] == sourceMetadatum)
return key;
}
return undefined;
},
onInputURL(event) {
this.url = event;
@ -433,7 +441,6 @@ export default {
if (removedKey != '')
delete this.mappedCollection['mapping'][removedKey];
}
// Necessary for causing reactivity to re-check if metadata remains available