Merged in release/3.7.0 (pull request #8256)

release/3.7.0
This commit is contained in:
Paula Quispe
2021-11-03 22:08:49 +00:00
committed by Julio Cesar Laura Avendaño
6 changed files with 531 additions and 477 deletions

6
package-lock.json generated
View File

@@ -257,9 +257,9 @@
}
},
"apexcharts": {
"version": "3.28.1",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.28.1.tgz",
"integrity": "sha512-5M1KitI/XmY2Sx6ih9vQOXyQUTmotDG/cML2N6bkBlVseF10RPSzM7dkrf7Y68apSZF6e7J581gXXu1+qkLhCA==",
"version": "3.29.0",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-3.29.0.tgz",
"integrity": "sha512-PhI17VayidYAbLb5/g+7WOeirgFrVopzt0qGwLq8V+cd6NXx4CeHYq3S0pDZiUGO7UFQ4YIrT8+ie9/Fnler+w==",
"requires": {
"svg.draggable.js": "^2.2.2",
"svg.easing.js": "^2.0.0",

View File

@@ -23,7 +23,7 @@
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/vue-fontawesome": "^2.0.2",
"apexcharts": "^3.27.3",
"apexcharts": "^3.28.2",
"axios": "^0.15.3",
"bootstrap": "^4.5.3",
"bootstrap-colorpicker": "^3.0.3",

View File

@@ -1,7 +1,9 @@
<template>
<div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block">
<div class="p-1 v-flex">
<h6 class="v-search-title">{{ $t("ID_DRILL_DOWN_RISK_MATRIX") }}</h6>
<h6 class="v-search-title">
{{ $t("ID_DRILL_DOWN_RISK_MATRIX") }}
</h6>
<div>
<BreadCrumb
:options="dataBreadcrumbs()"
@@ -128,7 +130,9 @@ export default {
dateFrom:
this.data[3] && this.data[3].data.dateFrom
? this.data[3].data.dateFrom
: moment().subtract(30, "d").format("YYYY-MM-DD"),
: moment()
.subtract(30, "d")
.format("YYYY-MM-DD"),
dateTo:
this.data[3] && this.data[3].data.dateTo
? this.data[3].data.dateTo
@@ -137,7 +141,7 @@ export default {
size:
this.data[3] && this.data[3].data.size
? this.data[3].data.size
: { name: this.$t("ID_ALL"), id: "all" },
: { name: "20", id: "20" },
riskType:
this.data[3] && this.data[3].data.riskType
? this.data[3].data.riskType
@@ -150,11 +154,11 @@ export default {
},
],
sizeOptions: [
{ name: this.$t("ID_ALL"), id: "all" },
{ name: "5", id: "5" },
{ name: "10", id: "10" },
{ name: "15", id: "15" },
{ name: "20", id: "20" },
{ name: "30", id: "30" },
{ name: "40", id: "40" },
{ name: "50", id: "50" },
],
dataCasesByRisk: [],
width: 0,
@@ -169,8 +173,9 @@ export default {
},
id: "LevelThreeChart",
events: {
markerClick: function (event, chartContext, config) {
that.currentSelection = that.dataCasesByRisk[config.seriesIndex];
markerClick: function(event, chartContext, config) {
that.currentSelection =
that.dataCasesByRisk[config.seriesIndex];
that.onClickCaseMarker(that.currentSelection);
},
},
@@ -180,9 +185,11 @@ export default {
},
dataLabels: {
enabled: true,
formatter: function (val, opt) {
formatter: function(val, opt) {
if (that.dataCasesByRisk.length > 0) {
return that.dataCasesByRisk[opt["seriesIndex"]]["number_case"];
return that.dataCasesByRisk[opt["seriesIndex"]][
"number_case"
];
}
return "";
},
@@ -195,8 +202,18 @@ export default {
tickAmount: 7,
},
tooltip: {
custom: function ({ series, seriesIndex, dataPointIndex, w }) {
return that.customTooltip(series, seriesIndex, dataPointIndex, w);
custom: function({
series,
seriesIndex,
dataPointIndex,
w,
}) {
return that.customTooltip(
series,
seriesIndex,
dataPointIndex,
w
);
},
},
},
@@ -251,7 +268,9 @@ export default {
dateTo: moment(this.dateTo).format("YYYY-MM-DD"),
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("YYYY-MM-DD h:mm:ss a");
Api.process
.totalCasesByRisk(dt)
@@ -279,7 +298,13 @@ export default {
serie.push({
name: el["number_case"].toString(),
data: [
[moment(el["due_date"]).toDate().getTime(), el["days"], 20],
[
moment(el["due_date"])
.toDate()
.getTime(),
el["days"],
20,
],
],
});
break;
@@ -287,7 +312,13 @@ export default {
serie.push({
name: el["number_case"].toString(),
data: [
[moment(el["delegated"]).toDate().getTime(), -el["days"], 20],
[
moment(el["delegated"])
.toDate()
.getTime(),
-el["days"],
20,
],
],
});
break;
@@ -295,7 +326,13 @@ export default {
serie.push({
name: el["number_case"].toString(),
data: [
[moment(el["delegated"]).toDate().getTime(), -el["days"], 20],
[
moment(el["delegated"])
.toDate()
.getTime(),
-el["days"],
20,
],
],
});
break;
@@ -443,8 +480,12 @@ export default {
*/
showModalClaimCase(item) {
let that = this;
api.cases.open(_.extend({ ACTION: "unassigned" }, item)).then(() => {
api.cases.cases_open(_.extend({ ACTION: "todo" }, 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"].show();
});

View File

@@ -50,7 +50,8 @@ class AppDelegation extends BaseAppDelegation
{
try {
// This value needs to have a value like 0.x
$risk = 0.2;
$systemConfiguration = Bootstrap::getSystemConfiguration();
$risk = $systemConfiguration['at_risk_delegation_max_time'];
return $risk;
} catch (Exception $e) {

View File

@@ -278,6 +278,7 @@ class Home
->first();
if (!empty($caseList)) {
$tableName = $caseList->ADD_TAB_NAME;
$proUid = $caseList->PRO_UID;
//this gets the configured columns
$columns = json_decode($caseList->CAL_COLUMNS);
@@ -300,13 +301,18 @@ class Home
}
//this modifies the query
if (!empty($tableName) && !empty($fields)) {
$arguments[] = function ($query) use ($tableName, $fields, $customFilters, $types) {
if (!empty($tableName)) {
$arguments[] = function ($query) use ($tableName, $fields, $customFilters, $types, $proUid) {
//setting the related process
$query->where('PROCESS.PRO_UID', '=', $proUid);
//setting columns data from report table
$query->leftJoin($tableName, "{$tableName}.APP_UID", "=", "APP_DELEGATION.APP_UID");
foreach ($fields as $value) {
$query->addSelect($value);
}
//filters for custom case list
//setting filters for custom case list
foreach ($customFilters as $key => $filter) {
if (in_array($key, $fields)) {
//special case for date range

View File

@@ -84,7 +84,8 @@ class System
'report_table_double_number' => 4,
'ext_ajax_timeout' => 600000,
'disable_task_manager_routing_async' => '0',
'on_one_server_enable' => 0
'on_one_server_enable' => 0,
'at_risk_delegation_max_time' => '0.2',
];
/**
@@ -1246,6 +1247,11 @@ class System
$config['disable_task_manager_routing_async'] = self::$defaultConfig['disable_task_manager_routing_async'];
}
$value = $config['at_risk_delegation_max_time'];
if ($value > 0 && $value < 1) {
$config['at_risk_delegation_max_time'] = self::$defaultConfig['at_risk_delegation_max_time'];
}
return $config;
}