Removes unecessary functions from importer mapping form.
This commit is contained in:
parent
cf8a7145c0
commit
5d05d49e8e
|
@ -138,8 +138,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex';
|
||||
import MetadatumEditionForm from './../edition/metadatum-edition-form.vue';
|
||||
import { mapActions } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'ImporterEditionForm',
|
||||
|
@ -165,23 +164,9 @@ export default {
|
|||
collectionMetadata: [],
|
||||
collectionId: undefined,
|
||||
url: '',
|
||||
isNewMetadatumModalActive: false,
|
||||
isLoadingMetadatumTypes: false,
|
||||
selectedMetadatumType: undefined,
|
||||
isEditingMetadatum: false,
|
||||
metadatum: {},
|
||||
editedMetadatum: {},
|
||||
backgroundProcess: undefined
|
||||
}
|
||||
},
|
||||
components: {
|
||||
MetadatumEditionForm
|
||||
},
|
||||
computed: {
|
||||
metadatumTypes() {
|
||||
return this.getMetadatumTypes();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions('importer', [
|
||||
'fetchImporterTypes',
|
||||
|
@ -198,14 +183,6 @@ export default {
|
|||
...mapActions('collection', [
|
||||
'fetchCollectionsForParent'
|
||||
]),
|
||||
...mapActions('metadata', [
|
||||
'fetchMetadata',
|
||||
'fetchMetadatumTypes',
|
||||
'sendMetadatum'
|
||||
]),
|
||||
...mapGetters('metadata', [
|
||||
'getMetadatumTypes'
|
||||
]),
|
||||
createImporter() {
|
||||
// Puts loading on Draft Importer creation
|
||||
this.isLoading = true;
|
||||
|
@ -225,7 +202,7 @@ export default {
|
|||
|
||||
})
|
||||
.catch(error => this.$console.error(error));
|
||||
},
|
||||
},
|
||||
loadImporter() {
|
||||
// Puts loading on Draft Importer creation
|
||||
this.isLoading = true;
|
||||
|
@ -305,7 +282,7 @@ export default {
|
|||
return new Promise((resolve, reject) => {
|
||||
if (this.importer.accepts.file && !this.importer.accepts.url)
|
||||
this.onUploadFile().then(() => { resolve() }).catch((errors) => this.$console.log(errors));
|
||||
else if (!this.importer.accepts.file && !this.mporter.accepts.url)
|
||||
else if (!this.importer.accepts.file && !this.importer.accepts.url)
|
||||
this.onInputURL().then(() => { resolve() }).catch((errors) => this.$console.log(errors));
|
||||
else if (this.importer.accepts.file && this.importer.accepts.url) {
|
||||
if (this.importerFile)
|
||||
|
|
|
@ -171,30 +171,22 @@ export default {
|
|||
importerId: Number,
|
||||
importer: null,
|
||||
isLoading: false,
|
||||
isFetchingCollections: false,
|
||||
form: {
|
||||
|
||||
},
|
||||
mappedCollection: {
|
||||
'id': Number,
|
||||
'mapping': {},
|
||||
'total_items': Number
|
||||
},
|
||||
importerTypes: [],
|
||||
importerType: '',
|
||||
importerFile: {},
|
||||
importerSourceInfo: null,
|
||||
collections: [],
|
||||
collectionMetadata: [],
|
||||
collectionId: undefined,
|
||||
url: '',
|
||||
isNewMetadatumModalActive: false,
|
||||
isLoadingMetadatumTypes: false,
|
||||
selectedMetadatumType: undefined,
|
||||
isEditingMetadatum: false,
|
||||
metadatum: {},
|
||||
editedMetadatum: {},
|
||||
hasRunImporter: false,
|
||||
backgroundProcess: undefined
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue