This commit is contained in:
@@ -91,10 +91,7 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
created() {
|
created() {
|
||||||
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
|
this.setDefaultView();
|
||||||
this.selectedRow = [{ index: 0 }];
|
|
||||||
this.activeItemIndex = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -156,7 +153,9 @@ export default {
|
|||||||
this.activeItemIndex,
|
this.activeItemIndex,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
this.setDefaultView();
|
||||||
|
},
|
||||||
|
setDefaultView: function() {
|
||||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||||
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
|
if (this.value.items[this.activeWoItemIndex].scheduledUsers.length == 1) {
|
||||||
this.selectedRow = [{ index: 0 }];
|
this.selectedRow = [{ index: 0 }];
|
||||||
|
|||||||
@@ -102,10 +102,7 @@ export default {
|
|||||||
GzWoItemScheduledUsers
|
GzWoItemScheduledUsers
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.value.items.length == 1) {
|
this.setDefaultView();
|
||||||
this.selectedRow = [{ index: 0 }];
|
|
||||||
this.activeItemIndex = 0;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -169,6 +166,9 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.value.items.splice(this.activeItemIndex, 1);
|
this.value.items.splice(this.activeItemIndex, 1);
|
||||||
|
this.setDefaultView();
|
||||||
|
},
|
||||||
|
setDefaultView: function() {
|
||||||
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
//if only one record left then display it otherwise just let the datatable show what the user can click on
|
||||||
if (this.value.items.length == 1) {
|
if (this.value.items.length == 1) {
|
||||||
this.selectedRow = [{ index: 0 }];
|
this.selectedRow = [{ index: 0 }];
|
||||||
|
|||||||
Reference in New Issue
Block a user