Merged in bugfix/PMCORE-3795 (pull request #8426)
PMCORE-3795 Approved-by: Rodrigo Quelca Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
6c1501fc2b
@@ -71,7 +71,7 @@ export default {
|
||||
"task"
|
||||
],
|
||||
requestFunction(data) {
|
||||
return that.getCases(data);
|
||||
return that.getCasesViewMore(data);
|
||||
},
|
||||
requestFunctionViewMore(data) {
|
||||
return that.getCasesViewMore(data);
|
||||
@@ -83,31 +83,6 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
getCases(data) {
|
||||
let that = this,
|
||||
dt,
|
||||
filters = {};
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
filters[item.filterVar] = item.value;
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.draft(filters)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
resolutionFunc({
|
||||
data: dt,
|
||||
count: response.data.total,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
rejectionFunc(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
"send_by",
|
||||
],
|
||||
requestFunction(data) {
|
||||
return that.getCases(data);
|
||||
return that.getCasesViewMore(data);
|
||||
},
|
||||
requestFunctionViewMore(data) {
|
||||
return that.getCasesViewMore(data);
|
||||
@@ -86,31 +86,6 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
getCases(data) {
|
||||
let that = this,
|
||||
dt,
|
||||
filters = {};
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
filters[item.filterVar] = item.value;
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.todo(filters)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
resolutionFunc({
|
||||
data: dt,
|
||||
count: response.data.total,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
rejectionFunc(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
"send_by",
|
||||
],
|
||||
requestFunction(data) {
|
||||
return that.getCases(data);
|
||||
return that.getCasesViewMore(data);
|
||||
},
|
||||
requestFunctionViewMore(data) {
|
||||
return that.getCasesViewMore(data);
|
||||
@@ -85,31 +85,6 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
getCases(data) {
|
||||
let that = this,
|
||||
dt,
|
||||
filters = {};
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
filters[item.filterVar] = item.value;
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.paused(filters)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
resolutionFunc({
|
||||
data: dt,
|
||||
count: response.data.total,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
rejectionFunc(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
"send_by",
|
||||
],
|
||||
requestFunction(data) {
|
||||
return that.getCases(data);
|
||||
return that.getCasesViewMore(data);
|
||||
},
|
||||
requestFunctionViewMore(data) {
|
||||
return that.getCasesViewMore(data);
|
||||
@@ -85,31 +85,6 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
getCases(data) {
|
||||
let that = this,
|
||||
dt,
|
||||
filters = {};
|
||||
_.forIn(this.filters, function (item, key) {
|
||||
filters[item.filterVar] = item.value;
|
||||
});
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
api.cases
|
||||
.unassigned(filters)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
resolutionFunc({
|
||||
data: dt,
|
||||
count: response.data.total,
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
rejectionFunc(e);
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get cases for Vue Card View
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user