PMCORE-2542

This commit is contained in:
Henry Jordan
2020-12-10 19:40:17 +00:00
parent 7703557973
commit 455207fe0f
6 changed files with 124 additions and 7 deletions

View File

@@ -118,6 +118,15 @@ export let cases = {
window.config.SYS_URI +
`cases/ajaxListener`, params);
},
unpause(data) {
var params = new URLSearchParams();
params.append('action', 'unpauseCase');
params.append('sApplicationUID', data.APP_UID);
params.append('iIndex', data.DEL_INDEX);
return axios.post(window.config.SYS_SERVER +
window.config.SYS_URI +
`cases/cases_Ajax`, params);
},
/**
* Service to jump a case by it's number
* @param {object} dt

View File

@@ -9,6 +9,11 @@
:options="options"
ref="vueTable"
>
<div slot="detail" slot-scope="props">
<div class="btn-default" @click="openCaseDetail(props.row)">
<i class="fas fa-info-circle"></i>
</div>
</div>
<div slot="case_number" slot-scope="props">
{{ props.row.CASE_NUMBER }}
</div>
@@ -40,9 +45,12 @@
</div>
<div slot="priority" slot-scope="props">{{ props.row.PRIORITY }}</div>
<div slot="actions" slot-scope="props">
<button class="settings-radio" @click="openCase(props)">Unpause</button>
<button class="settings-radio" @click="showModalUnpauseCase(props.row)">
{{ $t("ID_UNPAUSE") }}
</button>
</div>
</v-server-table>
<ModalUnpauseCase ref="modal-unpause-case"></ModalUnpauseCase>
</div>
</template>
@@ -51,6 +59,7 @@ import HeaderCounter from "../components/home/HeaderCounter.vue";
import ButtonFleft from "../components/home/ButtonFleft.vue";
import ModalNewRequest from "./ModalNewRequest.vue";
import TaskCell from "../components/vuetable/TaskCell.vue";
import ModalUnpauseCase from "./modal/ModalUnpauseCase.vue";
import api from "./../api/index";
export default {
@@ -60,6 +69,7 @@ export default {
ButtonFleft,
ModalNewRequest,
TaskCell,
ModalUnpauseCase,
},
props: {},
data() {
@@ -72,6 +82,7 @@ export default {
},
},
columns: [
"detail",
"case_number",
"case_title",
"process_name",
@@ -94,6 +105,7 @@ export default {
delegation_date: this.$i18n.t("ID_DELEGATION_DATE"),
priority: this.$i18n.t("ID_PRIORITY"),
actions: "",
detail: "",
},
selectable: {
mode: "single",
@@ -165,6 +177,10 @@ export default {
DUE_DATE: v.DEL_TASK_DUE_DATE,
DELEGATION_DATE: v.DEL_DELEGATE_DATE,
PRIORITY: v.DEL_PRIORITY_LABEL,
DEL_INDEX: v.DEL_INDEX,
APP_UID: v.APP_UID,
PRO_UID: v.PRO_UID,
TAS_UID: v.TAS_UID,
});
});
return data;
@@ -202,11 +218,25 @@ export default {
return nameFormat;
},
/**
* Open selected cases in the inbox
* Open case detail
*
* @param {object} item
*/
openCase(item) {},
openCaseDetail(item) {
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
this.$parent.dataCase = {
APP_UID: item.APP_UID,
DEL_INDEX: item.DEL_INDEX,
PRO_UID: item.PRO_UID,
TAS_UID: item.TAS_UID,
};
this.$parent.page = "case-detail";
});
},
showModalUnpauseCase(item) {
this.$refs["modal-unpause-case"].data = item;
this.$refs["modal-unpause-case"].show();
},
},
};
</script>

View File

@@ -0,0 +1,67 @@
<template>
<div>
<b-modal
ref="modal-unpause-case"
hide-footer
:title="$t('ID_CONFIRMATION')"
size="md"
>
<p>
{{ $t("ID_ARE_YOU_SURE_UNPAUSE_TASK") }}
</p>
<div class="row float-right">
<div class="modal-footer">
<button
type="button"
class="btn btn-danger"
data-dismiss="modal"
@click="cancel"
>
{{ $t("ID_CANCEL") }}
</button>
<button type="button" class="btn btn-success" @click="unpauseCase">
{{ $t("ID_UNPAUSE") }}
</button>
</div>
</div>
</b-modal>
</div>
</template>
<script>
import api from "./../../api/index";
export default {
name: "ModalUnpauseCase",
components: {},
props: {},
mounted() {},
data() {
return {
data: null,
};
},
methods: {
classBtn(cls) {
return "btn v-btn-request " + cls;
},
show() {
this.$refs["modal-unpause-case"].show();
},
cancel() {
this.$refs["modal-unpause-case"].hide();
},
unpauseCase() {
let that = this;
api.cases.unpause(this.data).then((response) => {
if (response.statusText == "OK") {
that.$refs["modal-unpause-case"].hide();
that.$parent.$refs["vueTable"].getData();
}
});
},
},
};
</script>
<style>
</style>

File diff suppressed because one or more lines are too long

View File

@@ -52126,5 +52126,14 @@ msgstr "Send email to participants"
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"
# TRANSLATION
# LABEL/ID_CONFIRMATION
#: LABEL/ID_CONFIRMATION
msgid "Confirmation"
msgstr "Confirmation"
# TRANSLATION
# LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
#: LABEL/ID_ARE_YOU_SURE_UNPAUSE_TASK
msgid "Are you sure want to unpause the task?"
msgstr "Are you sure want to unpause the task?"

View File

@@ -56846,6 +56846,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'JAVASCRIPT','ID_CLICK_VIEW_MORE_INFO','en','Click here to view more info','2014-01-15') ,
( 'JAVASCRIPT','ID_CLOSE_SEARCH','en','Close Search','2014-01-15') ,
( 'JAVASCRIPT','ID_COLOR_LEYENDS','en','Key','2014-01-15') ,
( 'JAVASCRIPT','ID_CONFIRMATION','en','Confirmation','2020-12-01') ,
( 'JAVASCRIPT','ID_CONFIRM_ADHOCUSER_CASE','en','Are you sure you want to do it?','2014-01-15') ,
( 'JAVASCRIPT','ID_CONFIRM_CANCEL_CASE','en','Are you sure you want to cancel this case?','2014-01-15') ,
( 'JAVASCRIPT','ID_CONFIRM_DELETE_CASE','en','Are you sure you want to delete this case?','2014-01-15') ,
@@ -57194,6 +57195,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_APP_MSG_BODY','en','Body','2014-01-15') ,
( 'LABEL','ID_APP_UID','en','App Uid','2015-09-15') ,
( 'LABEL','ID_ARE_YOU_SURE_RESEND','en','Are you sure that you want to resend this message','2014-01-15') ,
( 'LABEL','ID_ARE_YOU_SURE_UNPAUSE_TASK','en','Are you sure want to unpause the task?','2020-12-01') ,
( 'LABEL','ID_ARRAY_VARIABLES_EMPTY','en','Array of variables is empty','2014-01-15') ,
( 'LABEL','ID_ASSIGN','en','Assign','2014-01-15') ,
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,