PMCORE-2538

update PMCORE-2538
This commit is contained in:
Henry Jordan
2020-12-10 15:19:14 +00:00
parent ec9ce2f65a
commit 353e84fb65
6 changed files with 132 additions and 6 deletions

View File

@@ -109,6 +109,15 @@ export let cases = {
window.config.SYS_URI + window.config.SYS_URI +
`cases/open?APP_UID=${data.APP_UID}&DEL_INDEX=${data.DEL_INDEX}&action=${data.ACTION}`); `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 //remove this section
search(data) { search(data) {
return new Promise((resolutionFunc, rejectionFunc) => { return new Promise((resolutionFunc, rejectionFunc) => {

View File

@@ -44,6 +44,7 @@
:dataCaseSummary="dataCaseSummaryTab" :dataCaseSummary="dataCaseSummaryTab"
:dataCase="dataCase" :dataCase="dataCase"
></TabsCaseDetail> ></TabsCaseDetail>
<ModalCancelCase ref="modal-cancel-case"></ModalCancelCase>
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
<case-summary <case-summary
@@ -82,6 +83,7 @@ import AttachedDocuments from "../components/home/caseDetail/AttachedDocuments.v
import CaseComment from "../components/home/caseDetail/CaseComment"; 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 ModalCancelCase from "../home/modal/ModalCancelCase.vue";
import Api from "../api/index"; import Api from "../api/index";
export default { export default {
@@ -93,6 +95,7 @@ export default {
AttachedDocuments, AttachedDocuments,
CaseComment, CaseComment,
CaseComments, CaseComments,
ModalCancelCase,
}, },
props: {}, props: {},
data() { data() {
@@ -199,11 +202,13 @@ export default {
var data = response.data; var data = response.data;
this.formatCaseSummary(response.data); this.formatCaseSummary(response.data);
this.dataCaseSummary = { this.dataCaseSummary = {
title: "Case Summary", title: this.$i18n.t("ID_SUMMARY"),
titleActions: "Actions", titleActions: this.$i18n.t("ID_ACTIONS"),
btnLabel: "Cancel Request", btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
btnType: false, btnType: false,
onClick: () => {}, onClick: () => {
that.$refs["modal-cancel-case"].show();
},
label: { label: {
numberCase: data[2].label, numberCase: data[2].label,
process: data[0].label, process: data[0].label,
@@ -211,7 +216,7 @@ export default {
caseTitle: data[1].label, caseTitle: data[1].label,
created: data[6].label, created: data[6].label,
delegationDate: response.data[11].label, delegationDate: response.data[11].label,
duration: "Duration", duration: this.$i18n.t("ID_DURATION"),
}, },
text: { text: {
numberCase: data[2].value, numberCase: data[2].value,

View 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>

File diff suppressed because one or more lines are too long

View File

@@ -52106,3 +52106,19 @@ msgstr "Duration"
#: LABEL/ID_PENDING_TASKS #: LABEL/ID_PENDING_TASKS
msgid "Pending Tasks" msgid "Pending Tasks"
msgstr "Pending Tasks" msgstr "Pending Tasks"
# TRANSLATION
# LABEL/ID_SEND_EMAIL_TO_PARTICIPANTS
#: LABEL/ID_SEND_EMAIL_TO_PARTICIPANTS
msgid "Send email to participants"
msgstr "Send email to participants"
# TRANSLATION
# LABEL/ID_TRYING_CANCEL
#: LABEL/ID_TRYING_CANCEL
msgid "You are tying to cancel the current case. Please be aware this action cannot be undone"
msgstr "You are tying to cancel the current case. Please be aware this action cannot be undone"

View File

@@ -60913,6 +60913,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_SENDMAIL_NOT_INSTALLED','en','An error has occured, please verify on which server "SendMail" has been installed or any other mail service, and if it has been configured correctly.','2014-01-15') , ( 'LABEL','ID_SENDMAIL_NOT_INSTALLED','en','An error has occured, please verify on which server "SendMail" has been installed or any other mail service, and if it has been configured correctly.','2014-01-15') ,
( 'LABEL','ID_SEND_AT','en','send at','2014-01-15') , ( 'LABEL','ID_SEND_AT','en','send at','2014-01-15') ,
( 'LABEL','ID_SEND_EMAIL_CASE_PARTICIPANTS','en','Send Email (Case Participants)','2014-01-15') , ( 'LABEL','ID_SEND_EMAIL_CASE_PARTICIPANTS','en','Send Email (Case Participants)','2014-01-15') ,
( 'LABEL','ID_SEND_EMAIL_TO_PARTICIPANTS','en','Send email to participants','2020-12-01') ,
( 'LABEL','ID_SENT','en','Participated','2016-07-11') , ( 'LABEL','ID_SENT','en','Participated','2016-07-11') ,
( 'LABEL','ID_SENT_BY','en','Sent By','2014-01-15') , ( 'LABEL','ID_SENT_BY','en','Sent By','2014-01-15') ,
( 'LABEL','ID_SERVER','en','Server','2014-01-15') , ( 'LABEL','ID_SERVER','en','Server','2014-01-15') ,
@@ -61297,6 +61298,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_TRIGGER_SOURCE_LINK','en','Edit Source Code','2014-01-15') , ( 'LABEL','ID_TRIGGER_SOURCE_LINK','en','Edit Source Code','2014-01-15') ,
( 'LABEL','ID_TRIGGER_TITLE_ALREADY_EXISTS','en','The trigger title with {0}: "{1}" already exists.','2014-05-20') , ( 'LABEL','ID_TRIGGER_TITLE_ALREADY_EXISTS','en','The trigger title with {0}: "{1}" already exists.','2014-05-20') ,
( 'LABEL','ID_TRUE','en','TRUE','2014-01-15') , ( 'LABEL','ID_TRUE','en','TRUE','2014-01-15') ,
( 'LABEL','ID_TRYING_CANCEL','en','You are tying to cancel the current case. Please be aware this action cannot be undone','2020-12-01') ,
( 'LABEL','ID_TUE','en','Tue','2014-01-15') , ( 'LABEL','ID_TUE','en','Tue','2014-01-15') ,
( 'LABEL','ID_TYPE','en','Type','2014-01-15') , ( 'LABEL','ID_TYPE','en','Type','2014-01-15') ,
( 'LABEL','ID_TYPE_PROCESS','en','Process Type','2014-10-22') , ( 'LABEL','ID_TYPE_PROCESS','en','Process Type','2014-10-22') ,