Merge branch 'release/3.7.0' of bitbucket.org:colosa/processmaker into bugfix/PMCORE-3342
This commit is contained in:
@@ -60,6 +60,16 @@ export let filters = {
|
|||||||
keys: {},
|
keys: {},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* Service to get the process list
|
||||||
|
*/
|
||||||
|
processListPaged(data) {
|
||||||
|
return Api.get({
|
||||||
|
service: "PROCESSES",
|
||||||
|
params: data,
|
||||||
|
keys: {},
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* Service to get the users list
|
* Service to get the users list
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -518,7 +518,8 @@ export default {
|
|||||||
APP_UID: v.APP_UID,
|
APP_UID: v.APP_UID,
|
||||||
DEL_INDEX: v.DEL_INDEX,
|
DEL_INDEX: v.DEL_INDEX,
|
||||||
PRO_UID: v.PRO_UID,
|
PRO_UID: v.PRO_UID,
|
||||||
TAS_UID: v.TAS_UID
|
TAS_UID: v.TAS_UID,
|
||||||
|
UNASSIGNED: v.UNASSIGNED
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
@@ -580,7 +581,8 @@ export default {
|
|||||||
DEL_INDEX: data.row.DEL_INDEX,
|
DEL_INDEX: data.row.DEL_INDEX,
|
||||||
PRO_UID: data.row.PRO_UID,
|
PRO_UID: data.row.PRO_UID,
|
||||||
TAS_UID: data.row.TAS_UID,
|
TAS_UID: data.row.TAS_UID,
|
||||||
ACTION: this.dataCase.ACTION || "todo"
|
ACTION: this.dataCase.ACTION || "todo",
|
||||||
|
UNASSIGNED: data.row.UNASSIGNED
|
||||||
});
|
});
|
||||||
this.$emit("onUpdatePage", "XCase");
|
this.$emit("onUpdatePage", "XCase");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ export default {
|
|||||||
autoShow: false,
|
autoShow: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
refresh: false,
|
refresh: true,
|
||||||
});
|
});
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -430,17 +430,17 @@ export default {
|
|||||||
//force to search in the parallel tasks
|
//force to search in the parallel tasks
|
||||||
if (params && params.openapplicationuid) {
|
if (params && params.openapplicationuid) {
|
||||||
this.onUpdateFilters({
|
this.onUpdateFilters({
|
||||||
params: [
|
params: [
|
||||||
{
|
{
|
||||||
fieldId: "caseNumber",
|
fieldId: "caseNumber",
|
||||||
filterVar: "caseNumber",
|
filterVar: "caseNumber",
|
||||||
label: "",
|
label: "",
|
||||||
options:[],
|
options:[],
|
||||||
value: params.openapplicationuid,
|
value: params.openapplicationuid,
|
||||||
autoShow: false
|
autoShow: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
refresh: false
|
refresh: true
|
||||||
});
|
});
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,15 @@
|
|||||||
:class="[{ collapsed: collapsed }, { onmobile: isOnMobile }]"
|
:class="[{ collapsed: collapsed }, { onmobile: isOnMobile }]"
|
||||||
>
|
>
|
||||||
<div class="demo">
|
<div class="demo">
|
||||||
|
<b-alert
|
||||||
|
:show="dataAlert.dismissCountDown"
|
||||||
|
dismissible
|
||||||
|
:variant="dataAlert.variant"
|
||||||
|
@dismissed="dataAlert.dismissCountDown = 0"
|
||||||
|
@dismiss-count-down="countDownChanged"
|
||||||
|
>
|
||||||
|
{{ dataAlert.message }}
|
||||||
|
</b-alert>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
@@ -114,7 +123,13 @@ export default {
|
|||||||
},
|
},
|
||||||
defaultOption: window.config.defaultOption || '',
|
defaultOption: window.config.defaultOption || '',
|
||||||
pageData: {},
|
pageData: {},
|
||||||
settings: {}
|
settings: {},
|
||||||
|
dataAlert: {
|
||||||
|
dismissSecs: 5,
|
||||||
|
dismissCountDown: 0,
|
||||||
|
message: "",
|
||||||
|
variant: "info"
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -280,6 +295,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.page = "MyCases";
|
this.page = "MyCases";
|
||||||
}
|
}
|
||||||
|
if (window.config._nodeId === "CASES_SENT" && this.defaultOption !== "") {
|
||||||
|
this.cleanDefaultOption();
|
||||||
|
this.showAlert(this.$i18n.t("ID_NO_PERMISSION_NO_PARTICIPATED_CASES"));
|
||||||
|
}
|
||||||
this.settings = this.config.setting[this.page];
|
this.settings = this.config.setting[this.page];
|
||||||
this.lastPage = this.page;
|
this.lastPage = this.page;
|
||||||
},
|
},
|
||||||
@@ -602,7 +621,25 @@ export default {
|
|||||||
return obj.props;
|
return obj.props;
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
},
|
||||||
|
/**
|
||||||
|
* 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>
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ export default {
|
|||||||
autoShow: false,
|
autoShow: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
refresh: false,
|
refresh: true,
|
||||||
});
|
});
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -464,17 +464,17 @@ export default {
|
|||||||
//force to search in the parallel tasks
|
//force to search in the parallel tasks
|
||||||
if (params && params.openapplicationuid) {
|
if (params && params.openapplicationuid) {
|
||||||
this.onUpdateFilters({
|
this.onUpdateFilters({
|
||||||
params: [
|
params: [
|
||||||
{
|
{
|
||||||
fieldId: "caseNumber",
|
fieldId: "caseNumber",
|
||||||
filterVar: "caseNumber",
|
filterVar: "caseNumber",
|
||||||
label: "",
|
label: "",
|
||||||
options:[],
|
options:[],
|
||||||
value: params.openapplicationuid,
|
value: params.openapplicationuid,
|
||||||
autoShow: false
|
autoShow: false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
refresh: false
|
refresh: true
|
||||||
});
|
});
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -233,7 +233,10 @@ export default {
|
|||||||
getProcesses(query) {
|
getProcesses(query) {
|
||||||
let that = this;
|
let that = this;
|
||||||
Api.filters
|
Api.filters
|
||||||
.processList(query || "")
|
.processListPaged({
|
||||||
|
text: query || "",
|
||||||
|
paged: false,
|
||||||
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
that.formatDataProcesses(response.data);
|
that.formatDataProcesses(response.data);
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -126,14 +126,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
currentSelection: null,
|
currentSelection: null,
|
||||||
dateFrom:
|
dateFrom:
|
||||||
this.data[3] && this.data[3].data.dateFromRisk
|
this.data[3] && this.data[3].data.dateFrom
|
||||||
? this.data[3].data.dateFromRisk
|
? this.data[3].data.dateFrom
|
||||||
: moment().format("YYYY-MM-DD"),
|
: moment().subtract(30, "d").format("YYYY-MM-DD"),
|
||||||
dateTo:
|
dateTo:
|
||||||
this.data[3] && this.data[3].data.dateToRisk
|
this.data[3] && this.data[3].data.dateTo
|
||||||
? this.data[3].data.dateToRisk
|
? this.data[3].data.dateTo
|
||||||
: moment().add(30, "d").format("YYYY-MM-DD"),
|
: moment().format("YYYY-MM-DD"),
|
||||||
dateNow: moment().format("DD/MM/YYYY h:mm:ss a"),
|
dateNow: moment().format("YYYY-MM-DD h:mm:ss a"),
|
||||||
size:
|
size:
|
||||||
this.data[3] && this.data[3].data.size
|
this.data[3] && this.data[3].data.size
|
||||||
? this.data[3].data.size
|
? this.data[3].data.size
|
||||||
@@ -227,12 +227,12 @@ export default {
|
|||||||
dt = {
|
dt = {
|
||||||
process: this.data[2].id,
|
process: this.data[2].id,
|
||||||
caseList: this.data[1].id.toLowerCase(),
|
caseList: this.data[1].id.toLowerCase(),
|
||||||
dateFrom: moment(this.dateFrom).format("DD/MM/YYYY"),
|
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
|
||||||
dateTo: moment(this.dateTo).format("DD/MM/YYYY"),
|
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
|
||||||
riskStatus: this.riskType,
|
riskStatus: this.riskType,
|
||||||
};
|
};
|
||||||
this.size.id != "all" ? (dt["topCases"] = this.size.id) : null;
|
this.size.id != "all" ? (dt["topCases"] = this.size.id) : null;
|
||||||
this.dateNow = moment().format("DD/MM/YYYY h:mm:ss a");
|
this.dateNow = moment().format("YYYY-MM-DD h:mm:ss a");
|
||||||
Api.process
|
Api.process
|
||||||
.totalCasesByRisk(dt)
|
.totalCasesByRisk(dt)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@@ -462,11 +462,9 @@ export default {
|
|||||||
name: this.data[2]["name"],
|
name: this.data[2]["name"],
|
||||||
level: 3,
|
level: 3,
|
||||||
data: {
|
data: {
|
||||||
dateFrom: this.data[3].data.dateFrom,
|
dateFrom: this.dateFrom,
|
||||||
dateTo: this.data[3].data.dateTo,
|
dateTo: this.dateTo,
|
||||||
period: this.data[3].data.period,
|
period: this.data[3].data.period,
|
||||||
dateFromRisk: this.dateFrom,
|
|
||||||
dateToRisk: this.dateTo,
|
|
||||||
size: this.size,
|
size: this.size,
|
||||||
riskType: this.riskType,
|
riskType: this.riskType,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,8 +58,8 @@
|
|||||||
:options="options"
|
:options="options"
|
||||||
:series="series"
|
:series="series"
|
||||||
></apexchart>
|
></apexchart>
|
||||||
<div class="row">
|
<div class="vp-text-align-center">
|
||||||
<div class="col-sm vp-align-right">
|
<div class="vp-align-right vp-inline-block">
|
||||||
<button
|
<button
|
||||||
@click="onClickDrillDown()"
|
@click="onClickDrillDown()"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
><span class="vp-padding-l10">{{ $t("ID_DRILL") }}</span>
|
><span class="vp-padding-l10">{{ $t("ID_DRILL") }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm">
|
<div class="vp-inline-block">
|
||||||
<button @click="onClickData()" type="button" class="btn btn-primary">
|
<button @click="onClickData()" type="button" class="btn btn-primary">
|
||||||
<i class="fas fa-th"></i
|
<i class="fas fa-th"></i
|
||||||
><span class="vp-padding-l10">{{ $t("ID_DATA") }}</span>
|
><span class="vp-padding-l10">{{ $t("ID_DATA") }}</span>
|
||||||
@@ -100,10 +100,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dateFrom: this.data[3]
|
dateFrom: this.data[3]
|
||||||
? this.data[3].data.dateFrom
|
? this.data[3].data.dateFrom
|
||||||
: moment().format("YYYY-MM-DD"),
|
: moment().subtract(30, "d").format("YYYY-MM-DD"),
|
||||||
dateTo: this.data[3]
|
dateTo: this.data[3]
|
||||||
? this.data[3].data.dateTo
|
? this.data[3].data.dateTo
|
||||||
: moment().add(30, "d").format("YYYY-MM-DD"),
|
: moment().format("YYYY-MM-DD"),
|
||||||
period: this.data[3] ? this.data[3].data.period : "day",
|
period: this.data[3] ? this.data[3].data.period : "day",
|
||||||
periodOptions: [
|
periodOptions: [
|
||||||
{ text: this.$t("ID_DAY"), value: "day" },
|
{ text: this.$t("ID_DAY"), value: "day" },
|
||||||
@@ -187,8 +187,8 @@ export default {
|
|||||||
dt = {
|
dt = {
|
||||||
processId: this.data[2].id,
|
processId: this.data[2].id,
|
||||||
caseList: this.data[1].id.toLowerCase(),
|
caseList: this.data[1].id.toLowerCase(),
|
||||||
dateFrom: moment(this.dateFrom).format("DD/MM/YYYY"),
|
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
|
||||||
dateTo: moment(this.dateTo).format("DD/MM/YYYY"),
|
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
|
||||||
groupBy: this.period,
|
groupBy: this.period,
|
||||||
};
|
};
|
||||||
Api.process
|
Api.process
|
||||||
@@ -338,5 +338,9 @@ export default {
|
|||||||
.vp-padding-l20 {
|
.vp-padding-l20 {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vp-text-align-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
|
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
|
||||||
@@ -233,7 +233,6 @@
|
|||||||
@postNotes="onPostNotes"
|
@postNotes="onPostNotes"
|
||||||
></ModalComments>
|
></ModalComments>
|
||||||
<ModalClaimCase ref="modal-claim-case"></ModalClaimCase>
|
<ModalClaimCase ref="modal-claim-case"></ModalClaimCase>
|
||||||
<ModalPauseCase ref="modal-pause-case"></ModalPauseCase>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -251,7 +250,6 @@ import MultiviewHeader from "../../components/headers/MultiviewHeader.vue";
|
|||||||
import VueCardView from "../../components/dataViews/vueCardView/VueCardView.vue";
|
import VueCardView from "../../components/dataViews/vueCardView/VueCardView.vue";
|
||||||
import VueListView from "../../components/dataViews/vueListView/VueListView.vue";
|
import VueListView from "../../components/dataViews/vueListView/VueListView.vue";
|
||||||
import defaultMixins from "./defaultMixins";
|
import defaultMixins from "./defaultMixins";
|
||||||
import ModalPauseCase from '../modal/ModalPauseCase.vue';
|
|
||||||
import ModalComments from "../modal/ModalComments.vue";
|
import ModalComments from "../modal/ModalComments.vue";
|
||||||
import { Event } from 'vue-tables-2';
|
import { Event } from 'vue-tables-2';
|
||||||
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
|
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
|
||||||
@@ -270,7 +268,6 @@ export default {
|
|||||||
MultiviewHeader,
|
MultiviewHeader,
|
||||||
VueCardView,
|
VueCardView,
|
||||||
VueListView,
|
VueListView,
|
||||||
ModalPauseCase,
|
|
||||||
CurrentUserCell,
|
CurrentUserCell,
|
||||||
ModalComments
|
ModalComments
|
||||||
},
|
},
|
||||||
@@ -680,14 +677,6 @@ export default {
|
|||||||
this.$refs["vueListView"].getData();
|
this.$refs["vueListView"].getData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
* Show modal to pause a case
|
|
||||||
* @param {objec} data
|
|
||||||
*/
|
|
||||||
showModalPause(data) {
|
|
||||||
this.$refs["modal-pause-case"].data = data;
|
|
||||||
this.$refs["modal-pause-case"].show();
|
|
||||||
},
|
|
||||||
/**
|
/**
|
||||||
* Show options in the ellipsis
|
* Show options in the ellipsis
|
||||||
* @param {object} data
|
* @param {object} data
|
||||||
@@ -705,13 +694,6 @@ export default {
|
|||||||
that.openComments(data);
|
that.openComments(data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pause: {
|
|
||||||
name: "pause case",
|
|
||||||
icon: "far fa-pause-circle",
|
|
||||||
fn: function() {
|
|
||||||
that.showModalPause(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
claim: {
|
claim: {
|
||||||
name: "claim case",
|
name: "claim case",
|
||||||
icon: "fas fa-briefcase",
|
icon: "fas fa-briefcase",
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ export default {
|
|||||||
window.config.SYS_URI +
|
window.config.SYS_URI +
|
||||||
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&TAS_UID=${this.dataCase.TAS_UID}&action=${this.dataCase.ACTION}`;
|
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&TAS_UID=${this.dataCase.TAS_UID}&action=${this.dataCase.ACTION}`;
|
||||||
}
|
}
|
||||||
|
if (this.dataCase.UNASSIGNED === true) {
|
||||||
|
this.path =
|
||||||
|
window.config.SYS_SERVER_AJAX +
|
||||||
|
window.config.SYS_URI +
|
||||||
|
`cases/open?APP_UID=${this.dataCase.APP_UID}&DEL_INDEX=${this.dataCase.DEL_INDEX}&action=unassigned`;
|
||||||
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|||||||
@@ -1496,8 +1496,8 @@ class Derivation
|
|||||||
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && !empty(trim($tasGroupVariable))) {
|
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && !empty(trim($tasGroupVariable))) {
|
||||||
$nextTaskGroupVariable = trim($tasGroupVariable, " @#");
|
$nextTaskGroupVariable = trim($tasGroupVariable, " @#");
|
||||||
|
|
||||||
if (isset($oldFields["APP_DATA"][$nextTaskGroupVariable])) {
|
if (isset($currentFields["APP_DATA"][$nextTaskGroupVariable])) {
|
||||||
$dataVariable = $oldFields["APP_DATA"][$nextTaskGroupVariable];
|
$dataVariable = $currentFields["APP_DATA"][$nextTaskGroupVariable];
|
||||||
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
|
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
|
||||||
|
|
||||||
if (!empty($dataVariable)) {
|
if (!empty($dataVariable)) {
|
||||||
@@ -1512,7 +1512,7 @@ class Derivation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// We will to send the notifications
|
// We will to send the notifications
|
||||||
$sendNotificationsMobile = $this->sendNotificationsMobile($oldFields, $subProcessInfo, $newCase['INDEX']);
|
$sendNotificationsMobile = $this->sendNotificationsMobile($currentFields, $subProcessInfo, $newCase['INDEX']);
|
||||||
$nextTaskData = $taskNextDel->toArray(BasePeer::TYPE_FIELDNAME);
|
$nextTaskData = $taskNextDel->toArray(BasePeer::TYPE_FIELDNAME);
|
||||||
$nextTaskData['USR_UID'] = $subProcessInfo['USR_UID'];
|
$nextTaskData['USR_UID'] = $subProcessInfo['USR_UID'];
|
||||||
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $newCase['INDEX']);
|
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $newCase['INDEX']);
|
||||||
|
|||||||
@@ -4200,6 +4200,20 @@ class WorkspaceTools
|
|||||||
APP_STATUS_ID = 0");
|
APP_STATUS_ID = 0");
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
|
// Populating APPLICATION.APP_INIT_USER_ID
|
||||||
|
CLI::logging("-> Populating APPLICATION.APP_INIT_USER_ID \n");
|
||||||
|
$con->begin();
|
||||||
|
$stmt = $con->createStatement();
|
||||||
|
$rs = $stmt->executeQuery("UPDATE APPLICATION AS AP
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT USERS.USR_UID, USERS.USR_ID
|
||||||
|
FROM USERS
|
||||||
|
) AS USR
|
||||||
|
ON (AP.APP_INIT_USER = USR.USR_UID)
|
||||||
|
SET AP.APP_INIT_USER_ID = USR.USR_ID
|
||||||
|
WHERE AP.APP_INIT_USER_ID = 0");
|
||||||
|
$con->commit();
|
||||||
|
|
||||||
// Populating APPLICATION.APP_FINISH_DATE
|
// Populating APPLICATION.APP_FINISH_DATE
|
||||||
CLI::logging("-> Populating APPLICATION.APP_FINISH_DATE \n");
|
CLI::logging("-> Populating APPLICATION.APP_FINISH_DATE \n");
|
||||||
$con->begin();
|
$con->begin();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use ProcessMaker\ChangeLog\ChangeLog;
|
|||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
use ProcessMaker\Core\JobsManager;
|
use ProcessMaker\Core\JobsManager;
|
||||||
use ProcessMaker\Core\System;
|
use ProcessMaker\Core\System;
|
||||||
|
use ProcessMaker\Model\Application;
|
||||||
use ProcessMaker\Model\Delegation;
|
use ProcessMaker\Model\Delegation;
|
||||||
|
|
||||||
class WsBase
|
class WsBase
|
||||||
@@ -3284,29 +3285,36 @@ class WsBase
|
|||||||
$_SESSION["INDEX"] = $delIndex;
|
$_SESSION["INDEX"] = $delIndex;
|
||||||
$_SESSION["USER_LOGGED"] = $userUid;
|
$_SESSION["USER_LOGGED"] = $userUid;
|
||||||
|
|
||||||
|
// Validate the appUid
|
||||||
if (empty($caseUid)) {
|
if (empty($caseUid)) {
|
||||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " caseUid");
|
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " caseUid");
|
||||||
|
|
||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
// Validate the status
|
||||||
|
$caseInfo = Application::getCase($caseUid);
|
||||||
|
if ($caseInfo['APP_STATUS'] === Application::STATUS_DRAFT_NAME) {
|
||||||
|
$result = new WsResponse(100, G::LoadTranslation("ID_DRAFT_CASES_CAN_NOT_PAUSED"));
|
||||||
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
// Validate the index
|
||||||
if (empty($delIndex)) {
|
if (empty($delIndex)) {
|
||||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " delIndex");
|
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " delIndex");
|
||||||
|
|
||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
// Validate the user
|
||||||
if (empty($userUid)) {
|
if (empty($userUid)) {
|
||||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
|
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
|
||||||
|
|
||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
//Validate if status is closed
|
// Validate if status is closed
|
||||||
$appDelegation = new AppDelegation();
|
$appDelegation = new AppDelegation();
|
||||||
$rows = $appDelegation->LoadParallel($caseUid, $delIndex);
|
$rows = $appDelegation->LoadParallel($caseUid, $delIndex);
|
||||||
if (empty($rows)) {
|
if (empty($rows)) {
|
||||||
@@ -3314,7 +3322,7 @@ class WsBase
|
|||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
//Validate if the case is paused
|
// Validate if the case is paused
|
||||||
$appDelay = new AppDelay();
|
$appDelay = new AppDelay();
|
||||||
$sw = $appDelay->isPaused($caseUid, $delIndex);
|
$sw = $appDelay->isPaused($caseUid, $delIndex);
|
||||||
if ($sw === true) {
|
if ($sw === true) {
|
||||||
@@ -3322,6 +3330,7 @@ class WsBase
|
|||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
// Review the unpaused date
|
||||||
if (strlen($unpauseDate) >= 10) {
|
if (strlen($unpauseDate) >= 10) {
|
||||||
if (!preg_match("/^\d{4}-\d{2}-\d{2}| \d{2}:\d{2}:\d{2}$/", $unpauseDate)) {
|
if (!preg_match("/^\d{4}-\d{2}-\d{2}| \d{2}:\d{2}:\d{2}$/", $unpauseDate)) {
|
||||||
$result = new WsResponse(100, G::LoadTranslation("ID_INVALID_DATA") . " $unpauseDate");
|
$result = new WsResponse(100, G::LoadTranslation("ID_INVALID_DATA") . " $unpauseDate");
|
||||||
@@ -3336,7 +3345,7 @@ class WsBase
|
|||||||
$case = new Cases();
|
$case = new Cases();
|
||||||
$case->pauseCase($caseUid, $delIndex, $userUid, $unpauseDate);
|
$case->pauseCase($caseUid, $delIndex, $userUid, $unpauseDate);
|
||||||
|
|
||||||
//Response
|
// Response
|
||||||
$result = self::messageExecuteSuccessfully();
|
$result = self::messageExecuteSuccessfully();
|
||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
$record = $rsCriteria->getRow();
|
$record = $rsCriteria->getRow();
|
||||||
|
|
||||||
if ($flagIncludeCurrentDel) {
|
if ($flagIncludeCurrentDel) {
|
||||||
if (preg_match('/^(?:' . 'NORMAL|SCRIPT\-TASK|WEBENTRYEVENT|START\-MESSAGE\-EVENT|START\-TIMER\-EVENT' . ')$/', $record['TAS_TYPE'])) {
|
if (preg_match('/^(?:' . 'SERVICE\-TASK|NORMAL|SCRIPT\-TASK|WEBENTRYEVENT|START\-MESSAGE\-EVENT|START\-TIMER\-EVENT' . ')$/', $record['TAS_TYPE'])) {
|
||||||
$arrayAppDelegationPrevious = $record;
|
$arrayAppDelegationPrevious = $record;
|
||||||
$flagPrevious = false;
|
$flagPrevious = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,9 +148,9 @@ class ListMyInbox extends BaseListMyInbox implements ListInterface
|
|||||||
$dataset->next();
|
$dataset->next();
|
||||||
$aRow = $dataset->getRow();
|
$aRow = $dataset->getRow();
|
||||||
$data['DEL_CURRENT_USR_UID'] = $data['USR_UID'];
|
$data['DEL_CURRENT_USR_UID'] = $data['USR_UID'];
|
||||||
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
$data['DEL_CURRENT_USR_USERNAME'] = is_array($aRow) ? $aRow['USR_USERNAME'] : '';
|
||||||
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
$data['DEL_CURRENT_USR_FIRSTNAME'] = is_array($aRow) ? $aRow['USR_FIRSTNAME'] : '';
|
||||||
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
$data['DEL_CURRENT_USR_LASTNAME'] = is_array($aRow) ? $aRow['USR_LASTNAME'] : '';
|
||||||
|
|
||||||
if ($data['DEL_INDEX'] == 1 && $data['APP_STATUS'] == 'TO_DO') {
|
if ($data['DEL_INDEX'] == 1 && $data['APP_STATUS'] == 'TO_DO') {
|
||||||
$data['APP_CREATE_DATE'] = $data['APP_UPDATE_DATE'];
|
$data['APP_CREATE_DATE'] = $data['APP_UPDATE_DATE'];
|
||||||
|
|||||||
@@ -7049,6 +7049,12 @@ msgstr "Down Trigger"
|
|||||||
msgid "Draft"
|
msgid "Draft"
|
||||||
msgstr "Draft"
|
msgstr "Draft"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DRAFT_CASES_CAN_NOT_PAUSED
|
||||||
|
#: LABEL/ID_DRAFT_CASES_CAN_NOT_PAUSED
|
||||||
|
msgid "Draft cases can not be paused"
|
||||||
|
msgstr "Draft cases can not be paused"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_DRIVE_HELP_ENABLE
|
# LABEL/ID_DRIVE_HELP_ENABLE
|
||||||
#: LABEL/ID_DRIVE_HELP_ENABLE
|
#: LABEL/ID_DRIVE_HELP_ENABLE
|
||||||
@@ -20741,6 +20747,12 @@ msgstr "There are no older session files"
|
|||||||
msgid "You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed."
|
msgid "You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed."
|
||||||
msgstr "You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed."
|
msgstr "You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed."
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_NO_PERMISSION_NO_PARTICIPATED_CASES
|
||||||
|
#: LABEL/ID_NO_PERMISSION_NO_PARTICIPATED_CASES
|
||||||
|
msgid "You do not have permission to see this case or you have not participated in it."
|
||||||
|
msgstr "You do not have permission to see this case or you have not participated in it."
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_NO_PREVIOUS_USR_UID
|
# LABEL/ID_NO_PREVIOUS_USR_UID
|
||||||
#: LABEL/ID_NO_PREVIOUS_USR_UID
|
#: LABEL/ID_NO_PREVIOUS_USR_UID
|
||||||
|
|||||||
@@ -58006,6 +58006,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_DOWNLOAD_SETTINGS','en','Download Settings','2020-12-10') ,
|
( 'LABEL','ID_DOWNLOAD_SETTINGS','en','Download Settings','2020-12-10') ,
|
||||||
( 'LABEL','ID_DOWN_TRIGGER','en','Down Trigger','2015-02-20') ,
|
( 'LABEL','ID_DOWN_TRIGGER','en','Down Trigger','2015-02-20') ,
|
||||||
( 'LABEL','ID_DRAFT','en','Draft','2014-01-15') ,
|
( 'LABEL','ID_DRAFT','en','Draft','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_DRAFT_CASES_CAN_NOT_PAUSED','en','Draft cases can not be paused','2021-10-01') ,
|
||||||
( 'LABEL','ID_DRIVE_HELP_ENABLE','en','When this option is enabled, all input, output and attached documents generated in your processes can be stored in Google Drive.','2016-01-05') ,
|
( 'LABEL','ID_DRIVE_HELP_ENABLE','en','When this option is enabled, all input, output and attached documents generated in your processes can be stored in Google Drive.','2016-01-05') ,
|
||||||
( 'LABEL','ID_DRILL_DOWN_NAVIGATOR','en','Drill Down Navigator','2020-08-26') ,
|
( 'LABEL','ID_DRILL_DOWN_NAVIGATOR','en','Drill Down Navigator','2020-08-26') ,
|
||||||
( 'LABEL','ID_DRILL','en','Drill','2021-08-26') ,
|
( 'LABEL','ID_DRILL','en','Drill','2021-08-26') ,
|
||||||
@@ -60361,6 +60362,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_NO_NEW_VERSIONS','en','No new versions available','2014-09-18') ,
|
( 'LABEL','ID_NO_NEW_VERSIONS','en','No new versions available','2014-09-18') ,
|
||||||
( 'LABEL','ID_NO_OLDER_SESSION_FILES','en','There are no older session files','2014-01-15') ,
|
( 'LABEL','ID_NO_OLDER_SESSION_FILES','en','There are no older session files','2014-01-15') ,
|
||||||
( 'LABEL','ID_NO_PERMISSION_NO_PARTICIPATED','en','You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed.','2017-06-05') ,
|
( 'LABEL','ID_NO_PERMISSION_NO_PARTICIPATED','en','You cannot open this case because on the reason below: <br> You do not have permission to see this case. <br> You have not participated in this case. <br> Case is already claimed.','2017-06-05') ,
|
||||||
|
( 'LABEL','ID_NO_PERMISSION_NO_PARTICIPATED_CASES','en','You do not have permission to see this case or you have not participated in it.','2021-10-04') ,
|
||||||
( 'LABEL','ID_NO_PREVIOUS_USR_UID','en','The previous task doesn''t have any users.','2017-10-18') ,
|
( 'LABEL','ID_NO_PREVIOUS_USR_UID','en','The previous task doesn''t have any users.','2017-10-18') ,
|
||||||
( 'LABEL','ID_NO_REASSIGN','en','Do not reassign','2014-01-15') ,
|
( 'LABEL','ID_NO_REASSIGN','en','Do not reassign','2014-01-15') ,
|
||||||
( 'LABEL','ID_NO_RECORDS','en','No records','2014-01-15') ,
|
( 'LABEL','ID_NO_RECORDS','en','No records','2014-01-15') ,
|
||||||
|
|||||||
@@ -732,8 +732,12 @@ class Ajax
|
|||||||
}
|
}
|
||||||
// End save
|
// End save
|
||||||
|
|
||||||
$case = new Cases();
|
$case = new WsBase();
|
||||||
$case->pauseCase($appUid, $delIndex, $_SESSION['USER_LOGGED'], $unpauseDate);
|
$response = $case->pauseCase($appUid, $delIndex, $_SESSION['USER_LOGGED'], $unpauseDate);
|
||||||
|
$response = (object) $response;
|
||||||
|
if ($response->status_code == 100) {
|
||||||
|
throw new Exception($response->message);
|
||||||
|
}
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
$caseData = $app->load($appUid);
|
$caseData = $app->load($appUid);
|
||||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ class ActionsByEmail
|
|||||||
if ($data[$index]['ABE_MAILSERVER_OR_MAILCURRENT'] == 0) {
|
if ($data[$index]['ABE_MAILSERVER_OR_MAILCURRENT'] == 0) {
|
||||||
$delegation = new AppDelegation();
|
$delegation = new AppDelegation();
|
||||||
$previousTask = $delegation->getPreviousDelegationValidTask($data[$index]['APP_UID'], $data[$index]['DEL_INDEX']);
|
$previousTask = $delegation->getPreviousDelegationValidTask($data[$index]['APP_UID'], $data[$index]['DEL_INDEX']);
|
||||||
if (in_array($previousTask['TAS_TYPE'], Task::DUMMY_TASKS)) {
|
if (in_array($previousTask['TAS_TYPE'], Task::DUMMY_TASKS) || in_array($previousTask['TAS_TYPE'], Task::$typesRunAutomatically)) {
|
||||||
$res = Task::getTask($previousTask['TAS_ID']);
|
$res = Task::getTask($previousTask['TAS_ID']);
|
||||||
$data[$index]['USER'] = $res->TAS_TITLE . ' (' . $previousTask['TAS_TYPE'] . ')';
|
$data[$index]['USER'] = $res->TAS_TITLE . ' (' . $previousTask['TAS_TYPE'] . ')';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class Draft extends AbstractCases
|
|||||||
{
|
{
|
||||||
$query = Application::query()->select(['APPLICATION.APP_NUMBER']);
|
$query = Application::query()->select(['APPLICATION.APP_NUMBER']);
|
||||||
// Add the initial scope for draft cases for specific user
|
// Add the initial scope for draft cases for specific user
|
||||||
$query->draft($this->getUserUid());
|
$query->draft($this->getUserId());
|
||||||
// Get only one case
|
// Get only one case
|
||||||
$query->limit(1);
|
$query->limit(1);
|
||||||
// Get result
|
// Get result
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class Application extends Model
|
|||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
// Status id
|
// Status id
|
||||||
const STATUS_DRAFT = 1;
|
const STATUS_DRAFT = 1;
|
||||||
|
const STATUS_DRAFT_NAME = 'DRAFT';
|
||||||
const STATUS_TODO = 2;
|
const STATUS_TODO = 2;
|
||||||
const STATUS_COMPLETED = 3;
|
const STATUS_COMPLETED = 3;
|
||||||
const STATUS_CANCELED = 4;
|
const STATUS_CANCELED = 4;
|
||||||
@@ -52,13 +53,13 @@ class Application extends Model
|
|||||||
* Scope for query to get the creator
|
* Scope for query to get the creator
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
* @param string $usrUid
|
* @param int $usrId
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
*/
|
*/
|
||||||
public function scopeCreator($query, $usrUid)
|
public function scopeCreator($query, $usrId)
|
||||||
{
|
{
|
||||||
return $query->where('APP_INIT_USER', '=', $usrUid);
|
return $query->where('APP_INIT_USER_ID', '=', $usrId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -359,7 +360,7 @@ class Application extends Model
|
|||||||
* Scope the Draft cases
|
* Scope the Draft cases
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||||
* @param string $user
|
* @param int $user
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Database\Eloquent\Builder
|
* @return \Illuminate\Database\Eloquent\Builder
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ class Metrics extends Api
|
|||||||
*/
|
*/
|
||||||
public function getProcessTotalCases($caseList, $category = null, $topTen = false, $processes = [])
|
public function getProcessTotalCases($caseList, $category = null, $topTen = false, $processes = [])
|
||||||
{
|
{
|
||||||
$usrId = $this->getUserId();
|
$usrUid = $this->getUserId();
|
||||||
|
$usrId = !empty($usrUid) ? User::getId($usrUid) : 0;
|
||||||
try {
|
try {
|
||||||
switch ($caseList) {
|
switch ($caseList) {
|
||||||
case 'inbox':
|
case 'inbox':
|
||||||
@@ -60,6 +61,7 @@ class Metrics extends Api
|
|||||||
break;
|
break;
|
||||||
case 'unassigned':
|
case 'unassigned':
|
||||||
$list = new Unassigned();
|
$list = new Unassigned();
|
||||||
|
$list->setUserUid($usrUid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$list->setUserId($usrId);
|
$list->setUserId($usrId);
|
||||||
@@ -89,7 +91,8 @@ class Metrics extends Api
|
|||||||
*/
|
*/
|
||||||
public function getTotalCasesByRange($caseList, $processId = null, $dateFrom = null, $dateTo = null, $groupBy = 'day')
|
public function getTotalCasesByRange($caseList, $processId = null, $dateFrom = null, $dateTo = null, $groupBy = 'day')
|
||||||
{
|
{
|
||||||
$usrId = $this->getUserId();
|
$usrUid = $this->getUserId();
|
||||||
|
$usrId = !empty($usrUid) ? User::getId($usrUid) : 0;
|
||||||
try {
|
try {
|
||||||
switch ($caseList) {
|
switch ($caseList) {
|
||||||
case 'inbox':
|
case 'inbox':
|
||||||
@@ -103,6 +106,7 @@ class Metrics extends Api
|
|||||||
break;
|
break;
|
||||||
case 'unassigned':
|
case 'unassigned':
|
||||||
$list = new Unassigned();
|
$list = new Unassigned();
|
||||||
|
$list->setUserUid($usrUid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$list->setUserId($usrId);
|
$list->setUserId($usrId);
|
||||||
@@ -179,7 +183,8 @@ class Metrics extends Api
|
|||||||
public function getCasesRiskByProcess($caseList = 'inbox', $process, $dateFrom = null, $dateTo = null, $riskStatus = 'ON_TIME', $topCases = null)
|
public function getCasesRiskByProcess($caseList = 'inbox', $process, $dateFrom = null, $dateTo = null, $riskStatus = 'ON_TIME', $topCases = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$usrId = $this->getUserId();
|
$usrUid = $this->getUserId();
|
||||||
|
$usrId = !empty($usrUid) ? User::getId($usrUid) : 0;
|
||||||
switch ($caseList) {
|
switch ($caseList) {
|
||||||
case 'inbox':
|
case 'inbox':
|
||||||
$list = new Inbox();
|
$list = new Inbox();
|
||||||
@@ -192,6 +197,7 @@ class Metrics extends Api
|
|||||||
break;
|
break;
|
||||||
case 'unassigned':
|
case 'unassigned':
|
||||||
$list = new Unassigned();
|
$list = new Unassigned();
|
||||||
|
$list->setUserUid($usrUid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$list->setUserId($usrId);
|
$list->setUserId($usrId);
|
||||||
|
|||||||
Reference in New Issue
Block a user