Fix removing a kanban bucket

This commit is contained in:
kolaente 2020-12-28 23:42:09 +01:00
parent 2c273a7fd9
commit ddd24825a3
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
3 changed files with 7 additions and 4 deletions

View file

@ -309,7 +309,7 @@ describe('Lists', () => {
.should('contain', 'New Bucket Title') .should('contain', 'New Bucket Title')
}) })
it('Can delete a bucket', () => { it.only('Can delete a bucket', () => {
cy.visit('/lists/1/kanban') cy.visit('/lists/1/kanban')
cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-trigger') cy.get('.kanban .bucket .bucket-header .dropdown.options .dropdown-trigger')
@ -327,6 +327,9 @@ describe('Lists', () => {
cy.get('.kanban .bucket .title') cy.get('.kanban .bucket .title')
.contains(buckets[0].title) .contains(buckets[0].title)
.should('not.exist') .should('not.exist')
cy.get('.kanban .bucket .title')
.contains(buckets[1].title)
.should('exist')
}) })

View file

@ -157,7 +157,7 @@ export default {
.then(r => { .then(r => {
ctx.commit('removeBucket', bucket) ctx.commit('removeBucket', bucket)
// We reload all buckets because tasks are being moved from the deleted bucket // We reload all buckets because tasks are being moved from the deleted bucket
ctx.dispatch('loadBucketsForList', bucket.listId) ctx.dispatch('loadBucketsForList', {listId: bucket.listId})
return Promise.resolve(r) return Promise.resolve(r)
}) })
.catch(e => { .catch(e => {

View file

@ -31,8 +31,8 @@
:class="{'is-max': bucket.tasks.length >= bucket.limit}" :class="{'is-max': bucket.tasks.length >= bucket.limit}"
class="limit" class="limit"
v-if="bucket.limit > 0"> v-if="bucket.limit > 0">
{{ bucket.tasks.length }}/{{ bucket.limit }} {{ bucket.tasks.length }}/{{ bucket.limit }}
</span> </span>
<div <div
:class="{ 'is-active': bucketOptionsDropDownActive[bucket.id] }" :class="{ 'is-active': bucketOptionsDropDownActive[bucket.id] }"
class="dropdown is-right options" class="dropdown is-right options"