Updates to editing request.

This commit is contained in:
thehollidayinn
2019-10-21 22:50:09 -06:00
parent 85d6c3ac34
commit 16bcb65d94
6 changed files with 39 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ export default {
},
watch: {
show() {
if (!this.editingCollection.collectionIndex);
if (!this.editingCollection.collectionIndex) return;
this.newCollection = Object.assign({}, this.editingCollection);
},
},

View File

@@ -50,7 +50,7 @@ export default {
},
watch: {
show() {
if (!this.editingFolder.folderIndex);
if (!this.editingFolder.folderIndex) return;
this.newFolder = Object.assign({}, this.editingFolder);
},
},

View File

@@ -69,6 +69,7 @@
padding: 0;
width: 20px;
margin: 0;
margin-right: .2rem;
height: 20px;
border-radius: 50%;
}

View File

@@ -42,6 +42,7 @@
padding: 0;
width: 20px;
margin: 0;
margin-right: .2rem;
height: 20px;
border-radius: 50%;
}

View File

@@ -71,6 +71,26 @@ export default {
show() {
this.request = Object.assign(this.request, this.editingRequest);
},
'request.collection': function (newValue, oldValue) {
if (!oldValue) return;
if (newValue === oldValue) {
delete this.request.oldCollection;
return;
}
this.request.oldFolder = this.request.folder;
this.request.folder = -1;
this.request.oldCollection = oldValue;
},
'request.folder': function (newValue, oldValue) {
if (!oldValue) return;
if (newValue === oldValue) {
delete this.request.oldFolder;
return;
}
this.request.oldFolder = oldValue;
}
},
computed: {
collections() {