diff --git a/src/components/ADempiere/Tab/index.vue b/src/components/ADempiere/Tab/index.vue index 57e1c164..804fb815 100644 --- a/src/components/ADempiere/Tab/index.vue +++ b/src/components/ADempiere/Tab/index.vue @@ -29,12 +29,14 @@ :style="tabParentStyle" > - + - {{ tabAttributes.name }} + + {{ tabAttributes.name }} + {{ tabAttributes.name }} @@ -126,26 +128,26 @@ export default { }, methods: { lockRecord() { - this.lock = !this.lock const tableName = this.windowMetadata.firstTab.tableName const action = this.lock ? 'lockRecord' : 'unlockRecord' - const message = !this.lock ? 'lockRecord' : 'unlockRecord' this.$store.dispatch(action, { tableName, recordId: this.record[tableName + '_ID'], recordUuid: this.record.UUID }) .then(() => { + this.lock = !this.lock this.$message({ type: 'success', - message: this.$t('data.' + message), + message: this.$t('data.notification.' + action), showClose: true }) }) .catch(() => { + this.lock = !this.lock this.$message({ type: 'error', - message: this.$t('data.isError') + this.$t('data.' + message), + message: this.$t('data.isError') + this.$t('data.' + action), showClose: true }) }) diff --git a/src/lang/ADempiere/en.js b/src/lang/ADempiere/en.js index a560942d..b87b0fcb 100644 --- a/src/lang/ADempiere/en.js +++ b/src/lang/ADempiere/en.js @@ -366,7 +366,11 @@ export default { }, selectionRequired: 'You must select a record', undo: 'Undo', - unlockRecord: 'Unlock Record' + unlockRecord: 'Unlock Record', + notification: { + lockRecord: 'The Registry was Locked', + unlockRecord: 'Registry was Unlocked' + } }, sequence: { available: 'Available', diff --git a/src/lang/ADempiere/es.js b/src/lang/ADempiere/es.js index 20fd6415..1df5113f 100644 --- a/src/lang/ADempiere/es.js +++ b/src/lang/ADempiere/es.js @@ -342,7 +342,12 @@ export default { }, selectionRequired: 'Debe seleccionar un registro', undo: 'Deshacer', - unlockRecord: 'Registro Desbloqueado' + unlockRecord: 'Desbloquear Registro', + notification: { + lockRecord: 'El Registro fue Bloqueado', + unlockRecord: 'El Registro fue Desbloqueado' + } + }, sequence: { available: 'Disponibles',