Merged in feature/PMCORE-4006 (pull request #8641)
PMCORE-4006 Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -239,6 +239,21 @@ export let cases = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* get the list of users to re-assign
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getUsersToReassign(data) {
|
||||||
|
return Api.get({
|
||||||
|
service: "GET_USERS_TO_REASSIGN",
|
||||||
|
data: {},
|
||||||
|
keys: {
|
||||||
|
task_uid: data.TAS_UID,
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
reassingCase(data) {
|
reassingCase(data) {
|
||||||
return Api.update({
|
return Api.update({
|
||||||
service: "REASSIGN_CASE",
|
service: "REASSIGN_CASE",
|
||||||
@@ -254,6 +269,25 @@ export let cases = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Reassign a case to a new user
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
reassingCaseSupervisor(data) {
|
||||||
|
return Api.update({
|
||||||
|
service: "REASSIGN_CASE",
|
||||||
|
data: {
|
||||||
|
usr_uid_target: data.userSelected,
|
||||||
|
del_index: data.DEL_INDEX,
|
||||||
|
reason: data.reasonReassign,
|
||||||
|
sendMail: data.notifyUser,
|
||||||
|
usr_uid_source: data.USR_UID
|
||||||
|
},
|
||||||
|
keys: {
|
||||||
|
app_uid: data.APP_UID
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Claim case with endpoint
|
* Claim case with endpoint
|
||||||
* @param {*} data
|
* @param {*} data
|
||||||
@@ -270,6 +304,38 @@ export let cases = {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Assign case with endpoint
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
assignCase(data) {
|
||||||
|
return Api.update({
|
||||||
|
service: "ASSIGN_CASE",
|
||||||
|
data: {
|
||||||
|
reason: data.reasonReassign,
|
||||||
|
sendMail: data.notifyUser,
|
||||||
|
index: data.DEL_INDEX
|
||||||
|
},
|
||||||
|
keys: {
|
||||||
|
app_uid: data.APP_UID,
|
||||||
|
usr_uid: data.userSelected
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Verify if the user is Supervisor
|
||||||
|
* @param {*} data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
getIsSupervisor(data) {
|
||||||
|
return Api.get({
|
||||||
|
service: "IS_SUPERVISOR",
|
||||||
|
keys: {
|
||||||
|
app_num: data
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Service to jump a case by it's number
|
* Service to jump a case by it's number
|
||||||
* @param {object} dt
|
* @param {object} dt
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
|
ASSIGN_CASE: "/cases/{app_uid}/{usr_uid}/assign",
|
||||||
|
IS_SUPERVISOR: "/cases/{app_num}/supervisor",
|
||||||
AUTHENTICATE_USER: "/oauth2/token",
|
AUTHENTICATE_USER: "/oauth2/token",
|
||||||
USER_DATA: "/light/user/data",
|
USER_DATA: "/light/user/data",
|
||||||
GET_MAIN_MENU_COUNTERS: "/light/counters",
|
GET_MAIN_MENU_COUNTERS: "/light/counters",
|
||||||
@@ -10,6 +12,7 @@
|
|||||||
GET_LISTS_PAUSED: "/light/paused",
|
GET_LISTS_PAUSED: "/light/paused",
|
||||||
GET_LISTS_COMPLETED: "/light/completed",
|
GET_LISTS_COMPLETED: "/light/completed",
|
||||||
GET_USERS_PICTURES: "/light/users/data",
|
GET_USERS_PICTURES: "/light/users/data",
|
||||||
|
GET_USERS_TO_REASSIGN: "/cases/{task_uid}/{app_uid}/userstoreassign",
|
||||||
FORMS_ARRAY: "/light/project/{pro_uid}/activity/{act_uid}/steps",
|
FORMS_ARRAY: "/light/project/{pro_uid}/activity/{act_uid}/steps",
|
||||||
GET_NEW_CASES: "/case/start-cases?type_view=category",
|
GET_NEW_CASES: "/case/start-cases?type_view=category",
|
||||||
GET_HISTORY_CASES: "/light/history/{app_uid}",
|
GET_HISTORY_CASES: "/light/history/{app_uid}",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div slot="actions" slot-scope="props">
|
<div slot="actions" slot-scope="props">
|
||||||
<b-button
|
<b-button
|
||||||
v-if="props.row.STATUS === 'OPEN'"
|
v-if="props.row.STATUS === 'OPEN' && !supervisor || !flagSupervising"
|
||||||
@click="onClick(props)"
|
@click="onClick(props)"
|
||||||
variant="outline-success"
|
variant="outline-success"
|
||||||
>{{ $t("ID_CONTINUE") }}</b-button
|
>{{ $t("ID_CONTINUE") }}</b-button
|
||||||
@@ -65,9 +65,35 @@
|
|||||||
variant="outline-primary"
|
variant="outline-primary"
|
||||||
>{{ $t("ID_UNPAUSE") }}</b-button
|
>{{ $t("ID_UNPAUSE") }}</b-button
|
||||||
>
|
>
|
||||||
|
<b-button
|
||||||
|
v-if="props.row.USR_UID === '' && props.row.STATUS !== 'CLOSED' && supervisor && flagSupervising"
|
||||||
|
@click="onClickAssign(props.row)"
|
||||||
|
variant="primary"
|
||||||
|
>
|
||||||
|
<i class="fa fa-users"></i>
|
||||||
|
{{ $t("ID_ASSIGN") }}
|
||||||
|
</b-button>
|
||||||
|
<b-button
|
||||||
|
v-if="props.row.USR_UID !== '' && props.row.STATUS !== 'CLOSED' && supervisor && flagSupervising"
|
||||||
|
@click="onClickReassign(props.row)"
|
||||||
|
variant="success"
|
||||||
|
>
|
||||||
|
<i class="fas fa-exchange-alt"></i>
|
||||||
|
{{ $t("ID_REASSIGN") }}
|
||||||
|
</b-button>
|
||||||
</div>
|
</div>
|
||||||
</v-server-table>
|
</v-server-table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-right">
|
||||||
|
<b-button
|
||||||
|
v-if="supervisor && flagSupervising"
|
||||||
|
@click="onClickReview(dataCaseReview)"
|
||||||
|
variant="primary"
|
||||||
|
>
|
||||||
|
<i class="far fa-edit"></i>
|
||||||
|
{{ $t("ID_REVIEW_CASE") }}
|
||||||
|
</b-button>
|
||||||
|
</div>
|
||||||
<TabsCaseDetail
|
<TabsCaseDetail
|
||||||
ref="tabsCaseDetail"
|
ref="tabsCaseDetail"
|
||||||
:dataCaseStatus="dataCaseStatusTab"
|
:dataCaseStatus="dataCaseStatusTab"
|
||||||
@@ -113,6 +139,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ModalClaimCase ref="modal-claim-case" @claimCatch="claimCatch"></ModalClaimCase>
|
<ModalClaimCase ref="modal-claim-case" @claimCatch="claimCatch"></ModalClaimCase>
|
||||||
|
<ModalReassignCase ref="modal-reassign-case" @claimCatch="claimCatch"></ModalReassignCase>
|
||||||
|
<ModalAssignCase ref="modal-assign-case" @claimCatch="claimCatch"></ModalAssignCase>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -125,9 +154,11 @@ import CaseComment from "../components/home/caseDetail/CaseComment";
|
|||||||
import CaseComments from "../components/home/caseDetail/CaseComments";
|
import CaseComments from "../components/home/caseDetail/CaseComments";
|
||||||
import TabsCaseDetail from "../home/TabsCaseDetail.vue";
|
import TabsCaseDetail from "../home/TabsCaseDetail.vue";
|
||||||
import ButtonFleft from "../components/home/ButtonFleft.vue";
|
import ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||||
|
import ModalAssignCase from "./modal/ModalAssignCase.vue";
|
||||||
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
||||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||||
import ModalClaimCase from "./modal/ModalClaimCase.vue";
|
import ModalClaimCase from "./modal/ModalClaimCase.vue";
|
||||||
|
import ModalReassignCase from "./modal/ModalReassignCase.vue";
|
||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
import CurrentUserCell from "../components/vuetable/CurrentUserCell.vue"
|
import CurrentUserCell from "../components/vuetable/CurrentUserCell.vue"
|
||||||
import utils from "./../utils/utils";
|
import utils from "./../utils/utils";
|
||||||
@@ -143,10 +174,12 @@ export default {
|
|||||||
AttachedDocumentsEdit,
|
AttachedDocumentsEdit,
|
||||||
CaseComment,
|
CaseComment,
|
||||||
CaseComments,
|
CaseComments,
|
||||||
|
ModalAssignCase,
|
||||||
ModalCancelCase,
|
ModalCancelCase,
|
||||||
ButtonFleft,
|
ButtonFleft,
|
||||||
ModalNewRequest,
|
ModalNewRequest,
|
||||||
ModalClaimCase,
|
ModalClaimCase,
|
||||||
|
ModalReassignCase,
|
||||||
TaskCell,
|
TaskCell,
|
||||||
CurrentUserCell
|
CurrentUserCell
|
||||||
},
|
},
|
||||||
@@ -230,7 +263,11 @@ export default {
|
|||||||
dataComments: {
|
dataComments: {
|
||||||
title: "Comments",
|
title: "Comments",
|
||||||
items: []
|
items: []
|
||||||
}
|
},
|
||||||
|
dataCaseReview: {},
|
||||||
|
app_num: this.$parent.dataCase.APP_NUMBER,
|
||||||
|
supervisor: false,
|
||||||
|
flagSupervising: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -242,6 +279,7 @@ export default {
|
|||||||
//set dataCase
|
//set dataCase
|
||||||
this.dataCase = this.$parent.dataCase;
|
this.dataCase = this.$parent.dataCase;
|
||||||
this.$el.getElementsByClassName("VuePagination__count")[0].remove();
|
this.$el.getElementsByClassName("VuePagination__count")[0].remove();
|
||||||
|
this.changeFlagSupervising(this.dataCase.FLAG);
|
||||||
this.getDataCaseSummary();
|
this.getDataCaseSummary();
|
||||||
this.getInputDocuments();
|
this.getInputDocuments();
|
||||||
this.getOutputDocuments();
|
this.getOutputDocuments();
|
||||||
@@ -506,6 +544,8 @@ export default {
|
|||||||
.pendingtask(that.$parent.dataCase)
|
.pendingtask(that.$parent.dataCase)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
dt = that.formatDataResponse(response.data);
|
dt = that.formatDataResponse(response.data);
|
||||||
|
this.dataCaseReview = dt[0];
|
||||||
|
this.supervisor = that.isSupervisor();
|
||||||
resolutionFunc({
|
resolutionFunc({
|
||||||
data: dt,
|
data: dt,
|
||||||
count: response.data.length,
|
count: response.data.length,
|
||||||
@@ -538,7 +578,8 @@ export default {
|
|||||||
PRO_UID: v.PRO_UID,
|
PRO_UID: v.PRO_UID,
|
||||||
TAS_UID: v.TAS_UID,
|
TAS_UID: v.TAS_UID,
|
||||||
UNASSIGNED: v.UNASSIGNED,
|
UNASSIGNED: v.UNASSIGNED,
|
||||||
USR_ID: v.USR_ID
|
USR_ID: v.USR_ID,
|
||||||
|
USR_UID: v.USR_UID
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
@@ -606,6 +647,21 @@ export default {
|
|||||||
this.$emit("onUpdatePage", "XCase");
|
this.$emit("onUpdatePage", "XCase");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Review case Click handler
|
||||||
|
*
|
||||||
|
* @param {object} data
|
||||||
|
*/
|
||||||
|
onClickReview(data) {
|
||||||
|
this.$emit("onUpdateDataCase", {
|
||||||
|
APP_UID: data.APP_UID,
|
||||||
|
DEL_INDEX: data.DEL_INDEX,
|
||||||
|
PRO_UID: data.PRO_UID,
|
||||||
|
TAS_UID: data.TAS_UID,
|
||||||
|
ACTION: "to_revise"
|
||||||
|
});
|
||||||
|
this.$emit("onUpdatePage", "XCase");
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Unpause click handler
|
* Unpause click handler
|
||||||
*
|
*
|
||||||
@@ -622,6 +678,58 @@ export default {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
that.showAlert(error.response.data.error.message, 'danger');
|
that.showAlert(error.response.data.error.message, 'danger');
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Assign click handler
|
||||||
|
*
|
||||||
|
* @param {object} item
|
||||||
|
*/
|
||||||
|
onClickAssign(item) {
|
||||||
|
let that = this;
|
||||||
|
Api.cases.open(_.extend({ ACTION: "assign" }, item)).then(() => {
|
||||||
|
Api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
|
that.$refs["modal-assign-case"].data = item;
|
||||||
|
that.$refs["modal-assign-case"].show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Reassign click handler
|
||||||
|
*
|
||||||
|
* @param {object} item
|
||||||
|
*/
|
||||||
|
onClickReassign(item) {
|
||||||
|
let that = this;
|
||||||
|
item.FLAG = this.flagSupervising;
|
||||||
|
Api.cases.open(_.extend({ ACTION: "reassign" }, item)).then(() => {
|
||||||
|
Api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
|
that.$refs["modal-reassign-case"].data = item;
|
||||||
|
that.$refs["modal-reassign-case"].show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Is supervisor
|
||||||
|
*
|
||||||
|
* @return {bool} response
|
||||||
|
*/
|
||||||
|
isSupervisor() {
|
||||||
|
Api.cases.getIsSupervisor(this.app_num).then((response) => {
|
||||||
|
let res = false;
|
||||||
|
if (response.statusText === "OK" || response.status === 200) {
|
||||||
|
this.supervisor = response.data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Change the flag supervisor
|
||||||
|
*
|
||||||
|
* @param {string} data
|
||||||
|
*/
|
||||||
|
changeFlagSupervising(data) {
|
||||||
|
if (data === 'SUPERVISING'){
|
||||||
|
this.flagSupervising = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Claim case
|
* Claim case
|
||||||
@@ -675,4 +783,7 @@ export default {
|
|||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
|
.table td, .table th {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -358,6 +358,7 @@ export default {
|
|||||||
PRO_UID: item.PRO_UID,
|
PRO_UID: item.PRO_UID,
|
||||||
TAS_UID: item.TAS_UID,
|
TAS_UID: item.TAS_UID,
|
||||||
APP_NUMBER: item.CASE_NUMBER,
|
APP_NUMBER: item.CASE_NUMBER,
|
||||||
|
FLAG: this.filterHeader,
|
||||||
ACTION:
|
ACTION:
|
||||||
that.filterHeader === "SUPERVISING"
|
that.filterHeader === "SUPERVISING"
|
||||||
? "to_revise"
|
? "to_revise"
|
||||||
|
|||||||
190
resources/assets/js/home/modal/ModalAssignCase.vue
Normal file
190
resources/assets/js/home/modal/ModalAssignCase.vue
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<b-modal
|
||||||
|
ref="modal-assign-case"
|
||||||
|
hide-footer
|
||||||
|
size="lg"
|
||||||
|
>
|
||||||
|
<template v-slot:modal-title>
|
||||||
|
{{ $t('ID_ASSIGN_CASE') }}
|
||||||
|
<i class="fas fa-users"></i>
|
||||||
|
</template>
|
||||||
|
<b-alert
|
||||||
|
:show="dataAlert.dismissCountDown"
|
||||||
|
dismissible
|
||||||
|
:variant="dataAlert.variant"
|
||||||
|
@dismissed="dataAlert.dismissCountDown = 0"
|
||||||
|
@dismiss-count-down="countDownChanged"
|
||||||
|
>
|
||||||
|
{{ dataAlert.message }}
|
||||||
|
</b-alert>
|
||||||
|
<b-container fluid>
|
||||||
|
<b-row class="my-1">
|
||||||
|
<b-col sm="3">
|
||||||
|
<label for="selectUser">{{ $t('ID_SELECT_USER') }}</label>
|
||||||
|
</b-col>
|
||||||
|
<b-col sm="9">
|
||||||
|
<b-form-select v-model="userSelected" :options="users"></b-form-select>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
|
||||||
|
<b-row class="my-1">
|
||||||
|
<b-col sm="3">
|
||||||
|
<label for="reasonAssign">{{ $t('ID_REASON') }}</label>
|
||||||
|
</b-col>
|
||||||
|
<b-col sm="9">
|
||||||
|
<b-form-textarea
|
||||||
|
id="reasonAssign"
|
||||||
|
v-model="reasonAssign"
|
||||||
|
rows="3"
|
||||||
|
max-rows="6"
|
||||||
|
></b-form-textarea>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
|
||||||
|
<b-row class="my-1">
|
||||||
|
<b-col sm="3">
|
||||||
|
<label for="notifyUser">{{ $t('ID_NOTIFY_USERS_CASE') }}</label>
|
||||||
|
</b-col>
|
||||||
|
<b-col sm="9">
|
||||||
|
<b-form-checkbox v-model="notifyUser" id="notifyUser" name="notifyUser" switch>
|
||||||
|
</b-form-checkbox>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
</b-container>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<div class="float-right">
|
||||||
|
<b-button
|
||||||
|
variant="danger"
|
||||||
|
data-dismiss="modal"
|
||||||
|
@click="cancel"
|
||||||
|
>
|
||||||
|
{{ $t("ID_CANCEL") }}
|
||||||
|
</b-button>
|
||||||
|
<b-button
|
||||||
|
variant="success"
|
||||||
|
@click="assignCase"
|
||||||
|
>
|
||||||
|
{{ $t("ID_ASSIGN") }}
|
||||||
|
</b-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-modal>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import api from "../../api/index";
|
||||||
|
import utils from "../../utils/utils";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ModalAssignCase",
|
||||||
|
components: {},
|
||||||
|
props: {},
|
||||||
|
mounted() {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataAlert: {
|
||||||
|
dismissSecs: 5,
|
||||||
|
dismissCountDown: 0,
|
||||||
|
message: "",
|
||||||
|
variant: "danger",
|
||||||
|
},
|
||||||
|
data: null,
|
||||||
|
locale: 'en-US',
|
||||||
|
users: [],
|
||||||
|
reasonAssign: null,
|
||||||
|
userSelected: null,
|
||||||
|
notifyUser: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
classBtn(cls) {
|
||||||
|
return "btn v-btn-request " + cls;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Show modal
|
||||||
|
*/
|
||||||
|
show() {
|
||||||
|
this.users = [];
|
||||||
|
this.getUsers();
|
||||||
|
this.$refs["modal-assign-case"].show();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Button cancel
|
||||||
|
*/
|
||||||
|
cancel() {
|
||||||
|
this.$refs["modal-assign-case"].hide();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Service to get users
|
||||||
|
*/
|
||||||
|
getUsers() {
|
||||||
|
let that = this;
|
||||||
|
api.cases.getUserToReassign(this.data).then((response) => {
|
||||||
|
var users = response.data.data,
|
||||||
|
i;
|
||||||
|
if (response.statusText == "OK" || response.status === 200) {
|
||||||
|
for (i = 0; i < users.length; i += 1) {
|
||||||
|
that.users.push({
|
||||||
|
value: users[i].USR_UID,
|
||||||
|
text: utils.userNameDisplayFormat({
|
||||||
|
userName: users[i].USR_USERNAME || "",
|
||||||
|
firstName: users[i].USR_FIRSTNAME || "",
|
||||||
|
lastName: users[i].USR_LASTNAME || "",
|
||||||
|
format: window.config.FORMATS.format || null
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Service assign case, using reassign api service
|
||||||
|
*/
|
||||||
|
assignCase() {
|
||||||
|
let that = this;
|
||||||
|
this.data.userSelected = this.userSelected;
|
||||||
|
this.data.reasonAssign = this.reasonAssign;
|
||||||
|
this.notifyUser = this.notifyUser;
|
||||||
|
api.cases.assignCase(this.data).then((response) => {
|
||||||
|
if (response.statusText == "OK" || response.status === 200) {
|
||||||
|
that.$refs["modal-assign-case"].hide();
|
||||||
|
if (that.$parent.$refs["vueTable"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueTable"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueListView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueListView"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueCardView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueCardView"].getData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
if(e.response.data && e.response.data.error){
|
||||||
|
that.showAlert(e.response.data.error.message, "danger");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Show the alert message
|
||||||
|
* @param {string} message - message to be displayed in the body
|
||||||
|
* @param {string} type - alert type
|
||||||
|
*/
|
||||||
|
showAlert(message, type) {
|
||||||
|
this.dataAlert.message = message;
|
||||||
|
this.dataAlert.variant = type || "info";
|
||||||
|
this.dataAlert.dismissCountDown = this.dataAlert.dismissSecs;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Updates the alert dismiss value to update
|
||||||
|
* dismissCountDown and decrease
|
||||||
|
* @param {mumber}
|
||||||
|
*/
|
||||||
|
countDownChanged(dismissCountDown) {
|
||||||
|
this.dataAlert.dismissCountDown = dismissCountDown;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:modal-title>
|
<template v-slot:modal-title>
|
||||||
{{ $t('ID_REASSIGN_CASE') }}
|
{{ $t('ID_REASSIGN_CASE') }}
|
||||||
<i class="fas fa-undo"></i>
|
<i :class="icon"></i>
|
||||||
</template>
|
</template>
|
||||||
<b-alert
|
<b-alert
|
||||||
:show="dataAlert.dismissCountDown"
|
:show="dataAlert.dismissCountDown"
|
||||||
@@ -78,7 +78,7 @@ import api from "./../../api/index";
|
|||||||
import utils from "../../utils/utils";
|
import utils from "../../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ModalPauseCase",
|
name: "ModalReassignCase",
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
@@ -95,7 +95,8 @@ export default {
|
|||||||
users: [],
|
users: [],
|
||||||
reasonReassign: null,
|
reasonReassign: null,
|
||||||
userSelected: null,
|
userSelected: null,
|
||||||
notifyUser: false
|
notifyUser: false,
|
||||||
|
icon: "fas fa-undo"
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -106,8 +107,12 @@ export default {
|
|||||||
* Show modal
|
* Show modal
|
||||||
*/
|
*/
|
||||||
show() {
|
show() {
|
||||||
|
this.users = [];
|
||||||
this.getUsersReassign();
|
this.getUsersReassign();
|
||||||
this.$refs["modal-reassign-case"].show();
|
this.$refs["modal-reassign-case"].show();
|
||||||
|
if (this.data.FLAG){
|
||||||
|
this.icon = "fas fa-exchange-alt";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Button cancel
|
* Button cancel
|
||||||
@@ -120,7 +125,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
getUsersReassign() {
|
getUsersReassign() {
|
||||||
let that = this;
|
let that = this;
|
||||||
api.cases.getUserReassign(this.data).then((response) => {
|
api.cases.getUserToReassign(this.data).then((response) => {
|
||||||
var users = response.data.data,
|
var users = response.data.data,
|
||||||
i;
|
i;
|
||||||
if (response.statusText == "OK" || response.status === 200) {
|
if (response.statusText == "OK" || response.status === 200) {
|
||||||
@@ -146,25 +151,47 @@ export default {
|
|||||||
this.data.userSelected = this.userSelected;
|
this.data.userSelected = this.userSelected;
|
||||||
this.data.reasonReassign = this.reasonReassign;
|
this.data.reasonReassign = this.reasonReassign;
|
||||||
this.notifyUser = this.notifyUser;
|
this.notifyUser = this.notifyUser;
|
||||||
api.cases.reassingCase(this.data).then((response) => {
|
if (!this.data.FLAG){
|
||||||
if (response.statusText == "OK" || response.status === 200) {
|
api.cases.reassingCase(this.data).then((response) => {
|
||||||
that.$refs["modal-reassign-case"].hide();
|
if (response.statusText == "OK" || response.status === 200) {
|
||||||
if (that.$parent.$refs["vueTable"] !== undefined) {
|
that.$refs["modal-reassign-case"].hide();
|
||||||
that.$parent.$refs["vueTable"].getData();
|
if (that.$parent.$refs["vueTable"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueTable"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueListView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueListView"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueCardView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueCardView"].getData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (that.$parent.$refs["vueListView"] !== undefined) {
|
})
|
||||||
that.$parent.$refs["vueListView"].getData();
|
.catch((e) => {
|
||||||
|
if(e.response.data && e.response.data.error){
|
||||||
|
that.showAlert(e.response.data.error.message, "danger");
|
||||||
}
|
}
|
||||||
if (that.$parent.$refs["vueCardView"] !== undefined) {
|
});
|
||||||
that.$parent.$refs["vueCardView"].getData();
|
} else {
|
||||||
|
api.cases.reassingCaseSupervisor(this.data).then((response) => {
|
||||||
|
if (response.statusText == "OK" || response.status === 200) {
|
||||||
|
that.$refs["modal-reassign-case"].hide();
|
||||||
|
if (that.$parent.$refs["vueTable"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueTable"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueListView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueListView"].getData();
|
||||||
|
}
|
||||||
|
if (that.$parent.$refs["vueCardView"] !== undefined) {
|
||||||
|
that.$parent.$refs["vueCardView"].getData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
.catch((e) => {
|
||||||
.catch((e) => {
|
if(e.response.data && e.response.data.error){
|
||||||
if(e.response.data && e.response.data.error){
|
that.showAlert(e.response.data.error.message, "danger");
|
||||||
that.showAlert(e.response.data.error.message, "danger");
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Show the alert message
|
* Show the alert message
|
||||||
|
|||||||
@@ -2419,6 +2419,12 @@ msgstr "Array of variables is empty"
|
|||||||
msgid "Assign"
|
msgid "Assign"
|
||||||
msgstr "Assign"
|
msgstr "Assign"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_ASSIGN_CASE
|
||||||
|
#: LABEL/ID_ASSIGN_CASE
|
||||||
|
msgid "Assign Case"
|
||||||
|
msgstr "Assign Case"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_ASSIGNED_FIEDS
|
# LABEL/ID_ASSIGNED_FIEDS
|
||||||
#: LABEL/ID_ASSIGNED_FIEDS
|
#: LABEL/ID_ASSIGNED_FIEDS
|
||||||
@@ -24017,6 +24023,12 @@ msgstr "Resume"
|
|||||||
msgid "Return"
|
msgid "Return"
|
||||||
msgstr "Return"
|
msgstr "Return"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_REVIEW_CASE
|
||||||
|
#: LABEL/ID_REVIEW_CASE
|
||||||
|
msgid "Review Case"
|
||||||
|
msgstr "Review Case"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_RIGHT
|
# LABEL/ID_RIGHT
|
||||||
#: LABEL/ID_RIGHT
|
#: LABEL/ID_RIGHT
|
||||||
|
|||||||
@@ -57205,6 +57205,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_ARE_YOU_SURE_UNPAUSE_TASK','en','Are you sure want to unpause the task?','2021-01-26') ,
|
( 'LABEL','ID_ARE_YOU_SURE_UNPAUSE_TASK','en','Are you sure want to unpause the task?','2021-01-26') ,
|
||||||
( 'LABEL','ID_ARRAY_VARIABLES_EMPTY','en','Array of variables is empty','2014-01-15') ,
|
( 'LABEL','ID_ARRAY_VARIABLES_EMPTY','en','Array of variables is empty','2014-01-15') ,
|
||||||
( 'LABEL','ID_ASSIGN','en','Assign','2014-01-15') ,
|
( 'LABEL','ID_ASSIGN','en','Assign','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_ASSIGN_CASE','en','Assign Case','2022-11-04') ,
|
||||||
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,
|
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,
|
||||||
( 'LABEL','ID_ASSIGNED_GROUPS','en','ASSIGNED GROUPS','2014-01-15') ,
|
( 'LABEL','ID_ASSIGNED_GROUPS','en','ASSIGNED GROUPS','2014-01-15') ,
|
||||||
( 'LABEL','ID_ASSIGNED_MEMBERS','en','MEMBERS','2014-01-15') ,
|
( 'LABEL','ID_ASSIGNED_MEMBERS','en','MEMBERS','2014-01-15') ,
|
||||||
@@ -60924,6 +60925,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_RESTORING_CASE','en','Restoring case','2015-09-15') ,
|
( 'LABEL','ID_RESTORING_CASE','en','Restoring case','2015-09-15') ,
|
||||||
( 'LABEL','ID_RESULT','en','Result','2014-01-15') ,
|
( 'LABEL','ID_RESULT','en','Result','2014-01-15') ,
|
||||||
( 'LABEL','ID_RESUME','en','Resume','2014-01-15') ,
|
( 'LABEL','ID_RESUME','en','Resume','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_REVIEW_CASE','en','Review Case','2022-11-10') ,
|
||||||
( 'LABEL','ID_RETURN_ADVANCED_SEARCH','en','Return','2019-07-17') ,
|
( 'LABEL','ID_RETURN_ADVANCED_SEARCH','en','Return','2019-07-17') ,
|
||||||
( 'LABEL','ID_RIGHT','en','right','2014-09-18') ,
|
( 'LABEL','ID_RIGHT','en','right','2014-09-18') ,
|
||||||
( 'LABEL','ID_RIGHT_MARGIN','en','Right Margin','2014-01-15') ,
|
( 'LABEL','ID_RIGHT_MARGIN','en','Right Margin','2014-01-15') ,
|
||||||
|
|||||||
Reference in New Issue
Block a user