Fix users not removed from the list in settings when unshared
This commit is contained in:
parent
9d818921a7
commit
188134ae2e
1 changed files with 4 additions and 15 deletions
|
@ -258,31 +258,20 @@ export default {
|
||||||
} else if (this.shareType === 'team') {
|
} else if (this.shareType === 'team') {
|
||||||
this.stuffModel.teamId = this.sharable.id
|
this.stuffModel.teamId = this.sharable.id
|
||||||
}
|
}
|
||||||
|
|
||||||
this.stuffService
|
this.stuffService
|
||||||
.delete(this.stuffModel)
|
.delete(this.stuffModel)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.showDeleteModal = false
|
this.showDeleteModal = false
|
||||||
for (const i in this.sharables) {
|
for (const i in this.sharables) {
|
||||||
if (
|
if (
|
||||||
(this.sharables[i].id === this.stuffModel.userId &&
|
(this.sharables[i].username === this.stuffModel.userId && this.shareType === 'user') ||
|
||||||
this.shareType === 'user') ||
|
(this.sharables[i].id === this.stuffModel.teamId && this.shareType === 'team')
|
||||||
(this.sharables[i].id === this.stuffModel.teamId &&
|
|
||||||
this.shareType === 'team')
|
|
||||||
) {
|
) {
|
||||||
this.sharables.splice(i, 1)
|
this.sharables.splice(i, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.success(
|
this.success({message: `The ${this.shareType} was successfully deleted from the ${this.typeString}.`}, this)
|
||||||
{
|
|
||||||
message:
|
|
||||||
'The ' +
|
|
||||||
this.shareType +
|
|
||||||
' was successfully deleted from the ' +
|
|
||||||
this.typeString +
|
|
||||||
'.',
|
|
||||||
},
|
|
||||||
this
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
|
|
Loading…
Add table
Reference in a new issue