Add success message when modifying buckets

This commit is contained in:
kolaente 2021-01-15 23:46:43 +01:00
parent 873b36e6cd
commit 09b7a903d2
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 8 additions and 5 deletions

View file

@ -221,10 +221,6 @@ $crazy-height-calculation: '100vh - 4.5rem - 1.5rem - 1em - 1.5em - 8px';
a.dropdown-item { a.dropdown-item {
padding-right: 1rem; padding-right: 1rem;
.input {
height: 2.25em;
}
} }
} }

View file

@ -23,7 +23,7 @@
<h2 <h2
:ref="`bucket${bucket.id}title`" :ref="`bucket${bucket.id}title`"
@focusout="() => saveBucketTitle(bucket.id)" @focusout="() => saveBucketTitle(bucket.id)"
@keyup.enter="() => saveBucketTitle(bucket.id)" @keydown.enter.prevent.stop="() => saveBucketTitle(bucket.id)"
class="title input" class="title input"
contenteditable="true" contenteditable="true"
spellcheck="false">{{ bucket.title }}</h2> spellcheck="false">{{ bucket.title }}</h2>
@ -532,6 +532,9 @@ export default {
}) })
this.$store.dispatch('kanban/deleteBucket', bucket) this.$store.dispatch('kanban/deleteBucket', bucket)
.then(() => {
this.success({message: 'The bucket has been deleted successfully.'}, this)
})
.catch(e => { .catch(e => {
this.error(e, this) this.error(e, this)
}) })
@ -560,6 +563,7 @@ export default {
.then(r => { .then(r => {
realBucket.title = r.title realBucket.title = r.title
bucketTitleElement.blur() bucketTitleElement.blur()
this.success({message: 'The bucket title has been saved successfully.'}, this)
}) })
.catch(e => { .catch(e => {
this.error(e, this) this.error(e, this)
@ -568,6 +572,9 @@ export default {
updateBucket(bucket) { updateBucket(bucket) {
bucket.limit = parseInt(bucket.limit) bucket.limit = parseInt(bucket.limit)
this.$store.dispatch('kanban/updateBucket', bucket) this.$store.dispatch('kanban/updateBucket', bucket)
.then(() => {
this.success({message: 'The bucket limit been saved successfully.'}, this)
})
.catch(e => { .catch(e => {
this.error(e, this) this.error(e, this)
}) })