fix: namespace archive success message
This commit is contained in:
parent
78ad9becf3
commit
8b90b8f6a8
2 changed files with 4 additions and 2 deletions
|
@ -335,6 +335,7 @@
|
||||||
"archiveText": "You won't be able to edit this namespace or create new lists until you un-archive it. This will also archive all lists in this namespace.",
|
"archiveText": "You won't be able to edit this namespace or create new lists until you un-archive it. This will also archive all lists in this namespace.",
|
||||||
"unarchiveText": "You will be able to create new lists or edit it.",
|
"unarchiveText": "You will be able to create new lists or edit it.",
|
||||||
"success": "The namespace was successfully archived.",
|
"success": "The namespace was successfully archived.",
|
||||||
|
"unarchiveSuccess": "The namespace was successfully un-archived.",
|
||||||
"description": "If a namespace is archived, you cannot create new lists or edit it."
|
"description": "If a namespace is archived, you cannot create new lists or edit it."
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
|
|
|
@ -37,12 +37,13 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
async archiveNamespace() {
|
async archiveNamespace() {
|
||||||
try {
|
try {
|
||||||
|
const isArchived = !this.namespace.isArchived
|
||||||
const namespace = await this.namespaceService.update({
|
const namespace = await this.namespaceService.update({
|
||||||
...this.namespace,
|
...this.namespace,
|
||||||
isArchived: !this.namespace.isArchived,
|
isArchived,
|
||||||
})
|
})
|
||||||
this.$store.commit('namespaces/setNamespaceById', namespace)
|
this.$store.commit('namespaces/setNamespaceById', namespace)
|
||||||
this.$message.success({message: this.$t('namespace.archive.success')})
|
this.$message.success({message: this.$t(isArchived ? 'namespace.archive.success' : 'namespace.archive.unarchiveSuccess')})
|
||||||
} finally {
|
} finally {
|
||||||
this.$router.back()
|
this.$router.back()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue