Batch is the new Bulk
This commit is contained in:
@@ -57,8 +57,8 @@ export default {
|
||||
//Clear any possible prior errors
|
||||
vm.$emit("ext-show-job-log", "clear");
|
||||
|
||||
//do the bulk action
|
||||
let url = "job-operations/bulk-delete";
|
||||
//do the batch action
|
||||
let url = "job-operations/batch-delete";
|
||||
let body = this.dataListSelection;
|
||||
|
||||
try {
|
||||
|
||||
@@ -73,19 +73,19 @@ export default {
|
||||
return false;
|
||||
},
|
||||
async doAction() {
|
||||
//do the bulk action
|
||||
//do the batch action
|
||||
let vm = this;
|
||||
let url = "tag-list/";
|
||||
let body = this.dataListSelection;
|
||||
switch (vm.action) {
|
||||
case "Add":
|
||||
url += `bulk-add/${vm.tag}`;
|
||||
url += `batch-add/${vm.tag}`;
|
||||
break;
|
||||
case "Remove":
|
||||
url += `bulk-remove/${vm.tag}`;
|
||||
url += `batch-remove/${vm.tag}`;
|
||||
break;
|
||||
case "Replace":
|
||||
url += `bulk-replace/${vm.tag}?toTag=${vm.replace}`;
|
||||
url += `batch-replace/${vm.tag}?toTag=${vm.replace}`;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,8 +90,6 @@ export default {
|
||||
}
|
||||
|
||||
let res = await window.$gz.api.get(`job-operations/logs/${jobId}`);
|
||||
//{"data":[{"created":"2020-12-09T19:20:41.915635Z","statusText":"Processing job \"Bulk operation: DELETE on HeadOffice (2 specified) - BulkCoreBizObjectOperation:Delete\"","jobId":"9817e970-c746-443c-8f11-fc0588f2acff"},{"created":"2020-12-09T19:20:41.922711Z","statusText":"Bulk job Delete started...","jobId":"9817e970-c746-443c-8f11-fc0588f2acff"},{"created":"2020-12-09T19:20:41.938821Z","statusText":"Error processing item 11: Validation errors:\r\nTarget: errorbox error: LT:Customer\r\n","jobId":"9817e970-c746-443c-8f11-fc0588f2acff"},{"created":"2020-12-09T19:20:41.951148Z","statusText":"Error processing item 2: Validation errors:\r\nTarget: errorbox error: LT:Customer\r\n","jobId":"9817e970-c746-443c-8f11-fc0588f2acff"},{"created":"2020-12-09T19:20:41.954891Z","statusText":"Bulk job Delete processed 2 of 2 with 2 failures","jobId":"9817e970-c746-443c-8f11-fc0588f2acff"}]}
|
||||
//NOPE-----------
|
||||
if (res.data) {
|
||||
let ret = [];
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
|
||||
@@ -471,11 +471,11 @@ export default {
|
||||
getDataListSelection(ayaType) {
|
||||
let vm = this;
|
||||
//called when parent form needs the selected id's or the list view options needed to rehydrate the entire list of id's in the same order and filter
|
||||
//i.e. for reporting, bulk operations etc
|
||||
//i.e. for reporting, batch operations etc
|
||||
|
||||
let selectedRowIds = [];
|
||||
//get selected row id's if there are selections else get all row id's
|
||||
//called into from parent for things like reporting or bulk ops
|
||||
//called into from parent for things like reporting or batch ops
|
||||
//selected or records both are arrays with an id property that contains the row id conveniently for this method
|
||||
if (vm.selected.length > 0) {
|
||||
//return row id's of selected items only
|
||||
|
||||
Reference in New Issue
Block a user