FE tweaks and fixes
This commit is contained in:
@@ -290,7 +290,7 @@ export default {
|
||||
return this.$SystemAPI.dalSchemaAlterationList({ batchID }).then(({ set }) => {
|
||||
this.alterations = set
|
||||
|
||||
if (!this.alteration.length) {
|
||||
if (!this.alterations.length) {
|
||||
this.$emit('hide')
|
||||
}
|
||||
}).catch(this.toastErrorHandler(this.$t('notification:module.schemaAlterations.load.error')))
|
||||
@@ -332,11 +332,11 @@ export default {
|
||||
},
|
||||
|
||||
stringifyAttributeReTypeParams ({ attr = {}, to = {} }) {
|
||||
return this.$t('module.schemaAlteration.params.attribute.delete', { ident: attr.ident, toType: to.type })
|
||||
return this.$t('module.schemaAlteration.params.attribute.reType', { ident: attr.ident, toType: to.type })
|
||||
},
|
||||
|
||||
stringifyAttributeReEncodeParams ({ attr = {}, to = {} }) {
|
||||
return this.$t('module.schemaAlteration.params.attribute.delete', { ident: attr.ident, toType: to.type })
|
||||
return this.$t('module.schemaAlteration.params.attribute.reEncode', { ident: attr.ident, toType: to.type })
|
||||
},
|
||||
|
||||
stringifyModelAddParams ({ attr = {} }) {
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
:modal="dalSchemaAlterations.modal"
|
||||
:batch="dalSchemaAlterations.batchID"
|
||||
:module="module"
|
||||
@hide="fetchModule"
|
||||
@hide="fetchModuleWithAlterations"
|
||||
@cancel="dalSchemaAlterations.modal = ($event || false)"
|
||||
/>
|
||||
|
||||
@@ -671,7 +671,7 @@ export default {
|
||||
moduleID: {
|
||||
immediate: true,
|
||||
async handler (moduleID) {
|
||||
this.fetchModule(moduleID)
|
||||
await this.fetchModule(moduleID)
|
||||
this.fetchSensitivityLevels()
|
||||
this.checkAlterations()
|
||||
},
|
||||
@@ -825,6 +825,11 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
async fetchModuleWithAlterations () {
|
||||
await this.fetchModule(this.moduleID)
|
||||
this.checkAlterations()
|
||||
},
|
||||
|
||||
async fetchModule (moduleID = this.moduleID) {
|
||||
this.module = undefined
|
||||
this.initialModuleState = undefined
|
||||
@@ -853,7 +858,6 @@ export default {
|
||||
this.initialModuleState = module.clone()
|
||||
|
||||
const { moduleID, namespaceID, issues = [] } = this.module
|
||||
|
||||
if (issues.length > 0) {
|
||||
// do not proceed with record search as it's
|
||||
// likely to fail due to issues on a module
|
||||
@@ -873,14 +877,23 @@ export default {
|
||||
},
|
||||
|
||||
checkAlterations () {
|
||||
if (!this.module) {
|
||||
return
|
||||
}
|
||||
|
||||
// Check if module has Alterations to resolve
|
||||
let modal = false
|
||||
let batchID
|
||||
for (const i of this.module.issues) {
|
||||
if (i.meta.batchID) {
|
||||
this.dalSchemaAlterations.modal = true
|
||||
this.dalSchemaAlterations.batchID = i.meta.batchID
|
||||
modal = true
|
||||
batchID = i.meta.batchID
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
this.dalSchemaAlterations.modal = modal
|
||||
this.dalSchemaAlterations.batchID = batchID
|
||||
},
|
||||
|
||||
handleDelete () {
|
||||
|
||||
Reference in New Issue
Block a user