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: {},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Service to get the process list
|
||||
*/
|
||||
processListPaged(data) {
|
||||
return Api.get({
|
||||
service: "PROCESSES",
|
||||
params: data,
|
||||
keys: {},
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Service to get the users list
|
||||
*/
|
||||
|
||||
@@ -518,7 +518,8 @@ export default {
|
||||
APP_UID: v.APP_UID,
|
||||
DEL_INDEX: v.DEL_INDEX,
|
||||
PRO_UID: v.PRO_UID,
|
||||
TAS_UID: v.TAS_UID
|
||||
TAS_UID: v.TAS_UID,
|
||||
UNASSIGNED: v.UNASSIGNED
|
||||
});
|
||||
});
|
||||
return data;
|
||||
@@ -580,7 +581,8 @@ export default {
|
||||
DEL_INDEX: data.row.DEL_INDEX,
|
||||
PRO_UID: data.row.PRO_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");
|
||||
}
|
||||
|
||||
@@ -662,7 +662,7 @@ export default {
|
||||
autoShow: false,
|
||||
},
|
||||
],
|
||||
refresh: false,
|
||||
refresh: true,
|
||||
});
|
||||
this.$emit("cleanDefaultOption");
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ export default {
|
||||
autoShow: false
|
||||
}
|
||||
],
|
||||
refresh: false
|
||||
refresh: true
|
||||
});
|
||||
this.$emit("cleanDefaultOption");
|
||||
}
|
||||
|
||||
@@ -4,6 +4,15 @@
|
||||
:class="[{ collapsed: collapsed }, { onmobile: isOnMobile }]"
|
||||
>
|
||||
<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">
|
||||
<router-view />
|
||||
</div>
|
||||
@@ -114,7 +123,13 @@ export default {
|
||||
},
|
||||
defaultOption: window.config.defaultOption || '',
|
||||
pageData: {},
|
||||
settings: {}
|
||||
settings: {},
|
||||
dataAlert: {
|
||||
dismissSecs: 5,
|
||||
dismissCountDown: 0,
|
||||
message: "",
|
||||
variant: "info"
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -280,6 +295,10 @@ export default {
|
||||
} else {
|
||||
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.lastPage = this.page;
|
||||
},
|
||||
@@ -602,7 +621,25 @@ export default {
|
||||
return obj.props;
|
||||
}
|
||||
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>
|
||||
|
||||
@@ -475,7 +475,7 @@ export default {
|
||||
autoShow: false,
|
||||
},
|
||||
],
|
||||
refresh: false,
|
||||
refresh: true,
|
||||
});
|
||||
this.$emit("cleanDefaultOption");
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ export default {
|
||||
autoShow: false
|
||||
}
|
||||
],
|
||||
refresh: false
|
||||
refresh: true
|
||||
});
|
||||
this.$emit("cleanDefaultOption");
|
||||
}
|
||||
|
||||
@@ -233,7 +233,10 @@ export default {
|
||||
getProcesses(query) {
|
||||
let that = this;
|
||||
Api.filters
|
||||
.processList(query || "")
|
||||
.processListPaged({
|
||||
text: query || "",
|
||||
paged: false,
|
||||
})
|
||||
.then((response) => {
|
||||
that.formatDataProcesses(response.data);
|
||||
})
|
||||
|
||||
@@ -126,14 +126,14 @@ export default {
|
||||
return {
|
||||
currentSelection: null,
|
||||
dateFrom:
|
||||
this.data[3] && this.data[3].data.dateFromRisk
|
||||
? this.data[3].data.dateFromRisk
|
||||
: moment().format("YYYY-MM-DD"),
|
||||
this.data[3] && this.data[3].data.dateFrom
|
||||
? this.data[3].data.dateFrom
|
||||
: moment().subtract(30, "d").format("YYYY-MM-DD"),
|
||||
dateTo:
|
||||
this.data[3] && this.data[3].data.dateToRisk
|
||||
? this.data[3].data.dateToRisk
|
||||
: moment().add(30, "d").format("YYYY-MM-DD"),
|
||||
dateNow: moment().format("DD/MM/YYYY h:mm:ss a"),
|
||||
this.data[3] && this.data[3].data.dateTo
|
||||
? this.data[3].data.dateTo
|
||||
: moment().format("YYYY-MM-DD"),
|
||||
dateNow: moment().format("YYYY-MM-DD h:mm:ss a"),
|
||||
size:
|
||||
this.data[3] && this.data[3].data.size
|
||||
? this.data[3].data.size
|
||||
@@ -227,12 +227,12 @@ export default {
|
||||
dt = {
|
||||
process: this.data[2].id,
|
||||
caseList: this.data[1].id.toLowerCase(),
|
||||
dateFrom: moment(this.dateFrom).format("DD/MM/YYYY"),
|
||||
dateTo: moment(this.dateTo).format("DD/MM/YYYY"),
|
||||
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
|
||||
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
|
||||
riskStatus: this.riskType,
|
||||
};
|
||||
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
|
||||
.totalCasesByRisk(dt)
|
||||
.then((response) => {
|
||||
@@ -462,11 +462,9 @@ export default {
|
||||
name: this.data[2]["name"],
|
||||
level: 3,
|
||||
data: {
|
||||
dateFrom: this.data[3].data.dateFrom,
|
||||
dateTo: this.data[3].data.dateTo,
|
||||
dateFrom: this.dateFrom,
|
||||
dateTo: this.dateTo,
|
||||
period: this.data[3].data.period,
|
||||
dateFromRisk: this.dateFrom,
|
||||
dateToRisk: this.dateTo,
|
||||
size: this.size,
|
||||
riskType: this.riskType,
|
||||
},
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
:options="options"
|
||||
:series="series"
|
||||
></apexchart>
|
||||
<div class="row">
|
||||
<div class="col-sm vp-align-right">
|
||||
<div class="vp-text-align-center">
|
||||
<div class="vp-align-right vp-inline-block">
|
||||
<button
|
||||
@click="onClickDrillDown()"
|
||||
type="button"
|
||||
@@ -69,7 +69,7 @@
|
||||
><span class="vp-padding-l10">{{ $t("ID_DRILL") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm">
|
||||
<div class="vp-inline-block">
|
||||
<button @click="onClickData()" type="button" class="btn btn-primary">
|
||||
<i class="fas fa-th"></i
|
||||
><span class="vp-padding-l10">{{ $t("ID_DATA") }}</span>
|
||||
@@ -100,10 +100,10 @@ export default {
|
||||
return {
|
||||
dateFrom: this.data[3]
|
||||
? this.data[3].data.dateFrom
|
||||
: moment().format("YYYY-MM-DD"),
|
||||
: moment().subtract(30, "d").format("YYYY-MM-DD"),
|
||||
dateTo: this.data[3]
|
||||
? 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",
|
||||
periodOptions: [
|
||||
{ text: this.$t("ID_DAY"), value: "day" },
|
||||
@@ -187,8 +187,8 @@ export default {
|
||||
dt = {
|
||||
processId: this.data[2].id,
|
||||
caseList: this.data[1].id.toLowerCase(),
|
||||
dateFrom: moment(this.dateFrom).format("DD/MM/YYYY"),
|
||||
dateTo: moment(this.dateTo).format("DD/MM/YYYY"),
|
||||
dateFrom: moment(this.dateFrom).format("YYYY-MM-DD"),
|
||||
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
|
||||
groupBy: this.period,
|
||||
};
|
||||
Api.process
|
||||
@@ -338,5 +338,9 @@ export default {
|
||||
.vp-padding-l20 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.vp-text-align-center {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
|
||||
@@ -233,7 +233,6 @@
|
||||
@postNotes="onPostNotes"
|
||||
></ModalComments>
|
||||
<ModalClaimCase ref="modal-claim-case"></ModalClaimCase>
|
||||
<ModalPauseCase ref="modal-pause-case"></ModalPauseCase>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -251,7 +250,6 @@ import MultiviewHeader from "../../components/headers/MultiviewHeader.vue";
|
||||
import VueCardView from "../../components/dataViews/vueCardView/VueCardView.vue";
|
||||
import VueListView from "../../components/dataViews/vueListView/VueListView.vue";
|
||||
import defaultMixins from "./defaultMixins";
|
||||
import ModalPauseCase from '../modal/ModalPauseCase.vue';
|
||||
import ModalComments from "../modal/ModalComments.vue";
|
||||
import { Event } from 'vue-tables-2';
|
||||
import CurrentUserCell from "../../components/vuetable/CurrentUserCell.vue";
|
||||
@@ -270,7 +268,6 @@ export default {
|
||||
MultiviewHeader,
|
||||
VueCardView,
|
||||
VueListView,
|
||||
ModalPauseCase,
|
||||
CurrentUserCell,
|
||||
ModalComments
|
||||
},
|
||||
@@ -680,14 +677,6 @@ export default {
|
||||
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
|
||||
* @param {object} data
|
||||
@@ -705,13 +694,6 @@ export default {
|
||||
that.openComments(data);
|
||||
}
|
||||
},
|
||||
pause: {
|
||||
name: "pause case",
|
||||
icon: "far fa-pause-circle",
|
||||
fn: function() {
|
||||
that.showModalPause(data);
|
||||
}
|
||||
},
|
||||
claim: {
|
||||
name: "claim case",
|
||||
icon: "fas fa-briefcase",
|
||||
|
||||
@@ -49,6 +49,12 @@ export default {
|
||||
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}`;
|
||||
}
|
||||
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(() => {
|
||||
let that = this;
|
||||
|
||||
@@ -1496,8 +1496,8 @@ class Derivation
|
||||
if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && !empty(trim($tasGroupVariable))) {
|
||||
$nextTaskGroupVariable = trim($tasGroupVariable, " @#");
|
||||
|
||||
if (isset($oldFields["APP_DATA"][$nextTaskGroupVariable])) {
|
||||
$dataVariable = $oldFields["APP_DATA"][$nextTaskGroupVariable];
|
||||
if (isset($currentFields["APP_DATA"][$nextTaskGroupVariable])) {
|
||||
$dataVariable = $currentFields["APP_DATA"][$nextTaskGroupVariable];
|
||||
$dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable);
|
||||
|
||||
if (!empty($dataVariable)) {
|
||||
@@ -1512,7 +1512,7 @@ class Derivation
|
||||
}
|
||||
}
|
||||
// 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['USR_UID'] = $subProcessInfo['USR_UID'];
|
||||
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $newCase['INDEX']);
|
||||
|
||||
@@ -4200,6 +4200,20 @@ class WorkspaceTools
|
||||
APP_STATUS_ID = 0");
|
||||
$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
|
||||
CLI::logging("-> Populating APPLICATION.APP_FINISH_DATE \n");
|
||||
$con->begin();
|
||||
|
||||
@@ -10,6 +10,7 @@ use ProcessMaker\ChangeLog\ChangeLog;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
use ProcessMaker\Core\JobsManager;
|
||||
use ProcessMaker\Core\System;
|
||||
use ProcessMaker\Model\Application;
|
||||
use ProcessMaker\Model\Delegation;
|
||||
|
||||
class WsBase
|
||||
@@ -3284,24 +3285,31 @@ class WsBase
|
||||
$_SESSION["INDEX"] = $delIndex;
|
||||
$_SESSION["USER_LOGGED"] = $userUid;
|
||||
|
||||
// Validate the appUid
|
||||
if (empty($caseUid)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " caseUid");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
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)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " delIndex");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
}
|
||||
// Validate the user
|
||||
if (empty($userUid)) {
|
||||
$result = new WsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
return $result;
|
||||
@@ -3322,6 +3330,7 @@ class WsBase
|
||||
$g->sessionVarRestore();
|
||||
return $result;
|
||||
}
|
||||
// Review the unpaused date
|
||||
if (strlen($unpauseDate) >= 10) {
|
||||
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");
|
||||
|
||||
@@ -89,7 +89,7 @@ class AppDelegation extends BaseAppDelegation
|
||||
$record = $rsCriteria->getRow();
|
||||
|
||||
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;
|
||||
$flagPrevious = false;
|
||||
}
|
||||
|
||||
@@ -148,9 +148,9 @@ class ListMyInbox extends BaseListMyInbox implements ListInterface
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
$data['DEL_CURRENT_USR_UID'] = $data['USR_UID'];
|
||||
$data['DEL_CURRENT_USR_USERNAME'] = $aRow['USR_USERNAME'];
|
||||
$data['DEL_CURRENT_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
|
||||
$data['DEL_CURRENT_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
|
||||
$data['DEL_CURRENT_USR_USERNAME'] = is_array($aRow) ? $aRow['USR_USERNAME'] : '';
|
||||
$data['DEL_CURRENT_USR_FIRSTNAME'] = is_array($aRow) ? $aRow['USR_FIRSTNAME'] : '';
|
||||
$data['DEL_CURRENT_USR_LASTNAME'] = is_array($aRow) ? $aRow['USR_LASTNAME'] : '';
|
||||
|
||||
if ($data['DEL_INDEX'] == 1 && $data['APP_STATUS'] == 'TO_DO') {
|
||||
$data['APP_CREATE_DATE'] = $data['APP_UPDATE_DATE'];
|
||||
|
||||
@@ -7049,6 +7049,12 @@ msgstr "Down Trigger"
|
||||
msgid "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
|
||||
# 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."
|
||||
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
|
||||
# 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_DOWN_TRIGGER','en','Down Trigger','2015-02-20') ,
|
||||
( '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_DRILL_DOWN_NAVIGATOR','en','Drill Down Navigator','2020-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_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_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_REASSIGN','en','Do not reassign','2014-01-15') ,
|
||||
( 'LABEL','ID_NO_RECORDS','en','No records','2014-01-15') ,
|
||||
|
||||
@@ -732,8 +732,12 @@ class Ajax
|
||||
}
|
||||
// End save
|
||||
|
||||
$case = new Cases();
|
||||
$case->pauseCase($appUid, $delIndex, $_SESSION['USER_LOGGED'], $unpauseDate);
|
||||
$case = new WsBase();
|
||||
$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();
|
||||
$caseData = $app->load($appUid);
|
||||
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
|
||||
|
||||
@@ -360,7 +360,7 @@ class ActionsByEmail
|
||||
if ($data[$index]['ABE_MAILSERVER_OR_MAILCURRENT'] == 0) {
|
||||
$delegation = new AppDelegation();
|
||||
$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']);
|
||||
$data[$index]['USER'] = $res->TAS_TITLE . ' (' . $previousTask['TAS_TYPE'] . ')';
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ class Draft extends AbstractCases
|
||||
{
|
||||
$query = Application::query()->select(['APPLICATION.APP_NUMBER']);
|
||||
// Add the initial scope for draft cases for specific user
|
||||
$query->draft($this->getUserUid());
|
||||
$query->draft($this->getUserId());
|
||||
// Get only one case
|
||||
$query->limit(1);
|
||||
// Get result
|
||||
|
||||
@@ -14,6 +14,7 @@ class Application extends Model
|
||||
public $timestamps = false;
|
||||
// Status id
|
||||
const STATUS_DRAFT = 1;
|
||||
const STATUS_DRAFT_NAME = 'DRAFT';
|
||||
const STATUS_TODO = 2;
|
||||
const STATUS_COMPLETED = 3;
|
||||
const STATUS_CANCELED = 4;
|
||||
@@ -52,13 +53,13 @@ class Application extends Model
|
||||
* Scope for query to get the creator
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $usrUid
|
||||
* @param int $usrId
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $user
|
||||
* @param int $user
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
|
||||
@@ -46,7 +46,8 @@ class Metrics extends Api
|
||||
*/
|
||||
public function getProcessTotalCases($caseList, $category = null, $topTen = false, $processes = [])
|
||||
{
|
||||
$usrId = $this->getUserId();
|
||||
$usrUid = $this->getUserId();
|
||||
$usrId = !empty($usrUid) ? User::getId($usrUid) : 0;
|
||||
try {
|
||||
switch ($caseList) {
|
||||
case 'inbox':
|
||||
@@ -60,6 +61,7 @@ class Metrics extends Api
|
||||
break;
|
||||
case 'unassigned':
|
||||
$list = new Unassigned();
|
||||
$list->setUserUid($usrUid);
|
||||
break;
|
||||
}
|
||||
$list->setUserId($usrId);
|
||||
@@ -89,7 +91,8 @@ class Metrics extends Api
|
||||
*/
|
||||
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 {
|
||||
switch ($caseList) {
|
||||
case 'inbox':
|
||||
@@ -103,6 +106,7 @@ class Metrics extends Api
|
||||
break;
|
||||
case 'unassigned':
|
||||
$list = new Unassigned();
|
||||
$list->setUserUid($usrUid);
|
||||
break;
|
||||
}
|
||||
$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)
|
||||
{
|
||||
try {
|
||||
$usrId = $this->getUserId();
|
||||
$usrUid = $this->getUserId();
|
||||
$usrId = !empty($usrUid) ? User::getId($usrUid) : 0;
|
||||
switch ($caseList) {
|
||||
case 'inbox':
|
||||
$list = new Inbox();
|
||||
@@ -192,6 +197,7 @@ class Metrics extends Api
|
||||
break;
|
||||
case 'unassigned':
|
||||
$list = new Unassigned();
|
||||
$list->setUserUid($usrUid);
|
||||
break;
|
||||
}
|
||||
$list->setUserId($usrId);
|
||||
|
||||
Reference in New Issue
Block a user