feature/PMCORE-2545
update
This commit is contained in:
@@ -127,6 +127,12 @@ export let cases = {
|
||||
window.config.SYS_URI +
|
||||
`cases/cases_Ajax`, params);
|
||||
},
|
||||
claim(data) {
|
||||
var params = new URLSearchParams();
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/cases_CatchExecute`, params);
|
||||
},
|
||||
/**
|
||||
* Service to jump a case by it's number
|
||||
* @param {object} dt
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
<template>
|
||||
<div class="card v-case-summary-card" style="width: 20rem">
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.title }}</h6>
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.items"
|
||||
:key="item.title"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<div class="v-list v-list-row block">
|
||||
<div class="v-list-item">
|
||||
<div class="v-attached-icon">
|
||||
<i :class="classIcon(item.extension)"></i>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div @click="item.onClick" class="v-item-except text-sm h-1x">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "AttachedDocuments",
|
||||
props: {
|
||||
data: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icon: {
|
||||
pdf: "fas fa-file-pdf",
|
||||
doc: "fas fa-file-word",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
classIcon(icon) {
|
||||
return this.icon[icon];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-list-item {
|
||||
position: relative;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.v-list-row .v-list-item {
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.block {
|
||||
background: #fff;
|
||||
border-width: 0;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.v-list {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.v-item-except {
|
||||
padding-left: 10px;
|
||||
color: #6c757d !important;
|
||||
}
|
||||
|
||||
.v-attached-icon {
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,107 +0,0 @@
|
||||
<template>
|
||||
<div class="card v-case-summary-card" style="width: 20rem">
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.title }}</h6>
|
||||
<div class="card-text v-case-summary-card-body">
|
||||
<div>
|
||||
<span> {{ data.label.numberCase }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.numberCase }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.process }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.process }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.status }} </span>:<span class="font-weight-bold">
|
||||
{{ data.text.status }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.caseTitle }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.caseTitle }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.created }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.created }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.delegationDate }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.delegationDate }}</span
|
||||
>
|
||||
</div>
|
||||
<div>
|
||||
<span> {{ data.label.duration }} </span>:<span
|
||||
class="font-weight-bold"
|
||||
>
|
||||
{{ data.text.duration }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.titleActions }}</h6>
|
||||
<div v-if=data.btnType class="container v-case-summary-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-success btn-sm"
|
||||
@click="data.onClick"
|
||||
>
|
||||
{{ data.btnLabel }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else class="container v-case-summary-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary btn-sm"
|
||||
@click="data.onClick"
|
||||
>
|
||||
{{ data.btnLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CaseSummary",
|
||||
props: {
|
||||
data: Object,
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-case-summary-card {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.v-case-summary-card-body {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.v-case-summary-center {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -1,114 +0,0 @@
|
||||
<template>
|
||||
<div class="card v-case-summary-card" style="width: 20rem">
|
||||
<div class="card-body">
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.titleInput }}</h6>
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.inputDocuments"
|
||||
:key="item.title"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<div class="v-list v-list-row block">
|
||||
<div class="v-list-item">
|
||||
<div class="v-attached-icon">
|
||||
<i :class="classIcon(item.extension)"></i>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div @click="item.onClick" class="v-item-except text-sm h-1x">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.titleOutput }}</h6>
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.outputDocuments"
|
||||
:key="item.title"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<div class="v-list v-list-row block">
|
||||
<div class="v-list-item">
|
||||
<div class="v-attached-icon">
|
||||
<i :class="classIcon(item.extension)"></i>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<div @click="item.onClick" class="v-item-except text-sm h-1x">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "IoDocuments",
|
||||
props: {
|
||||
data: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icon: {
|
||||
pdf: "fas fa-file-pdf",
|
||||
doc: "fas fa-file-word",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
classIcon(icon) {
|
||||
return this.icon[icon];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-list-item {
|
||||
position: relative;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.v-list-row .v-list-item {
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.block {
|
||||
background: #fff;
|
||||
border-width: 0;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.v-list {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.v-item-except {
|
||||
padding-left: 10px;
|
||||
color: #6c757d !important;
|
||||
}
|
||||
|
||||
.v-attached-icon {
|
||||
font-size: 25px;
|
||||
}
|
||||
</style>
|
||||
@@ -4,7 +4,7 @@
|
||||
<a href=""
|
||||
><img
|
||||
class="mx-auto rounded-circle v-img-fluid"
|
||||
src="http://demos.themes.guide/bodeo/assets/images/users/m103.jpg"
|
||||
:src="path"
|
||||
alt="avatar"
|
||||
/></a>
|
||||
</div>
|
||||
@@ -29,6 +29,18 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
path() {
|
||||
if (this.data) {
|
||||
return (
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${this.data.data.USR_UID}`
|
||||
);
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<a href=""
|
||||
><img
|
||||
class="mx-auto rounded-circle v-img-fluid"
|
||||
src="http://demos.themes.guide/bodeo/assets/images/users/m103.jpg"
|
||||
:src="pathImgOwner"
|
||||
alt="avatar"
|
||||
/></a>
|
||||
</div>
|
||||
@@ -44,7 +44,7 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-secondary btn-sm" @click="onClickComment">
|
||||
<button class="btn btn-success btn-sm" @click="onClickComment">
|
||||
{{ $t("ID_SEND") }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -68,6 +68,15 @@ export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
pathImgOwner() {
|
||||
return (
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${window.config.USR_UID}`
|
||||
);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
@@ -91,4 +100,9 @@ export default {
|
||||
.v-check-comment {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.v-img-fluid {
|
||||
max-width: 30px;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -65,7 +65,7 @@
|
||||
<div v-else class="container v-case-summary-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary btn-sm"
|
||||
class="btn btn-success btn-sm"
|
||||
@click="data.onClick"
|
||||
>
|
||||
{{ data.btnLabel }}
|
||||
|
||||
@@ -155,7 +155,6 @@ export default {
|
||||
.search(that.jsonFilters)
|
||||
.then((response) => {
|
||||
dt = that.formatDataResponse(response.data.data);
|
||||
console.log(dt);
|
||||
resolutionFunc({
|
||||
data: dt,
|
||||
count: response.data.total,
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<div id="case-detail" ref="case-detail" class="v-container-case-detail">
|
||||
<div>
|
||||
<p class="mb-2">
|
||||
<b-icon icon="arrow-left" @click="backSearch()"></b-icon
|
||||
><u>Back to Results</u>
|
||||
<p class="">
|
||||
<b-icon icon="arrow-left"></b-icon>
|
||||
<button type="button" class="btn btn-link" @click="$emit('onLastPage')">
|
||||
{{ $t("ID_BACK") }}
|
||||
</button>
|
||||
<button-fleft :data="newCase"></button-fleft>
|
||||
</p>
|
||||
<modal-new-request ref="newRequest"></modal-new-request>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
@@ -70,7 +74,10 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<attached-documents :data="dataAttachedDocuments"></attached-documents>
|
||||
<attached-documents
|
||||
v-if="dataAttachedDocuments.items.length > 0"
|
||||
:data="dataAttachedDocuments"
|
||||
></attached-documents>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,7 +90,9 @@ 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 ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
|
||||
import Api from "../api/index";
|
||||
export default {
|
||||
@@ -96,11 +105,20 @@ export default {
|
||||
CaseComment,
|
||||
CaseComments,
|
||||
ModalCancelCase,
|
||||
ButtonFleft,
|
||||
ModalNewRequest,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
dataCase: null,
|
||||
newCase: {
|
||||
title: this.$i18n.t("ID_NEW_CASE"),
|
||||
class: "btn-success",
|
||||
onClick: () => {
|
||||
this.$refs["newRequest"].show();
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
"task",
|
||||
"case_title",
|
||||
@@ -374,6 +392,6 @@ export default {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
padding-left: 50px;
|
||||
padding-right: 0px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -28,7 +28,7 @@
|
||||
</div>
|
||||
<div slot="priority" slot-scope="props">{{ props.row.PRIORITY }}</div>
|
||||
<div slot="actions" slot-scope="props">
|
||||
<button class="settings-radio" @click="openCase(props)">
|
||||
<button class="btn btn-success btn-sm" @click="openCase(props)">
|
||||
Continue
|
||||
</button>
|
||||
</div>
|
||||
@@ -197,14 +197,14 @@ export default {
|
||||
* @param {object} item
|
||||
*/
|
||||
openCase(item) {
|
||||
this.$parent.dataCase = {
|
||||
this.$emit("onUpdateDataCase", {
|
||||
APP_UID: item.APP_UID,
|
||||
DEL_INDEX: item.DEL_INDEX,
|
||||
PRO_UID: item.PRO_UID,
|
||||
TAS_UID: item.TAS_UID,
|
||||
ACTION: "draft",
|
||||
};
|
||||
this.$parent.page = "XCase";
|
||||
});
|
||||
this.$emit("onUpdatePage", "XCase");
|
||||
},
|
||||
/**
|
||||
* Open case detail
|
||||
@@ -212,14 +212,15 @@ export default {
|
||||
* @param {object} item
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
this.$parent.dataCase = {
|
||||
that.$emit("onUpdateDataCase", {
|
||||
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";
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
class="sidebar-overlay"
|
||||
@click="collapsed = true"
|
||||
/>
|
||||
|
||||
<component
|
||||
v-bind:is="page"
|
||||
ref="component"
|
||||
@@ -25,6 +24,9 @@
|
||||
:name="pageName"
|
||||
@onSubmitFilter="onSubmitFilter"
|
||||
@onRemoveFilter="onRemoveFilter"
|
||||
@onUpdatePage="onUpdatePage"
|
||||
@onUpdateDataCase="onUpdateDataCase"
|
||||
@onLastPage="onLastPage"
|
||||
></component>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,6 +65,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lastPage: "MyCases",
|
||||
page: "MyCases",
|
||||
menu: null,
|
||||
dataCase: {},
|
||||
@@ -159,6 +162,17 @@ export default {
|
||||
this.pageId = null;
|
||||
this.pageName = null;
|
||||
},
|
||||
onUpdatePage(page) {
|
||||
this.lastPage = this.page;
|
||||
this.page = page;
|
||||
},
|
||||
onUpdateDataCase(data) {
|
||||
this.dataCase = data;
|
||||
},
|
||||
onLastPage(){
|
||||
this.page = this.lastPage;
|
||||
this.lastPage = "MyCases"
|
||||
},
|
||||
removeMenuSearchChild(id) {
|
||||
let newMenu = this.menu;
|
||||
let advSearch = _.find(newMenu, function(o) {
|
||||
|
||||
@@ -45,7 +45,10 @@
|
||||
</div>
|
||||
<div slot="priority" slot-scope="props">{{ props.row.PRIORITY }}</div>
|
||||
<div slot="actions" slot-scope="props">
|
||||
<button class="settings-radio" @click="showModalUnpauseCase(props.row)">
|
||||
<button
|
||||
class="btn btn-success btn-sm"
|
||||
@click="showModalUnpauseCase(props.row)"
|
||||
>
|
||||
{{ $t("ID_UNPAUSE") }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -223,14 +226,15 @@ export default {
|
||||
* @param {object} item
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
this.$parent.dataCase = {
|
||||
that.$emit("onUpdateDataCase", {
|
||||
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";
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
showModalUnpauseCase(item) {
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
</div>
|
||||
<div slot="priority" slot-scope="props">{{ props.row.PRIORITY }}</div>
|
||||
<div slot="actions" slot-scope="props">
|
||||
<button class="settings-radio" @click="openCase(props.row)">
|
||||
Continue
|
||||
<button class="btn btn-success btn-sm" @click="openCase(props.row)">
|
||||
{{ $t("ID_OPEN_CASE") }}
|
||||
</button>
|
||||
</div>
|
||||
</v-server-table>
|
||||
@@ -219,14 +219,14 @@ export default {
|
||||
* @param {object} item
|
||||
*/
|
||||
openCase(item) {
|
||||
this.$parent.dataCase = {
|
||||
this.$emit("onUpdateDataCase", {
|
||||
APP_UID: item.APP_UID,
|
||||
DEL_INDEX: item.DEL_INDEX,
|
||||
PRO_UID: item.PRO_UID,
|
||||
TAS_UID: item.TAS_UID,
|
||||
ACTION: "todo",
|
||||
};
|
||||
this.$parent.page = "XCase";
|
||||
});
|
||||
this.$emit("onUpdatePage", "XCase");
|
||||
},
|
||||
/**
|
||||
* Open case detail
|
||||
@@ -234,14 +234,15 @@ export default {
|
||||
* @param {object} item
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
this.$parent.dataCase = {
|
||||
that.$emit("onUpdateDataCase", {
|
||||
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";
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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)">Claim Case</button>
|
||||
<button class="btn btn-success btn-sm" @click="claimCase(props.row)">
|
||||
{{ $t("ID_CLAIM_CASE") }}
|
||||
</button>
|
||||
</div>
|
||||
</v-server-table>
|
||||
<ModalClaimCase ref="modal-claim-case"></ModalClaimCase>
|
||||
</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 ModalClaimCase from "./modal/ModalClaimCase.vue";
|
||||
import api from "./../api/index";
|
||||
|
||||
export default {
|
||||
@@ -60,6 +69,7 @@ export default {
|
||||
ButtonFleft,
|
||||
ModalNewRequest,
|
||||
TaskCell,
|
||||
ModalClaimCase,
|
||||
},
|
||||
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,
|
||||
PRO_UID: v.PRO_UID,
|
||||
TAS_UID: v.TAS_UID,
|
||||
DEL_INDEX: v.DEL_INDEX,
|
||||
APP_UID: v.APP_UID,
|
||||
});
|
||||
});
|
||||
return data;
|
||||
@@ -179,6 +195,10 @@ export default {
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (!(name && lastName && userName)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
@@ -202,11 +222,34 @@ export default {
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Open selected cases in the inbox
|
||||
* Claim case
|
||||
*
|
||||
* @param {object} item
|
||||
*/
|
||||
openCase(item) {},
|
||||
claimCase(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "unassigned" }, item)).then(() => {
|
||||
that.$refs["modal-claim-case"].data = item;
|
||||
that.$refs["modal-claim-case"].show();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Open case detail
|
||||
*
|
||||
* @param {object} item
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
that.$emit("onUpdateDataCase", {
|
||||
APP_UID: item.APP_UID,
|
||||
DEL_INDEX: item.DEL_INDEX,
|
||||
PRO_UID: item.PRO_UID,
|
||||
TAS_UID: item.TAS_UID,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
74
resources/assets/js/home/modal/ModalClaimCase.vue
Normal file
74
resources/assets/js/home/modal/ModalClaimCase.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-modal
|
||||
ref="modal-claim-case"
|
||||
hide-footer
|
||||
:title="$t('ID_CONFIRMATION')"
|
||||
size="md"
|
||||
>
|
||||
<p>
|
||||
{{ $t("ID_ARE_YOU_SURE_CLAIM_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="claimCase">
|
||||
{{ $t("ID_CLAIM") }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import api from "./../../api/index";
|
||||
export default {
|
||||
name: "ModalClaimCase",
|
||||
components: {},
|
||||
props: {},
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
data: null,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
show() {
|
||||
this.$refs["modal-claim-case"].show();
|
||||
},
|
||||
cancel() {
|
||||
this.$refs["modal-claim-case"].hide();
|
||||
},
|
||||
claimCase() {
|
||||
let that = this;
|
||||
api.cases.claim(this.data).then((response) => {
|
||||
if (response.statusText == "OK") {
|
||||
that.$refs["modal-claim-case"].hide();
|
||||
that.$parent.$emit("onUpdateDataCase", {
|
||||
APP_UID: this.data.APP_UID,
|
||||
DEL_INDEX: this.data.DEL_INDEX,
|
||||
PRO_UID: this.data.PRO_UID,
|
||||
TAS_UID: this.data.TAS_UID,
|
||||
ACTION: "todo",
|
||||
});
|
||||
that.$parent.$emit("onUpdatePage", "XCase");
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
File diff suppressed because one or more lines are too long
@@ -52137,3 +52137,9 @@ msgstr "Confirmation"
|
||||
#: 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?"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
|
||||
#: LABEL/ID_ARE_YOU_SURE_CLAIM_TASK
|
||||
msgid "Are you sure want to claim the task?"
|
||||
msgstr "Are you sure want to claim the task?"
|
||||
@@ -57196,6 +57196,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( '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_ARE_YOU_SURE_CLAIM_TASK','en','Are you sure want to claim 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') ,
|
||||
|
||||
Reference in New Issue
Block a user