Merged in bugfix/PMCORE-3365 (pull request #8164)
PMCORE-3365 Approved-by: Rodrigo Quelca
This commit is contained in:
committed by
Julio Cesar Laura Avendaño
commit
8c939a6f87
@@ -124,22 +124,23 @@ export default {
|
|||||||
getCasesForPreview(data) {
|
getCasesForPreview(data) {
|
||||||
let that = this,
|
let that = this,
|
||||||
dt,
|
dt,
|
||||||
paged,
|
|
||||||
limit = data.limit,
|
limit = data.limit,
|
||||||
start = data.page === 1 ? 0 : limit * (data.page - 1),
|
start = data.page === 1 ? 0 : limit * (data.page - 1),
|
||||||
filters = {};
|
params = {};
|
||||||
paged = start + "," + limit;
|
params = {
|
||||||
filters = {
|
filters: {
|
||||||
paged: paged,
|
limit: limit,
|
||||||
|
offset: start,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
if (this.customCaseId !== '') {
|
if (this.customCaseId !== '') {
|
||||||
filters['id'] = this.customCaseId;
|
params['id'] = this.customCaseId;
|
||||||
}
|
}
|
||||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||||
switch (that.type) {
|
switch (that.type) {
|
||||||
case 'inbox':
|
case 'inbox':
|
||||||
api.cases
|
api.custom
|
||||||
.inbox(filters)
|
.inbox(params)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dt = that.formatDataResponse(response.data.data);
|
dt = that.formatDataResponse(response.data.data);
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
@@ -152,8 +153,8 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'draft':
|
case 'draft':
|
||||||
api.cases
|
api.custom
|
||||||
.draft(filters)
|
.draft(params)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dt = that.formatDataResponse(response.data.data);
|
dt = that.formatDataResponse(response.data.data);
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
@@ -166,8 +167,8 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'paused':
|
case 'paused':
|
||||||
api.cases
|
api.custom
|
||||||
.paused(filters)
|
.paused(params)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dt = that.formatDataResponse(response.data.data);
|
dt = that.formatDataResponse(response.data.data);
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
@@ -180,8 +181,8 @@ export default {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'unassigned':
|
case 'unassigned':
|
||||||
api.cases
|
api.custom
|
||||||
.unassigned(filters)
|
.unassigned(params)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dt = that.formatDataResponse(response.data.data);
|
dt = that.formatDataResponse(response.data.data);
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
|
|||||||
Reference in New Issue
Block a user