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",
|
SEARCH: "/home/search",
|
||||||
PROCESSES: "/home/processes",
|
PROCESSES: "/home/processes",
|
||||||
USERS: "/home/users",
|
USERS: "/home/users",
|
||||||
TASKS: "/home/tasks"
|
TASKS: "/home/tasks",
|
||||||
|
DEBUG_STATUS: "/home/process-debug-status?processUid={prj_uid}"
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -45,6 +45,16 @@ export let cases = {
|
|||||||
keys: {}
|
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) {
|
inputdocuments(data) {
|
||||||
var params = new FormData();
|
var params = new FormData();
|
||||||
params.append('appUid', data.APP_UID);
|
params.append('appUid', data.APP_UID);
|
||||||
@@ -73,7 +83,11 @@ export let cases = {
|
|||||||
|
|
||||||
return axios.post(window.config.SYS_SERVER +
|
return axios.post(window.config.SYS_SERVER +
|
||||||
window.config.SYS_URI +
|
window.config.SYS_URI +
|
||||||
`appProxy/getSummary`, params);
|
`appProxy/getSummary`, params, {
|
||||||
|
headers: {
|
||||||
|
'Cache-Control': 'no-cache'
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
casenotes(data) {
|
casenotes(data) {
|
||||||
var params = new FormData();
|
var params = new FormData();
|
||||||
@@ -125,6 +139,14 @@ export let cases = {
|
|||||||
window.config.SYS_URI +
|
window.config.SYS_URI +
|
||||||
`cases/ajaxListener`, params);
|
`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) {
|
unpause(data) {
|
||||||
var params = new URLSearchParams();
|
var params = new URLSearchParams();
|
||||||
params.append('action', 'unpauseCase');
|
params.append('action', 'unpauseCase');
|
||||||
@@ -164,8 +186,49 @@ export let cases = {
|
|||||||
keys: {},
|
keys: {},
|
||||||
paged: dt.paged
|
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 = {
|
export let casesHeader = {
|
||||||
|
|||||||
@@ -72,11 +72,12 @@ export let filters = {
|
|||||||
/**
|
/**
|
||||||
* Service to get the users list
|
* Service to get the users list
|
||||||
*/
|
*/
|
||||||
taskList(query) {
|
taskList(params) {
|
||||||
return Api.get({
|
return Api.get({
|
||||||
service: "TASKS",
|
service: "TASKS",
|
||||||
params: {
|
params: {
|
||||||
text: query,
|
text: params.query,
|
||||||
|
proId: params.proId
|
||||||
},
|
},
|
||||||
keys: {},
|
keys: {},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -80,4 +80,16 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div
|
<div
|
||||||
v-for="item in data.items"
|
v-for="item in data.items"
|
||||||
:key="item.title"
|
:key="item.data.id"
|
||||||
class="v-attached-block"
|
class="v-attached-block"
|
||||||
>
|
>
|
||||||
<div class="v-list v-list-row block">
|
<div class="v-list v-list-row block">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="card-text">
|
<div class="card-text">
|
||||||
<div
|
<div
|
||||||
v-for="item in data.items"
|
v-for="item in data.items"
|
||||||
:key="item.title"
|
:key="item.data.id"
|
||||||
class="v-attached-block"
|
class="v-attached-block"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
|
|||||||
@@ -123,18 +123,22 @@ export default {
|
|||||||
onDropFile(e) {
|
onDropFile(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
if(this.data.noPerms === 1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let that = this,
|
let that = this,
|
||||||
fls = [];
|
fls = [];
|
||||||
_.each(e.dataTransfer.files, (f) => {
|
_.each(e.dataTransfer.files, (f) => {
|
||||||
that.files.push(f);
|
that.files.push(f);
|
||||||
});
|
});
|
||||||
|
that.files = that.files.slice(0,5);
|
||||||
_.each(that.files, (f) => {
|
_.each(that.files, (f) => {
|
||||||
fls.push({
|
fls.push({
|
||||||
data: f,
|
data: f,
|
||||||
title: f.name,
|
title: f.name,
|
||||||
extension: f.name.split(".").pop(),
|
extension: f.name.split(".").pop(),
|
||||||
onClick: () => {},
|
onClick: () => {},
|
||||||
|
id: _.random(1000000)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -143,6 +147,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onDragOver(e) {
|
onDragOver(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if(this.data.noPerms === 1){
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!this.showMaskDrop) {
|
if (!this.showMaskDrop) {
|
||||||
this.showMaskDrop = true;
|
this.showMaskDrop = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,8 +52,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
<div v-if="data.onClick">
|
||||||
<h6 class="card-subtitle mb-2 text-muted">{{ data.titleActions }}</h6>
|
<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
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="btn btn-success btn-sm"
|
class="btn btn-success btn-sm"
|
||||||
@@ -62,14 +63,6 @@
|
|||||||
{{ data.btnLabel }}
|
{{ data.btnLabel }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</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>
|
</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
@@ -0,0 +1,300 @@
|
|||||||
|
<template>
|
||||||
|
<div class="debugger-container">
|
||||||
|
<tabs>
|
||||||
|
<tab name="Variables">
|
||||||
|
<div
|
||||||
|
class="btn-toolbar justify-content-between"
|
||||||
|
role="toolbar"
|
||||||
|
aria-label="Toolbar with button groups"
|
||||||
|
>
|
||||||
|
<b-form-radio-group
|
||||||
|
@change="changeOption"
|
||||||
|
v-model="optionsDebugVars.selected"
|
||||||
|
:options="optionsDebugVars.options"
|
||||||
|
button-variant="outline-secondary"
|
||||||
|
name="radio-btn-outline"
|
||||||
|
size="sm"
|
||||||
|
buttons
|
||||||
|
></b-form-radio-group>
|
||||||
|
</div>
|
||||||
|
<div style="padding-top: 10px">
|
||||||
|
<v-client-table
|
||||||
|
:data="dataTable"
|
||||||
|
:columns="columns"
|
||||||
|
:options="options"
|
||||||
|
ref="vueTable"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</tab>
|
||||||
|
<tab name="Triggers">
|
||||||
|
<div>
|
||||||
|
<v-client-table
|
||||||
|
:data="dataTableTriggers"
|
||||||
|
:columns="columns"
|
||||||
|
:options="options"
|
||||||
|
ref="vueTableTriggers"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</tab>
|
||||||
|
</tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Tabs from "../../../components/tabs/Tabs.vue";
|
||||||
|
import Tab from "../../../components/tabs/Tab.vue";
|
||||||
|
import api from "../../../api/index";
|
||||||
|
export default {
|
||||||
|
name: "ButtonFleft",
|
||||||
|
props: {
|
||||||
|
data: Object
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
Tabs,
|
||||||
|
Tab,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
debugFullPage: false,
|
||||||
|
debugTabs: [],
|
||||||
|
activetab: 1,
|
||||||
|
variableTabs: [],
|
||||||
|
debugSearch: "",
|
||||||
|
isRTL: false,
|
||||||
|
dataTable: [],
|
||||||
|
dataTableTriggers: [],
|
||||||
|
columns: ["key", "value"],
|
||||||
|
options: {
|
||||||
|
perPage: 200,
|
||||||
|
filterable: true,
|
||||||
|
pagination: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
headings: {
|
||||||
|
key: this.$i18n.t("ID_NAME"),
|
||||||
|
value: this.$i18n.t("ID_FIELD_DYNAFORM_TEXT")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
optionsDebugVars: {
|
||||||
|
selected: "all",
|
||||||
|
options: [
|
||||||
|
{ text: this.$i18n.t("ID_OPT_ALL"), value: "all" },
|
||||||
|
{ text: this.$i18n.t("ID_DYNAFORM"), value: "dyn" },
|
||||||
|
{ text: this.$i18n.t("ID_SYSTEM"), value: "sys" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getDebugVars({ filter: "all" });
|
||||||
|
this.getDebugVarsTriggers();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
classBtn(cls) {
|
||||||
|
return "btn v-btn-request " + cls;
|
||||||
|
},
|
||||||
|
showDebugger() {
|
||||||
|
this.$refs["modal-debugger"].show();
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Get debug variables
|
||||||
|
*/
|
||||||
|
getDebugVars(data) {
|
||||||
|
let that = this,
|
||||||
|
dt = [];
|
||||||
|
api.cases.debugVars(data).then((response) => {
|
||||||
|
_.forIn(response.data.data[0], function (value, key) {
|
||||||
|
dt.push({
|
||||||
|
key,
|
||||||
|
value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dataTable = dt;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Get trigger variables
|
||||||
|
*/
|
||||||
|
getDebugVarsTriggers(data) {
|
||||||
|
let that = this,
|
||||||
|
dt = [];
|
||||||
|
api.cases.debugVarsTriggers(data).then((response) => {
|
||||||
|
if (response.data.length > 0) {
|
||||||
|
_.forIn(response.data.data[0], function (value, key) {
|
||||||
|
dt.push({
|
||||||
|
key,
|
||||||
|
value
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.dataTableTriggers = dt;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Change Radio option [All, Dynaform, System]
|
||||||
|
*/
|
||||||
|
changeOption(opt) {
|
||||||
|
this.getDebugVars({ filter: opt });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.debugger-container {
|
||||||
|
overflow: auto;
|
||||||
|
max-width: 25%;
|
||||||
|
min-width: 25%;
|
||||||
|
padding: 0.1rem;
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
border-width: 1px;
|
||||||
|
border-top-left-radius: 0.1rem;
|
||||||
|
border-top-right-radius: 0.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component {
|
||||||
|
margin: 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tabs {
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 700px) {
|
||||||
|
.tabs-component-tabs {
|
||||||
|
border: 0;
|
||||||
|
align-items: stretch;
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab {
|
||||||
|
color: #999;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-right: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab:not(:last-child) {
|
||||||
|
border-bottom: dotted 1px #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab:hover {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab.is-active {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab.is-disabled * {
|
||||||
|
color: #cdcdcd;
|
||||||
|
cursor: not-allowed !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 700px) {
|
||||||
|
.tabs-component-tab {
|
||||||
|
background-color: #fff;
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
border-radius: 3px 3px 0 0;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
transform: translateY(2px);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab.is-active {
|
||||||
|
border-bottom: solid 1px #fff;
|
||||||
|
z-index: 2;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-tab-a {
|
||||||
|
align-items: center;
|
||||||
|
color: inherit;
|
||||||
|
display: flex;
|
||||||
|
padding: 0.75em 1em;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs-component-panels {
|
||||||
|
padding: 4em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 700px) {
|
||||||
|
.tabs-component-panels {
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
border: solid 1px #ddd;
|
||||||
|
border-radius: 0 6px 6px 6px;
|
||||||
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
|
||||||
|
padding: 0.5em 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group > input[type="checkbox"],
|
||||||
|
input[type="radio"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline-secondary-active {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #6c757d;
|
||||||
|
border-color: #6c757d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.VueTables__search-field > label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.VueTables.VueTables--client .row {
|
||||||
|
display: -ms-flexbox;
|
||||||
|
display: flex;
|
||||||
|
-ms-flex-wrap: wrap;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debugger-container .VueTables.VueTables--client > * {
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debugger-container .VueTables.VueTables--client .table td,
|
||||||
|
.table th {
|
||||||
|
padding: 0.3rem;
|
||||||
|
vertical-align: top;
|
||||||
|
border-top: 1px solid #dee2e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debugger-container .form-control {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 30px;
|
||||||
|
padding: 0.5rem 0.5rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #495057;
|
||||||
|
background-color: #fff;
|
||||||
|
background-clip: padding-box;
|
||||||
|
border: 1px solid #ced4da;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.debugger-container .col-md-12 {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
padding-right: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
isOnMobile: false,
|
isOnMobile: false,
|
||||||
hideToggle: true,
|
hideToggle: true,
|
||||||
selectedTheme: "",
|
selectedTheme: "",
|
||||||
sidebarWidth: "310px",
|
sidebarWidth: "260px",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -42,7 +42,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.onResize();
|
this.onResize();
|
||||||
window.addEventListener("resize", this.onResize);
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
{{ tagContent(tag) }}
|
{{ tagContent(tag) }}
|
||||||
</div>
|
</div>
|
||||||
<component
|
<component
|
||||||
|
:filters="filters"
|
||||||
v-bind:is="tagComponent(tag)"
|
v-bind:is="tagComponent(tag)"
|
||||||
v-bind:info="tagInfo(tag)"
|
v-bind:info="tagInfo(tag)"
|
||||||
v-bind:tag="tag"
|
v-bind:tag="tag"
|
||||||
@@ -256,7 +257,7 @@ export default {
|
|||||||
id: "CaseStatus",
|
id: "CaseStatus",
|
||||||
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_CASE_STATUS')}`,
|
title: `${this.$i18n.t('ID_FILTER')}: ${this.$i18n.t('ID_CASE_STATUS')}`,
|
||||||
optionLabel: this.$i18n.t('ID_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: "",
|
tagText: "",
|
||||||
tagPrefix: this.$i18n.t('ID_SEARCH_BY_STATUS'),
|
tagPrefix: this.$i18n.t('ID_SEARCH_BY_STATUS'),
|
||||||
items:[
|
items:[
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export default {
|
|||||||
SearchPopover,
|
SearchPopover,
|
||||||
Multiselect
|
Multiselect
|
||||||
},
|
},
|
||||||
props: ["tag", "info", "filter"],
|
props: ["tag", "info", "filters", "filter"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
taks: [],
|
taks: [],
|
||||||
@@ -53,9 +53,12 @@ export default {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
asyncFind(query) {
|
asyncFind(query) {
|
||||||
|
let params = {};
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
params.proId = this.getProcess();
|
||||||
|
params.query = query;
|
||||||
api.filters
|
api.filters
|
||||||
.taskList(query)
|
.taskList(params)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.taks = response.data;
|
this.taks = response.data;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
@@ -64,6 +67,13 @@ export default {
|
|||||||
console.error(err);
|
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
|
* 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>
|
<template>
|
||||||
<div v-if="data.length" class="grouped-cell">
|
<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
|
<div
|
||||||
v-bind:style="{ color: activeColor(item.STATUS) }"
|
v-bind:style="{ color: activeColor(item.STATUS) }"
|
||||||
v-b-popover.hover.top="item.DELAYED_MSG"
|
:id="statusId + index"
|
||||||
>
|
>
|
||||||
<i class="fas fa-square"></i>
|
<i class="fas fa-square"></i>
|
||||||
</div>
|
</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">
|
<div class="col ellipsis" v-b-popover.hover.top="item.TAS_NAME">
|
||||||
{{ item.TAS_NAME }}
|
{{ item.TAS_NAME }}
|
||||||
</div>
|
</div>
|
||||||
<div class="avatar">
|
<div class="avatar" :id="id + index">
|
||||||
<b-avatar
|
<b-avatar
|
||||||
variant="info"
|
variant="info"
|
||||||
:src="item.AVATAR"
|
:src="item.AVATAR"
|
||||||
size="1.2em"
|
size="2em"
|
||||||
></b-avatar>
|
></b-avatar>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -29,6 +53,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
||||||
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
||||||
|
id: "avatar-" + _.random(1000000),
|
||||||
|
statusId: "status-" + _.random(1000000)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -40,13 +66,20 @@ export default {
|
|||||||
activeColor: function(codeColor) {
|
activeColor: function(codeColor) {
|
||||||
return this.colorMap[codeColor - 1];
|
return this.colorMap[codeColor - 1];
|
||||||
},
|
},
|
||||||
|
mailto: function(email) {
|
||||||
|
return "mailto:" + email;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.popover {
|
||||||
|
max-width: 600px !important;
|
||||||
|
min-width: 200px !important;
|
||||||
|
}
|
||||||
.grouped-cell {
|
.grouped-cell {
|
||||||
font-size: smaller;
|
font-size: small;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
@@ -55,9 +88,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.color {
|
.color {
|
||||||
|
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
.avatar {
|
.avatar {
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="v-task-cell">
|
<div v-if="data.length" class="task-cell">
|
||||||
<div v-for="item in data" v-bind:key="item.TITLE" class="d-flex mb-3">
|
<div v-for="(item, index) in data" class="d-flex mb-3">
|
||||||
<div v-bind:style="{ color: activeColor(item.CODE_COLOR) }">
|
<div
|
||||||
|
v-bind:style="{ color: activeColor(item.CODE_COLOR) }"
|
||||||
|
:id="statusId + index"
|
||||||
|
>
|
||||||
<i class="fas fa-square"></i>
|
<i class="fas fa-square"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="col .v-task-cell-ellipsis">
|
<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 }}
|
{{ item.TITLE }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,8 +23,8 @@ export default {
|
|||||||
props: ["data"],
|
props: ["data"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//Color map for ["In Progress", "overdue", "inDraft", "paused", "unnasigned"]
|
colorMap: ["green", "red", "orange", "blue", "silver"],
|
||||||
colorMap: ["green", "red", "orange", "aqua", "silver"],
|
statusId: "status-" + _.random(1000000)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -29,20 +35,31 @@ export default {
|
|||||||
*/
|
*/
|
||||||
activeColor: function(codeColor) {
|
activeColor: function(codeColor) {
|
||||||
return this.colorMap[codeColor - 1];
|
return this.colorMap[codeColor - 1];
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.v-task-cell {
|
.popover {
|
||||||
display: inline-flex;
|
max-width: 600px !important;
|
||||||
|
min-width: 200px !important;
|
||||||
|
}
|
||||||
|
.task-cell {
|
||||||
|
font-size: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v-task-cell-ellipsis {
|
.ellipsis {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 140px;
|
width: 140px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
.color {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
color: "red";
|
||||||
|
width: "1.3em";
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
<div slot="info" slot-scope="props">
|
<div slot="info" slot-scope="props">
|
||||||
<b-icon
|
<b-icon
|
||||||
@@ -54,11 +55,7 @@
|
|||||||
{{ props.row.STATUS }}
|
{{ props.row.STATUS }}
|
||||||
</div>
|
</div>
|
||||||
<div slot="current_user" slot-scope="props">
|
<div slot="current_user" slot-scope="props">
|
||||||
<div class="v-user-cell" v-for="item in props.row.USER">
|
<CurrentUserCell :data="props.row.USER_DATA" />
|
||||||
<div class="col .v-user-cell-ellipsis">
|
|
||||||
{{ item.USER_DATA }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div slot="start_date" slot-scope="props">
|
<div slot="start_date" slot-scope="props">
|
||||||
{{ props.row.START_DATE }}
|
{{ props.row.START_DATE }}
|
||||||
@@ -86,9 +83,10 @@ import ButtonFleft from "../components/home/ButtonFleft.vue";
|
|||||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||||
import AdvancedFilter from "../components/search/AdvancedFilter";
|
import AdvancedFilter from "../components/search/AdvancedFilter";
|
||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
|
import CurrentUserCell from "../components/vuetable/CurrentUserCell.vue";
|
||||||
import ModalComments from "./modal/ModalComments.vue";
|
import ModalComments from "./modal/ModalComments.vue";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
import { Event } from "vue-tables-2";
|
import utils from "./../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AdvancedSearch",
|
name: "AdvancedSearch",
|
||||||
@@ -97,6 +95,7 @@ export default {
|
|||||||
ButtonFleft,
|
ButtonFleft,
|
||||||
ModalNewRequest,
|
ModalNewRequest,
|
||||||
TaskCell,
|
TaskCell,
|
||||||
|
CurrentUserCell,
|
||||||
ModalComments
|
ModalComments
|
||||||
},
|
},
|
||||||
props: ["id", "name", "filters"],
|
props: ["id", "name", "filters"],
|
||||||
@@ -120,7 +119,6 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
columns: [
|
columns: [
|
||||||
"info",
|
|
||||||
"case_number",
|
"case_number",
|
||||||
"case_title",
|
"case_title",
|
||||||
"process_name",
|
"process_name",
|
||||||
@@ -159,7 +157,16 @@ export default {
|
|||||||
},
|
},
|
||||||
customFilters: ["myfilter"],
|
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: {
|
watch: {
|
||||||
@@ -168,6 +175,23 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
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
|
* Get cases data by header
|
||||||
*/
|
*/
|
||||||
@@ -212,7 +236,7 @@ export default {
|
|||||||
CASE_TITLE: v.DEL_TITLE,
|
CASE_TITLE: v.DEL_TITLE,
|
||||||
PROCESS_NAME: v.PRO_TITLE,
|
PROCESS_NAME: v.PRO_TITLE,
|
||||||
TASK: this.formatTasks(v.THREAD_TASKS),
|
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,
|
START_DATE: v.APP_CREATE_DATE_LABEL,
|
||||||
FINISH_DATE: v.APP_FINISH_DATE_LABEL,
|
FINISH_DATE: v.APP_FINISH_DATE_LABEL,
|
||||||
DURATION: v.DURATION,
|
DURATION: v.DURATION,
|
||||||
@@ -235,58 +259,35 @@ export default {
|
|||||||
dataFormat.push({
|
dataFormat.push({
|
||||||
TITLE: data[i].tas_title,
|
TITLE: data[i].tas_title,
|
||||||
CODE_COLOR: data[i].tas_color,
|
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;
|
return dataFormat;
|
||||||
|
|
||||||
},
|
},
|
||||||
formatUser(data) {
|
formatUser(data) {
|
||||||
var i,
|
var i,
|
||||||
dataFormat = [];
|
dataFormat = [];
|
||||||
for (i = 0; i < data.length; i += 1) {
|
for (i = 0; i < data.length; i += 1) {
|
||||||
dataFormat.push({
|
dataFormat.push({
|
||||||
USER_DATA: this.nameFormatCases(
|
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||||
data[i].usr_firstname,
|
userName: data[i].usr_firstname,
|
||||||
data[i].usr_lastname,
|
firstName: data[i].usr_lastname,
|
||||||
data[i].usr_username
|
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;
|
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
|
* Convert string to date format
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -107,8 +107,9 @@ import ButtonFleft from "../components/home/ButtonFleft.vue";
|
|||||||
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
import ModalCancelCase from "../home/modal/ModalCancelCase.vue";
|
||||||
import ModalNewRequest from "./ModalNewRequest.vue";
|
import ModalNewRequest from "./ModalNewRequest.vue";
|
||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
|
import utils from "./../utils/utils";
|
||||||
import Api from "../api/index";
|
import Api from "../api/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CaseDetail",
|
name: "CaseDetail",
|
||||||
components: {
|
components: {
|
||||||
@@ -155,7 +156,7 @@ export default {
|
|||||||
headings: {
|
headings: {
|
||||||
task: this.$i18n.t("ID_TASK"),
|
task: this.$i18n.t("ID_TASK"),
|
||||||
case_title: this.$i18n.t("ID_CASE_TITLE"),
|
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"),
|
status: this.$i18n.t("ID_STATUS"),
|
||||||
due_date: this.$i18n.t("ID_DUE_DATE"),
|
due_date: this.$i18n.t("ID_DUE_DATE"),
|
||||||
actions: this.$i18n.t("ID_ACTIONS"),
|
actions: this.$i18n.t("ID_ACTIONS"),
|
||||||
@@ -201,6 +202,7 @@ export default {
|
|||||||
this.getInputDocuments();
|
this.getInputDocuments();
|
||||||
this.getOutputDocuments();
|
this.getOutputDocuments();
|
||||||
this.getCasesNotes();
|
this.getCasesNotes();
|
||||||
|
this.requestOpenSummary();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
postComment(comment, send, files) {
|
postComment(comment, send, files) {
|
||||||
@@ -241,7 +243,9 @@ export default {
|
|||||||
this.dataAttachedDocuments.items = att;
|
this.dataAttachedDocuments.items = att;
|
||||||
},
|
},
|
||||||
getDataCaseSummary() {
|
getDataCaseSummary() {
|
||||||
let that = this;
|
let action,
|
||||||
|
option,
|
||||||
|
that = this;
|
||||||
Api.cases
|
Api.cases
|
||||||
.casesummary(this.dataCase)
|
.casesummary(this.dataCase)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@@ -252,9 +256,7 @@ export default {
|
|||||||
titleActions: this.$i18n.t("ID_ACTIONS"),
|
titleActions: this.$i18n.t("ID_ACTIONS"),
|
||||||
btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
|
btnLabel: this.$i18n.t("ID_CANCEL_CASE"),
|
||||||
btnType: false,
|
btnType: false,
|
||||||
onClick: () => {
|
onClick: null,
|
||||||
that.$refs["modal-cancel-case"].show();
|
|
||||||
},
|
|
||||||
label: {
|
label: {
|
||||||
numberCase: data[2].label,
|
numberCase: data[2].label,
|
||||||
process: data[0].label,
|
process: data[0].label,
|
||||||
@@ -274,6 +276,19 @@ export default {
|
|||||||
duration: response.data[11].value.split(" ")[1],
|
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) => {
|
.catch((err) => {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
@@ -387,6 +402,7 @@ export default {
|
|||||||
let that = this,
|
let that = this,
|
||||||
notesArray = [];
|
notesArray = [];
|
||||||
_.each(notes, (n) => {
|
_.each(notes, (n) => {
|
||||||
|
n.id = _.random(1000000);
|
||||||
notesArray.push({
|
notesArray.push({
|
||||||
user: that.nameFormatCases(
|
user: that.nameFormatCases(
|
||||||
n.USR_FIRSTNAME,
|
n.USR_FIRSTNAME,
|
||||||
@@ -451,7 +467,13 @@ export default {
|
|||||||
COLOR: v.TAS_COLOR_LABEL,
|
COLOR: v.TAS_COLOR_LABEL,
|
||||||
}],
|
}],
|
||||||
CASE_TITLE: v.DEL_TITLE,
|
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,
|
STATUS: v.DEL_THREAD_STATUS,
|
||||||
DUE_DATE: v.DEL_TASK_DUE_DATE,
|
DUE_DATE: v.DEL_TASK_DUE_DATE,
|
||||||
TASK_COLOR: v.TAS_COLOR_LABEL,
|
TASK_COLOR: v.TAS_COLOR_LABEL,
|
||||||
@@ -490,7 +512,24 @@ export default {
|
|||||||
ACTION: "todo",
|
ACTION: "todo",
|
||||||
});
|
});
|
||||||
this.$emit("onUpdatePage", "XCase");
|
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>
|
</script>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
<div slot="detail" slot-scope="props">
|
<div slot="detail" slot-scope="props">
|
||||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||||
@@ -48,6 +49,7 @@ import ModalNewRequest from "./ModalNewRequest.vue";
|
|||||||
import CasesFilter from "../components/search/CasesFilter";
|
import CasesFilter from "../components/search/CasesFilter";
|
||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
|
import utils from "./../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Draft",
|
name: "Draft",
|
||||||
@@ -58,7 +60,7 @@ export default {
|
|||||||
TaskCell,
|
TaskCell,
|
||||||
CasesFilter,
|
CasesFilter,
|
||||||
},
|
},
|
||||||
props: {},
|
props: ["defaultOption"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
@@ -101,9 +103,20 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
pmDateFormat: "Y-m-d H:i:s",
|
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: {},
|
watch: {},
|
||||||
computed: {
|
computed: {
|
||||||
/**
|
/**
|
||||||
@@ -116,6 +129,38 @@ export default {
|
|||||||
updated() {},
|
updated() {},
|
||||||
beforeCreate() {},
|
beforeCreate() {},
|
||||||
methods: {
|
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
|
* Get cases todo data
|
||||||
*/
|
*/
|
||||||
@@ -164,6 +209,9 @@ export default {
|
|||||||
TITLE: v.TAS_TITLE,
|
TITLE: v.TAS_TITLE,
|
||||||
CODE_COLOR: v.TAS_COLOR,
|
CODE_COLOR: v.TAS_COLOR,
|
||||||
COLOR: v.TAS_COLOR_LABEL,
|
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,
|
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||||
PRO_UID: v.PRO_UID,
|
PRO_UID: v.PRO_UID,
|
||||||
@@ -196,6 +244,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
openCaseDetail(item) {
|
openCaseDetail(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
that.$emit("onUpdateDataCase", {
|
that.$emit("onUpdateDataCase", {
|
||||||
APP_UID: item.APP_UID,
|
APP_UID: item.APP_UID,
|
||||||
@@ -206,6 +255,7 @@ export default {
|
|||||||
});
|
});
|
||||||
that.$emit("onUpdatePage", "case-detail");
|
that.$emit("onUpdatePage", "case-detail");
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onRemoveFilter(data) {},
|
onRemoveFilter(data) {},
|
||||||
onUpdateFilters(data) {
|
onUpdateFilters(data) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
:id="pageId"
|
:id="pageId"
|
||||||
:pageUri="pageUri"
|
:pageUri="pageUri"
|
||||||
:name="pageName"
|
:name="pageName"
|
||||||
|
:defaultOption="defaultOption"
|
||||||
@onSubmitFilter="onSubmitFilter"
|
@onSubmitFilter="onSubmitFilter"
|
||||||
@onRemoveFilter="onRemoveFilter"
|
@onRemoveFilter="onRemoveFilter"
|
||||||
@onUpdatePage="onUpdatePage"
|
@onUpdatePage="onUpdatePage"
|
||||||
@@ -78,7 +79,7 @@ export default {
|
|||||||
collapsed: false,
|
collapsed: false,
|
||||||
selectedTheme: "",
|
selectedTheme: "",
|
||||||
isOnMobile: false,
|
isOnMobile: false,
|
||||||
sidebarWidth: "310px",
|
sidebarWidth: "260px",
|
||||||
pageId: null,
|
pageId: null,
|
||||||
pageName: null,
|
pageName: null,
|
||||||
pageUri: null,
|
pageUri: null,
|
||||||
@@ -93,12 +94,12 @@ export default {
|
|||||||
CONSOLIDATED_CASES: "batch-routing",
|
CONSOLIDATED_CASES: "batch-routing",
|
||||||
CASES_TO_REASSIGN: "task-reassignments",
|
CASES_TO_REASSIGN: "task-reassignments",
|
||||||
CASES_FOLDERS: "my-documents"
|
CASES_FOLDERS: "my-documents"
|
||||||
}
|
},
|
||||||
|
defaultOption: window.config.defaultOption || ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.onResize();
|
this.onResize();
|
||||||
window.addEventListener("resize", this.onResize);
|
|
||||||
this.getMenu();
|
this.getMenu();
|
||||||
this.listenerIframe();
|
this.listenerIframe();
|
||||||
window.setInterval(
|
window.setInterval(
|
||||||
@@ -136,7 +137,7 @@ export default {
|
|||||||
.get()
|
.get()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.setDefaultCasesMenu(response.data);
|
this.setDefaultCasesMenu(response.data);
|
||||||
this.menu = this.mappingMenu(response.data);
|
this.menu = this.mappingMenu(this.setDefaultIcon(response.data));
|
||||||
this.setCounter();
|
this.setCounter();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
@@ -174,6 +175,19 @@ export default {
|
|||||||
}
|
}
|
||||||
return newData;
|
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) {
|
OnClickSidebarItem(item) {
|
||||||
if (item.item.page && item.item.page === "/advanced-search") {
|
if (item.item.page && item.item.page === "/advanced-search") {
|
||||||
this.page = "advanced-search";
|
this.page = "advanced-search";
|
||||||
@@ -312,7 +326,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
#home {
|
#home {
|
||||||
padding-left: 310px;
|
padding-left: 260px;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
}
|
}
|
||||||
#home.collapsed {
|
#home.collapsed {
|
||||||
|
|||||||
@@ -64,8 +64,10 @@ export default {
|
|||||||
api.process.list
|
api.process.list
|
||||||
.start()
|
.start()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
if (response.data && response.data.success !== "failure") {
|
||||||
that.categories = that.formatCategories(response.data);
|
that.categories = that.formatCategories(response.data);
|
||||||
that.categoriesFiltered = that.categories;
|
that.categoriesFiltered = that.categories;
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="v-mycases" ref="v-mycases" class="v-container-mycases">
|
<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>
|
<button-fleft :data="newCase"></button-fleft>
|
||||||
<MyCasesFilter
|
<MyCasesFilter
|
||||||
:filters="filters"
|
:filters="filters"
|
||||||
@@ -15,7 +24,13 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
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">
|
<div slot="case_number" slot-scope="props">
|
||||||
{{ props.row.CASE_NUMBER }}
|
{{ props.row.CASE_NUMBER }}
|
||||||
</div>
|
</div>
|
||||||
@@ -56,6 +71,7 @@ import MyCasesFilter from "../components/search/MyCasesFilter";
|
|||||||
import ModalComments from "./modal/ModalComments.vue";
|
import ModalComments from "./modal/ModalComments.vue";
|
||||||
import GroupedCell from "../components/vuetable/GroupedCell.vue";
|
import GroupedCell from "../components/vuetable/GroupedCell.vue";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
|
import utils from "./../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MyCases",
|
name: "MyCases",
|
||||||
@@ -70,6 +86,12 @@ export default {
|
|||||||
props: ["filters"],
|
props: ["filters"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataAlert: {
|
||||||
|
dismissSecs: 5,
|
||||||
|
dismissCountDown: 0,
|
||||||
|
message: "",
|
||||||
|
variant: "info"
|
||||||
|
},
|
||||||
metrics: [],
|
metrics: [],
|
||||||
title: this.$i18n.t('ID_MY_CASES'),
|
title: this.$i18n.t('ID_MY_CASES'),
|
||||||
filter: "CASES_INBOX",
|
filter: "CASES_INBOX",
|
||||||
@@ -121,7 +143,16 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
translations: null,
|
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() {
|
mounted() {
|
||||||
@@ -144,6 +175,43 @@ export default {
|
|||||||
updated() {},
|
updated() {},
|
||||||
beforeCreate() {},
|
beforeCreate() {},
|
||||||
methods: {
|
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
|
* Get Cases Headers from BE
|
||||||
*/
|
*/
|
||||||
@@ -151,8 +219,26 @@ export default {
|
|||||||
let that = this;
|
let that = this;
|
||||||
api.casesHeader.get().then((response) => {
|
api.casesHeader.get().then((response) => {
|
||||||
that.headers = that.formatCasesHeaders(response.data);
|
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
|
* Get cases data by header
|
||||||
*/
|
*/
|
||||||
@@ -223,46 +309,25 @@ export default {
|
|||||||
{
|
{
|
||||||
TAS_NAME: data[i].tas_title,
|
TAS_NAME: data[i].tas_title,
|
||||||
STATUS: data[i].tas_color,
|
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;
|
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
|
* Convert string to date format
|
||||||
*
|
*
|
||||||
@@ -349,32 +414,6 @@ export default {
|
|||||||
}
|
}
|
||||||
return dateToConvert;
|
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
|
* Format Response from HEADERS
|
||||||
* @param {*} response
|
* @param {*} response
|
||||||
@@ -401,6 +440,8 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
_.forEach(response, (v) => {
|
_.forEach(response, (v) => {
|
||||||
|
//Hack for display the SUPERVISING CARD
|
||||||
|
if(!(v.id === "SUPERVISING" && v.counter === 0)){
|
||||||
data.push({
|
data.push({
|
||||||
title: v.title,
|
title: v.title,
|
||||||
counter: v.counter,
|
counter: v.counter,
|
||||||
@@ -409,10 +450,12 @@ export default {
|
|||||||
onClick: (obj) => {
|
onClick: (obj) => {
|
||||||
that.title = obj.title;
|
that.title = obj.title;
|
||||||
that.filterHeader = obj.item;
|
that.filterHeader = obj.item;
|
||||||
|
that.$refs["vueTable"].setPage(1); // Reset the page when change the header filter
|
||||||
that.$refs["vueTable"].getData();
|
that.$refs["vueTable"].getData();
|
||||||
},
|
},
|
||||||
class: info[v.id].class,
|
class: info[v.id].class
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
@@ -442,7 +485,25 @@ export default {
|
|||||||
*/
|
*/
|
||||||
onPostNotes() {
|
onPostNotes() {
|
||||||
this.$refs["vueTable"].getData();
|
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>
|
</script>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
<div slot="detail" slot-scope="props">
|
<div slot="detail" slot-scope="props">
|
||||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||||
@@ -33,15 +34,8 @@
|
|||||||
<TaskCell :data="props.row.TASK" />
|
<TaskCell :data="props.row.TASK" />
|
||||||
</div>
|
</div>
|
||||||
<div slot="current_user" slot-scope="props">
|
<div slot="current_user" slot-scope="props">
|
||||||
{{
|
{{ props.row.USERNAME_DISPLAY_FORMAT }}
|
||||||
nameFormatCases(
|
|
||||||
props.row.USR_FIRSTNAME,
|
|
||||||
props.row.USR_LASTNAME,
|
|
||||||
props.row.USR_USERNAME
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="due_date" slot-scope="props">
|
<div slot="due_date" slot-scope="props">
|
||||||
{{ props.row.DUE_DATE }}
|
{{ props.row.DUE_DATE }}
|
||||||
</div>
|
</div>
|
||||||
@@ -70,6 +64,7 @@ import CasesFilter from "../components/search/CasesFilter";
|
|||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
import ModalUnpauseCase from "./modal/ModalUnpauseCase.vue";
|
import ModalUnpauseCase from "./modal/ModalUnpauseCase.vue";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
|
import utils from "./../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Paused",
|
name: "Paused",
|
||||||
@@ -97,7 +92,6 @@ export default {
|
|||||||
"case_title",
|
"case_title",
|
||||||
"process_name",
|
"process_name",
|
||||||
"task",
|
"task",
|
||||||
"current_user",
|
|
||||||
"due_date",
|
"due_date",
|
||||||
"delegation_date",
|
"delegation_date",
|
||||||
"priority",
|
"priority",
|
||||||
@@ -132,6 +126,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
pmDateFormat: "Y-m-d H:i:s",
|
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() {},
|
||||||
@@ -147,6 +150,23 @@ export default {
|
|||||||
updated() {},
|
updated() {},
|
||||||
beforeCreate() {},
|
beforeCreate() {},
|
||||||
methods: {
|
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
|
* Get cases todo data
|
||||||
*/
|
*/
|
||||||
@@ -195,10 +215,16 @@ export default {
|
|||||||
TITLE: v.TAS_TITLE,
|
TITLE: v.TAS_TITLE,
|
||||||
CODE_COLOR: v.TAS_COLOR,
|
CODE_COLOR: v.TAS_COLOR,
|
||||||
COLOR: v.TAS_COLOR_LABEL,
|
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,
|
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||||
USR_LASTNAME: v.USR_LASTNAME,
|
userName: v.USR_LASTNAME,
|
||||||
USR_USERNAME: v.USR_USERNAME,
|
firstName: v.USR_LASTNAME,
|
||||||
|
lastName: v.USR_LASTNAME,
|
||||||
|
format: window.config.FORMATS.format || null
|
||||||
|
}),
|
||||||
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||||
@@ -210,38 +236,6 @@ export default {
|
|||||||
});
|
});
|
||||||
return data;
|
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
|
* Open case detail
|
||||||
*
|
*
|
||||||
@@ -249,6 +243,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
openCaseDetail(item) {
|
openCaseDetail(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
that.$emit("onUpdateDataCase", {
|
that.$emit("onUpdateDataCase", {
|
||||||
APP_UID: item.APP_UID,
|
APP_UID: item.APP_UID,
|
||||||
@@ -259,6 +254,7 @@ export default {
|
|||||||
});
|
});
|
||||||
that.$emit("onUpdatePage", "case-detail");
|
that.$emit("onUpdatePage", "case-detail");
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
showModalUnpauseCase(item) {
|
showModalUnpauseCase(item) {
|
||||||
this.$refs["modal-unpause-case"].data = item;
|
this.$refs["modal-unpause-case"].data = item;
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
<tab :name="$t('ID_SUMMARY')">
|
<tab :name="$t('ID_SUMMARY')">
|
||||||
<PmCaseSummary :data="dataCaseSummary"> </PmCaseSummary>
|
<PmCaseSummary :data="dataCaseSummary"> </PmCaseSummary>
|
||||||
</tab>
|
</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')">
|
<tab :name="$t('ID_PROCESS_MAP')">
|
||||||
<ProcessMap :data="dataCase" v-if="currentTab == $t('ID_PROCESS_MAP')">
|
<ProcessMap :data="dataCase" v-if="currentTab == $t('ID_PROCESS_MAP')">
|
||||||
</ProcessMap>
|
</ProcessMap>
|
||||||
@@ -25,6 +29,7 @@ import PmCaseSummary from "./../components/home/caseDetail/PmCaseSummary.vue";
|
|||||||
import ProcessMap from "./../components/home/caseDetail/ProcessMap.vue";
|
import ProcessMap from "./../components/home/caseDetail/ProcessMap.vue";
|
||||||
import CaseHistory from "./../components/home/caseDetail/CaseHistory.vue";
|
import CaseHistory from "./../components/home/caseDetail/CaseHistory.vue";
|
||||||
import ChangeLog from "./../components/home/caseDetail/ChangeLog.vue";
|
import ChangeLog from "./../components/home/caseDetail/ChangeLog.vue";
|
||||||
|
import MoreInformation from './../components/home/caseDetail/MoreInformation.vue';
|
||||||
import Api from "../api/index";
|
import Api from "../api/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -36,6 +41,7 @@ export default {
|
|||||||
PmCaseSummary,
|
PmCaseSummary,
|
||||||
CaseHistory,
|
CaseHistory,
|
||||||
ChangeLog,
|
ChangeLog,
|
||||||
|
MoreInformation
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
dataCase: Object,
|
dataCase: Object,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
<div slot="detail" slot-scope="props">
|
<div slot="detail" slot-scope="props">
|
||||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||||
@@ -33,15 +34,8 @@
|
|||||||
<TaskCell :data="props.row.TASK" />
|
<TaskCell :data="props.row.TASK" />
|
||||||
</div>
|
</div>
|
||||||
<div slot="current_user" slot-scope="props">
|
<div slot="current_user" slot-scope="props">
|
||||||
{{
|
{{ props.row.USERNAME_DISPLAY_FORMAT}}
|
||||||
nameFormatCases(
|
|
||||||
props.row.USR_FIRSTNAME,
|
|
||||||
props.row.USR_LASTNAME,
|
|
||||||
props.row.USR_USERNAME
|
|
||||||
)
|
|
||||||
}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="due_date" slot-scope="props">
|
<div slot="due_date" slot-scope="props">
|
||||||
{{ props.row.DUE_DATE }}
|
{{ props.row.DUE_DATE }}
|
||||||
</div>
|
</div>
|
||||||
@@ -65,6 +59,7 @@ import ModalNewRequest from "./ModalNewRequest.vue";
|
|||||||
import TaskCell from "../components/vuetable/TaskCell.vue";
|
import TaskCell from "../components/vuetable/TaskCell.vue";
|
||||||
import CasesFilter from "../components/search/CasesFilter";
|
import CasesFilter from "../components/search/CasesFilter";
|
||||||
import api from "./../api/index";
|
import api from "./../api/index";
|
||||||
|
import utils from "./../utils/utils";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Todo",
|
name: "Todo",
|
||||||
@@ -75,6 +70,7 @@ export default {
|
|||||||
TaskCell,
|
TaskCell,
|
||||||
CasesFilter,
|
CasesFilter,
|
||||||
},
|
},
|
||||||
|
props: ["defaultOption"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
newCase: {
|
newCase: {
|
||||||
@@ -90,7 +86,6 @@ export default {
|
|||||||
"case_title",
|
"case_title",
|
||||||
"process_name",
|
"process_name",
|
||||||
"task",
|
"task",
|
||||||
"current_user",
|
|
||||||
"due_date",
|
"due_date",
|
||||||
"delegation_date",
|
"delegation_date",
|
||||||
"priority",
|
"priority",
|
||||||
@@ -124,6 +119,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
pmDateFormat: "Y-m-d H:i:s",
|
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() {},
|
||||||
@@ -139,6 +143,38 @@ export default {
|
|||||||
updated() {},
|
updated() {},
|
||||||
beforeCreate() {},
|
beforeCreate() {},
|
||||||
methods: {
|
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
|
* Get cases todo data
|
||||||
*/
|
*/
|
||||||
@@ -187,10 +223,16 @@ export default {
|
|||||||
TITLE: v.TAS_TITLE,
|
TITLE: v.TAS_TITLE,
|
||||||
CODE_COLOR: v.TAS_COLOR,
|
CODE_COLOR: v.TAS_COLOR,
|
||||||
COLOR: v.TAS_COLOR_LABEL,
|
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,
|
USERNAME_DISPLAY_FORMAT: utils.userNameDisplayFormat({
|
||||||
USR_LASTNAME: v.USR_LASTNAME,
|
userName: v.USR_LASTNAME,
|
||||||
USR_USERNAME: v.USR_USERNAME,
|
firstName: v.USR_LASTNAME,
|
||||||
|
lastName: v.USR_LASTNAME,
|
||||||
|
format: window.config.FORMATS.format || null
|
||||||
|
}),
|
||||||
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||||
@@ -202,38 +244,6 @@ export default {
|
|||||||
});
|
});
|
||||||
return data;
|
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
|
* Open selected cases in the inbox
|
||||||
*
|
*
|
||||||
@@ -256,6 +266,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
openCaseDetail(item) {
|
openCaseDetail(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
that.$emit("onUpdateDataCase", {
|
that.$emit("onUpdateDataCase", {
|
||||||
APP_UID: item.APP_UID,
|
APP_UID: item.APP_UID,
|
||||||
@@ -266,6 +277,7 @@ export default {
|
|||||||
});
|
});
|
||||||
that.$emit("onUpdatePage", "case-detail");
|
that.$emit("onUpdatePage", "case-detail");
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onRemoveFilter(data) {},
|
onRemoveFilter(data) {},
|
||||||
onUpdateFilters(data) {
|
onUpdateFilters(data) {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:options="options"
|
:options="options"
|
||||||
ref="vueTable"
|
ref="vueTable"
|
||||||
|
@row-click="onRowClick"
|
||||||
>
|
>
|
||||||
<div slot="detail" slot-scope="props">
|
<div slot="detail" slot-scope="props">
|
||||||
<div class="btn-default" @click="openCaseDetail(props.row)">
|
<div class="btn-default" @click="openCaseDetail(props.row)">
|
||||||
@@ -32,16 +33,6 @@
|
|||||||
<div slot="task" slot-scope="props">
|
<div slot="task" slot-scope="props">
|
||||||
<TaskCell :data="props.row.TASK" />
|
<TaskCell :data="props.row.TASK" />
|
||||||
</div>
|
</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">
|
<div slot="due_date" slot-scope="props">
|
||||||
{{ props.row.DUE_DATE }}
|
{{ props.row.DUE_DATE }}
|
||||||
</div>
|
</div>
|
||||||
@@ -94,7 +85,6 @@ export default {
|
|||||||
"case_title",
|
"case_title",
|
||||||
"process_name",
|
"process_name",
|
||||||
"task",
|
"task",
|
||||||
"current_user",
|
|
||||||
"due_date",
|
"due_date",
|
||||||
"delegation_date",
|
"delegation_date",
|
||||||
"priority",
|
"priority",
|
||||||
@@ -129,6 +119,15 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
pmDateFormat: "Y-m-d H:i:s",
|
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() {},
|
||||||
@@ -144,6 +143,23 @@ export default {
|
|||||||
updated() {},
|
updated() {},
|
||||||
beforeCreate() {},
|
beforeCreate() {},
|
||||||
methods: {
|
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
|
* Get cases unassigned data
|
||||||
*/
|
*/
|
||||||
@@ -192,10 +208,10 @@ export default {
|
|||||||
TITLE: v.TAS_TITLE,
|
TITLE: v.TAS_TITLE,
|
||||||
CODE_COLOR: v.TAS_COLOR,
|
CODE_COLOR: v.TAS_COLOR,
|
||||||
COLOR: v.TAS_COLOR_LABEL,
|
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,
|
DUE_DATE: v.DEL_TASK_DUE_DATE_LABEL,
|
||||||
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
DELEGATION_DATE: v.DEL_DELEGATE_DATE_LABEL,
|
||||||
PRIORITY: v.DEL_PRIORITY_LABEL,
|
PRIORITY: v.DEL_PRIORITY_LABEL,
|
||||||
@@ -207,42 +223,6 @@ export default {
|
|||||||
});
|
});
|
||||||
return data;
|
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
|
* Claim case
|
||||||
*
|
*
|
||||||
@@ -251,9 +231,11 @@ export default {
|
|||||||
claimCase(item) {
|
claimCase(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
api.cases.open(_.extend({ ACTION: "unassigned" }, item)).then(() => {
|
api.cases.open(_.extend({ ACTION: "unassigned" }, item)).then(() => {
|
||||||
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
that.$refs["modal-claim-case"].data = item;
|
that.$refs["modal-claim-case"].data = item;
|
||||||
that.$refs["modal-claim-case"].show();
|
that.$refs["modal-claim-case"].show();
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Open case detail
|
* Open case detail
|
||||||
@@ -262,6 +244,7 @@ export default {
|
|||||||
*/
|
*/
|
||||||
openCaseDetail(item) {
|
openCaseDetail(item) {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
api.cases.open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
that.$emit("onUpdateDataCase", {
|
that.$emit("onUpdateDataCase", {
|
||||||
APP_UID: item.APP_UID,
|
APP_UID: item.APP_UID,
|
||||||
@@ -272,6 +255,7 @@ export default {
|
|||||||
});
|
});
|
||||||
that.$emit("onUpdatePage", "case-detail");
|
that.$emit("onUpdatePage", "case-detail");
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
onRemoveFilter(data) {},
|
onRemoveFilter(data) {},
|
||||||
onUpdateFilters(data) {
|
onUpdateFilters(data) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="d-flex">
|
||||||
<iframe
|
<iframe
|
||||||
:width="width"
|
:width="width"
|
||||||
ref="xIFrame"
|
ref="xIFrame"
|
||||||
@@ -7,21 +7,28 @@
|
|||||||
:src="path"
|
:src="path"
|
||||||
:height="height"
|
:height="height"
|
||||||
allowfullscreen
|
allowfullscreen
|
||||||
|
@load="onLoadIframe"
|
||||||
></iframe>
|
></iframe>
|
||||||
|
<Debugger v-if="openDebug === true" :style="'height:' + height + 'px'" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import Debugger from "../components/home/debugger/Debugger.vue";
|
||||||
|
import api from "../api/index";
|
||||||
export default {
|
export default {
|
||||||
name: "XCase",
|
name: "XCase",
|
||||||
components: {},
|
components: {
|
||||||
|
Debugger
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
data: Object,
|
data: Object
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let that = this;
|
||||||
this.height = window.innerHeight - this.diffHeight;
|
this.height = window.innerHeight - this.diffHeight;
|
||||||
this.dataCase = this.$parent.dataCase;
|
this.dataCase = this.$parent.dataCase;
|
||||||
if(this.dataCase.ACTION =="jump") {
|
if (this.dataCase.ACTION === "jump") {
|
||||||
this.path =
|
this.path =
|
||||||
window.config.SYS_SERVER +
|
window.config.SYS_SERVER +
|
||||||
window.config.SYS_URI +
|
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}`;
|
`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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
openDebug: false,
|
||||||
|
dataCase: null,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
diffHeight: 10,
|
diffHeight: 10,
|
||||||
dataCase: null,
|
|
||||||
path: "",
|
path: "",
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
classBtn(cls) {
|
classBtn(cls) {
|
||||||
return "btn v-btn-request " + cls;
|
return "btn v-btn-request " + cls;
|
||||||
},
|
},
|
||||||
|
onLoadIframe() {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.debugger-inline-cont {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import VueRouter from "vue-router";
|
|||||||
import VueSidebarMenu from "vue-sidebar-menu";
|
import VueSidebarMenu from "vue-sidebar-menu";
|
||||||
import VueI18n from 'vue-i18n';
|
import VueI18n from 'vue-i18n';
|
||||||
import { BootstrapVue, BootstrapVueIcons } from 'bootstrap-vue';
|
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/css/all.css";
|
||||||
import "@fortawesome/fontawesome-free/js/all.js";
|
import "@fortawesome/fontawesome-free/js/all.js";
|
||||||
import 'bootstrap/dist/css/bootstrap-grid.css';
|
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 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||||
|
|
||||||
import Home from "./Home";
|
import Home from "./Home";
|
||||||
|
|
||||||
Vue.use(VueRouter);
|
Vue.use(VueRouter);
|
||||||
Vue.use(VueSidebarMenu);
|
Vue.use(VueSidebarMenu);
|
||||||
Vue.use(BootstrapVue);
|
Vue.use(BootstrapVue);
|
||||||
Vue.use(BootstrapVueIcons);
|
Vue.use(BootstrapVueIcons);
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
Vue.use(ServerTable, {}, false, 'bootstrap3', {});
|
||||||
|
Vue.use(ClientTable, {}, false, 'bootstrap3', {});
|
||||||
window.ProcessMaker = {
|
window.ProcessMaker = {
|
||||||
apiClient: require('axios')
|
apiClient: require('axios')
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export default {
|
|||||||
mounted() {},
|
mounted() {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
permission: true,
|
||||||
dataAlert: {
|
dataAlert: {
|
||||||
dismissSecs: 5,
|
dismissSecs: 5,
|
||||||
dismissCountDown: 0,
|
dismissCountDown: 0,
|
||||||
@@ -114,18 +115,33 @@ export default {
|
|||||||
return "btn v-btn-request " + cls;
|
return "btn v-btn-request " + cls;
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
this.getCasesNotes();
|
let that = this;
|
||||||
this.$refs["modal-comments"].show();
|
//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() {
|
cancel() {
|
||||||
this.$refs["modal-comments"].hide();
|
this.$refs["modal-comments"].hide();
|
||||||
},
|
},
|
||||||
getCasesNotes() {
|
getCasesNotes(callback) {
|
||||||
let that = this;
|
let that = this;
|
||||||
Api.cases
|
Api.cases
|
||||||
.casenotes(this.dataCase)
|
.casenotes(this.dataCase)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
that.formatResponseCaseNotes(response.data.notes);
|
that.formatResponseCaseNotes(response.data.notes);
|
||||||
|
that.permission = response.data.noPerms == 1 ? false : true;
|
||||||
|
if (_.isFunction(callback)) {
|
||||||
|
callback(response);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
throw new Error(err);
|
throw new Error(err);
|
||||||
@@ -138,6 +154,7 @@ export default {
|
|||||||
let that = this,
|
let that = this,
|
||||||
notesArray = [];
|
notesArray = [];
|
||||||
_.each(notes, (n) => {
|
_.each(notes, (n) => {
|
||||||
|
n.id = _.random(1000000);
|
||||||
notesArray.push({
|
notesArray.push({
|
||||||
user: that.nameFormatCases(
|
user: that.nameFormatCases(
|
||||||
n.USR_FIRSTNAME,
|
n.USR_FIRSTNAME,
|
||||||
@@ -154,6 +171,7 @@ export default {
|
|||||||
},
|
},
|
||||||
dropFiles(files) {
|
dropFiles(files) {
|
||||||
this.attachDocuments = true;
|
this.attachDocuments = true;
|
||||||
|
this.dataAttachedDocuments.items = [];
|
||||||
this.dataAttachedDocuments.items = files;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -405,5 +405,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.vsm--mobile-item {
|
.vsm--mobile-item {
|
||||||
max-width: 200px !important;
|
max-width: 210px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] = (int) (env('MAIN_SYSTEM_UTC_TIME_ZONE',
|
|||||||
ini_set('date.timezone', $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] ? 'UTC' : env('MAIN_TIME_ZONE', 'America/New_York'));
|
ini_set('date.timezone', $_SESSION['__SYSTEM_UTC_TIME_ZONE__'] ? 'UTC' : env('MAIN_TIME_ZONE', 'America/New_York'));
|
||||||
define('TIME_ZONE', ini_get('date.timezone'));
|
define('TIME_ZONE', ini_get('date.timezone'));
|
||||||
|
|
||||||
|
// Only test async routing
|
||||||
|
define('DISABLE_TASK_MANAGER_ROUTING_ASYNC', false);
|
||||||
|
|
||||||
//This path includes PM tables model classes
|
//This path includes PM tables model classes
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_DB . SYS_SYS . "/");
|
set_include_path(get_include_path() . PATH_SEPARATOR . PATH_DB . SYS_SYS . "/");
|
||||||
|
|
||||||
|
|||||||
@@ -550,15 +550,5 @@ class SupervisingTest extends TestCase
|
|||||||
|
|
||||||
$res = $supervising->getPagingCounters();
|
$res = $supervising->getPagingCounters();
|
||||||
$this->assertEquals(3, $res);
|
$this->assertEquals(3, $res);
|
||||||
|
|
||||||
$delegation = Delegation::select()->where('USR_ID', $cases->USR_ID)->first();
|
|
||||||
|
|
||||||
$supervising->setCaseNumber($delegation->APP_NUMBER);
|
|
||||||
$supervising->setProcessId($delegation->PRO_ID);
|
|
||||||
$supervising->setTaskId($delegation->TAS_ID);
|
|
||||||
$supervising->setCaseUid($delegation->APP_UID);
|
|
||||||
|
|
||||||
$res = $supervising->getPagingCounters();
|
|
||||||
$this->assertEquals(1, $res);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,4 +154,24 @@ class UserTest extends TestCase
|
|||||||
$results = User::getId(G::generateUniqueID());
|
$results = User::getId(G::generateUniqueID());
|
||||||
$this->assertEquals(0, $results);
|
$this->assertEquals(0, $results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It test get the user information
|
||||||
|
*
|
||||||
|
* @covers \ProcessMaker\Model\User::scopeUserId()
|
||||||
|
* @covers \ProcessMaker\Model\User::getInformation()
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_get_information()
|
||||||
|
{
|
||||||
|
$user = factory(User::class)->create();
|
||||||
|
// When the user exist
|
||||||
|
$results = User::getInformation($user->USR_ID);
|
||||||
|
$this->assertNotEmpty($results);
|
||||||
|
$this->assertArrayHasKey('usr_username', $results);
|
||||||
|
$this->assertArrayHasKey('usr_firstname', $results);
|
||||||
|
$this->assertArrayHasKey('usr_lastname', $results);
|
||||||
|
$this->assertArrayHasKey('usr_email', $results);
|
||||||
|
$this->assertArrayHasKey('usr_position', $results);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -17,4 +17,16 @@ class ApplyMaskDateEnvironmentTest extends TestCase
|
|||||||
$expected = '2020/11/12';
|
$expected = '2020/11/12';
|
||||||
$this->assertEquals($expected, applyMaskDateEnvironment($date1, 'Y/m/d'));
|
$this->assertEquals($expected, applyMaskDateEnvironment($date1, 'Y/m/d'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When the mask is empty will return the same date
|
||||||
|
*
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_should_return_date_without_mask()
|
||||||
|
{
|
||||||
|
$date1 = date("2020-11-12 09:09:10");
|
||||||
|
$expected = '2020-11-12 09:09:10';
|
||||||
|
$this->assertEquals($expected, applyMaskDateEnvironment($date1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -927,9 +927,14 @@ class LdapAdvanced
|
|||||||
$arrayData['countUser']++;
|
$arrayData['countUser']++;
|
||||||
|
|
||||||
if ((is_array($username) && !empty($username)) || trim($username) != '') {
|
if ((is_array($username) && !empty($username)) || trim($username) != '') {
|
||||||
|
$dataUserLdap = $this->getUserDataFromAttribute($username, $arrayUserLdap);
|
||||||
|
$dataUserLdap["usrRole"] = "";
|
||||||
|
if (!empty($arrayAuthSourceData['AUTH_SOURCE_DATA']['USR_ROLE'])) {
|
||||||
|
$dataUserLdap["usrRole"] = $arrayAuthSourceData['AUTH_SOURCE_DATA']['USR_ROLE'];
|
||||||
|
}
|
||||||
$arrayData = $this->groupSynchronizeUser(
|
$arrayData = $this->groupSynchronizeUser(
|
||||||
$groupUid,
|
$groupUid,
|
||||||
$this->getUserDataFromAttribute($username, $arrayUserLdap),
|
$dataUserLdap,
|
||||||
$arrayData
|
$arrayData
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1631,7 +1636,14 @@ class LdapAdvanced
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function automaticRegister($aAuthSource, $strUser, $strPass)
|
/**
|
||||||
|
* Automatic register.
|
||||||
|
* @param array $authSource
|
||||||
|
* @param string $strUser
|
||||||
|
* @param string $strPass
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function automaticRegister($authSource, $strUser, $strPass)
|
||||||
{
|
{
|
||||||
$rbac = RBAC::getSingleton();
|
$rbac = RBAC::getSingleton();
|
||||||
|
|
||||||
@@ -1645,52 +1657,56 @@ class LdapAdvanced
|
|||||||
|
|
||||||
$user = $this->searchUserByUid($strUser);
|
$user = $this->searchUserByUid($strUser);
|
||||||
|
|
||||||
$res = 0;
|
$result = 0;
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
if ($this->VerifyLogin($user['sUsername'], $strPass) === true) {
|
if ($this->VerifyLogin($user['sUsername'], $strPass) === true) {
|
||||||
$res = 1;
|
$result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($res == 0 && $this->VerifyLogin($user['sDN'], $strPass) === true) {
|
if ($result == 0 && $this->VerifyLogin($user['sDN'], $strPass) === true) {
|
||||||
$res = 1;
|
$result = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return $res;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($res == 0) {
|
if ($result == 0) {
|
||||||
$aAuthSource = $rbac->authSourcesObj->load($this->sAuthSource);
|
$authSource = $rbac->authSourcesObj->load($this->sAuthSource);
|
||||||
$aAttributes = array();
|
$attributes = [];
|
||||||
|
|
||||||
if (isset($aAuthSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'])) {
|
if (isset($authSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'])) {
|
||||||
$aAttributes = $aAuthSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'];
|
$attributes = $authSource['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$aData = array();
|
$usrRole = 'PROCESSMAKER_OPERATOR';
|
||||||
$aData['USR_USERNAME'] = $user['sUsername'];
|
if (!empty($authSource['AUTH_SOURCE_DATA']['USR_ROLE'])) {
|
||||||
$aData["USR_PASSWORD"] = "00000000000000000000000000000000";
|
$usrRole = $authSource['AUTH_SOURCE_DATA']['USR_ROLE'];
|
||||||
$aData['USR_FIRSTNAME'] = $user['sFirstname'];
|
}
|
||||||
$aData['USR_LASTNAME'] = $user['sLastname'];
|
$data = [];
|
||||||
$aData['USR_EMAIL'] = $user['sEmail'];
|
$data['USR_USERNAME'] = $user['sUsername'];
|
||||||
$aData['USR_DUE_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 2));
|
$data["USR_PASSWORD"] = "00000000000000000000000000000000";
|
||||||
$aData['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
|
$data['USR_FIRSTNAME'] = $user['sFirstname'];
|
||||||
$aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
$data['USR_LASTNAME'] = $user['sLastname'];
|
||||||
$aData['USR_BIRTHDAY'] = date('Y-m-d');
|
$data['USR_EMAIL'] = $user['sEmail'];
|
||||||
$aData['USR_STATUS'] = (isset($user['USR_STATUS'])) ? (($user['USR_STATUS'] == 'ACTIVE') ? 1 : 0) : 1;
|
$data['USR_DUE_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 2));
|
||||||
$aData['USR_AUTH_TYPE'] = strtolower($aAuthSource['AUTH_SOURCE_PROVIDER']);
|
$data['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
$aData['UID_AUTH_SOURCE'] = $aAuthSource['AUTH_SOURCE_UID'];
|
$data['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
$aData['USR_AUTH_USER_DN'] = $user['sDN'];
|
$data['USR_BIRTHDAY'] = date('Y-m-d');
|
||||||
$aData['USR_ROLE'] = 'PROCESSMAKER_OPERATOR';
|
$data['USR_STATUS'] = (isset($user['USR_STATUS'])) ? (($user['USR_STATUS'] == 'ACTIVE') ? 1 : 0) : 1;
|
||||||
|
$data['USR_AUTH_TYPE'] = strtolower($authSource['AUTH_SOURCE_PROVIDER']);
|
||||||
|
$data['UID_AUTH_SOURCE'] = $authSource['AUTH_SOURCE_UID'];
|
||||||
|
$data['USR_AUTH_USER_DN'] = $user['sDN'];
|
||||||
|
$data['USR_ROLE'] = $usrRole;
|
||||||
|
|
||||||
if (!empty($aAttributes)) {
|
if (!empty($attributes)) {
|
||||||
foreach ($aAttributes as $value) {
|
foreach ($attributes as $value) {
|
||||||
if (isset($user[$value['attributeUser']])) {
|
if (isset($user[$value['attributeUser']])) {
|
||||||
$aData[$value['attributeUser']] = str_replace("*", "'", $user[$value['attributeUser']]);
|
$data[$value['attributeUser']] = str_replace("*", "'", $user[$value['attributeUser']]);
|
||||||
if ($value['attributeUser'] == 'USR_STATUS') {
|
if ($value['attributeUser'] == 'USR_STATUS') {
|
||||||
$evalValue = $aData[$value['attributeUser']];
|
$evalValue = $data[$value['attributeUser']];
|
||||||
$statusValue = (isset($user['USR_STATUS'])) ? $user['USR_STATUS'] : 'ACTIVE';
|
$statusValue = (isset($user['USR_STATUS'])) ? $user['USR_STATUS'] : 'ACTIVE';
|
||||||
$aData[$value['attributeUser']] = $statusValue;
|
$data[$value['attributeUser']] = $statusValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1698,23 +1714,23 @@ class LdapAdvanced
|
|||||||
|
|
||||||
//req - accountexpires
|
//req - accountexpires
|
||||||
if (isset($user["USR_DUE_DATE"]) && $user["USR_DUE_DATE"] != '') {
|
if (isset($user["USR_DUE_DATE"]) && $user["USR_DUE_DATE"] != '') {
|
||||||
$aData["USR_DUE_DATE"] = $this->convertDateADtoPM($user["USR_DUE_DATE"]);
|
$data["USR_DUE_DATE"] = $this->convertDateADtoPM($user["USR_DUE_DATE"]);
|
||||||
}
|
}
|
||||||
//end
|
//end
|
||||||
|
|
||||||
$sUserUID = $rbac->createUser($aData, 'PROCESSMAKER_OPERATOR');
|
$userUid = $rbac->createUser($data, $usrRole);
|
||||||
$aData['USR_UID'] = $sUserUID;
|
$data['USR_UID'] = $userUid;
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
|
|
||||||
$oUser = new Users();
|
$users = new Users();
|
||||||
$aData['USR_STATUS'] = (isset($user['USR_STATUS'])) ? $user['USR_STATUS'] : 'ACTIVE';
|
$data['USR_STATUS'] = (isset($user['USR_STATUS'])) ? $user['USR_STATUS'] : 'ACTIVE';
|
||||||
$oUser->create($aData);
|
$users->create($data);
|
||||||
$this->log(null, "Automatic Register for user $strUser ");
|
$this->log(null, "Automatic Register for user $strUser ");
|
||||||
$res = 1;
|
$result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2260,15 +2276,15 @@ class LdapAdvanced
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* creates an users using the data send in the array $aUsers
|
* creates an users using the data send in the array $user
|
||||||
* and then add the user to specific department
|
* and then add the user to specific department
|
||||||
* this function is used in cron only
|
* this function is used in cron only
|
||||||
*
|
*
|
||||||
* @param array $aUser info taken from ldap
|
* @param array $user info taken from ldap
|
||||||
* @param string $depUid the department UID
|
* @param string $depUid the department UID
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function createUserAndActivate($aUser, $depUid)
|
public function createUserAndActivate($user, $depUid)
|
||||||
{
|
{
|
||||||
$rbac = RBAC::getSingleton();
|
$rbac = RBAC::getSingleton();
|
||||||
|
|
||||||
@@ -2284,41 +2300,42 @@ class LdapAdvanced
|
|||||||
$rbac->usersRolesObj = new UsersRoles();
|
$rbac->usersRolesObj = new UsersRoles();
|
||||||
}
|
}
|
||||||
|
|
||||||
$sUsername = $aUser['sUsername'];
|
$sUsername = $user['sUsername'];
|
||||||
$sFullname = $aUser['sFullname'];
|
$sFullname = $user['sFullname'];
|
||||||
$sFirstname = $aUser['sFirstname'];
|
$sFirstname = $user['sFirstname'];
|
||||||
$sLastname = $aUser['sLastname'];
|
$sLastname = $user['sLastname'];
|
||||||
$sEmail = $aUser['sEmail'];
|
$sEmail = $user['sEmail'];
|
||||||
$sDn = $aUser['sDN'];
|
$sDn = $user['sDN'];
|
||||||
|
$usrRole = empty($user['usrRole']) ? 'PROCESSMAKER_OPERATOR' : $user['usrRole'];
|
||||||
|
|
||||||
$aData = array();
|
$data = [];
|
||||||
$aData['USR_USERNAME'] = $sUsername;
|
$data['USR_USERNAME'] = $sUsername;
|
||||||
$aData["USR_PASSWORD"] = "00000000000000000000000000000000";
|
$data["USR_PASSWORD"] = "00000000000000000000000000000000";
|
||||||
$aData['USR_FIRSTNAME'] = $sFirstname;
|
$data['USR_FIRSTNAME'] = $sFirstname;
|
||||||
$aData['USR_LASTNAME'] = $sLastname;
|
$data['USR_LASTNAME'] = $sLastname;
|
||||||
$aData['USR_EMAIL'] = $sEmail;
|
$data['USR_EMAIL'] = $sEmail;
|
||||||
$aData['USR_DUE_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 2));
|
$data['USR_DUE_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 2));
|
||||||
$aData['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
|
$data['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
$aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
$data['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
|
||||||
$aData['USR_BIRTHDAY'] = date('Y-m-d');
|
$data['USR_BIRTHDAY'] = date('Y-m-d');
|
||||||
$aData['USR_STATUS'] = 1;
|
$data['USR_STATUS'] = 1;
|
||||||
$aData['USR_AUTH_TYPE'] = 'ldapadvanced';
|
$data['USR_AUTH_TYPE'] = 'ldapadvanced';
|
||||||
$aData['UID_AUTH_SOURCE'] = $this->sAuthSource;
|
$data['UID_AUTH_SOURCE'] = $this->sAuthSource;
|
||||||
$aData['USR_AUTH_USER_DN'] = $sDn;
|
$data['USR_AUTH_USER_DN'] = $sDn;
|
||||||
|
|
||||||
$sUserUID = $rbac->createUser($aData, "PROCESSMAKER_OPERATOR");
|
$userUid = $rbac->createUser($data, $usrRole);
|
||||||
|
|
||||||
$aData['USR_STATUS'] = 'ACTIVE';
|
$data['USR_STATUS'] = 'ACTIVE';
|
||||||
$aData['USR_UID'] = $sUserUID;
|
$data['USR_UID'] = $userUid;
|
||||||
$aData['DEP_UID'] = $depUid;
|
$data['DEP_UID'] = $depUid;
|
||||||
$aData['USR_ROLE'] = 'PROCESSMAKER_OPERATOR';
|
$data['USR_ROLE'] = $usrRole;
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
|
|
||||||
$oUser = new Users();
|
$users = new Users();
|
||||||
$oUser->create($aData);
|
$users->create($data);
|
||||||
|
|
||||||
return $sUserUID;
|
return $userUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function synchronizeManagers($managersHierarchy)
|
public function synchronizeManagers($managersHierarchy)
|
||||||
|
|||||||
@@ -4643,6 +4643,12 @@ msgstr "Config Directory"
|
|||||||
msgid "Confirm"
|
msgid "Confirm"
|
||||||
msgstr "Confirm"
|
msgstr "Confirm"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_CONFIRMATION
|
||||||
|
#: LABEL/ID_CONFIRMATION
|
||||||
|
msgid "Confirmation"
|
||||||
|
msgstr "Confirmation"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_CONFIRM_ADHOCUSER_CASE
|
# LABEL/ID_CONFIRM_ADHOCUSER_CASE
|
||||||
#: LABEL/ID_CONFIRM_ADHOCUSER_CASE
|
#: LABEL/ID_CONFIRM_ADHOCUSER_CASE
|
||||||
@@ -5909,6 +5915,12 @@ msgstr "Definition"
|
|||||||
msgid "Delay Field"
|
msgid "Delay Field"
|
||||||
msgstr "Delay Field"
|
msgstr "Delay Field"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DELAYED
|
||||||
|
#: LABEL/ID_DELAYED
|
||||||
|
msgid "Delayed"
|
||||||
|
msgstr "Delayed"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_DELEGATE_DATE_FROM
|
# LABEL/ID_DELEGATE_DATE_FROM
|
||||||
#: LABEL/ID_DELEGATE_DATE_FROM
|
#: LABEL/ID_DELEGATE_DATE_FROM
|
||||||
@@ -6899,6 +6911,12 @@ msgstr "Duplicate category name."
|
|||||||
msgid "Duplicate entry for primary key"
|
msgid "Duplicate entry for primary key"
|
||||||
msgstr "Duplicate entry for primary key"
|
msgstr "Duplicate entry for primary key"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DURATION
|
||||||
|
#: LABEL/ID_DURATION
|
||||||
|
msgid "Duration"
|
||||||
|
msgstr "Duration"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_DYANFORM_CREATED
|
# LABEL/ID_DYANFORM_CREATED
|
||||||
#: LABEL/ID_DYANFORM_CREATED
|
#: LABEL/ID_DYANFORM_CREATED
|
||||||
@@ -10709,6 +10727,12 @@ msgstr "Invalid value for '{0}'. It must be a string."
|
|||||||
msgid "Invalid value for \"{0}\". This value must be an array."
|
msgid "Invalid value for \"{0}\". This value must be an array."
|
||||||
msgstr "Invalid value for \"{0}\". This value must be an array."
|
msgstr "Invalid value for \"{0}\". This value must be an array."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_IN_DRAFT
|
||||||
|
#: LABEL/ID_IN_DRAFT
|
||||||
|
msgid "In Draft"
|
||||||
|
msgstr "In Draft"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_IN_PROGRESS
|
# LABEL/ID_IN_PROGRESS
|
||||||
#: LABEL/ID_IN_PROGRESS
|
#: LABEL/ID_IN_PROGRESS
|
||||||
|
|||||||
@@ -57593,6 +57593,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_CONFIGURE','en','Configure','2014-01-15') ,
|
( 'LABEL','ID_CONFIGURE','en','Configure','2014-01-15') ,
|
||||||
( 'LABEL','ID_CONFIG_DIRECTORY','en','Config Directory','2014-01-15') ,
|
( 'LABEL','ID_CONFIG_DIRECTORY','en','Config Directory','2014-01-15') ,
|
||||||
( 'LABEL','ID_CONFIRM','en','Confirm','2014-01-15') ,
|
( 'LABEL','ID_CONFIRM','en','Confirm','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_CONFIRMATION','en','Confirmation','2020-01-15') ,
|
||||||
( 'LABEL','ID_CONFIRM_ADHOCUSER_CASE','en','Are you sure you want to do it?','2014-01-15') ,
|
( 'LABEL','ID_CONFIRM_ADHOCUSER_CASE','en','Are you sure you want to do it?','2014-01-15') ,
|
||||||
( 'LABEL','ID_CONFIRM_ASSIGNED_GRID','en','Do you want to delete the data in the row you just created?','2015-01-16') ,
|
( 'LABEL','ID_CONFIRM_ASSIGNED_GRID','en','Do you want to delete the data in the row you just created?','2015-01-16') ,
|
||||||
( 'LABEL','ID_CONFIRM_CANCEL_CASE','en','Are you sure you want to cancel this case?','2014-01-15') ,
|
( 'LABEL','ID_CONFIRM_CANCEL_CASE','en','Are you sure you want to cancel this case?','2014-01-15') ,
|
||||||
@@ -57810,6 +57811,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_DEFAULT_SKIN','en','Default Skin','2014-01-15') ,
|
( 'LABEL','ID_DEFAULT_SKIN','en','Default Skin','2014-01-15') ,
|
||||||
( 'LABEL','ID_DEFINITION','en','Definition','2014-01-15') ,
|
( 'LABEL','ID_DEFINITION','en','Definition','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELAY_FIELD','en','Delay Field','2014-01-15') ,
|
( 'LABEL','ID_DELAY_FIELD','en','Delay Field','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_DELAYED','en','Delayed','2021-01-20') ,
|
||||||
( 'LABEL','ID_DELEGATE_DATE_FROM','en','Date from','2017-10-18') ,
|
( 'LABEL','ID_DELEGATE_DATE_FROM','en','Date from','2017-10-18') ,
|
||||||
( 'LABEL','ID_DELEGATE_DATE_TO','en','to','2014-01-15') ,
|
( 'LABEL','ID_DELEGATE_DATE_TO','en','to','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELEGATE_USER','en','Delegated User','2014-01-15') ,
|
( 'LABEL','ID_DELEGATE_USER','en','Delegated User','2014-01-15') ,
|
||||||
@@ -57979,6 +57981,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2014-01-15') ,
|
( 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2014-01-15') ,
|
||||||
( 'LABEL','ID_DUPLICATE_CATEGORY_NAME','en','Duplicate category name.','2014-01-15') ,
|
( 'LABEL','ID_DUPLICATE_CATEGORY_NAME','en','Duplicate category name.','2014-01-15') ,
|
||||||
( 'LABEL','ID_DUPLICATE_ENTRY_PRIMARY_KEY','en','Duplicate entry for primary key','2014-01-15') ,
|
( 'LABEL','ID_DUPLICATE_ENTRY_PRIMARY_KEY','en','Duplicate entry for primary key','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_DURATION','en','Duration','2021-01-20') ,
|
||||||
( 'LABEL','ID_DYANFORM_CREATED','en','Dynaform has been created successfully','2014-01-15') ,
|
( 'LABEL','ID_DYANFORM_CREATED','en','Dynaform has been created successfully','2014-01-15') ,
|
||||||
( 'LABEL','ID_DYANFORM_REMOVE','en','Dynaform has been removed successfully from Process','2014-01-15') ,
|
( 'LABEL','ID_DYANFORM_REMOVE','en','Dynaform has been removed successfully from Process','2014-01-15') ,
|
||||||
( 'LABEL','ID_DYNADOC','en','My Case Forms and Documents','2014-01-15') ,
|
( 'LABEL','ID_DYNADOC','en','My Case Forms and Documents','2014-01-15') ,
|
||||||
@@ -58641,6 +58644,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES','en','Invalid value for "{0}". It only accepts values: "{1}".','2014-10-21') ,
|
( 'LABEL','ID_INVALID_VALUE_ONLY_ACCEPTS_VALUES','en','Invalid value for "{0}". It only accepts values: "{1}".','2014-10-21') ,
|
||||||
( 'LABEL','ID_INVALID_VALUE_STRING','en','Invalid value for ''{0}''. It must be a string.','2014-10-21') ,
|
( 'LABEL','ID_INVALID_VALUE_STRING','en','Invalid value for ''{0}''. It must be a string.','2014-10-21') ,
|
||||||
( 'LABEL','ID_INVALID_VALUE_THIS_MUST_BE_ARRAY','en','Invalid value for "{0}". This value must be an array.','2014-10-21') ,
|
( 'LABEL','ID_INVALID_VALUE_THIS_MUST_BE_ARRAY','en','Invalid value for "{0}". This value must be an array.','2014-10-21') ,
|
||||||
|
( 'LABEL','ID_IN_DRAFT','en','In Draft','2021-01-20') ,
|
||||||
( 'LABEL','ID_IN_PROGRESS','en','In Progress','2014-01-15') ,
|
( 'LABEL','ID_IN_PROGRESS','en','In Progress','2014-01-15') ,
|
||||||
( 'LABEL','ID_IP','en','IP Client','2014-10-08') ,
|
( 'LABEL','ID_IP','en','IP Client','2014-10-08') ,
|
||||||
( 'LABEL','ID_ISNT_LICENSE','en','This isn''t the correct license.','2014-01-15') ,
|
( 'LABEL','ID_ISNT_LICENSE','en','This isn''t the correct license.','2014-01-15') ,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -12,18 +12,18 @@
|
|||||||
"@vue/cli": "^4.4.6",
|
"@vue/cli": "^4.4.6",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.0",
|
||||||
"bootstrap-vue": "^2.15.0",
|
"bootstrap-vue": "^2.20.1",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.8.1",
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"save": "^2.4.0",
|
"save": "^2.4.0",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-tables-2": "^2.0.27",
|
"vue-tables-2": "^2.1.61",
|
||||||
"vuelidate": "^0.7.5"
|
"vuelidate": "^0.7.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "~4.5.0",
|
"@vue/cli-plugin-babel": "^4.5.9",
|
||||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
"@vue/cli-plugin-eslint": "^4.5.9",
|
||||||
"@vue/cli-service": "~4.5.0",
|
"@vue/cli-service": "^4.5.9",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^6.7.2",
|
"eslint": "^6.7.2",
|
||||||
"eslint-plugin-vue": "^6.2.2",
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
|
|||||||
@@ -32,10 +32,26 @@
|
|||||||
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_PORT')">
|
<b-form-group :label="$root.translation('ID_PORT')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.port=!disabledField.port;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.port"
|
<b-form-input v-model="form.port"
|
||||||
:state="validateState('port')"
|
:state="validateState('port')"
|
||||||
|
:disabled="disabledField.port"
|
||||||
autocomplete="off"/>
|
autocomplete="off"/>
|
||||||
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_ENABLE_AUTOMATIC_REGISTER')"
|
<b-form-group :label="$root.translation('ID_ENABLE_AUTOMATIC_REGISTER')"
|
||||||
label-cols-lg="8">
|
label-cols-lg="8">
|
||||||
@@ -93,30 +109,108 @@
|
|||||||
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_USER_IDENTIFIER')">
|
<b-form-group :label="$root.translation('ID_USER_IDENTIFIER')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.userIdentifier=!disabledField.userIdentifier;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.userIdentifier"
|
<b-form-input v-model="form.userIdentifier"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
readonly/>
|
:disabled="disabledField.userIdentifier"/>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_GROUP_IDENTIFIER')">
|
<b-form-group :label="$root.translation('ID_GROUP_IDENTIFIER')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.groupIdentifier=!disabledField.groupIdentifier;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.groupIdentifier"
|
<b-form-input v-model="form.groupIdentifier"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
readonly/>
|
:disabled="disabledField.groupIdentifier"/>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_FILTER_TO_SEARCH_USERS')">
|
<b-form-group :label="$root.translation('ID_FILTER_TO_SEARCH_USERS')">
|
||||||
<b-form-input v-model="form.filterToSearchUsers"
|
<b-form-input v-model="form.filterToSearchUsers"
|
||||||
autocomplete="off"/>
|
autocomplete="off"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_USER_CLASS_IDENTIFIER')">
|
<b-form-group :label="$root.translation('ID_USER_CLASS_IDENTIFIER')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.userClassIdentifier=!disabledField.userClassIdentifier;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.userClassIdentifier"
|
<b-form-input v-model="form.userClassIdentifier"
|
||||||
|
:disabled="disabledField.userClassIdentifier"
|
||||||
autocomplete="off"/>
|
autocomplete="off"/>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_GROUP_CLASS_IDENTIFIER')">
|
<b-form-group :label="$root.translation('ID_GROUP_CLASS_IDENTIFIER')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.groupClassIdentifier=!disabledField.groupClassIdentifier;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.groupClassIdentifier"
|
<b-form-input v-model="form.groupClassIdentifier"
|
||||||
|
:disabled="disabledField.groupClassIdentifier"
|
||||||
autocomplete="off"/>
|
autocomplete="off"/>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_DEPARTMENT_CLASS_IDENTIFIER')">
|
<b-form-group :label="$root.translation('ID_DEPARTMENT_CLASS_IDENTIFIER')">
|
||||||
|
<b-input-group>
|
||||||
|
<template #append>
|
||||||
|
<b-input-group-text class="p-0">
|
||||||
|
<b-button size="md"
|
||||||
|
variant="outline-light"
|
||||||
|
class="border-0"
|
||||||
|
@click="disabledField.departmentClassIdentifier=!disabledField.departmentClassIdentifier;">
|
||||||
|
<b-icon icon="pencil-fill"
|
||||||
|
aria-hidden="true"
|
||||||
|
variant="primary">
|
||||||
|
</b-icon>
|
||||||
|
</b-button>
|
||||||
|
</b-input-group-text>
|
||||||
|
</template>
|
||||||
<b-form-input v-model="form.departmentClassIdentifier"
|
<b-form-input v-model="form.departmentClassIdentifier"
|
||||||
|
:disabled="disabledField.departmentClassIdentifier"
|
||||||
autocomplete="off"/>
|
autocomplete="off"/>
|
||||||
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@@ -158,7 +252,8 @@
|
|||||||
components: {
|
components: {
|
||||||
formUploadSource
|
formUploadSource
|
||||||
},
|
},
|
||||||
validations: {
|
validations() {
|
||||||
|
let fields = {
|
||||||
form: {
|
form: {
|
||||||
name: {
|
name: {
|
||||||
required
|
required
|
||||||
@@ -168,14 +263,24 @@
|
|||||||
},
|
},
|
||||||
port: {
|
port: {
|
||||||
required
|
required
|
||||||
},
|
|
||||||
userName: {
|
|
||||||
required
|
|
||||||
},
|
|
||||||
password: {
|
|
||||||
required
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
if (this.form.anonymous === '1') {
|
||||||
|
fields.form.userName = {
|
||||||
|
};
|
||||||
|
fields.form.password = {
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if (this.form.anonymous === '0') {
|
||||||
|
fields.form.userName = {
|
||||||
|
required
|
||||||
|
};
|
||||||
|
fields.form.password = {
|
||||||
|
required
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return fields;
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -217,7 +322,14 @@
|
|||||||
{value: "ds", text: "389 DS"}
|
{value: "ds", text: "389 DS"}
|
||||||
],
|
],
|
||||||
roles: [],
|
roles: [],
|
||||||
show: true
|
disabledField: {
|
||||||
|
port: true,
|
||||||
|
userIdentifier: true,
|
||||||
|
groupIdentifier: true,
|
||||||
|
userClassIdentifier: true,
|
||||||
|
groupClassIdentifier: true,
|
||||||
|
departmentClassIdentifier: true
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</b-form-file>
|
</b-form-file>
|
||||||
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION')" v-else>
|
<b-form-group :label="$root.translation('ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION',[fileContent.AUTH_SOURCE_NAME])" v-else>
|
||||||
<b-form-file v-model="form.connectionSettings"
|
<b-form-file v-model="form.connectionSettings"
|
||||||
@change="change"
|
@change="change"
|
||||||
:state="validateState('connectionSettings')"
|
:state="validateState('connectionSettings')"
|
||||||
|
|||||||
@@ -106,11 +106,17 @@ try {
|
|||||||
$cases = new Cases();
|
$cases = new Cases();
|
||||||
$cases->routeCase($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged);
|
$cases->routeCase($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged);
|
||||||
};
|
};
|
||||||
|
if (!DISABLE_TASK_MANAGER_ROUTING_ASYNC) {
|
||||||
|
// Routing the case asynchronically
|
||||||
JobsManager::getSingleton()->dispatch(RouteCase::class, $closure);
|
JobsManager::getSingleton()->dispatch(RouteCase::class, $closure);
|
||||||
|
|
||||||
// We close the related threads.
|
// We close the related threads.
|
||||||
$cases = new Cases();
|
$cases = new Cases();
|
||||||
$cases->CloseCurrentDelegation($application, $index);
|
$cases->CloseCurrentDelegation($application, $index);
|
||||||
|
} else {
|
||||||
|
// Routing the case synchronically
|
||||||
|
$closure();
|
||||||
|
}
|
||||||
|
|
||||||
$debuggerAvailable = true;
|
$debuggerAvailable = true;
|
||||||
$casesRedirector = 'casesListExtJsRedirector';
|
$casesRedirector = 'casesListExtJsRedirector';
|
||||||
@@ -126,13 +132,42 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$loc = $nextStep['PAGE'];
|
|
||||||
|
|
||||||
// Triggers After
|
// Triggers After
|
||||||
$isIE = Bootstrap::isIE();
|
$isIE = Bootstrap::isIE();
|
||||||
unset($_SESSION['TRIGGER_DEBUG']);
|
|
||||||
|
|
||||||
//close tab only if IE11 add a validation was added if the current skin is uxs
|
// If the routing of cases asynchronically is disabled, use the old behaviour for debug option
|
||||||
|
if (DISABLE_TASK_MANAGER_ROUTING_ASYNC) {
|
||||||
|
// Determine the landing page
|
||||||
|
if (isset($_SESSION['PMDEBUGGER']) && $_SESSION['PMDEBUGGER'] && $debuggerAvailable) {
|
||||||
|
$_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $nextStep['PAGE'];
|
||||||
|
$loc = 'cases_Step?' . 'breakpoint=triggerdebug';
|
||||||
|
} else {
|
||||||
|
$loc = $nextStep['PAGE'];
|
||||||
|
}
|
||||||
|
// If debug option is enabled for the process, load the debug template
|
||||||
|
if (isset($_SESSION['TRIGGER_DEBUG']['ISSET']) && !$isIE) {
|
||||||
|
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] == 1) {
|
||||||
|
$templatePower = new TemplatePower(PATH_TPL . 'cases/cases_Step.html');
|
||||||
|
$templatePower->prepare();
|
||||||
|
$G_PUBLISH = new Publisher();
|
||||||
|
$G_PUBLISH->AddContent('template', '', '', '', $templatePower);
|
||||||
|
$_POST['NextStep'] = $loc;
|
||||||
|
$G_PUBLISH->AddContent('view', 'cases/showDebugFrameLoader');
|
||||||
|
$G_PUBLISH->AddContent('view', 'cases/showDebugFrameBreaker');
|
||||||
|
$_SESSION['TRIGGER_DEBUG']['ISSET'] == 0;
|
||||||
|
G::RenderPage('publish', 'blank');
|
||||||
|
exit();
|
||||||
|
} else {
|
||||||
|
unset($_SESSION['TRIGGER_DEBUG']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// If the case is routed synchronically, always redirect to the next step
|
||||||
|
$loc = $nextStep['PAGE'];
|
||||||
|
unset($_SESSION['TRIGGER_DEBUG']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Close tab only if IE11 add a validation was added if the current skin is uxs
|
||||||
if ($isIE && !isset($_SESSION['__OUTLOOK_CONNECTOR__']) && SYS_SKIN !== "uxs") {
|
if ($isIE && !isset($_SESSION['__OUTLOOK_CONNECTOR__']) && SYS_SKIN !== "uxs") {
|
||||||
$script = "
|
$script = "
|
||||||
<script type='text/javascript'>
|
<script type='text/javascript'>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ if (!empty($_SESSION['GUEST_USER']) && $_SESSION['GUEST_USER'] === RBAC::GUEST_U
|
|||||||
}
|
}
|
||||||
$access = $RBAC->userCanAccess('PM_FOLDERS_ALL') != 1 && defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0;
|
$access = $RBAC->userCanAccess('PM_FOLDERS_ALL') != 1 && defined('DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION') && DISABLE_DOWNLOAD_DOCUMENTS_SESSION_VALIDATION == 0;
|
||||||
if ($access && $isGuestUser === false) {
|
if ($access && $isGuestUser === false) {
|
||||||
if (isset($_SESSION['USER_LOGGED']) && !$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) {
|
if ((isset($_SESSION['USER_LOGGED']) && !$oAppDocument->canDownloadInput($_SESSION['USER_LOGGED'], $_GET['a'], $docVersion)) || !isset($_SESSION['USER_LOGGED'])) {
|
||||||
G::header('Location: /errors/error403.php?url=' . urlencode($_SERVER['REQUEST_URI']));
|
G::header('Location: /errors/error403.php?url=' . urlencode($_SERVER['REQUEST_URI']));
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,13 @@ if ($featureEnable) {
|
|||||||
$cases = new Cases();
|
$cases = new Cases();
|
||||||
$cases->routeCaseActionByEmail($appUid, $delIndex, $aber, $dynUid, $forms, $remoteAddr, $files);
|
$cases->routeCaseActionByEmail($appUid, $delIndex, $aber, $dynUid, $forms, $remoteAddr, $files);
|
||||||
};
|
};
|
||||||
|
if (!DISABLE_TASK_MANAGER_ROUTING_ASYNC) {
|
||||||
|
// Routing the case asynchronically
|
||||||
JobsManager::getSingleton()->dispatch(ActionByEmail::class, $closure);
|
JobsManager::getSingleton()->dispatch(ActionByEmail::class, $closure);
|
||||||
|
} else {
|
||||||
|
// Routing the case synchronically
|
||||||
|
$closure();
|
||||||
|
}
|
||||||
|
|
||||||
$message = [];
|
$message = [];
|
||||||
$message['MESSAGE'] = '<strong>' . G::loadTranslation('ID_ABE_INFORMATION_SUBMITTED') . '</strong>';
|
$message['MESSAGE'] = '<strong>' . G::loadTranslation('ID_ABE_INFORMATION_SUBMITTED') . '</strong>';
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
file.reference.userExtendedAttributes-public=public
|
|
||||||
files.encoding=UTF-8
|
|
||||||
site.root.folder=${file.reference.userExtendedAttributes-public}
|
|
||||||
source.folder=
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>org.netbeans.modules.web.clientproject</type>
|
|
||||||
<configuration>
|
|
||||||
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
|
|
||||||
<name>userExtendedAttributes</name>
|
|
||||||
</data>
|
|
||||||
</configuration>
|
|
||||||
</project>
|
|
||||||
@@ -224,7 +224,7 @@
|
|||||||
this.statusNameMessage = this.$root.translation("ID_INVALID_MAX_PERMITTED", [this.$root.translation('ID_ATTRIBUTE_NAME'), '50']);
|
this.statusNameMessage = this.$root.translation("ID_INVALID_MAX_PERMITTED", [this.$root.translation('ID_ATTRIBUTE_NAME'), '50']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (/^[a-zA-Z][-_0-9a-zA-Z]+$/.test(this.form.name) === false) {
|
if (/^[a-zA-Z][-_0-9a-zA-Z\s]+$/.test(this.form.name) === false) {
|
||||||
this.statusName = false;
|
this.statusName = false;
|
||||||
this.statusNameMessage = this.$root.translation("ID_USE_ALPHANUMERIC_CHARACTERS_INCLUDING", ["- _"]);
|
this.statusNameMessage = this.$root.translation("ID_USE_ALPHANUMERIC_CHARACTERS_INCLUDING", ["- _"]);
|
||||||
return;
|
return;
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
formToFormData(form) {
|
formToFormData(form) {
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("UEA_ID", form.id);
|
formData.append("UEA_ID", form.id);
|
||||||
formData.append("UEA_NAME", form.name);
|
formData.append("UEA_NAME", form.name.trim());
|
||||||
formData.append("UEA_ATTRIBUTE_ID", form.attributeId);
|
formData.append("UEA_ATTRIBUTE_ID", form.attributeId);
|
||||||
formData.append("UEA_HIDDEN", form.hidden);
|
formData.append("UEA_HIDDEN", form.hidden);
|
||||||
formData.append("UEA_REQUIRED", form.required);
|
formData.append("UEA_REQUIRED", form.required);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
:options="options">
|
:options="options">
|
||||||
<div slot="roles"
|
<div slot="roles"
|
||||||
slot-scope="props">
|
slot-scope="props">
|
||||||
{{formatingRoles(props.row.rolesLabel)}}
|
{{formatingRoles(props.row)}}
|
||||||
</div>
|
</div>
|
||||||
<div slot="owner"
|
<div slot="owner"
|
||||||
slot-scope="props">
|
slot-scope="props">
|
||||||
@@ -187,8 +187,14 @@
|
|||||||
refresh() {
|
refresh() {
|
||||||
this.$refs.vServerTable1.refresh();
|
this.$refs.vServerTable1.refresh();
|
||||||
},
|
},
|
||||||
formatingRoles(rolesLabel) {
|
formatingRoles(row) {
|
||||||
return rolesLabel.join(", ");
|
if (row.option === "allUser") {
|
||||||
|
return this.$root.translation("ID_ALL_USERS");
|
||||||
|
}
|
||||||
|
if (row.option === "byRol") {
|
||||||
|
return row.rolesLabel.join(", ");
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
file.reference.userPersonalInformation-public=public
|
|
||||||
files.encoding=UTF-8
|
|
||||||
site.root.folder=${file.reference.userPersonalInformation-public}
|
|
||||||
source.folder=
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
|
||||||
<type>org.netbeans.modules.web.clientproject</type>
|
|
||||||
<configuration>
|
|
||||||
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
|
|
||||||
<name>userPersonalInformation</name>
|
|
||||||
</data>
|
|
||||||
</configuration>
|
|
||||||
</project>
|
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:state="validate.USR_FIRSTNAME.state"
|
:state="validate.USR_FIRSTNAME.state"
|
||||||
@keyup="validateFirstName"
|
@keyup="validateFirstName"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_FIRSTNAME"></b-form-input>
|
||||||
<b-form-invalid-feedback>{{validate.USR_FIRSTNAME.message}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{validate.USR_FIRSTNAME.message}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:state="validate.USR_LASTNAME.state"
|
:state="validate.USR_LASTNAME.state"
|
||||||
@keyup="validateLastName"
|
@keyup="validateLastName"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_LASTNAME"></b-form-input>
|
||||||
<b-form-invalid-feedback>{{validate.USR_LASTNAME.message}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{validate.USR_LASTNAME.message}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
@click="avatarClick"
|
@click="avatarClick"
|
||||||
badge-variant="light"
|
badge-variant="light"
|
||||||
:src="urlImage"
|
:src="urlImage"
|
||||||
:disabled="disabled">
|
:disabled="disabledField.USR_PHOTO">
|
||||||
</b-avatar>
|
</b-avatar>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_ADDRESS')">
|
<b-form-group :label="$root.translation('ID_ADDRESS')">
|
||||||
<b-form-input v-model="form.USR_ADDRESS"
|
<b-form-input v-model="form.USR_ADDRESS"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_ADDRESS"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="2">
|
<b-col cols="2">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_ZIP_CODE')">
|
<b-form-group :label="$root.translation('ID_ZIP_CODE')">
|
||||||
<b-form-input v-model="form.USR_ZIP_CODE"
|
<b-form-input v-model="form.USR_ZIP_CODE"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_ZIP_CODE"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:state="validate.USR_USERNAME.state"
|
:state="validate.USR_USERNAME.state"
|
||||||
@keyup="validateUserName"
|
@keyup="validateUserName"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_USERNAME"></b-form-input>
|
||||||
<b-form-valid-feedback><span v-html="validate.USR_USERNAME.message"></span></b-form-valid-feedback>
|
<b-form-valid-feedback><span v-html="validate.USR_USERNAME.message"></span></b-form-valid-feedback>
|
||||||
<b-form-invalid-feedback><span v-html="validate.USR_USERNAME.message"></span></b-form-invalid-feedback>
|
<b-form-invalid-feedback><span v-html="validate.USR_USERNAME.message"></span></b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<b-form-select v-model="form.USR_COUNTRY"
|
<b-form-select v-model="form.USR_COUNTRY"
|
||||||
:options="countryList"
|
:options="countryList"
|
||||||
@change="getStateList"
|
@change="getStateList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_COUNTRY"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="2">
|
<b-col cols="2">
|
||||||
@@ -85,14 +85,14 @@
|
|||||||
<b-form-select v-model="form.USR_CITY"
|
<b-form-select v-model="form.USR_CITY"
|
||||||
:options="stateList"
|
:options="stateList"
|
||||||
@change="getLocationList"
|
@change="getLocationList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_CITY"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="3">
|
<b-col cols="3">
|
||||||
<b-form-group :label="$root.translation('ID_CITY')">
|
<b-form-group :label="$root.translation('ID_CITY')">
|
||||||
<b-form-select v-model="form.USR_LOCATION"
|
<b-form-select v-model="form.USR_LOCATION"
|
||||||
:options="locationList"
|
:options="locationList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_LOCATION"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:state="validate.USR_EMAIL.state"
|
:state="validate.USR_EMAIL.state"
|
||||||
@keyup="validateEmail"
|
@keyup="validateEmail"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_EMAIL"></b-form-input>
|
||||||
<b-form-invalid-feedback>{{validate.USR_EMAIL.message}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{validate.USR_EMAIL.message}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_PHONE')">
|
<b-form-group :label="$root.translation('ID_PHONE')">
|
||||||
<b-form-input v-model="form.USR_PHONE"
|
<b-form-input v-model="form.USR_PHONE"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_PHONE"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="2">
|
<b-col cols="2">
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_POSITION')">
|
<b-form-group :label="$root.translation('ID_POSITION')">
|
||||||
<b-form-input v-model="form.USR_POSITION"
|
<b-form-input v-model="form.USR_POSITION"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_POSITION"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_STATUS')">
|
<b-form-group :label="$root.translation('ID_STATUS')">
|
||||||
<b-form-select v-model="form.USR_STATUS"
|
<b-form-select v-model="form.USR_STATUS"
|
||||||
:options="userStatus"
|
:options="userStatus"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_STATUS"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
</b-input-group-prepend>
|
</b-input-group-prepend>
|
||||||
<b-form-select v-model="form.USR_REPLACED_BY"
|
<b-form-select v-model="form.USR_REPLACED_BY"
|
||||||
:options="usersList"
|
:options="usersList"
|
||||||
:disabled="disabled"></b-form-select>
|
:disabled="disabledField.USR_REPLACED_BY"></b-form-select>
|
||||||
</b-input-group>
|
</b-input-group>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
@@ -156,7 +156,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_CALENDAR')">
|
<b-form-group :label="$root.translation('ID_CALENDAR')">
|
||||||
<b-form-select v-model="form.USR_CALENDAR"
|
<b-form-select v-model="form.USR_CALENDAR"
|
||||||
:options="availableCalendars"
|
:options="availableCalendars"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_CALENDAR"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_EXPIRATION_DATE')">
|
<b-form-group :label="$root.translation('ID_EXPIRATION_DATE')">
|
||||||
<b-form-datepicker v-model="form.USR_DUE_DATE"
|
<b-form-datepicker v-model="form.USR_DUE_DATE"
|
||||||
:date-format-options="{year:'numeric',month:'numeric',day:'numeric'}"
|
:date-format-options="{year:'numeric',month:'numeric',day:'numeric'}"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_DUE_DATE"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_TIME_ZONE')">
|
<b-form-group :label="$root.translation('ID_TIME_ZONE')">
|
||||||
<b-form-select v-model="form.USR_TIME_ZONE"
|
<b-form-select v-model="form.USR_TIME_ZONE"
|
||||||
:options="timeZoneList"
|
:options="timeZoneList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_TIME_ZONE"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="2">
|
<b-col cols="2">
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_DEFAULT_LANGUAGE')">
|
<b-form-group :label="$root.translation('ID_DEFAULT_LANGUAGE')">
|
||||||
<b-form-select v-model="form.USR_DEFAULT_LANG"
|
<b-form-select v-model="form.USR_DEFAULT_LANG"
|
||||||
:options="languagesList"
|
:options="languagesList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_DEFAULT_LANG"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -193,7 +193,7 @@
|
|||||||
<b-form-select v-model="form.USR_ROLE"
|
<b-form-select v-model="form.USR_ROLE"
|
||||||
:options="rolesList"
|
:options="rolesList"
|
||||||
@change="changeRole"
|
@change="changeRole"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_ROLE"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_DEFAULT_MAIN_MENU_OPTION')">
|
<b-form-group :label="$root.translation('ID_DEFAULT_MAIN_MENU_OPTION')">
|
||||||
<b-form-select v-model="form.PREF_DEFAULT_MENUSELECTED"
|
<b-form-select v-model="form.PREF_DEFAULT_MENUSELECTED"
|
||||||
:options="defaultMainMenuOptionList"
|
:options="defaultMainMenuOptionList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.PREF_DEFAULT_MENUSELECTED"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="2">
|
<b-col cols="2">
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
<b-form-group :label="$root.translation('ID_DEFAULT_CASES_MENU_OPTION')">
|
<b-form-group :label="$root.translation('ID_DEFAULT_CASES_MENU_OPTION')">
|
||||||
<b-form-select v-model="form.PREF_DEFAULT_CASES_MENUSELECTED"
|
<b-form-select v-model="form.PREF_DEFAULT_CASES_MENUSELECTED"
|
||||||
:options="defaultCasesMenuOptionList"
|
:options="defaultCasesMenuOptionList"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.PREF_DEFAULT_CASES_MENUSELECTED"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col cols="1">
|
<b-col cols="1">
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
type="password"
|
type="password"
|
||||||
@keyup="validatePassword"
|
@keyup="validatePassword"
|
||||||
@change="editing=false;"
|
@change="editing=false;"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_NEW_PASS"></b-form-input>
|
||||||
<b-form-valid-feedback><span v-html="validate.USR_NEW_PASS.message"></span></b-form-valid-feedback>
|
<b-form-valid-feedback><span v-html="validate.USR_NEW_PASS.message"></span></b-form-valid-feedback>
|
||||||
<b-form-invalid-feedback><span v-html="validate.USR_NEW_PASS.message"></span></b-form-invalid-feedback>
|
<b-form-invalid-feedback><span v-html="validate.USR_NEW_PASS.message"></span></b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
@@ -245,7 +245,7 @@
|
|||||||
type="password"
|
type="password"
|
||||||
@keyup="validateConfirmationPassword"
|
@keyup="validateConfirmationPassword"
|
||||||
@change="editing=false;"
|
@change="editing=false;"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_CNF_PASS"></b-form-input>
|
||||||
<b-form-invalid-feedback><span v-html="validate.USR_CNF_PASS.message"></span></b-form-invalid-feedback>
|
<b-form-invalid-feedback><span v-html="validate.USR_CNF_PASS.message"></span></b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</b-col>
|
</b-col>
|
||||||
@@ -282,24 +282,24 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:state="validate.USR_COST_BY_HOUR.state"
|
:state="validate.USR_COST_BY_HOUR.state"
|
||||||
@keyup="validateCostByHour"
|
@keyup="validateCostByHour"
|
||||||
:disabled="disabled"></b-form-input>
|
:disabled="disabledField.USR_COST_BY_HOUR"></b-form-input>
|
||||||
<b-form-invalid-feedback>{{validate.USR_COST_BY_HOUR.message}}</b-form-invalid-feedback>
|
<b-form-invalid-feedback>{{validate.USR_COST_BY_HOUR.message}}</b-form-invalid-feedback>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
<b-form-group :label="$root.translation('ID_UNITS')">
|
<b-form-group :label="$root.translation('ID_UNITS')">
|
||||||
<b-form-input v-model="form.USR_UNIT_COST"
|
<b-form-input v-model="form.USR_UNIT_COST"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
:disabled="disabled"/>
|
:disabled="disabledField.USR_UNIT_COST"/>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
<b-row :class="classCustom">
|
<b-row>
|
||||||
<b-col cols="12">
|
<b-col cols="12">
|
||||||
<b-form-group class="mt-4">
|
<b-form-group class="mt-4">
|
||||||
<b-form-checkbox v-model="form.USR_LOGGED_NEXT_TIME"
|
<b-form-checkbox v-model="form.USR_LOGGED_NEXT_TIME"
|
||||||
value="1"
|
value="1"
|
||||||
unchecked-value="0"
|
unchecked-value="0"
|
||||||
:disabled="disabled">
|
:disabled="disabledField.USR_LOGGED_NEXT_TIME">
|
||||||
{{$root.translation('ID_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON')}}
|
{{$root.translation('ID_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON')}}
|
||||||
</b-form-checkbox>
|
</b-form-checkbox>
|
||||||
</b-form-group>
|
</b-form-group>
|
||||||
@@ -428,6 +428,35 @@
|
|||||||
editing: false,
|
editing: false,
|
||||||
urlImage: "",
|
urlImage: "",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
disabledField: {
|
||||||
|
USR_FIRSTNAME: false,
|
||||||
|
USR_LASTNAME: false,
|
||||||
|
USR_ADDRESS: false,
|
||||||
|
USR_ZIP_CODE: false,
|
||||||
|
USR_COUNTRY: false,
|
||||||
|
USR_CITY: false,
|
||||||
|
USR_LOCATION: false,
|
||||||
|
USR_USERNAME: false,
|
||||||
|
USR_PHONE: false,
|
||||||
|
USR_POSITION: false,
|
||||||
|
USR_EMAIL: false,
|
||||||
|
USR_REPLACED_BY: false,
|
||||||
|
USR_CALENDAR: false,
|
||||||
|
USR_STATUS: false,
|
||||||
|
USR_TIME_ZONE: false,
|
||||||
|
USR_DEFAULT_LANG: false,
|
||||||
|
USR_DUE_DATE: false,
|
||||||
|
PREF_DEFAULT_MENUSELECTED: false,
|
||||||
|
PREF_DEFAULT_CASES_MENUSELECTED: false,
|
||||||
|
USR_ROLE: false,
|
||||||
|
USR_COST_BY_HOUR: false,
|
||||||
|
USR_UNIT_COST: false,
|
||||||
|
USR_NEW_PASS: false,
|
||||||
|
USR_CNF_PASS: false,
|
||||||
|
USR_LOGGED_NEXT_TIME: false,
|
||||||
|
USR_PHOTO: false
|
||||||
|
},
|
||||||
|
permission: {},
|
||||||
classCustom: "",
|
classCustom: "",
|
||||||
classCustom2: ""
|
classCustom2: ""
|
||||||
};
|
};
|
||||||
@@ -449,11 +478,17 @@
|
|||||||
//additional modes
|
//additional modes
|
||||||
if (this.$root.modeOfForm() === 1) {
|
if (this.$root.modeOfForm() === 1) {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
|
for (let i in this.disabledField) {
|
||||||
|
this.disabledField[i] = false;
|
||||||
|
}
|
||||||
this.classCustom = "";
|
this.classCustom = "";
|
||||||
this.classCustom2 = "sr-only sr-only-focusable";
|
this.classCustom2 = "sr-only sr-only-focusable";
|
||||||
}
|
}
|
||||||
if (this.$root.modeOfForm() === 2) {
|
if (this.$root.modeOfForm() === 2) {
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
|
for (let i in this.disabledField) {
|
||||||
|
this.disabledField[i] = true;
|
||||||
|
}
|
||||||
this.classCustom = "sr-only sr-only-focusable";
|
this.classCustom = "sr-only sr-only-focusable";
|
||||||
this.classCustom2 = "";
|
this.classCustom2 = "";
|
||||||
}
|
}
|
||||||
@@ -467,6 +502,14 @@
|
|||||||
this.classCustom = "";
|
this.classCustom = "";
|
||||||
this.classCustom2 = "sr-only sr-only-focusable";
|
this.classCustom2 = "sr-only sr-only-focusable";
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
|
for (let i in this.disabledField) {
|
||||||
|
this.disabledField[i] = false;
|
||||||
|
}
|
||||||
|
for (let i in this.permission) {
|
||||||
|
if (i in this.disabledField) {
|
||||||
|
this.disabledField[i] = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
if (this.$root.modeOfForm() === 1) {
|
if (this.$root.modeOfForm() === 1) {
|
||||||
@@ -476,6 +519,9 @@
|
|||||||
this.classCustom = "sr-only sr-only-focusable";
|
this.classCustom = "sr-only sr-only-focusable";
|
||||||
this.classCustom2 = "";
|
this.classCustom2 = "";
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
|
for (let i in this.disabledField) {
|
||||||
|
this.disabledField[i] = true;
|
||||||
|
}
|
||||||
for (let i in this.validate) {
|
for (let i in this.validate) {
|
||||||
this.validate[i].state = null;
|
this.validate[i].state = null;
|
||||||
}
|
}
|
||||||
@@ -583,6 +629,9 @@
|
|||||||
this.classCustom = "sr-only sr-only-focusable";
|
this.classCustom = "sr-only sr-only-focusable";
|
||||||
this.classCustom2 = "";
|
this.classCustom2 = "";
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
|
for (let i in this.disabledField) {
|
||||||
|
this.disabledField[i] = true;
|
||||||
|
}
|
||||||
for (let i in this.validate) {
|
for (let i in this.validate) {
|
||||||
this.validate[i].state = null;
|
this.validate[i].state = null;
|
||||||
}
|
}
|
||||||
@@ -627,6 +676,24 @@
|
|||||||
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
response;
|
response;
|
||||||
|
if ("error" in response.data && response.data.error !== "") {
|
||||||
|
this.$bvModal.msgBoxOk(this.$root.translation(response.data.error), {
|
||||||
|
title: " ", //is important because title disappear
|
||||||
|
hideHeaderClose: false,
|
||||||
|
okTitle: this.$root.translation('ID_OK'),
|
||||||
|
okVariant: "success",
|
||||||
|
okOnly: true
|
||||||
|
}).then(value => {
|
||||||
|
if (value === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
err;
|
||||||
|
});
|
||||||
|
this.disableButtonSave = false;
|
||||||
|
this.validate.USR_USERNAME.state = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.disableButtonSave = false;
|
this.disableButtonSave = false;
|
||||||
this.validate.USR_USERNAME.message = response.data.descriptionText;
|
this.validate.USR_USERNAME.message = response.data.descriptionText;
|
||||||
if (response.data.exists === false) {
|
if (response.data.exists === false) {
|
||||||
@@ -736,6 +803,17 @@
|
|||||||
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
response;
|
response;
|
||||||
|
if ("permission" in response.data) {
|
||||||
|
this.permission = response.data.permission;
|
||||||
|
//match attribute
|
||||||
|
if ("USR_REGION" in this.permission) {
|
||||||
|
this.permission.USR_CITY = this.permission.USR_REGION;
|
||||||
|
delete this.permission.USR_REGION;
|
||||||
|
}
|
||||||
|
if ("USR_CUR_PASS" in this.permission) {
|
||||||
|
delete this.permission.USR_CUR_PASS;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ("user" in response.data) {
|
if ("user" in response.data) {
|
||||||
for (let i in this.form) {
|
for (let i in this.form) {
|
||||||
if (i in response.data.user) {
|
if (i in response.data.user) {
|
||||||
@@ -845,10 +923,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
getUsersList() {
|
getUsersList() {
|
||||||
|
if (this.filterUser.trim() === "") {
|
||||||
|
this.usersList = [];
|
||||||
|
return null;
|
||||||
|
}
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
formData.append("action", "usersList");
|
formData.append("action", "usersList");
|
||||||
formData.append("USR_UID", this.form.USR_UID);
|
formData.append("USR_UID", this.form.USR_UID);
|
||||||
formData.append("filter", this.filterUser);
|
formData.append("filter", this.filterUser.trim());
|
||||||
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
response;
|
response;
|
||||||
|
|||||||
@@ -23,11 +23,12 @@ class AbstractCases implements CasesInterface
|
|||||||
const PRIORITIES = [1 => 'VL', 2 => 'L', 3 => 'N', 4 => 'H', 5 => 'VH'];
|
const PRIORITIES = [1 => 'VL', 2 => 'L', 3 => 'N', 4 => 'H', 5 => 'VH'];
|
||||||
// Task Colors
|
// Task Colors
|
||||||
const TASK_COLORS = [1 => 'green', 2 => 'red', 3 => 'orange', 4 => 'blue', 5 => 'gray'];
|
const TASK_COLORS = [1 => 'green', 2 => 'red', 3 => 'orange', 4 => 'blue', 5 => 'gray'];
|
||||||
const COLOR_OVERDUE = 1;
|
const TASK_STATUS = [1 => 'ON_TIME', 2 => 'OVERDUE', 3 => 'DRAFT', 4 => 'PAUSED', 5 => 'UNASSIGNED'];
|
||||||
const COLOR_ON_TIME = 2;
|
const COLOR_ON_TIME = 1; // green
|
||||||
const COLOR_DRAFT = 3;
|
const COLOR_OVERDUE = 2; // red
|
||||||
const COLOR_PAUSED = 4;
|
const COLOR_DRAFT = 3; // orange
|
||||||
const COLOR_UNASSIGNED = 5;
|
const COLOR_PAUSED = 4; // blue
|
||||||
|
const COLOR_UNASSIGNED = 5; // gray
|
||||||
// Status values
|
// Status values
|
||||||
const STATUS_DRAFT = 1;
|
const STATUS_DRAFT = 1;
|
||||||
const STATUS_TODO = 2;
|
const STATUS_TODO = 2;
|
||||||
@@ -1063,24 +1064,27 @@ class AbstractCases implements CasesInterface
|
|||||||
* Get task color according the due date
|
* Get task color according the due date
|
||||||
*
|
*
|
||||||
* @param string $dueDate
|
* @param string $dueDate
|
||||||
|
* @param string $statusThread
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getTaskColor(string $dueDate)
|
public function getTaskColor(string $dueDate, string $statusThread = '')
|
||||||
{
|
{
|
||||||
$currentDate = new DateTime('now');
|
$currentDate = new DateTime('now');
|
||||||
$dueDate = new DateTime($dueDate);
|
$dueDate = new DateTime($dueDate);
|
||||||
if ($dueDate > $currentDate) {
|
if ($currentDate > $dueDate) {
|
||||||
|
// Overdue: When the current date is mayor to the due date of the case
|
||||||
$taskColor = self::COLOR_OVERDUE;
|
$taskColor = self::COLOR_OVERDUE;
|
||||||
} else {
|
} else {
|
||||||
|
// OnTime
|
||||||
$taskColor = self::COLOR_ON_TIME;
|
$taskColor = self::COLOR_ON_TIME;
|
||||||
if (get_class($this) === Draft::class) {
|
if (get_class($this) === Draft::class || $statusThread === self::TASK_STATUS[3]) {
|
||||||
$taskColor = self::COLOR_DRAFT;
|
$taskColor = self::COLOR_DRAFT;
|
||||||
}
|
}
|
||||||
if (get_class($this) === Paused::class) {
|
if (get_class($this) === Paused::class || $statusThread === self::TASK_STATUS[4]) {
|
||||||
$taskColor = self::COLOR_PAUSED;
|
$taskColor = self::COLOR_PAUSED;
|
||||||
}
|
}
|
||||||
if (get_class($this) === Unassigned::class) {
|
if (get_class($this) === Unassigned::class || $statusThread === self::TASK_STATUS[5]) {
|
||||||
$taskColor = self::COLOR_UNASSIGNED;
|
$taskColor = self::COLOR_UNASSIGNED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1113,24 +1117,30 @@ class AbstractCases implements CasesInterface
|
|||||||
}
|
}
|
||||||
if ($key === 'due_date') {
|
if ($key === 'due_date') {
|
||||||
$threadTasks[$i][$key] = $row;
|
$threadTasks[$i][$key] = $row;
|
||||||
|
$threadTasks[$i]['delay'] = getDiffBetweenDates($row, date("Y-m-d H:i:s"));
|
||||||
// Get task color label
|
// Get task color label
|
||||||
$threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row) : '';
|
$threadTasks[$i]['tas_color'] = (!empty($row)) ? $this->getTaskColor($row) : '';
|
||||||
$threadTasks[$i]['tas_color_label'] = (!empty($row)) ? self::TASK_COLORS[$threadTasks[$i]['tas_color']] : '';
|
$threadTasks[$i]['tas_color_label'] = (!empty($row)) ? self::TASK_COLORS[$threadTasks[$i]['tas_color']] : '';
|
||||||
|
$threadTasks[$i]['tas_status'] = self::TASK_STATUS[$threadTasks[$i]['tas_color']];
|
||||||
}
|
}
|
||||||
// Review if require other information
|
// Review if require other information
|
||||||
if ($onlyTask) {
|
if ($onlyTask) {
|
||||||
// Thread tasks
|
// Thread tasks
|
||||||
if($key === 'user_id') {
|
if($key === 'user_id') {
|
||||||
$threadTasks[$i][$key] = $row;
|
$threadTasks[$i][$key] = $row;
|
||||||
|
// Get the user tooltip information
|
||||||
|
$threadTasks[$i]['user_tooltip'] = User::getInformation($row);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Thread users
|
// Thread users
|
||||||
if ($key === 'user_id') {
|
if ($key === 'user_id') {
|
||||||
$threadUsers[$i][$key] = $row;
|
$threadUsers[$i][$key] = $row;
|
||||||
$user = (!empty($row)) ? User::where('USR_ID', $row)->first(): null;
|
// Get user information
|
||||||
$threadUsers[$i]['usr_username'] = $user ? $user->USR_USERNAME : '';
|
$userInfo = User::getInformation($row);
|
||||||
$threadUsers[$i]['usr_lastname'] = $user ? $user->USR_LASTNAME : '';
|
$threadUsers[$i]['usr_username'] = !empty($userInfo) ? $userInfo['usr_username'] : '';
|
||||||
$threadUsers[$i]['usr_firstname'] = $user ? $user->USR_FIRSTNAME : '';
|
$threadUsers[$i]['usr_lastname'] = !empty($userInfo) ? $userInfo['usr_lastname'] : '';
|
||||||
|
$threadUsers[$i]['usr_firstname'] = !empty($userInfo) ? $userInfo['usr_firstname'] : '';
|
||||||
|
$threadUsers[$i]['user_tooltip'] = User::getInformation($row);
|
||||||
}
|
}
|
||||||
// Thread titles
|
// Thread titles
|
||||||
if ($key === 'del_id') {
|
if ($key === 'del_id') {
|
||||||
@@ -1149,6 +1159,39 @@ class AbstractCases implements CasesInterface
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the thread information
|
||||||
|
*
|
||||||
|
* @param array $thread
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function threadInformation(array $thread)
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
$status = '';
|
||||||
|
// Define the task status
|
||||||
|
if ($thread['TAS_ASSIGN_TYPE'] === 'SELF_SERVICE') {
|
||||||
|
$status = 'UNASSIGNED';
|
||||||
|
}
|
||||||
|
if ($thread['APP_STATUS'] === 'DRAFT') {
|
||||||
|
$status = 'DRAFT';
|
||||||
|
}
|
||||||
|
// Define the thread information
|
||||||
|
$result['tas_title'] = $thread['TAS_TITLE'];
|
||||||
|
$result['user_id'] = $thread['USR_ID'];
|
||||||
|
$result['due_date'] = $thread['DEL_TASK_DUE_DATE'];
|
||||||
|
$result['delay'] = getDiffBetweenDates($thread['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
|
||||||
|
$result['tas_color'] = (!empty($thread['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($thread['DEL_TASK_DUE_DATE'], $status) : '';
|
||||||
|
$result['tas_color_label'] = (!empty($result['tas_color'])) ? self::TASK_COLORS[$result['tas_color']] : '';
|
||||||
|
$result['tas_status'] = self::TASK_STATUS[$result['tas_color']];
|
||||||
|
$result['unassigned'] = ($status === 'UNASSIGNED' ? true : false);
|
||||||
|
// Get the user tooltip information
|
||||||
|
$result['user_tooltip'] = User::getInformation($thread['USR_ID']);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set all properties
|
* Set all properties
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -99,6 +99,10 @@ class Draft extends AbstractCases
|
|||||||
// Get task color label
|
// Get task color label
|
||||||
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
|
// Get task status
|
||||||
|
$item['TAS_STATUS'] = self::TASK_STATUS[$item['TAS_COLOR']];
|
||||||
|
// Get delay
|
||||||
|
$item['DELAY'] = getDiffBetweenDates($item['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
|
||||||
// Apply the date format defined in environment
|
// Apply the date format defined in environment
|
||||||
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ class Inbox extends AbstractCases
|
|||||||
// Get task color label
|
// Get task color label
|
||||||
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
|
// Get task status
|
||||||
|
$item['TAS_STATUS'] = self::TASK_STATUS[$item['TAS_COLOR']];
|
||||||
|
// Get delay
|
||||||
|
$item['DELAY'] = getDiffBetweenDates($item['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
|
||||||
// Apply the date format defined in environment
|
// Apply the date format defined in environment
|
||||||
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use ProcessMaker\Model\Application;
|
|||||||
use ProcessMaker\Model\AppNotes;
|
use ProcessMaker\Model\AppNotes;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
use ProcessMaker\Model\Task;
|
use ProcessMaker\Model\Task;
|
||||||
|
use ProcessMaker\Model\User;
|
||||||
|
|
||||||
class Participated extends AbstractCases
|
class Participated extends AbstractCases
|
||||||
{
|
{
|
||||||
@@ -16,11 +17,12 @@ class Participated extends AbstractCases
|
|||||||
'APP_DELEGATION.DEL_TITLE', // Case Title
|
'APP_DELEGATION.DEL_TITLE', // Case Title
|
||||||
'PROCESS.PRO_TITLE', // Process Name
|
'PROCESS.PRO_TITLE', // Process Name
|
||||||
'TASK.TAS_TITLE', // Pending Task
|
'TASK.TAS_TITLE', // Pending Task
|
||||||
|
'TASK.TAS_ASSIGN_TYPE', // Task assign rule
|
||||||
'APPLICATION.APP_STATUS', // Status
|
'APPLICATION.APP_STATUS', // Status
|
||||||
'APPLICATION.APP_CREATE_DATE', // Start Date
|
'APPLICATION.APP_CREATE_DATE', // Start Date
|
||||||
'APPLICATION.APP_FINISH_DATE', // Finish Date
|
'APPLICATION.APP_FINISH_DATE', // Finish Date
|
||||||
'USERS.USR_ID', // Current UserId
|
|
||||||
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date related to the colors
|
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date related to the colors
|
||||||
|
'USERS.USR_ID', // Current UserId
|
||||||
// Additional column for other functionalities
|
// Additional column for other functionalities
|
||||||
'APP_DELEGATION.APP_UID', // Case Uid for Open case
|
'APP_DELEGATION.APP_UID', // Case Uid for Open case
|
||||||
'APP_DELEGATION.DEL_INDEX', // Del Index for Open case
|
'APP_DELEGATION.DEL_INDEX', // Del Index for Open case
|
||||||
@@ -113,30 +115,12 @@ class Participated extends AbstractCases
|
|||||||
$filter = $this->getParticipatedStatus();
|
$filter = $this->getParticipatedStatus();
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'STARTED':
|
case 'STARTED':
|
||||||
// Scope that search for the STARTED by user
|
// Scope that search for the STARTED by user: DRAFT, TO_DO, CANCELED AND COMPLETED
|
||||||
$query->caseStarted();
|
$query->caseStarted();
|
||||||
break;
|
break;
|
||||||
case 'IN_PROGRESS':
|
case 'IN_PROGRESS':
|
||||||
// Scope that search for the TO_DO
|
// Only cases in progress: TO_DO without DRAFT
|
||||||
$query->selectRaw(
|
$query->caseTodo();
|
||||||
'CONCAT(
|
|
||||||
\'[\',
|
|
||||||
GROUP_CONCAT(
|
|
||||||
CONCAT(
|
|
||||||
\'{"tas_id":\',
|
|
||||||
APP_DELEGATION.TAS_ID,
|
|
||||||
\', "user_id":\',
|
|
||||||
APP_DELEGATION.USR_ID,
|
|
||||||
\', "due_date":"\',
|
|
||||||
APP_DELEGATION.DEL_TASK_DUE_DATE,
|
|
||||||
\'"}\'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
\']\'
|
|
||||||
) AS PENDING'
|
|
||||||
);
|
|
||||||
// Only cases in progress
|
|
||||||
$query->caseInProgress();
|
|
||||||
// Group by AppNumber
|
// Group by AppNumber
|
||||||
$query->groupBy('APP_NUMBER');
|
$query->groupBy('APP_NUMBER');
|
||||||
break;
|
break;
|
||||||
@@ -167,47 +151,36 @@ class Participated extends AbstractCases
|
|||||||
$item['DURATION'] = getDiffBetweenDates($startDate, $endDate);
|
$item['DURATION'] = getDiffBetweenDates($startDate, $endDate);
|
||||||
// Get total case notes
|
// Get total case notes
|
||||||
$item['CASE_NOTES_COUNT'] = AppNotes::total($item['APP_NUMBER']);
|
$item['CASE_NOTES_COUNT'] = AppNotes::total($item['APP_NUMBER']);
|
||||||
|
// Define the thread information
|
||||||
|
$thread = [];
|
||||||
|
$thread['TAS_TITLE'] = $item['TAS_TITLE'];
|
||||||
|
$thread['USR_ID'] = $item['USR_ID'];
|
||||||
|
$thread['DEL_TASK_DUE_DATE'] = $item['DEL_TASK_DUE_DATE'];
|
||||||
|
$thread['TAS_ASSIGN_TYPE'] = $item['TAS_ASSIGN_TYPE'];
|
||||||
|
$thread['APP_STATUS'] = $item['APP_STATUS'];
|
||||||
// Define data according to the filters
|
// Define data according to the filters
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'STARTED':
|
case 'STARTED':
|
||||||
|
case 'IN_PROGRESS':
|
||||||
$result = [];
|
$result = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if ($item['APP_STATUS'] === 'TO_DO') {
|
if ($item['APP_STATUS'] === 'TO_DO') {
|
||||||
$taskPending = Delegation::getPendingThreads($item['APP_NUMBER']);
|
$taskPending = Delegation::getPendingThreads($item['APP_NUMBER']);
|
||||||
foreach ($taskPending as $thread) {
|
foreach ($taskPending as $thread) {
|
||||||
// todo this need to review
|
$thread['APP_STATUS'] = $item['APP_STATUS'];
|
||||||
$result[$i]['tas_title'] = $thread['TAS_TITLE'];
|
$result[$i] = $this->threadInformation($thread);
|
||||||
$result[$i]['user_id'] = $thread['USR_ID'];
|
|
||||||
$result[$i]['due_date'] = $thread['DEL_TASK_DUE_DATE'];
|
|
||||||
$result[$i]['tas_color'] = (!empty($thread['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($thread['DEL_TASK_DUE_DATE']) : '';
|
|
||||||
$result[$i]['tas_color_label'] = (!empty($result[$i]['tas_color'])) ? self::TASK_COLORS[$result[$i]['tas_color']] : '';
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$item['PENDING'] = $result;
|
$item['PENDING'] = $result;
|
||||||
} else {
|
} else {
|
||||||
$result[$i]['tas_title'] = $item['TAS_TITLE'];
|
$result[$i] = $this->threadInformation($thread);
|
||||||
$result[$i]['user_id'] = $item['USR_ID'];
|
|
||||||
$result[$i]['due_date'] = $item['DEL_TASK_DUE_DATE'];
|
|
||||||
$result[$i]['tas_color'] = (!empty($item['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($item['DEL_TASK_DUE_DATE']) : '';
|
|
||||||
$result[$i]['tas_color_label'] = (!empty($result[$i]['tas_color'])) ? self::TASK_COLORS[$result[$i]['tas_color']] : '';
|
|
||||||
$item['PENDING'] = $result;
|
$item['PENDING'] = $result;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'IN_PROGRESS':
|
|
||||||
// Get the detail related to the open thread
|
|
||||||
if (!empty($item['PENDING'])) {
|
|
||||||
$result = $this->prepareTaskPending($item['PENDING']);
|
|
||||||
$item['PENDING'] = !empty($result['THREAD_TASKS']) ? $result['THREAD_TASKS'] : [];
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'COMPLETED':
|
case 'COMPLETED':
|
||||||
$result = [];
|
$result = [];
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$result[$i]['tas_title'] = $item['TAS_TITLE'];
|
$result[$i] = $this->threadInformation($thread);
|
||||||
$result[$i]['user_id'] = $item['USR_ID'];
|
|
||||||
$result[$i]['due_date'] = $item['DEL_TASK_DUE_DATE'];
|
|
||||||
$result[$i]['tas_color'] = (!empty($item['DEL_TASK_DUE_DATE'])) ? $this->getTaskColor($item['DEL_TASK_DUE_DATE']) : '';
|
|
||||||
$result[$i]['tas_color_label'] = (!empty($result[$i]['tas_color'])) ? self::TASK_COLORS[$result[$i]['tas_color']] : '';
|
|
||||||
$item['PENDING'] = $result;
|
$item['PENDING'] = $result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -223,6 +196,7 @@ class Participated extends AbstractCases
|
|||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function getCounter()
|
public function getCounter()
|
||||||
{
|
{
|
||||||
// Get base query
|
// Get base query
|
||||||
@@ -235,14 +209,14 @@ class Participated extends AbstractCases
|
|||||||
$filter = $this->getParticipatedStatus();
|
$filter = $this->getParticipatedStatus();
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'STARTED':
|
case 'STARTED':
|
||||||
// Scope that search for the STARTED by user
|
// Scope that search for the STARTED by user: DRAFT, TO_DO, CANCELED AND COMPLETED
|
||||||
$query->caseStarted();
|
$query->caseStarted();
|
||||||
break;
|
break;
|
||||||
case 'IN_PROGRESS':
|
case 'IN_PROGRESS':
|
||||||
// Only distinct APP_NUMBER
|
// Only distinct APP_NUMBER
|
||||||
$query->distinct();
|
$query->distinct();
|
||||||
// Scope for in progress cases
|
// Scope for in progress: TO_DO without DRAFT
|
||||||
$query->statusIds([self::STATUS_DRAFT, self::STATUS_TODO]);
|
$query->caseTodo();
|
||||||
break;
|
break;
|
||||||
case 'COMPLETED':
|
case 'COMPLETED':
|
||||||
// Scope that search for the COMPLETED
|
// Scope that search for the COMPLETED
|
||||||
@@ -272,14 +246,14 @@ class Participated extends AbstractCases
|
|||||||
$filter = $this->getParticipatedStatus();
|
$filter = $this->getParticipatedStatus();
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'STARTED':
|
case 'STARTED':
|
||||||
// Scope that search for the STARTED by user
|
// Scope that search for the STARTED by user: DRAFT, TO_DO, CANCELED AND COMPLETED
|
||||||
$query->caseStarted();
|
$query->caseStarted();
|
||||||
break;
|
break;
|
||||||
case 'IN_PROGRESS':
|
case 'IN_PROGRESS':
|
||||||
// Only distinct APP_NUMBER
|
// Only distinct APP_NUMBER
|
||||||
$query->distinct();
|
$query->distinct();
|
||||||
// Scope for in progress cases
|
// Scope for in progress: TO_DO without DRAFT
|
||||||
$query->statusIds([self::STATUS_DRAFT, self::STATUS_TODO]);
|
$query->caseTodo();
|
||||||
break;
|
break;
|
||||||
case 'COMPLETED':
|
case 'COMPLETED':
|
||||||
// Scope that search for the COMPLETED
|
// Scope that search for the COMPLETED
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ class Paused extends AbstractCases
|
|||||||
// Get task color label
|
// Get task color label
|
||||||
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
|
// Get task status
|
||||||
|
$item['TAS_STATUS'] = self::TASK_STATUS[$item['TAS_COLOR']];
|
||||||
|
// Get delay
|
||||||
|
$item['DELAY'] = getDiffBetweenDates($item['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
|
||||||
// Apply the date format defined in environment
|
// Apply the date format defined in environment
|
||||||
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
||||||
|
|||||||
@@ -122,6 +122,8 @@ class Search extends AbstractCases
|
|||||||
$query->casesDone($casesClosed);
|
$query->casesDone($casesClosed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$query->isThreadOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query;
|
return $query;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class Supervising extends AbstractCases
|
|||||||
'APPLICATION.APP_CREATE_DATE', // Start Date
|
'APPLICATION.APP_CREATE_DATE', // Start Date
|
||||||
'APPLICATION.APP_FINISH_DATE', // Finish Date
|
'APPLICATION.APP_FINISH_DATE', // Finish Date
|
||||||
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date related to the colors
|
'APP_DELEGATION.DEL_TASK_DUE_DATE', // Due Date related to the colors
|
||||||
|
'USERS.USR_ID', // Current UserId
|
||||||
// Additional column for other functionalities
|
// Additional column for other functionalities
|
||||||
'APP_DELEGATION.APP_UID', // Case Uid for Open case
|
'APP_DELEGATION.APP_UID', // Case Uid for Open case
|
||||||
'APP_DELEGATION.DEL_INDEX', // Del Index for Open case
|
'APP_DELEGATION.DEL_INDEX', // Del Index for Open case
|
||||||
@@ -128,10 +129,10 @@ class Supervising extends AbstractCases
|
|||||||
$query->joinApplication();
|
$query->joinApplication();
|
||||||
// Only cases in to_do
|
// Only cases in to_do
|
||||||
$query->caseTodo();
|
$query->caseTodo();
|
||||||
// Scope that return the results for an specific user
|
|
||||||
$query->userId($this->getUserId());
|
|
||||||
// Scope the specific array of processes supervising
|
// Scope the specific array of processes supervising
|
||||||
$query->processInList($processes);
|
$query->processInList($processes);
|
||||||
|
// Only open threads
|
||||||
|
$query->isThreadOpen();
|
||||||
// Group by appNumber
|
// Group by appNumber
|
||||||
$query->groupBy('APP_NUMBER');
|
$query->groupBy('APP_NUMBER');
|
||||||
/** Apply filters */
|
/** Apply filters */
|
||||||
@@ -181,6 +182,12 @@ class Supervising extends AbstractCases
|
|||||||
{
|
{
|
||||||
// Get base query
|
// Get base query
|
||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
|
// Join with application
|
||||||
|
$query->joinApplication();
|
||||||
|
// Only cases in to_do
|
||||||
|
$query->caseTodo();
|
||||||
|
// Only open threads
|
||||||
|
$query->isThreadOpen();
|
||||||
// Only distinct APP_NUMBER
|
// Only distinct APP_NUMBER
|
||||||
$query->distinct();
|
$query->distinct();
|
||||||
// Get the list of processes of the supervisor
|
// Get the list of processes of the supervisor
|
||||||
@@ -200,6 +207,12 @@ class Supervising extends AbstractCases
|
|||||||
{
|
{
|
||||||
// Get base query
|
// Get base query
|
||||||
$query = Delegation::query()->select();
|
$query = Delegation::query()->select();
|
||||||
|
// Join with application
|
||||||
|
$query->joinApplication();
|
||||||
|
// Only cases in to_do
|
||||||
|
$query->caseTodo();
|
||||||
|
// Only open threads
|
||||||
|
$query->isThreadOpen();
|
||||||
// Only distinct APP_NUMBER
|
// Only distinct APP_NUMBER
|
||||||
$query->distinct();
|
$query->distinct();
|
||||||
// Get the list of processes of the supervisor
|
// Get the list of processes of the supervisor
|
||||||
|
|||||||
@@ -106,8 +106,12 @@ class Unassigned extends AbstractCases
|
|||||||
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
$priorityLabel = self::PRIORITIES[$item['DEL_PRIORITY']];
|
||||||
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
$item['DEL_PRIORITY_LABEL'] = G::LoadTranslation("ID_PRIORITY_{$priorityLabel}");
|
||||||
// Get task color label
|
// Get task color label
|
||||||
$item['TAS_COLOR'] = 1; // green - onTime
|
$item['TAS_COLOR'] = $this->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = self::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
|
// Get task status
|
||||||
|
$item['TAS_STATUS'] = self::TASK_STATUS[$item['TAS_COLOR']];
|
||||||
|
// Get delay
|
||||||
|
$item['DELAY'] = getDiffBetweenDates($item['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"));
|
||||||
// Apply the date format defined in environment
|
// Apply the date format defined in environment
|
||||||
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
$item['DEL_TASK_DUE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
$item['DEL_DELEGATE_DATE_LABEL'] = applyMaskDateEnvironment($item['DEL_DELEGATE_DATE']);
|
||||||
|
|||||||
@@ -82,7 +82,8 @@ class System
|
|||||||
'report_table_batch_regeneration' => 1000,
|
'report_table_batch_regeneration' => 1000,
|
||||||
'report_table_floating_number' => 4,
|
'report_table_floating_number' => 4,
|
||||||
'report_table_double_number' => 4,
|
'report_table_double_number' => 4,
|
||||||
'ext_ajax_timeout' => 600000
|
'ext_ajax_timeout' => 600000,
|
||||||
|
'disable_task_manager_routing_async' => '0'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1239,6 +1240,11 @@ class System
|
|||||||
$config['highlight_home_folder_scope'] = self::$defaultConfig['highlight_home_folder_scope'];
|
$config['highlight_home_folder_scope'] = self::$defaultConfig['highlight_home_folder_scope'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$value = $config['disable_task_manager_routing_async'];
|
||||||
|
if (!is_numeric($value) || !in_array($value, [0, 1])) {
|
||||||
|
$config['disable_task_manager_routing_async'] = self::$defaultConfig['disable_task_manager_routing_async'];
|
||||||
|
}
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1805,6 +1805,7 @@ class Delegation extends Model
|
|||||||
{
|
{
|
||||||
$query = Delegation::query()->select([
|
$query = Delegation::query()->select([
|
||||||
'TASK.TAS_TITLE',
|
'TASK.TAS_TITLE',
|
||||||
|
'TASK.TAS_ASSIGN_TYPE',
|
||||||
'APP_DELEGATION.USR_ID',
|
'APP_DELEGATION.USR_ID',
|
||||||
'APP_DELEGATION.DEL_TASK_DUE_DATE'
|
'APP_DELEGATION.DEL_TASK_DUE_DATE'
|
||||||
]);
|
]);
|
||||||
@@ -1887,6 +1888,7 @@ class Delegation extends Model
|
|||||||
{
|
{
|
||||||
$query = Delegation::query()->select([
|
$query = Delegation::query()->select([
|
||||||
'TASK.TAS_TITLE', // Task
|
'TASK.TAS_TITLE', // Task
|
||||||
|
'TASK.TAS_ASSIGN_TYPE', // Task assign rule
|
||||||
'APP_DELEGATION.DEL_TITLE', // Thread title
|
'APP_DELEGATION.DEL_TITLE', // Thread title
|
||||||
'APP_DELEGATION.DEL_THREAD_STATUS', // Thread status
|
'APP_DELEGATION.DEL_THREAD_STATUS', // Thread status
|
||||||
'APP_DELEGATION.USR_ID', // Current UserId
|
'APP_DELEGATION.USR_ID', // Current UserId
|
||||||
@@ -1914,6 +1916,7 @@ class Delegation extends Model
|
|||||||
$abs = new AbstractCases();
|
$abs = new AbstractCases();
|
||||||
$item['TAS_COLOR'] = $abs->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
$item['TAS_COLOR'] = $abs->getTaskColor($item['DEL_TASK_DUE_DATE']);
|
||||||
$item['TAS_COLOR_LABEL'] = AbstractCases::TASK_COLORS[$item['TAS_COLOR']];
|
$item['TAS_COLOR_LABEL'] = AbstractCases::TASK_COLORS[$item['TAS_COLOR']];
|
||||||
|
$item['UNASSIGNED'] = ($item['TAS_ASSIGN_TYPE'] === 'SELF_SERVICE' ? true : false);
|
||||||
return $item;
|
return $item;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,19 @@ class User extends Model
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Scope for query to get the user by USR_ID
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
|
* @param int $usrId
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
|
*/
|
||||||
|
public function scopeUserId($query, string $usrId)
|
||||||
|
{
|
||||||
|
return $query->where('USR_ID', '=', $usrId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the groups from a user
|
* Return the groups from a user
|
||||||
*
|
*
|
||||||
@@ -171,6 +184,7 @@ class User extends Model
|
|||||||
throw new Exception("Error getting the users: {$e->getMessage()}.");
|
throw new Exception("Error getting the users: {$e->getMessage()}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the user id
|
* Get the user id
|
||||||
*
|
*
|
||||||
@@ -191,4 +205,35 @@ class User extends Model
|
|||||||
|
|
||||||
return $id;
|
return $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user information for the tooltip
|
||||||
|
*
|
||||||
|
* @param int $usrId
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public static function getInformation($usrId)
|
||||||
|
{
|
||||||
|
$query = User::query()->select([
|
||||||
|
'USR_USERNAME',
|
||||||
|
'USR_FIRSTNAME',
|
||||||
|
'USR_LASTNAME',
|
||||||
|
'USR_EMAIL',
|
||||||
|
'USR_POSITION'
|
||||||
|
])
|
||||||
|
->userId($usrId)
|
||||||
|
->limit(1);
|
||||||
|
$results = $query->get();
|
||||||
|
$info = [];
|
||||||
|
$results->each(function ($item) use (&$info) {
|
||||||
|
$info['usr_username'] = $item->USR_USERNAME;
|
||||||
|
$info['usr_firstname'] = $item->USR_FIRSTNAME;
|
||||||
|
$info['usr_lastname'] = $item->USR_LASTNAME;
|
||||||
|
$info['usr_email'] = $item->USR_EMAIL;
|
||||||
|
$info['usr_position'] = $item->USR_POSITION;
|
||||||
|
});
|
||||||
|
|
||||||
|
return $info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -554,7 +554,9 @@ class Home extends Api
|
|||||||
// Adding filters to the "Advanced Search" option
|
// Adding filters to the "Advanced Search" option
|
||||||
$option->child = $child;
|
$option->child = $child;
|
||||||
}
|
}
|
||||||
|
if ($menuInstance->Id[$i] === 'ID_CASE_ARCHIVE_SEARCH') {
|
||||||
|
$option->icon = "fas fa-archive";
|
||||||
|
}
|
||||||
// Add option to the menu
|
// Add option to the menu
|
||||||
$menuHome[] = $option;
|
$menuHome[] = $option;
|
||||||
}
|
}
|
||||||
@@ -698,4 +700,35 @@ class Home extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the process debug status
|
||||||
|
*
|
||||||
|
* @url GET /process-debug-status
|
||||||
|
*
|
||||||
|
* @param string $processUid
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*
|
||||||
|
* @access protected
|
||||||
|
* @class AccessControl {@permission PM_CASES}
|
||||||
|
*/
|
||||||
|
public function getProcessDebugStatus($processUid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
// Get the process requested
|
||||||
|
$process = Process::query()->select(['PRO_DEBUG'])->where('PRO_UID', '=', $processUid)->first();
|
||||||
|
if (!is_null($process)) {
|
||||||
|
return $process->PRO_DEBUG === 1;
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
}
|
||||||
|
// If not exists the requested process throw an 404 error
|
||||||
|
if (is_null($process)) {
|
||||||
|
throw new RestException(404, "Process with Uid '{$processUid}'.");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -617,9 +617,11 @@ function applyMaskDateEnvironment(string $date, $mask = '')
|
|||||||
$systemConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
$systemConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
|
||||||
$mask = isset($systemConf->aConfig['dateFormat']) ? $systemConf->aConfig['dateFormat'] : '';
|
$mask = isset($systemConf->aConfig['dateFormat']) ? $systemConf->aConfig['dateFormat'] : '';
|
||||||
}
|
}
|
||||||
if (!empty($date)) {
|
if (!empty($date) && !empty($mask)) {
|
||||||
$date = new DateTime($date);
|
$date = new DateTime($date);
|
||||||
$result = $date->format($mask);
|
$result = $date->format($mask);
|
||||||
|
} else {
|
||||||
|
$result = $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|||||||
@@ -1080,26 +1080,39 @@ Ext.onReady(function(){
|
|||||||
var data = Ext.util.JSON.decode(result.responseText);
|
var data = Ext.util.JSON.decode(result.responseText);
|
||||||
if (data.status == true) {
|
if (data.status == true) {
|
||||||
if (!isBrowserIE()) {
|
if (!isBrowserIE()) {
|
||||||
|
if (typeof parent.notify !== "undefined") {
|
||||||
// The case was cancelled
|
// The case was cancelled
|
||||||
parent.notify('', _("ID_CASE_CANCELLED", stringReplace("\\: ", "", _APP_NUM)));
|
parent.notify('', _("ID_CASE_CANCELLED", stringReplace("\\: ", "", _APP_NUM)));
|
||||||
|
}
|
||||||
|
if (typeof parent.updateCasesTree !== "undefined") {
|
||||||
parent.updateCasesTree();
|
parent.updateCasesTree();
|
||||||
|
}
|
||||||
|
if (typeof parent.highlightCasesTree !== "undefined") {
|
||||||
parent.highlightCasesTree();
|
parent.highlightCasesTree();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isBrowserIE()) {
|
if (!isBrowserIE()) {
|
||||||
|
if (typeof parent.notify !== "undefined") {
|
||||||
// The case wasn't cancel
|
// The case wasn't cancel
|
||||||
parent.notify('', data.msg);
|
parent.notify('', data.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (isBrowserIE()) {
|
if (isBrowserIE()) {
|
||||||
Ext.MessageBox.alert(_('ID_FAILED'), _('ID_SOMETHING_WRONG'));
|
Ext.MessageBox.alert(_('ID_FAILED'), _('ID_SOMETHING_WRONG'));
|
||||||
} else {
|
} else {
|
||||||
|
if (typeof parent.notify !== "undefined") {
|
||||||
parent.notify('', _('ID_SOMETHING_WRONG'));
|
parent.notify('', _('ID_SOMETHING_WRONG'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (typeof parent.postMessage !== "undefined") {
|
||||||
|
parent.postMessage("redirect=todo","*");
|
||||||
|
} else {
|
||||||
location.href = 'casesListExtJs';
|
location.href = 'casesListExtJs';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
failure: function (result, request) {
|
failure: function (result, request) {
|
||||||
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
Ext.MessageBox.alert(_('ID_FAILED'), result.responseText);
|
||||||
@@ -1361,13 +1374,22 @@ Ext.onReady(function(){
|
|||||||
var data = Ext.util.JSON.decode(result.responseText);
|
var data = Ext.util.JSON.decode(result.responseText);
|
||||||
if( data.status == 0 ) {
|
if( data.status == 0 ) {
|
||||||
try {
|
try {
|
||||||
|
if (typeof parent.notify !== "undefined") {
|
||||||
parent.notify('', data.msg);
|
parent.notify('', data.msg);
|
||||||
|
}
|
||||||
|
if (typeof parent.updateCasesTree !== "undefined") {
|
||||||
parent.updateCasesTree();
|
parent.updateCasesTree();
|
||||||
|
}
|
||||||
|
if (typeof parent.highlightCasesTree !== "undefined") {
|
||||||
parent.highlightCasesTree();
|
parent.highlightCasesTree();
|
||||||
}
|
}
|
||||||
catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
if (typeof parent.postMessage !== "undefined") {
|
||||||
|
parent.postMessage("redirect=todo", "*");
|
||||||
|
} else {
|
||||||
location.href = 'casesListExtJs';
|
location.href = 'casesListExtJs';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
alert(data.msg);
|
alert(data.msg);
|
||||||
}
|
}
|
||||||
@@ -1562,12 +1584,22 @@ Ext.onReady(function(){
|
|||||||
success : function(res, req) {
|
success : function(res, req) {
|
||||||
if(req.result.success) {
|
if(req.result.success) {
|
||||||
try {
|
try {
|
||||||
|
if (typeof parent.notify !== "undefined") {
|
||||||
parent.notify('PAUSE CASE', req.result.msg);
|
parent.notify('PAUSE CASE', req.result.msg);
|
||||||
|
}
|
||||||
|
if (typeof parent.updateCasesTree !== "undefined") {
|
||||||
parent.updateCasesTree();
|
parent.updateCasesTree();
|
||||||
|
}
|
||||||
|
if (typeof parent.highlightCasesTree !== "undefined") {
|
||||||
parent.highlightCasesTree();
|
parent.highlightCasesTree();
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
if (typeof parent.postMessage !== "undefined") {
|
||||||
|
parent.postMessage("redirect=todo", "*");
|
||||||
|
} else {
|
||||||
location.href = urlToRedirectAfterPause;
|
location.href = urlToRedirectAfterPause;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
PMExt.error(_('ID_ERROR'), req.result.msg);
|
PMExt.error(_('ID_ERROR'), req.result.msg);
|
||||||
}
|
}
|
||||||
@@ -1657,13 +1689,22 @@ Ext.onReady(function(){
|
|||||||
var data = Ext.util.JSON.decode(result.responseText);
|
var data = Ext.util.JSON.decode(result.responseText);
|
||||||
if( data.success ) {
|
if( data.success ) {
|
||||||
try {
|
try {
|
||||||
|
if (typeof parent.PMExt.updateCasesTree !== "undefined") {
|
||||||
parent.PMExt.notify(_('ID_DELETE_ACTION'), data.msg);
|
parent.PMExt.notify(_('ID_DELETE_ACTION'), data.msg);
|
||||||
|
}
|
||||||
|
if (typeof parent.updateCasesTree !== "undefined") {
|
||||||
parent.updateCasesTree();
|
parent.updateCasesTree();
|
||||||
|
}
|
||||||
|
if (typeof parent.highlightCasesTree !== "undefined") {
|
||||||
parent.highlightCasesTree();
|
parent.highlightCasesTree();
|
||||||
}
|
}
|
||||||
catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
|
if (typeof parent.postMessage !== "undefined") {
|
||||||
|
parent.postMessage("redirect=todo", "*");
|
||||||
|
} else {
|
||||||
location.href = 'casesListExtJs';
|
location.href = 'casesListExtJs';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
PMExt.error(_('ID_ERROR'), data.msg);
|
PMExt.error(_('ID_ERROR'), data.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,6 +342,7 @@ define('HIGHLIGHT_HOME_FOLDER_ENABLE', $config['highlight_home_folder_enable'] =
|
|||||||
define('HIGHLIGHT_HOME_FOLDER_REFRESH_TIME', $config['highlight_home_folder_refresh_time']);
|
define('HIGHLIGHT_HOME_FOLDER_REFRESH_TIME', $config['highlight_home_folder_refresh_time']);
|
||||||
define('HIGHLIGHT_HOME_FOLDER_SCOPE', $config['highlight_home_folder_scope']);
|
define('HIGHLIGHT_HOME_FOLDER_SCOPE', $config['highlight_home_folder_scope']);
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
define('DISABLE_TASK_MANAGER_ROUTING_ASYNC', $config['disable_task_manager_routing_async'] === "1");
|
||||||
|
|
||||||
// IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it.
|
// IIS Compatibility, SERVER_ADDR doesn't exist on that env, so we need to define it.
|
||||||
$_SERVER['SERVER_ADDR'] = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME'];
|
$_SERVER['SERVER_ADDR'] = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['SERVER_NAME'];
|
||||||
|
|||||||
Reference in New Issue
Block a user