Merged in release/3.6.0 (pull request #7740)
Updating develop with last changes in 3.6.0 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -68,7 +68,8 @@ const services = {
|
||||
SEARCH: "/home/search",
|
||||
PROCESSES: "/home/processes",
|
||||
USERS: "/home/users",
|
||||
TASKS: "/home/tasks"
|
||||
TASKS: "/home/tasks",
|
||||
DEBUG_STATUS: "/home/process-debug-status?processUid={prj_uid}"
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
@@ -45,6 +45,16 @@ export let cases = {
|
||||
keys: {}
|
||||
});
|
||||
},
|
||||
openSummary(data) {
|
||||
var params = new FormData();
|
||||
params.append('appUid', data.APP_UID);
|
||||
params.append('delIndex', data.DEL_INDEX);
|
||||
params.append('action', 'todo');
|
||||
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`appProxy/requestOpenSummary`, params);
|
||||
},
|
||||
inputdocuments(data) {
|
||||
var params = new FormData();
|
||||
params.append('appUid', data.APP_UID);
|
||||
@@ -73,7 +83,11 @@ export let cases = {
|
||||
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`appProxy/getSummary`, params);
|
||||
`appProxy/getSummary`, params, {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache'
|
||||
}
|
||||
});
|
||||
},
|
||||
casenotes(data) {
|
||||
var params = new FormData();
|
||||
@@ -125,6 +139,14 @@ export let cases = {
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
},
|
||||
actions(data) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'getCaseMenu');
|
||||
params.append('app_status', 'TO_DO');
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/ajaxListener`, params);
|
||||
},
|
||||
unpause(data) {
|
||||
var params = new URLSearchParams();
|
||||
params.append('action', 'unpauseCase');
|
||||
@@ -164,8 +186,49 @@ export let cases = {
|
||||
keys: {},
|
||||
paged: dt.paged
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* Make a search request to the Api service
|
||||
* @param {object} dt - filter parameters
|
||||
*/
|
||||
debugStatus(dt) {
|
||||
return Api.get({
|
||||
service: "DEBUG_STATUS",
|
||||
params: {},
|
||||
keys: {
|
||||
prj_uid: dt.PRO_UID
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* Get debug Vars in ajax service
|
||||
* @param {*} data
|
||||
*/
|
||||
debugVars(data) {
|
||||
var params;
|
||||
if (data.filter === "all") {
|
||||
return axios.get(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/debug_vars`);
|
||||
} else {
|
||||
params = new URLSearchParams();
|
||||
params.append('filter', data.filter);
|
||||
return axios.post(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/debug_vars`, params);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get triggers debug Vars in ajax service
|
||||
* @param {*} data
|
||||
*/
|
||||
debugVarsTriggers(data) {
|
||||
let dc = _.random(0, 10000000000),
|
||||
r = _.random(1.0, 100.0);
|
||||
return axios.get(window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`cases/debug_triggers?r=${r}&_dc=${dc}`);
|
||||
},
|
||||
};
|
||||
|
||||
export let casesHeader = {
|
||||
|
||||
@@ -72,11 +72,12 @@ export let filters = {
|
||||
/**
|
||||
* Service to get the users list
|
||||
*/
|
||||
taskList(query) {
|
||||
taskList(params) {
|
||||
return Api.get({
|
||||
service: "TASKS",
|
||||
params: {
|
||||
text: query,
|
||||
text: params.query,
|
||||
proId: params.proId
|
||||
},
|
||||
keys: {},
|
||||
});
|
||||
|
||||
@@ -80,4 +80,16 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
color: white;
|
||||
background-color: #ffc107;
|
||||
border-color: #ffc107;
|
||||
}
|
||||
|
||||
.btn-warning:hover {
|
||||
color: white;
|
||||
background-color: #e0a800;
|
||||
border-color: #d39e00;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.items"
|
||||
:key="item.title"
|
||||
:key="item.data.id"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<div class="v-list v-list-row block">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="card-text">
|
||||
<div
|
||||
v-for="item in data.items"
|
||||
:key="item.title"
|
||||
:key="item.data.id"
|
||||
class="v-attached-block"
|
||||
>
|
||||
<span>
|
||||
|
||||
@@ -123,18 +123,22 @@ export default {
|
||||
onDropFile(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if(this.data.noPerms === 1){
|
||||
return;
|
||||
}
|
||||
let that = this,
|
||||
fls = [];
|
||||
_.each(e.dataTransfer.files, (f) => {
|
||||
that.files.push(f);
|
||||
});
|
||||
|
||||
that.files = that.files.slice(0,5);
|
||||
_.each(that.files, (f) => {
|
||||
fls.push({
|
||||
data: f,
|
||||
title: f.name,
|
||||
extension: f.name.split(".").pop(),
|
||||
onClick: () => {},
|
||||
id: _.random(1000000)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -143,6 +147,9 @@ export default {
|
||||
},
|
||||
onDragOver(e) {
|
||||
e.preventDefault();
|
||||
if(this.data.noPerms === 1){
|
||||
return;
|
||||
}
|
||||
if (!this.showMaskDrop) {
|
||||
this.showMaskDrop = true;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div v-if="data.onClick">
|
||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.titleActions }}</h6>
|
||||
<div v-if="data.btnType" class="container v-case-summary-center">
|
||||
<div class="container v-case-summary-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-success btn-sm"
|
||||
@@ -62,14 +63,6 @@
|
||||
{{ data.btnLabel }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-else class="container v-case-summary-center">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-success btn-sm"
|
||||
@click="data.onClick"
|
||||
>
|
||||
{{ data.btnLabel }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<div class="summaryForm">
|
||||
<iframe
|
||||
:width="width"
|
||||
ref="IFrameSummaryForm"
|
||||
frameborder="0"
|
||||
:src="path"
|
||||
:height="height"
|
||||
allowfullscreen
|
||||
>
|
||||
</iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "MoreInformation",
|
||||
props: {
|
||||
data: Object
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
height: "500px",
|
||||
width: "100%",
|
||||
diffHeight: 10
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
path() {
|
||||
let url = "";
|
||||
if (this.data && this.data.DYN_UID) {
|
||||
url =
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
'/cases/summary?APP_UID='+this.data.APP_UID +
|
||||
'&DEL_INDEX=' + this.data.DEL_INDEX +
|
||||
'&DYN_UID=' + this.data.DYN_UID;
|
||||
}
|
||||
return url;
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
300
resources/assets/js/components/home/debugger/Debugger.vue
Normal file
300
resources/assets/js/components/home/debugger/Debugger.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ export default {
|
||||
isOnMobile: false,
|
||||
hideToggle: true,
|
||||
selectedTheme: "",
|
||||
sidebarWidth: "310px",
|
||||
sidebarWidth: "260px",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -42,7 +42,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.onResize();
|
||||
window.addEventListener("resize", this.onResize);
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
{{ tagContent(tag) }}
|
||||
</div>
|
||||
<component
|
||||
:filters="filters"
|
||||
v-bind:is="tagComponent(tag)"
|
||||
v-bind:info="tagInfo(tag)"
|
||||
v-bind:tag="tag"
|
||||
@@ -256,7 +257,7 @@ export default {
|
||||
id: "CaseStatus",
|
||||
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_CASE_STATUS')}`,
|
||||
optionLabel: this.$i18n.t('ID_STATUS'),
|
||||
detail: "ID_PLEASE_SELECT_THE_STATUS_FOR_THE_SEARCH",
|
||||
detail: this.$i18n.t('ID_PLEASE_SELECT_THE_STATUS_FOR_THE_SEARCH'),
|
||||
tagText: "",
|
||||
tagPrefix: this.$i18n.t('ID_SEARCH_BY_STATUS'),
|
||||
items:[
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
SearchPopover,
|
||||
Multiselect
|
||||
},
|
||||
props: ["tag", "info", "filter"],
|
||||
props: ["tag", "info", "filters", "filter"],
|
||||
data() {
|
||||
return {
|
||||
taks: [],
|
||||
@@ -53,9 +53,12 @@ export default {
|
||||
*/
|
||||
|
||||
asyncFind(query) {
|
||||
this.isLoading = true;
|
||||
let params = {};
|
||||
this.isLoading = true;
|
||||
params.proId = this.getProcess();
|
||||
params.query = query;
|
||||
api.filters
|
||||
.taskList(query)
|
||||
.taskList(params)
|
||||
.then((response) => {
|
||||
this.taks = response.data;
|
||||
this.isLoading = false;
|
||||
@@ -64,6 +67,13 @@ export default {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get the process id to manage the dependency
|
||||
*/
|
||||
getProcess() {
|
||||
let component = _.find(this.filters, function(o) { return o.fieldId === "processName"; });
|
||||
return component ? component.value : null;
|
||||
},
|
||||
/**
|
||||
* Form validations review
|
||||
*/
|
||||
|
||||
81
resources/assets/js/components/vuetable/CurrentUserCell.vue
Normal file
81
resources/assets/js/components/vuetable/CurrentUserCell.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div v-if="data.length" class="grouped-cell">
|
||||
<div v-for="(item, index) in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div class="avatar" :id="id + index">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="2em"
|
||||
></b-avatar>
|
||||
</div>
|
||||
<b-popover
|
||||
:target="id + index"
|
||||
placement="top"
|
||||
ref="popover"
|
||||
triggers="hover"
|
||||
>
|
||||
<b-row >
|
||||
<b-col md="3">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="4em"
|
||||
></b-avatar>
|
||||
</b-col>
|
||||
<b-col md="9">
|
||||
<div class="font-weight-bold">{{item.USERNAME_DISPLAY_FORMAT}}</div>
|
||||
<div v-if="item.POSITION !== ''">{{item.POSITION}}</div>
|
||||
<b-link :href="mailto(item.EMAIL)" >{{item.EMAIL}}</b-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-popover>
|
||||
<div class="col ellipsis">
|
||||
{{ item.USERNAME_DISPLAY_FORMAT }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "CurrentUserCell",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
id: "avatar-" + _.random(1000000)
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Generates the mail link
|
||||
*/
|
||||
mailto: function(email) {
|
||||
return "mailto:" + email;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.popover {
|
||||
max-width: 600px !important;
|
||||
min-width: 200px !important;
|
||||
}
|
||||
.grouped-cell {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.color {
|
||||
color: red;
|
||||
}
|
||||
.avatar {
|
||||
color: "red";
|
||||
width: "1.3em";
|
||||
}
|
||||
</style>
|
||||
@@ -1,22 +1,46 @@
|
||||
<template>
|
||||
<div v-if="data.length" class="grouped-cell">
|
||||
<div v-for="item in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div v-for="(item, index) in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div
|
||||
v-bind:style="{ color: activeColor(item.STATUS) }"
|
||||
v-b-popover.hover.top="item.DELAYED_MSG"
|
||||
:id="statusId + index"
|
||||
>
|
||||
<i class="fas fa-square"></i>
|
||||
</div>
|
||||
<b-popover :target="statusId + index" triggers="hover" placement="top">
|
||||
<b> {{ item.DELAYED_TITLE }} </b> {{ item.DELAYED_MSG }}
|
||||
</b-popover>
|
||||
<div class="col ellipsis" v-b-popover.hover.top="item.TAS_NAME">
|
||||
{{ item.TAS_NAME }}
|
||||
</div>
|
||||
<div class="avatar">
|
||||
<div class="avatar" :id="id + index">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="1.2em"
|
||||
size="2em"
|
||||
></b-avatar>
|
||||
</div>
|
||||
<b-popover
|
||||
:target="id + index"
|
||||
placement="top"
|
||||
ref="popover"
|
||||
triggers="hover"
|
||||
>
|
||||
<b-row >
|
||||
<b-col md="3">
|
||||
<b-avatar
|
||||
variant="info"
|
||||
:src="item.AVATAR"
|
||||
size="4em"
|
||||
></b-avatar>
|
||||
</b-col>
|
||||
<b-col md="9">
|
||||
<div class="font-weight-bold">{{item.USERNAME}}</div>
|
||||
<div v-if="item.POSITION !== ''">{{item.POSITION}}</div>
|
||||
<b-link :href="mailto(item.EMAIL)" >{{item.EMAIL}}</b-link>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-popover>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -29,6 +53,8 @@ export default {
|
||||
return {
|
||||
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
||||
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
||||
id: "avatar-" + _.random(1000000),
|
||||
statusId: "status-" + _.random(1000000)
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -40,13 +66,20 @@ export default {
|
||||
activeColor: function(codeColor) {
|
||||
return this.colorMap[codeColor - 1];
|
||||
},
|
||||
mailto: function(email) {
|
||||
return "mailto:" + email;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style>
|
||||
.popover {
|
||||
max-width: 600px !important;
|
||||
min-width: 200px !important;
|
||||
}
|
||||
.grouped-cell {
|
||||
font-size: smaller;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.ellipsis {
|
||||
@@ -55,9 +88,7 @@ export default {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.color {
|
||||
|
||||
color: red;
|
||||
}
|
||||
.avatar {
|
||||
|
||||
@@ -1,48 +1,65 @@
|
||||
<template>
|
||||
<div class="v-task-cell">
|
||||
<div v-for="item in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
||||
<div v-bind:style="{ color: activeColor(item.CODE_COLOR) }">
|
||||
<i class="fas fa-square"></i>
|
||||
</div>
|
||||
<div class="col .v-task-cell-ellipsis">
|
||||
{{ item.TITLE }}
|
||||
</div>
|
||||
<div v-if="data.length" class="task-cell">
|
||||
<div v-for="(item, index) in data" class="d-flex mb-3">
|
||||
<div
|
||||
v-bind:style="{ color: activeColor(item.CODE_COLOR) }"
|
||||
:id="statusId + index"
|
||||
>
|
||||
<i class="fas fa-square"></i>
|
||||
</div>
|
||||
<b-popover :target="statusId + index" triggers="hover" placement="top">
|
||||
<b> {{ item.DELAYED_TITLE }} </b> {{ item.DELAYED_MSG }}
|
||||
</b-popover>
|
||||
<div class="col ellipsis" v-b-popover.hover.top="item.TITLE">
|
||||
{{ item.TITLE }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "TaskCell",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
||||
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get the style color to be applied in the square icon
|
||||
* @param {number} - status color(1-5)
|
||||
* @return {string} - color atribute string
|
||||
*/
|
||||
activeColor: function (codeColor) {
|
||||
return this.colorMap[codeColor - 1];
|
||||
name: "TaskCell",
|
||||
props: ["data"],
|
||||
data() {
|
||||
return {
|
||||
colorMap: ["green", "red", "orange", "blue", "silver"],
|
||||
statusId: "status-" + _.random(1000000)
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Get the style color to be applied in the square icon
|
||||
* @param {number} - status color(1-5)
|
||||
* @return {string} - color atribute string
|
||||
*/
|
||||
activeColor: function(codeColor) {
|
||||
return this.colorMap[codeColor - 1];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-task-cell {
|
||||
display: inline-flex;
|
||||
<style>
|
||||
.popover {
|
||||
max-width: 600px !important;
|
||||
min-width: 200px !important;
|
||||
}
|
||||
.task-cell {
|
||||
font-size: normal;
|
||||
}
|
||||
|
||||
.v-task-cell-ellipsis {
|
||||
white-space: nowrap;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
.ellipsis {
|
||||
white-space: nowrap;
|
||||
width: 140px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.color {
|
||||
color: red;
|
||||
}
|
||||
.avatar {
|
||||
color: "red";
|
||||
width: "1.3em";
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<div slot="info" slot-scope="props">
|
||||
<b-icon
|
||||
@@ -54,11 +55,7 @@
|
||||
{{ props.row.STATUS }}
|
||||
</div>
|
||||
<div slot="current_user" slot-scope="props">
|
||||
<div class="v-user-cell" v-for="item in props.row.USER">
|
||||
<div class="col .v-user-cell-ellipsis">
|
||||
{{ item.USER_DATA }}
|
||||
</div>
|
||||
</div>
|
||||
<CurrentUserCell :data="props.row.USER_DATA" />
|
||||
</div>
|
||||
<div slot="start_date" slot-scope="props">
|
||||
{{ props.row.START_DATE }}
|
||||
@@ -86,9 +83,10 @@ import ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
import AdvancedFilter from "../components/search/AdvancedFilter";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
import CurrentUserCell from "../components/vuetable/CurrentUserCell.vue";
|
||||
import ModalComments from "./modal/ModalComments.vue";
|
||||
import api from "./../api/index";
|
||||
import { Event } from "vue-tables-2";
|
||||
import utils from "./../utils/utils";
|
||||
|
||||
export default {
|
||||
name: "AdvancedSearch",
|
||||
@@ -97,6 +95,7 @@ export default {
|
||||
ButtonFleft,
|
||||
ModalNewRequest,
|
||||
TaskCell,
|
||||
CurrentUserCell,
|
||||
ModalComments
|
||||
},
|
||||
props: ["id", "name", "filters"],
|
||||
@@ -120,7 +119,6 @@ export default {
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
"info",
|
||||
"case_number",
|
||||
"case_title",
|
||||
"process_name",
|
||||
@@ -159,7 +157,16 @@ export default {
|
||||
},
|
||||
customFilters: ["myfilter"],
|
||||
},
|
||||
pmDateFormat: window.config.FORMATS.dateFormat
|
||||
pmDateFormat: window.config.FORMATS.dateFormat,
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -168,6 +175,23 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.openCaseDetail(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases data by header
|
||||
*/
|
||||
@@ -212,7 +236,7 @@ export default {
|
||||
CASE_TITLE: v.DEL_TITLE,
|
||||
PROCESS_NAME: v.PRO_TITLE,
|
||||
TASK: this.formatTasks(v.THREAD_TASKS),
|
||||
USER: this.formatUser(v.THREAD_USERS),
|
||||
USER_DATA: this.formatUser(v.THREAD_USERS),
|
||||
START_DATE: v.APP_CREATE_DATE_LABEL,
|
||||
FINISH_DATE: v.APP_FINISH_DATE_LABEL,
|
||||
DURATION: v.DURATION,
|
||||
@@ -235,58 +259,35 @@ export default {
|
||||
dataFormat.push({
|
||||
TITLE: data[i].tas_title,
|
||||
CODE_COLOR: data[i].tas_color,
|
||||
DELAYED_TITLE: data[i].tas_status === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[data[i].tas_status],
|
||||
DELAYED_MSG: data[i].tas_status === "OVERDUE" ? data[i].delay : ""
|
||||
|
||||
});
|
||||
}
|
||||
return dataFormat;
|
||||
|
||||
},
|
||||
formatUser(data) {
|
||||
var i,
|
||||
dataFormat = [];
|
||||
for (i = 0; i < data.length; i += 1) {
|
||||
dataFormat.push({
|
||||
USER_DATA: this.nameFormatCases(
|
||||
data[i].usr_firstname,
|
||||
data[i].usr_lastname,
|
||||
data[i].usr_username
|
||||
)
|
||||
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||
userName: data[i].usr_firstname,
|
||||
firstName: data[i].usr_lastname,
|
||||
lastName: data[i].usr_username,
|
||||
format: window.config.FORMATS.format || null
|
||||
}),
|
||||
EMAIL: data[i].user_tooltip.usr_email,
|
||||
POSITION: data[i].user_tooltip.usr_position,
|
||||
AVATAR: window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${data[i].user_id}`
|
||||
});
|
||||
}
|
||||
return dataFormat;
|
||||
},
|
||||
/**
|
||||
* Get for user format name configured in Processmaker Environment Settings
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} lastName
|
||||
* @param {string} userName
|
||||
* @return {string} nameFormat
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
if (this.nameFormat === "@firstName @lastName") {
|
||||
nameFormat = name + " " + lastName;
|
||||
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||
} else if (this.nameFormat === "@userName") {
|
||||
nameFormat = userName;
|
||||
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||
} else if (this.nameFormat === "@lastName @firstName") {
|
||||
nameFormat = lastName + " " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||
nameFormat = lastName + ", " + name;
|
||||
} else if (
|
||||
this.nameFormat === "@lastName, @firstName (@userName)"
|
||||
) {
|
||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||
} else {
|
||||
nameFormat = name + " " + lastName;
|
||||
}
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Convert string to date format
|
||||
*
|
||||
|
||||
@@ -107,8 +107,9 @@ import ButtonFleft from "../components/home/ButtonFleft.vue";
|
||||
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
|
||||
import utils from "./../utils/utils";
|
||||
import Api from "../api/index";
|
||||
|
||||
export default {
|
||||
name: "CaseDetail",
|
||||
components: {
|
||||
@@ -155,7 +156,7 @@ export default {
|
||||
headings: {
|
||||
task: this.$i18n.t("ID_TASK"),
|
||||
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
||||
assignee: this.$i18n.t("ID_ASSIGNEE"),
|
||||
assignee: this.$i18n.t("ID_CURRENT_USER"),
|
||||
status: this.$i18n.t("ID_STATUS"),
|
||||
due_date: this.$i18n.t("ID_DUE_DATE"),
|
||||
actions: this.$i18n.t("ID_ACTIONS"),
|
||||
@@ -201,6 +202,7 @@ export default {
|
||||
this.getInputDocuments();
|
||||
this.getOutputDocuments();
|
||||
this.getCasesNotes();
|
||||
this.requestOpenSummary();
|
||||
},
|
||||
methods: {
|
||||
postComment(comment, send, files) {
|
||||
@@ -241,7 +243,9 @@ export default {
|
||||
this.dataAttachedDocuments.items = att;
|
||||
},
|
||||
getDataCaseSummary() {
|
||||
let that = this;
|
||||
let action,
|
||||
option,
|
||||
that = this;
|
||||
Api.cases
|
||||
.casesummary(this.dataCase)
|
||||
.then((response) => {
|
||||
@@ -252,9 +256,7 @@ export default {
|
||||
titleActions: this.$i18n.t("ID_ACTIONS"),
|
||||
btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
|
||||
btnType: false,
|
||||
onClick: () => {
|
||||
that.$refs["modal-cancel-case"].show();
|
||||
},
|
||||
onClick: null,
|
||||
label: {
|
||||
numberCase: data[2].label,
|
||||
process: data[0].label,
|
||||
@@ -274,6 +276,19 @@ export default {
|
||||
duration: response.data[11].value.split(" ")[1],
|
||||
},
|
||||
};
|
||||
// Hack for identify the cancel case button
|
||||
Api.cases
|
||||
.actions(this.dataCase).then((response)=>{
|
||||
action = _.find(response.data, function(o) { return o.id == "ACTIONS"; });
|
||||
if(action){
|
||||
option = _.find(action.options, function(o) { return o.fn == "cancelCase"; });
|
||||
if(option && !option.hide){
|
||||
that.dataCaseSummary.onClick = () => {
|
||||
that.$refs["modal-cancel-case"].show();
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new Error(err);
|
||||
@@ -387,6 +402,7 @@ export default {
|
||||
let that = this,
|
||||
notesArray = [];
|
||||
_.each(notes, (n) => {
|
||||
n.id = _.random(1000000);
|
||||
notesArray.push({
|
||||
user: that.nameFormatCases(
|
||||
n.USR_FIRSTNAME,
|
||||
@@ -451,7 +467,13 @@ export default {
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
}],
|
||||
CASE_TITLE: v.DEL_TITLE,
|
||||
ASSIGNEE: v.USR_FIRSTNAME + " " + v.USR_LASTNAME,
|
||||
ASSIGNEE: v.USR_ID !== 0 ?
|
||||
utils.userNameDisplayFormat({
|
||||
userName: v.USR_USERNAME,
|
||||
firstName: v.USR_LASTNAME,
|
||||
lastName: v.USR_LASTNAME,
|
||||
format: window.config.FORMATS.format || null
|
||||
}) : this.$i18n.t("ID_UNASSIGNED"),
|
||||
STATUS: v.DEL_THREAD_STATUS,
|
||||
DUE_DATE: v.DEL_TASK_DUE_DATE,
|
||||
TASK_COLOR: v.TAS_COLOR_LABEL,
|
||||
@@ -490,7 +512,24 @@ export default {
|
||||
ACTION: "todo",
|
||||
});
|
||||
this.$emit("onUpdatePage", "XCase");
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Verify if the case has the permission Summary Form
|
||||
* to add dynUid in dataCase
|
||||
*/
|
||||
requestOpenSummary() {
|
||||
Api.cases
|
||||
.openSummary(this.dataCase)
|
||||
.then((response) => {
|
||||
var data = response.data;
|
||||
if (data.dynUid !== "") {
|
||||
this.dataCase.DYN_UID = data.dynUid;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -48,6 +49,7 @@ import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
import CasesFilter from "../components/search/CasesFilter";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
import api from "./../api/index";
|
||||
import utils from "./../utils/utils";
|
||||
|
||||
export default {
|
||||
name: "Draft",
|
||||
@@ -58,7 +60,7 @@ export default {
|
||||
TaskCell,
|
||||
CasesFilter,
|
||||
},
|
||||
props: {},
|
||||
props: ["defaultOption"],
|
||||
data() {
|
||||
return {
|
||||
newCase: {
|
||||
@@ -101,9 +103,20 @@ export default {
|
||||
},
|
||||
},
|
||||
pmDateFormat: "Y-m-d H:i:s",
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
this.openDefaultCase();
|
||||
},
|
||||
watch: {},
|
||||
computed: {
|
||||
/**
|
||||
@@ -116,6 +129,38 @@ export default {
|
||||
updated() {},
|
||||
beforeCreate() {},
|
||||
methods: {
|
||||
/**
|
||||
* Open a case when the component was mounted
|
||||
*/
|
||||
openDefaultCase() {
|
||||
let params;
|
||||
if(this.defaultOption) {
|
||||
params = utils.getAllUrlParams(this.defaultOption);
|
||||
if (params && params.app_uid && params.del_index) {
|
||||
this.openCase({
|
||||
APP_UID: params.app_uid,
|
||||
DEL_INDEX: params.del_index
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* On row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.openCase(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases todo data
|
||||
*/
|
||||
@@ -164,6 +209,9 @@ export default {
|
||||
TITLE: v.TAS_TITLE,
|
||||
CODE_COLOR: v.TAS_COLOR,
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
DELAYED_TITLE: v.TAS_STATUS === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[v.TAS_STATUS],
|
||||
DELAYED_MSG: v.TAS_STATUS === "OVERDUE" ? v.DELAY : ""
|
||||
}],
|
||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||
PRO_UID: v.PRO_UID,
|
||||
@@ -196,15 +244,17 @@ export default {
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
:id="pageId"
|
||||
:pageUri="pageUri"
|
||||
:name="pageName"
|
||||
:defaultOption="defaultOption"
|
||||
@onSubmitFilter="onSubmitFilter"
|
||||
@onRemoveFilter="onRemoveFilter"
|
||||
@onUpdatePage="onUpdatePage"
|
||||
@@ -78,7 +79,7 @@ export default {
|
||||
collapsed: false,
|
||||
selectedTheme: "",
|
||||
isOnMobile: false,
|
||||
sidebarWidth: "310px",
|
||||
sidebarWidth: "260px",
|
||||
pageId: null,
|
||||
pageName: null,
|
||||
pageUri: null,
|
||||
@@ -93,12 +94,12 @@ export default {
|
||||
CONSOLIDATED_CASES: "batch-routing",
|
||||
CASES_TO_REASSIGN: "task-reassignments",
|
||||
CASES_FOLDERS: "my-documents"
|
||||
}
|
||||
},
|
||||
defaultOption: window.config.defaultOption || ''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.onResize();
|
||||
window.addEventListener("resize", this.onResize);
|
||||
this.getMenu();
|
||||
this.listenerIframe();
|
||||
window.setInterval(
|
||||
@@ -136,7 +137,7 @@ export default {
|
||||
.get()
|
||||
.then((response) => {
|
||||
this.setDefaultCasesMenu(response.data);
|
||||
this.menu = this.mappingMenu(response.data);
|
||||
this.menu = this.mappingMenu(this.setDefaultIcon(response.data));
|
||||
this.setCounter();
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -174,6 +175,19 @@ export default {
|
||||
}
|
||||
return newData;
|
||||
},
|
||||
/**
|
||||
* Set a default icon if the item doesn't have one
|
||||
*/
|
||||
setDefaultIcon(data){
|
||||
var i,
|
||||
auxData = data;
|
||||
for (i = 0; i < auxData.length; i += 1) {
|
||||
if (auxData[i].icon !== undefined && auxData[i].icon === "") {
|
||||
auxData[i].icon = "fas fa-bars";
|
||||
}
|
||||
}
|
||||
return auxData;
|
||||
},
|
||||
OnClickSidebarItem(item) {
|
||||
if (item.item.page && item.item.page === "/advanced-search") {
|
||||
this.page = "advanced-search";
|
||||
@@ -312,7 +326,7 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
#home {
|
||||
padding-left: 310px;
|
||||
padding-left: 260px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
#home.collapsed {
|
||||
|
||||
@@ -64,8 +64,10 @@ export default {
|
||||
api.process.list
|
||||
.start()
|
||||
.then((response) => {
|
||||
that.categories = that.formatCategories(response.data);
|
||||
that.categoriesFiltered = that.categories;
|
||||
if (response.data && response.data.success !== "failure") {
|
||||
that.categories = that.formatCategories(response.data);
|
||||
that.categoriesFiltered = that.categories;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<template>
|
||||
<div id="v-mycases" ref="v-mycases" class="v-container-mycases">
|
||||
<b-alert
|
||||
:show="dataAlert.dismissCountDown"
|
||||
dismissible
|
||||
:variant="dataAlert.variant"
|
||||
@dismissed="dataAlert.dismissCountDown = 0"
|
||||
@dismiss-count-down="countDownChanged"
|
||||
>
|
||||
{{ dataAlert.message }}
|
||||
</b-alert>
|
||||
<button-fleft :data="newCase"></button-fleft>
|
||||
<MyCasesFilter
|
||||
:filters="filters"
|
||||
@@ -15,7 +24,13 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<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>
|
||||
@@ -56,6 +71,7 @@ import MyCasesFilter from "../components/search/MyCasesFilter";
|
||||
import ModalComments from "./modal/ModalComments.vue";
|
||||
import GroupedCell from "../components/vuetable/GroupedCell.vue";
|
||||
import api from "./../api/index";
|
||||
import utils from "./../utils/utils";
|
||||
|
||||
export default {
|
||||
name: "MyCases",
|
||||
@@ -70,6 +86,12 @@ export default {
|
||||
props: ["filters"],
|
||||
data() {
|
||||
return {
|
||||
dataAlert: {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
message: "",
|
||||
variant: "info"
|
||||
},
|
||||
metrics: [],
|
||||
title: this.$i18n.t('ID_MY_CASES'),
|
||||
filter: "CASES_INBOX",
|
||||
@@ -121,7 +143,16 @@ export default {
|
||||
},
|
||||
},
|
||||
translations: null,
|
||||
pmDateFormat: window.config.FORMATS.dateFormat
|
||||
pmDateFormat: window.config.FORMATS.dateFormat,
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -144,6 +175,43 @@ export default {
|
||||
updated() {},
|
||||
beforeCreate() {},
|
||||
methods: {
|
||||
/**
|
||||
* Row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.openCaseDetail(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Open case detail
|
||||
*
|
||||
* @param {object} item
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Get Cases Headers from BE
|
||||
*/
|
||||
@@ -151,8 +219,26 @@ export default {
|
||||
let that = this;
|
||||
api.casesHeader.get().then((response) => {
|
||||
that.headers = that.formatCasesHeaders(response.data);
|
||||
that.setFilterHeader();
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Set a filter in the header from Default Cases Menu option
|
||||
*/
|
||||
setFilterHeader() {
|
||||
let header = window.config._nodeId,
|
||||
filters = this.headers,
|
||||
filter,
|
||||
i;
|
||||
if (header === "CASES_TO_REVISE") {
|
||||
filter = "SUPERVISING";
|
||||
}
|
||||
for (i = 0; i < filters.length; i += 1) {
|
||||
if (filters[i].item === filter) {
|
||||
filters[i].onClick(filters[i]);
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases data by header
|
||||
*/
|
||||
@@ -223,46 +309,25 @@ export default {
|
||||
{
|
||||
TAS_NAME: data[i].tas_title,
|
||||
STATUS: data[i].tas_color,
|
||||
PENDING: ""
|
||||
DELAYED_TITLE: data[i].tas_status === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[data[i].tas_status],
|
||||
DELAYED_MSG: data[i].tas_status === "OVERDUE" ? data[i].delay : "",
|
||||
AVATAR: window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
`users/users_ViewPhotoGrid?pUID=${data[i].user_id}`,
|
||||
USERNAME: utils.userNameDisplayFormat({
|
||||
userName: data[i].user_tooltip.usr_username,
|
||||
firstName: data[i].user_tooltip.usr_firstname,
|
||||
lastName: data[i].user_tooltip.usr_lastname,
|
||||
format: window.config.FORMATS.format || null
|
||||
}),
|
||||
POSITION: data[i].user_tooltip.usr_position,
|
||||
EMAIL: data[i].user_tooltip.usr_email
|
||||
}
|
||||
);
|
||||
}
|
||||
return dataFormat;
|
||||
},
|
||||
/**
|
||||
* Get for user format name configured in Processmaker Environment Settings
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} lastName
|
||||
* @param {string} userName
|
||||
* @return {string} nameFormat
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
if (this.nameFormat === "@firstName @lastName") {
|
||||
nameFormat = name + " " + lastName;
|
||||
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||
} else if (this.nameFormat === "@userName") {
|
||||
nameFormat = userName;
|
||||
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||
} else if (this.nameFormat === "@lastName @firstName") {
|
||||
nameFormat = lastName + " " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||
nameFormat = lastName + ", " + name;
|
||||
} else if (
|
||||
this.nameFormat === "@lastName, @firstName (@userName)"
|
||||
) {
|
||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||
} else {
|
||||
nameFormat = name + " " + lastName;
|
||||
}
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Convert string to date format
|
||||
*
|
||||
@@ -349,32 +414,6 @@ export default {
|
||||
}
|
||||
return dateToConvert;
|
||||
},
|
||||
/**
|
||||
* Open selected cases in the inbox
|
||||
*
|
||||
* @param {object} item
|
||||
*/
|
||||
openCase(item) {
|
||||
const action = "todo";
|
||||
if (this.isIE) {
|
||||
window.open(
|
||||
"../../../cases/open?APP_UID=" +
|
||||
item.row.APP_UID +
|
||||
"&DEL_INDEX=" +
|
||||
item.row.DEL_INDEX +
|
||||
"&action=" +
|
||||
action
|
||||
);
|
||||
} else {
|
||||
window.location.href =
|
||||
"../../../cases/open?APP_UID=" +
|
||||
item.row.APP_UID +
|
||||
"&DEL_INDEX=" +
|
||||
item.row.DEL_INDEX +
|
||||
"&action=" +
|
||||
action;
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Format Response from HEADERS
|
||||
* @param {*} response
|
||||
@@ -401,18 +440,22 @@ export default {
|
||||
},
|
||||
};
|
||||
_.forEach(response, (v) => {
|
||||
data.push({
|
||||
title: v.title,
|
||||
counter: v.counter,
|
||||
item: v.id,
|
||||
icon: info[v.id].icon,
|
||||
onClick: (obj) => {
|
||||
that.title = obj.title;
|
||||
that.filterHeader = obj.item;
|
||||
that.$refs["vueTable"].getData();
|
||||
},
|
||||
class: info[v.id].class,
|
||||
});
|
||||
//Hack for display the SUPERVISING CARD
|
||||
if(!(v.id === "SUPERVISING" && v.counter === 0)){
|
||||
data.push({
|
||||
title: v.title,
|
||||
counter: v.counter,
|
||||
item: v.id,
|
||||
icon: info[v.id].icon,
|
||||
onClick: (obj) => {
|
||||
that.title = obj.title;
|
||||
that.filterHeader = obj.item;
|
||||
that.$refs["vueTable"].setPage(1); // Reset the page when change the header filter
|
||||
that.$refs["vueTable"].getData();
|
||||
},
|
||||
class: info[v.id].class
|
||||
});
|
||||
}
|
||||
});
|
||||
return data;
|
||||
},
|
||||
@@ -442,7 +485,25 @@ export default {
|
||||
*/
|
||||
onPostNotes() {
|
||||
this.$refs["vueTable"].getData();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Show the alert message
|
||||
* @param {string} message - message to be displayen 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>
|
||||
@@ -453,4 +514,4 @@ export default {
|
||||
padding-left: 50px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -13,6 +13,7 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -33,15 +34,8 @@
|
||||
<TaskCell :data="props.row.TASK" />
|
||||
</div>
|
||||
<div slot="current_user" slot-scope="props">
|
||||
{{
|
||||
nameFormatCases(
|
||||
props.row.USR_FIRSTNAME,
|
||||
props.row.USR_LASTNAME,
|
||||
props.row.USR_USERNAME
|
||||
)
|
||||
}}
|
||||
{{ props.row.USERNAME_DISPLAY_FORMAT }}
|
||||
</div>
|
||||
|
||||
<div slot="due_date" slot-scope="props">
|
||||
{{ props.row.DUE_DATE }}
|
||||
</div>
|
||||
@@ -70,6 +64,7 @@ import CasesFilter from "../components/search/CasesFilter";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
import ModalUnpauseCase from "./modal/ModalUnpauseCase.vue";
|
||||
import api from "./../api/index";
|
||||
import utils from "./../utils/utils";
|
||||
|
||||
export default {
|
||||
name: "Paused",
|
||||
@@ -97,7 +92,6 @@ export default {
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"current_user",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
@@ -132,6 +126,15 @@ export default {
|
||||
},
|
||||
},
|
||||
pmDateFormat: "Y-m-d H:i:s",
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -147,6 +150,23 @@ export default {
|
||||
updated() {},
|
||||
beforeCreate() {},
|
||||
methods: {
|
||||
/**
|
||||
* On row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.showModalUnpauseCase(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases todo data
|
||||
*/
|
||||
@@ -195,10 +215,16 @@ export default {
|
||||
TITLE: v.TAS_TITLE,
|
||||
CODE_COLOR: v.TAS_COLOR,
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
DELAYED_TITLE: v.TAS_STATUS === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[v.TAS_STATUS],
|
||||
DELAYED_MSG: v.TAS_STATUS === "OVERDUE" ? v.DELAY : ""
|
||||
}],
|
||||
USR_FIRSTNAME: v.USR_FIRSTNAME,
|
||||
USR_LASTNAME: v.USR_LASTNAME,
|
||||
USR_USERNAME: v.USR_USERNAME,
|
||||
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||
userName: v.USR_LASTNAME,
|
||||
firstName: v.USR_LASTNAME,
|
||||
lastName: v.USR_LASTNAME,
|
||||
format: window.config.FORMATS.format || null
|
||||
}),
|
||||
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||
@@ -210,38 +236,6 @@ export default {
|
||||
});
|
||||
return data;
|
||||
},
|
||||
/**
|
||||
* Get for user format name configured in Processmaker Environment Settings
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} lastName
|
||||
* @param {string} userName
|
||||
* @return {string} nameFormat
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
if (this.nameFormat === "@firstName @lastName") {
|
||||
nameFormat = name + " " + lastName;
|
||||
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||
} else if (this.nameFormat === "@userName") {
|
||||
nameFormat = userName;
|
||||
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||
} else if (this.nameFormat === "@lastName @firstName") {
|
||||
nameFormat = lastName + " " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||
nameFormat = lastName + ", " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName (@userName)") {
|
||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||
} else {
|
||||
nameFormat = name + " " + lastName;
|
||||
}
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Open case detail
|
||||
*
|
||||
@@ -249,15 +243,17 @@ export default {
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
showModalUnpauseCase(item) {
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
<tab :name="$t('ID_SUMMARY')">
|
||||
<PmCaseSummary :data="dataCaseSummary"> </PmCaseSummary>
|
||||
</tab>
|
||||
<tab :name="$t('ID_MORE_INFORMATION')">
|
||||
<MoreInformation :data="dataCase" v-if="currentTab == $t('ID_MORE_INFORMATION')">
|
||||
</MoreInformation>
|
||||
</tab>
|
||||
<tab :name="$t('ID_PROCESS_MAP')">
|
||||
<ProcessMap :data="dataCase" v-if="currentTab == $t('ID_PROCESS_MAP')">
|
||||
</ProcessMap>
|
||||
@@ -25,6 +29,7 @@ import PmCaseSummary from "./../components/home/caseDetail/PmCaseSummary.vue";
|
||||
import ProcessMap from "./../components/home/caseDetail/ProcessMap.vue";
|
||||
import CaseHistory from "./../components/home/caseDetail/CaseHistory.vue";
|
||||
import ChangeLog from "./../components/home/caseDetail/ChangeLog.vue";
|
||||
import MoreInformation from './../components/home/caseDetail/MoreInformation.vue';
|
||||
import Api from "../api/index";
|
||||
|
||||
export default {
|
||||
@@ -36,6 +41,7 @@ export default {
|
||||
PmCaseSummary,
|
||||
CaseHistory,
|
||||
ChangeLog,
|
||||
MoreInformation
|
||||
},
|
||||
props: {
|
||||
dataCase: Object,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -33,15 +34,8 @@
|
||||
<TaskCell :data="props.row.TASK" />
|
||||
</div>
|
||||
<div slot="current_user" slot-scope="props">
|
||||
{{
|
||||
nameFormatCases(
|
||||
props.row.USR_FIRSTNAME,
|
||||
props.row.USR_LASTNAME,
|
||||
props.row.USR_USERNAME
|
||||
)
|
||||
}}
|
||||
{{ props.row.USERNAME_DISPLAY_FORMAT}}
|
||||
</div>
|
||||
|
||||
<div slot="due_date" slot-scope="props">
|
||||
{{ props.row.DUE_DATE }}
|
||||
</div>
|
||||
@@ -65,6 +59,7 @@ import ModalNewRequest from "./ModalNewRequest.vue";
|
||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||
import CasesFilter from "../components/search/CasesFilter";
|
||||
import api from "./../api/index";
|
||||
import utils from "./../utils/utils";
|
||||
|
||||
export default {
|
||||
name: "Todo",
|
||||
@@ -75,6 +70,7 @@ export default {
|
||||
TaskCell,
|
||||
CasesFilter,
|
||||
},
|
||||
props: ["defaultOption"],
|
||||
data() {
|
||||
return {
|
||||
newCase: {
|
||||
@@ -90,7 +86,6 @@ export default {
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"current_user",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
@@ -124,6 +119,15 @@ export default {
|
||||
},
|
||||
},
|
||||
pmDateFormat: "Y-m-d H:i:s",
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -139,6 +143,38 @@ export default {
|
||||
updated() {},
|
||||
beforeCreate() {},
|
||||
methods: {
|
||||
/**
|
||||
* Open a case when the component was mounted
|
||||
*/
|
||||
openDefaultCase() {
|
||||
let params;
|
||||
if(this.defaultOption) {
|
||||
params = utils.getAllUrlParams(this.defaultOption);
|
||||
if (params && params.app_uid && params.del_index) {
|
||||
this.openCase({
|
||||
APP_UID: params.app_uid,
|
||||
DEL_INDEX: params.del_index
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* On row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.openCase(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases todo data
|
||||
*/
|
||||
@@ -187,10 +223,16 @@ export default {
|
||||
TITLE: v.TAS_TITLE,
|
||||
CODE_COLOR: v.TAS_COLOR,
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
DELAYED_TITLE: v.TAS_STATUS === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[v.TAS_STATUS],
|
||||
DELAYED_MSG: v.TAS_STATUS === "OVERDUE" ? v.DELAY : ""
|
||||
}],
|
||||
USR_FIRSTNAME: v.USR_FIRSTNAME,
|
||||
USR_LASTNAME: v.USR_LASTNAME,
|
||||
USR_USERNAME: v.USR_USERNAME,
|
||||
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||
userName: v.USR_LASTNAME,
|
||||
firstName: v.USR_LASTNAME,
|
||||
lastName: v.USR_LASTNAME,
|
||||
format: window.config.FORMATS.format || null
|
||||
}),
|
||||
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||
@@ -202,38 +244,6 @@ export default {
|
||||
});
|
||||
return data;
|
||||
},
|
||||
/**
|
||||
* Get for user format name configured in Processmaker Environment Settings
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} lastName
|
||||
* @param {string} userName
|
||||
* @return {string} nameFormat
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
if (this.nameFormat === "@firstName @lastName") {
|
||||
nameFormat = name + " " + lastName;
|
||||
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||
} else if (this.nameFormat === "@userName") {
|
||||
nameFormat = userName;
|
||||
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||
} else if (this.nameFormat === "@lastName @firstName") {
|
||||
nameFormat = lastName + " " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||
nameFormat = lastName + ", " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName (@userName)") {
|
||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||
} else {
|
||||
nameFormat = name + " " + lastName;
|
||||
}
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Open selected cases in the inbox
|
||||
*
|
||||
@@ -256,16 +266,18 @@ export default {
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
});
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
onUpdateFilters(data) {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
:columns="columns"
|
||||
:options="options"
|
||||
ref="vueTable"
|
||||
@row-click="onRowClick"
|
||||
>
|
||||
<div slot="detail" slot-scope="props">
|
||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||
@@ -32,16 +33,6 @@
|
||||
<div slot="task" slot-scope="props">
|
||||
<TaskCell :data="props.row.TASK" />
|
||||
</div>
|
||||
<div slot="current_user" slot-scope="props">
|
||||
{{
|
||||
nameFormatCases(
|
||||
props.row.USR_FIRSTNAME,
|
||||
props.row.USR_LASTNAME,
|
||||
props.row.USR_USERNAME
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div slot="due_date" slot-scope="props">
|
||||
{{ props.row.DUE_DATE }}
|
||||
</div>
|
||||
@@ -94,7 +85,6 @@ export default {
|
||||
"case_title",
|
||||
"process_name",
|
||||
"task",
|
||||
"current_user",
|
||||
"due_date",
|
||||
"delegation_date",
|
||||
"priority",
|
||||
@@ -129,6 +119,15 @@ export default {
|
||||
},
|
||||
},
|
||||
pmDateFormat: "Y-m-d H:i:s",
|
||||
clickCount: 0,
|
||||
singleClickTimer: null,
|
||||
statusTitle: {
|
||||
"ON_TIME": this.$i18n.t("ID_IN_PROGRESS"),
|
||||
"OVERDUE": this.$i18n.t("ID_TASK_OVERDUE"),
|
||||
"DRAFT": this.$i18n.t("ID_IN_DRAFT"),
|
||||
"PAUSED": this.$i18n.t("ID_PAUSED"),
|
||||
"UNASSIGNED": this.$i18n.t("ID_UNASSIGNED")
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@@ -144,6 +143,23 @@ export default {
|
||||
updated() {},
|
||||
beforeCreate() {},
|
||||
methods: {
|
||||
/**
|
||||
* On row click event handler
|
||||
* @param {object} event
|
||||
*/
|
||||
onRowClick(event) {
|
||||
let self = this;
|
||||
self.clickCount += 1;
|
||||
if (self.clickCount === 1) {
|
||||
self.singleClickTimer = setTimeout(function() {
|
||||
self.clickCount = 0;
|
||||
}, 400);
|
||||
} else if (self.clickCount === 2) {
|
||||
clearTimeout(self.singleClickTimer);
|
||||
self.clickCount = 0;
|
||||
self.claimCase(event.row);
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Get cases unassigned data
|
||||
*/
|
||||
@@ -192,10 +208,10 @@ export default {
|
||||
TITLE: v.TAS_TITLE,
|
||||
CODE_COLOR: v.TAS_COLOR,
|
||||
COLOR: v.TAS_COLOR_LABEL,
|
||||
DELAYED_TITLE: v.TAS_STATUS === "OVERDUE" ?
|
||||
this.$i18n.t("ID_DELAYED") + ":" : this.statusTitle[v.TAS_STATUS],
|
||||
DELAYED_MSG: v.TAS_STATUS === "OVERDUE" ? v.DELAY : ""
|
||||
}],
|
||||
USR_FIRSTNAME: v.USR_FIRSTNAME,
|
||||
USR_LASTNAME: v.USR_LASTNAME,
|
||||
USR_USERNAME: v.USR_USERNAME,
|
||||
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||
@@ -207,42 +223,6 @@ export default {
|
||||
});
|
||||
return data;
|
||||
},
|
||||
/**
|
||||
* Get for user format name configured in Processmaker Environment Settings
|
||||
*
|
||||
* @param {string} name
|
||||
* @param {string} lastName
|
||||
* @param {string} userName
|
||||
* @return {string} nameFormat
|
||||
*/
|
||||
nameFormatCases(name, lastName, userName) {
|
||||
let nameFormat = "";
|
||||
if (!(name && lastName && userName)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (/^\s*$/.test(name) && /^\s*$/.test(lastName)) {
|
||||
return nameFormat;
|
||||
}
|
||||
if (this.nameFormat === "@firstName @lastName") {
|
||||
nameFormat = name + " " + lastName;
|
||||
} else if (this.nameFormat === "@firstName @lastName (@userName)") {
|
||||
nameFormat = name + " " + lastName + " (" + userName + ")";
|
||||
} else if (this.nameFormat === "@userName") {
|
||||
nameFormat = userName;
|
||||
} else if (this.nameFormat === "@userName (@firstName @lastName)") {
|
||||
nameFormat = userName + " (" + name + " " + lastName + ")";
|
||||
} else if (this.nameFormat === "@lastName @firstName") {
|
||||
nameFormat = lastName + " " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName") {
|
||||
nameFormat = lastName + ", " + name;
|
||||
} else if (this.nameFormat === "@lastName, @firstName (@userName)") {
|
||||
nameFormat = lastName + ", " + name + " (" + userName + ")";
|
||||
} else {
|
||||
nameFormat = name + " " + lastName;
|
||||
}
|
||||
return nameFormat;
|
||||
},
|
||||
/**
|
||||
* Claim case
|
||||
*
|
||||
@@ -251,8 +231,10 @@ export default {
|
||||
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();
|
||||
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
that.$refs["modal-claim-case"].data = item;
|
||||
that.$refs["modal-claim-case"].show();
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -262,15 +244,17 @@ export default {
|
||||
*/
|
||||
openCaseDetail(item) {
|
||||
let that = this;
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||
api.cases.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,
|
||||
APP_NUMBER: item.CASE_NUMBER,
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
that.$emit("onUpdatePage", "case-detail");
|
||||
});
|
||||
},
|
||||
onRemoveFilter(data) {},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="d-flex">
|
||||
<iframe
|
||||
:width="width"
|
||||
ref="xIFrame"
|
||||
@@ -7,21 +7,28 @@
|
||||
:src="path"
|
||||
:height="height"
|
||||
allowfullscreen
|
||||
@load="onLoadIframe"
|
||||
></iframe>
|
||||
<Debugger v-if="openDebug === true" :style="'height:' + height + 'px'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Debugger from "../components/home/debugger/Debugger.vue";
|
||||
import api from "../api/index";
|
||||
export default {
|
||||
name: "XCase",
|
||||
components: {},
|
||||
components: {
|
||||
Debugger
|
||||
},
|
||||
props: {
|
||||
data: Object,
|
||||
data: Object
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
this.height = window.innerHeight - this.diffHeight;
|
||||
this.dataCase = this.$parent.dataCase;
|
||||
if(this.dataCase.ACTION =="jump") {
|
||||
if (this.dataCase.ACTION === "jump") {
|
||||
this.path =
|
||||
window.config.SYS_SERVER +
|
||||
window.config.SYS_URI +
|
||||
@@ -33,24 +40,35 @@ export default {
|
||||
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=${this.dataCase.ACTION}`;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
api.cases.debugStatus(this.dataCase).then((response) => {
|
||||
if (response.data) {
|
||||
that.openDebug = true;
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
openDebug: false,
|
||||
dataCase: null,
|
||||
height: "100%",
|
||||
width: "100%",
|
||||
diffHeight: 10,
|
||||
dataCase: null,
|
||||
path: "",
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
classBtn(cls) {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
onLoadIframe() {},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.debugger-inline-cont {
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,7 @@ import VueRouter from "vue-router";
|
||||
import VueSidebarMenu from "vue-sidebar-menu";
|
||||
import VueI18n from 'vue-i18n';
|
||||
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
||||
import { ServerTable, Event} from 'vue-tables-2';
|
||||
import { ServerTable, Event, ClientTable} from 'vue-tables-2';
|
||||
import "@fortawesome/fontawesome-free/css/all.css";
|
||||
import "@fortawesome/fontawesome-free/js/all.js";
|
||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
||||
@@ -11,13 +11,13 @@ import 'bootstrap/dist/css/bootstrap.min.css'
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
|
||||
import Home from "./Home";
|
||||
|
||||
Vue.use(VueRouter);
|
||||
Vue.use(VueSidebarMenu);
|
||||
Vue.use(BootstrapVue);
|
||||
Vue.use(BootstrapVueIcons);
|
||||
Vue.use(VueI18n);
|
||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
||||
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
||||
window.ProcessMaker = {
|
||||
apiClient: require('axios')
|
||||
};
|
||||
|
||||
@@ -52,6 +52,7 @@ export default {
|
||||
mounted() {},
|
||||
data() {
|
||||
return {
|
||||
permission: true,
|
||||
dataAlert: {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
@@ -114,18 +115,33 @@ export default {
|
||||
return "btn v-btn-request " + cls;
|
||||
},
|
||||
show() {
|
||||
this.getCasesNotes();
|
||||
this.$refs["modal-comments"].show();
|
||||
let that = this;
|
||||
//Clean the data attached documents for ever
|
||||
this.dataAttachedDocuments.items = [];
|
||||
this.getCasesNotes((response) => {
|
||||
if (that.permission) {
|
||||
that.$refs["modal-comments"].show();
|
||||
} else {
|
||||
that.$parent.showAlert(
|
||||
that.$i18n.t("ID_CASES_NOTES_NO_PERMISSIONS"),
|
||||
"danger"
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.$refs["modal-comments"].hide();
|
||||
},
|
||||
getCasesNotes() {
|
||||
getCasesNotes(callback) {
|
||||
let that = this;
|
||||
Api.cases
|
||||
.casenotes(this.dataCase)
|
||||
.then((response) => {
|
||||
that.formatResponseCaseNotes(response.data.notes);
|
||||
that.permission = response.data.noPerms == 1 ? false : true;
|
||||
if (_.isFunction(callback)) {
|
||||
callback(response);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new Error(err);
|
||||
@@ -138,6 +154,7 @@ export default {
|
||||
let that = this,
|
||||
notesArray = [];
|
||||
_.each(notes, (n) => {
|
||||
n.id = _.random(1000000);
|
||||
notesArray.push({
|
||||
user: that.nameFormatCases(
|
||||
n.USR_FIRSTNAME,
|
||||
@@ -154,6 +171,7 @@ export default {
|
||||
},
|
||||
dropFiles(files) {
|
||||
this.attachDocuments = true;
|
||||
this.dataAttachedDocuments.items = [];
|
||||
this.dataAttachedDocuments.items = files;
|
||||
},
|
||||
/**
|
||||
|
||||
91
resources/assets/js/utils/utils.js
Normal file
91
resources/assets/js/utils/utils.js
Normal file
@@ -0,0 +1,91 @@
|
||||
import _ from "lodash";
|
||||
export default {
|
||||
/**
|
||||
* Environment Formats function for full name
|
||||
* @param {object} params
|
||||
*/
|
||||
userNameDisplayFormat(params) {
|
||||
let aux;
|
||||
let defaultValues = {
|
||||
userName: '',
|
||||
firstName: '',
|
||||
lastName: '',
|
||||
format: '(@lastName, @firstName) @userName'
|
||||
};
|
||||
_.assignIn(defaultValues, params);
|
||||
aux = defaultValues.format;
|
||||
aux = aux.replace('@userName',defaultValues.userName);
|
||||
aux = aux.replace('@firstName',defaultValues.firstName);
|
||||
aux = aux.replace('@lastName',defaultValues.lastName);
|
||||
return aux;
|
||||
},
|
||||
/**
|
||||
* Parse an url string and prepare an object of the parameters
|
||||
* @param {string} url
|
||||
* @returns {object}
|
||||
*/
|
||||
getAllUrlParams(url) {
|
||||
|
||||
// get query string from url (optional) or window
|
||||
var queryString = url ? url.split('?')[1] : window.location.search.slice(1);
|
||||
|
||||
// we'll store the parameters here
|
||||
var obj = {};
|
||||
|
||||
// if query string exists
|
||||
if (queryString) {
|
||||
|
||||
// stuff after # is not part of query string, so get rid of it
|
||||
queryString = queryString.split('#')[0];
|
||||
|
||||
// split our query string into its component parts
|
||||
var arr = queryString.split('&');
|
||||
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
// separate the keys and the values
|
||||
var a = arr[i].split('=');
|
||||
|
||||
// set parameter name and value (use 'true' if empty)
|
||||
var paramName = a[0];
|
||||
var paramValue = typeof (a[1]) === 'undefined' ? true : a[1];
|
||||
|
||||
// (optional) keep case consistent
|
||||
paramName = paramName.toLowerCase();
|
||||
if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase();
|
||||
|
||||
// if the paramName ends with square brackets, e.g. colors[] or colors[2]
|
||||
if (paramName.match(/\[(\d+)?\]$/)) {
|
||||
|
||||
// create key if it doesn't exist
|
||||
var key = paramName.replace(/\[(\d+)?\]/, '');
|
||||
if (!obj[key]) obj[key] = [];
|
||||
|
||||
// if it's an indexed array e.g. colors[2]
|
||||
if (paramName.match(/\[\d+\]$/)) {
|
||||
// get the index value and add the entry at the appropriate position
|
||||
var index = /\[(\d+)\]/.exec(paramName)[1];
|
||||
obj[key][index] = paramValue;
|
||||
} else {
|
||||
// otherwise add the value to the end of the array
|
||||
obj[key].push(paramValue);
|
||||
}
|
||||
} else {
|
||||
// we're dealing with a string
|
||||
if (!obj[paramName]) {
|
||||
// if it doesn't exist, create property
|
||||
obj[paramName] = paramValue;
|
||||
} else if (obj[paramName] && typeof obj[paramName] === 'string'){
|
||||
// if property does exist and it's a string, convert it to an array
|
||||
obj[paramName] = [obj[paramName]];
|
||||
obj[paramName].push(paramValue);
|
||||
} else {
|
||||
// otherwise add the property
|
||||
obj[paramName].push(paramValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user