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.",
|
||||
"unarchiveText": "You will be able to create new lists or edit it.",
|
||||
"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."
|
||||
},
|
||||
"delete": {
|
||||
|
|
|
@ -37,12 +37,13 @@ export default {
|
|||
methods: {
|
||||
async archiveNamespace() {
|
||||
try {
|
||||
const isArchived = !this.namespace.isArchived
|
||||
const namespace = await this.namespaceService.update({
|
||||
...this.namespace,
|
||||
isArchived: !this.namespace.isArchived,
|
||||
isArchived,
|
||||
})
|
||||
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 {
|
||||
this.$router.back()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue