PMCORE-2538
update PMCORE-2538
This commit is contained in:
@@ -109,6 +109,15 @@ export let cases = {
|
||||
window.config.SYS_URI +
|
||||
`cases/open?APP_UID=${data.APP_UID}&DEL_INDEX=${data.DEL_INDEX}&action=${data.ACTION}`);
|
||||
},
|
||||
cancel(data) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'cancelCase');
|
||||
params.append('NOTE_REASON', data.COMMENT);
|
||||
params.append('NOTIFY_CANCEL', data.SEND);
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
},
|
||||
//remove this section
|
||||
search(data) {
|
||||
return new Promise((resolutionFunc, rejectionFunc) => {
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
:dataCaseSummary="dataCaseSummaryTab"
|
||||
:dataCase="dataCase"
|
||||
></TabsCaseDetail>
|
||||
<ModalCancelCase ref="modal-cancel-case"></ModalCancelCase>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<case-summary
|
||||
@@ -82,6 +83,7 @@ import AttachedDocuments from "../components/home/caseDetail/AttachedDocuments.v
|
||||
import CaseComment from "../components/home/caseDetail/CaseComment";
|
||||
import CaseComments from "../components/home/caseDetail/CaseComments";
|
||||
import TabsCaseDetail from "../home/TabsCaseDetail.vue";
|
||||
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
||||
|
||||
import Api from "../api/index";
|
||||
export default {
|
||||
@@ -93,6 +95,7 @@ export default {
|
||||
AttachedDocuments,
|
||||
CaseComment,
|
||||
CaseComments,
|
||||
ModalCancelCase,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
@@ -199,11 +202,13 @@ export default {
|
||||
var data = response.data;
|
||||
this.formatCaseSummary(response.data);
|
||||
this.dataCaseSummary = {
|
||||
title: "Case Summary",
|
||||
titleActions: "Actions",
|
||||
btnLabel: "Cancel Request",
|
||||
title: this.$i18n.t("ID_SUMMARY"),
|
||||
titleActions: this.$i18n.t("ID_ACTIONS"),
|
||||
btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
|
||||
btnType: false,
|
||||
onClick: () => {},
|
||||
onClick: () => {
|
||||
that.$refs["modal-cancel-case"].show();
|
||||
},
|
||||
label: {
|
||||
numberCase: data[2].label,
|
||||
process: data[0].label,
|
||||
@@ -211,7 +216,7 @@ export default {
|
||||
caseTitle: data[1].label,
|
||||
created: data[6].label,
|
||||
delegationDate: response.data[11].label,
|
||||
duration: "Duration",
|
||||
duration: this.$i18n.t("ID_DURATION"),
|
||||
},
|
||||
text: {
|
||||
numberCase: data[2].value,
|
||||
|
||||
94
resources/assets/js/home/modal/ModalCancelCase.vue
Normal file
94
resources/assets/js/home/modal/ModalCancelCase.vue
Normal file
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-modal
|
||||
ref="modal-cancel-case"
|
||||
hide-footer
|
||||
:title="$t('ID_CANCEL_CASE')"
|
||||
size="md"
|
||||
>
|
||||
<p>
|
||||
You are tying to cancel the current case. Please be aware this action
|
||||
cannot be undone
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<textarea
|
||||
class="form-control"
|
||||
name="comments"
|
||||
ref="comment"
|
||||
cols="80"
|
||||
rows="5"
|
||||
></textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 ml-auto">
|
||||
<input type="checkbox" class="" ref="send" />
|
||||
<label class="form-check-label" for="sendEmail">
|
||||
Send email to participants</label
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" @click="cancelCase">
|
||||
{{ $t("ID_CANCEL_CASE") }}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary"
|
||||
data-dismiss="modal"
|
||||
@click="cancel"
|
||||
>
|
||||
{{ $t("ID_CANCEL") }}
|
||||
</button>
|
||||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "./../../api/index";
|
||||
export default {
|
||||
name: "ModalCancelCase",
|
||||
components: {},
|
||||
props: {
|
||||
data: Object,
|
||||
},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
filter: "",
|
||||
categories: [],
|
||||
categoriesFiltered: [],
|
||||
TRANSLATIONS: window.config.TRANSLATIONS,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
show() {
|
||||
this.$refs["modal-cancel-case"].show();
|
||||
},
|
||||
cancel() {
|
||||
this.$refs["modal-cancel-case"].hide();
|
||||
},
|
||||
cancelCase() {
|
||||
let that = this;
|
||||
api.cases
|
||||
.cancel({
|
||||
COMMENT: this.$refs["comment"].value,
|
||||
SEND: this.$refs["send"].checked ? 1 : 0,
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.data && response.data.status) {
|
||||
that.$refs["modal-cancel-case"].hide();
|
||||
that.$parent.$parent.page = "todo";
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Reference in New Issue
Block a user