Merged in release/3.7.0 (pull request #8266)

release/3.7.0

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2021-11-09 20:47:41 +00:00
committed by Julio Cesar Laura Avendaño
10 changed files with 43 additions and 11 deletions

View File

@@ -104,7 +104,7 @@
></attached-documents-edit> ></attached-documents-edit>
</div> </div>
</div> </div>
<ModalClaimCase ref="modal-claim-case"></ModalClaimCase> <ModalClaimCase ref="modal-claim-case" @claimCatch="claimCatch"></ModalClaimCase>
</div> </div>
</template> </template>
@@ -640,6 +640,12 @@ export default {
console.error(e); console.error(e);
}); });
}, },
/**
* Claim catch error handler message
*/
claimCatch(message) {
this.showAlert(message, "danger");
}
}, },
}; };
</script> </script>

View File

@@ -144,6 +144,9 @@ export default {
toolbar: { toolbar: {
show: true, show: true,
}, },
export: {
csv: false
},
events: { events: {
click: function (event, chartContext, config) { click: function (event, chartContext, config) {
that.$refs.popover.$emit("close"); that.$refs.popover.$emit("close");
@@ -492,5 +495,8 @@ export default {
padding-top: 10px; padding-top: 10px;
text-align: end; text-align: end;
} }
.apexcharts-menu-item.exportCSV{
display: none !important;
}
</style> </style>
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style> <style src="vue-multiselect/dist/vue-multiselect.min.css"></style>

View File

@@ -251,7 +251,7 @@ export default {
let taskList = this.data[1].id.toLowerCase(), let taskList = this.data[1].id.toLowerCase(),
obj = [ obj = [
{ {
autoshow: false, autoShow: false,
fieldId: "processName", fieldId: "processName",
filterVar: "process", filterVar: "process",
label: "", label: "",
@@ -342,5 +342,9 @@ export default {
.vp-text-align-center { .vp-text-align-center {
text-align: center; text-align: center;
} }
.apexcharts-menu-item.exportCSV{
display: none !important;
}
</style> </style>
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style> <style src="vue-multiselect/dist/vue-multiselect.min.css"></style>

View File

@@ -78,6 +78,9 @@ export default {
}); });
eventBus.$emit("home-update-page", "XCase"); eventBus.$emit("home-update-page", "XCase");
} }
}).catch(function (error) {
that.$refs["modal-claim-case"].hide();
that.$emit("claimCatch", error.response.data.error.message);
}); });
}, },
}, },

View File

@@ -1134,6 +1134,13 @@ class Cases
if (empty($delegation['USR_UID'])) { if (empty($delegation['USR_UID'])) {
$case = new ClassesCases(); $case = new ClassesCases();
$case->loadCase($appUid); $case->loadCase($appUid);
//Review if the user can be claim the case
if (!$case->isSelfService($userUid, $delegation['TAS_UID'], $appUid)) {
$message = preg_replace("#<br\s*/?>#i", "", G::LoadTranslation("ID_NO_PERMISSION_NO_PARTICIPATED"));
throw new Exception($message);
}
$case->setCatchUser($appUid, $index, $userUid); $case->setCatchUser($appUid, $index, $userUid);
} else { } else {
throw new Exception(G::LoadTranslation("ID_CASE_USER_INVALID_CLAIM_CASE", [$userUid])); throw new Exception(G::LoadTranslation("ID_CASE_USER_INVALID_CLAIM_CASE", [$userUid]));

View File

@@ -274,11 +274,13 @@ class Home
$caseList = CaseList::where('CAL_TYPE', '=', $type) $caseList = CaseList::where('CAL_TYPE', '=', $type)
->where('CAL_ID', '=', $id) ->where('CAL_ID', '=', $id)
->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID') ->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID')
->join('PROCESS', 'PROCESS.PRO_UID', '=', 'ADDITIONAL_TABLES.PRO_UID')
->get() ->get()
->first(); ->first();
if (!empty($caseList)) { if (!empty($caseList)) {
$tableName = $caseList->ADD_TAB_NAME; $tableName = $caseList->ADD_TAB_NAME;
$proUid = $caseList->PRO_UID; $proUid = $caseList->PRO_UID;
$proId = $caseList->PRO_ID;
//this gets the configured columns //this gets the configured columns
$columns = json_decode($caseList->CAL_COLUMNS); $columns = json_decode($caseList->CAL_COLUMNS);
@@ -337,6 +339,7 @@ class Home
} }
}; };
} }
$arguments[1] = $proId;
} }
} }

View File

@@ -80,6 +80,7 @@ class Participated extends AbstractCases
if ($this->getTaskId()) { if ($this->getTaskId()) {
$queryTask = Delegation::query()->select('APP_NUMBER'); $queryTask = Delegation::query()->select('APP_NUMBER');
$queryTask->task($this->getTaskId()); $queryTask->task($this->getTaskId());
$queryTask->threadOpen();
$results = $queryTask->get(); $results = $queryTask->get();
$result = $results->values()->toArray(); $result = $results->values()->toArray();
// Filter the cases related to the specific task // Filter the cases related to the specific task

View File

@@ -1248,7 +1248,7 @@ class System
} }
$value = $config['at_risk_delegation_max_time']; $value = $config['at_risk_delegation_max_time'];
if ($value > 0 && $value < 1) { if ($value < 0 || $value > 1) {
$config['at_risk_delegation_max_time'] = self::$defaultConfig['at_risk_delegation_max_time']; $config['at_risk_delegation_max_time'] = self::$defaultConfig['at_risk_delegation_max_time'];
} }

View File

@@ -346,7 +346,7 @@ class Server implements iAuthenticate
$request = \OAuth2\Request::createFromGlobals(); $request = \OAuth2\Request::createFromGlobals();
$allowed = $this->server->verifyResourceRequest($request); $allowed = $this->server->verifyResourceRequest($request);
$token = $this->server->getAccessTokenData($request); $token = $this->server->getAccessTokenData($request);
self::$userId = $token['user_id']; self::$userId = !empty($token['user_id']) ? $token['user_id'] : '';
// Session handling to prevent session lose in other places like, home, admin, etc // Session handling to prevent session lose in other places like, home, admin, etc
// when user is using the new designer that have not session because it is using only the API // when user is using the new designer that have not session because it is using only the API
@@ -392,7 +392,7 @@ class Server implements iAuthenticate
->setSkin(SYS_SKIN) ->setSkin(SYS_SKIN)
->setLanguage(SYS_LANG); ->setLanguage(SYS_LANG);
if ($token['client_id'] === config('oauthClients.mobile.clientId')) { if (!empty($token['client_id']) && $token['client_id'] === config('oauthClients.mobile.clientId')) {
ChangeLog::getChangeLog() ChangeLog::getChangeLog()
->setSourceId(ChangeLog::FromMobile); ->setSourceId(ChangeLog::FromMobile);
} else { } else {

View File

@@ -584,12 +584,14 @@ Ext.onReady(function () {
} }
if (_nodeId != '') { if (_nodeId != '') {
treePanel1 = parent.Ext.getCmp('tree-panel'); if (parent.Ext) {
if (treePanel1) { treePanel1 = parent.Ext.getCmp('tree-panel');
node = treePanel1.getNodeById(_nodeId); if (treePanel1) {
} node = treePanel1.getNodeById(_nodeId);
if (node) { }
node.select(); if (node) {
node.select();
}
} }
} }