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

View File

@@ -144,6 +144,9 @@ export default {
toolbar: {
show: true,
},
export: {
csv: false
},
events: {
click: function (event, chartContext, config) {
that.$refs.popover.$emit("close");
@@ -492,5 +495,8 @@ export default {
padding-top: 10px;
text-align: end;
}
.apexcharts-menu-item.exportCSV{
display: none !important;
}
</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(),
obj = [
{
autoshow: false,
autoShow: false,
fieldId: "processName",
filterVar: "process",
label: "",
@@ -342,5 +342,9 @@ export default {
.vp-text-align-center {
text-align: center;
}
.apexcharts-menu-item.exportCSV{
display: none !important;
}
</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");
}
}).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'])) {
$case = new ClassesCases();
$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);
} else {
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)
->where('CAL_ID', '=', $id)
->join('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID')
->join('PROCESS', 'PROCESS.PRO_UID', '=', 'ADDITIONAL_TABLES.PRO_UID')
->get()
->first();
if (!empty($caseList)) {
$tableName = $caseList->ADD_TAB_NAME;
$proUid = $caseList->PRO_UID;
$proId = $caseList->PRO_ID;
//this gets the configured 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()) {
$queryTask = Delegation::query()->select('APP_NUMBER');
$queryTask->task($this->getTaskId());
$queryTask->threadOpen();
$results = $queryTask->get();
$result = $results->values()->toArray();
// Filter the cases related to the specific task

View File

@@ -1248,7 +1248,7 @@ class System
}
$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'];
}

View File

@@ -346,7 +346,7 @@ class Server implements iAuthenticate
$request = \OAuth2\Request::createFromGlobals();
$allowed = $this->server->verifyResourceRequest($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
// 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)
->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()
->setSourceId(ChangeLog::FromMobile);
} else {

View File

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