fix conflicts

This commit is contained in:
Rodrigo Quelca
2021-09-24 19:07:16 +00:00
14 changed files with 249 additions and 66 deletions

View File

@@ -1,18 +1,18 @@
<template> <template>
<nav aria-label="breadcrumb"> <nav>
<ol class="vp-breadcrumb"> <ol class="vp-breadcrumb">
<li <li
v-for="item in formatOptions(options)" v-for="item in formatOptions(options)"
:key="item.label" :key="item.label"
:class="item.classObject" :class="item.classObject"
> >
<span v-if="item.classObject.active === true">{{ item.label }}</span> <span v-if="item.data.color">
<a <div
v-if="item.classObject.active === false" class="vp-color-breadcrumb"
href="#" :style="{ backgroundColor: item.data.color }"
@click="item.onClick" ></div
>{{ item.label }}</a ></span>
> <span>{{ item.label }}</span>
</li> </li>
<div <div
v-for="item in settings" v-for="item in settings"
@@ -49,13 +49,13 @@ export default {
for (let i = 0; i <= options.length - 1; i++) { for (let i = 0; i <= options.length - 1; i++) {
if (i === options.length - 1) { if (i === options.length - 1) {
options[i].classObject = { options[i].classObject = {
"breadcrumb-item": true, "vp-breadcrumb-item": true,
active: true, active: true,
"vp-inline-block": true, "vp-inline-block": true,
}; };
} else { } else {
options[i].classObject = { options[i].classObject = {
"breadcrumb-item": true, "vp-breadcrumb-item": true,
active: false, active: false,
"vp-inline-block": true, "vp-inline-block": true,
}; };
@@ -75,18 +75,32 @@ export default {
} }
.vp-bread-crumbs-settings { .vp-bread-crumbs-settings {
line-height: 20px; line-height: 40px;
font-size: 18px;
padding-right: 10px;
} }
.vp-breadcrumb { .vp-breadcrumb {
padding: 0.75rem 1rem;
margin-bottom: 1rem; margin-bottom: 1rem;
list-style: none; list-style: none;
background-color: #e9ecef; background-color: #e9ecef;
border-radius: 0.25rem; border-radius: 0.25rem;
line-height: 40px;
height: 40px;
} }
.vp-inline-block { .vp-inline-block {
display: inline-block; display: inline-block;
} }
.vp-breadcrumb-item {
color: grey;
padding-right: 35px;
}
.vp-color-breadcrumb {
height: 10px;
width: 10px;
display: inline-block;
}
</style> </style>

View File

@@ -4,7 +4,9 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
typeView: "GRID", typeView: this.data.settings.view && this.data.settings.view.typeView
? this.data.settings.view.typeView
: "GRID",
random: 1, random: 1,
dataCasesList: [], dataCasesList: [],
defaultColumns: [ defaultColumns: [
@@ -24,6 +26,9 @@ export default {
title: "Grid", title: "Grid",
onClick(action) { onClick(action) {
that.typeView = "GRID"; that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-table", icon: "fas fa-table",
}, },
@@ -32,6 +37,9 @@ export default {
title: "List", title: "List",
onClick(action) { onClick(action) {
that.typeView = "LIST"; that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-list", icon: "fas fa-list",
}, },
@@ -40,6 +48,9 @@ export default {
title: "Card", title: "Card",
onClick(action) { onClick(action) {
that.typeView = "CARD"; that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-th", icon: "fas fa-th",
}, },
@@ -81,36 +92,36 @@ export default {
getCases(data) { getCases(data) {
let that = this, let that = this,
dt, dt,
typeList = that.data.pageParent == "inbox"? "todo": that.data.pageParent, typeList = that.data.pageParent == "inbox" ? "todo" : that.data.pageParent,
start = 0, start = 0,
paged, paged,
limit = data.limit, limit = data.limit,
filters = {}, filters = {},
id = this.data.customListId; id = this.data.customListId;
filters = { filters = {
paged: paged, paged: paged,
limit: limit, limit: limit,
offset: start, offset: start,
}; };
if (_.isEmpty(that.filters) && this.data.settings) { if (_.isEmpty(that.filters) && this.data.settings) {
_.forIn(this.data.settings.filters, function(item, key) { _.forIn(this.data.settings.filters, function (item, key) {
if (filters && item.value) { if (filters && item.value) {
filters[item.filterVar] = item.value; filters[item.filterVar] = item.value;
} }
}); });
} else { } else {
_.forIn(this.filters, function(item, key) { _.forIn(this.filters, function (item, key) {
if (filters && item.value) { if (filters && item.value) {
filters[item.filterVar] = item.value; filters[item.filterVar] = item.value;
} }
}); });
} }
return new Promise((resolutionFunc, rejectionFunc) => { return new Promise((resolutionFunc, rejectionFunc) => {
api.custom[that.data.pageParent] api.custom[that.data.pageParent]
({ ({
id, id,
filters, filters,
}) })
.then((response) => { .then((response) => {
dt = that.formatDataResponse(response.data.data); dt = that.formatDataResponse(response.data.data);
resolutionFunc({ resolutionFunc({
@@ -129,7 +140,7 @@ export default {
getCasesViewMore(data) { getCasesViewMore(data) {
let that = this, let that = this,
dt, dt,
typeList = that.data.pageParent == "inbox"? "todo": that.data.pageParent, typeList = that.data.pageParent == "inbox" ? "todo" : that.data.pageParent,
limit = data.limit, limit = data.limit,
start = data.page === 1 ? 0 : limit * (data.page - 1), start = data.page === 1 ? 0 : limit * (data.page - 1),
filters = {}; filters = {};
@@ -213,6 +224,20 @@ export default {
} }
return { value, key: value } return { value, key: value }
}); });
},
/**
* Update settings for user
* @param {string} key
* @param {*} data
*/
updateRootSettings(key, data) {
this.$emit("updateSettings", {
data: data,
key: key,
page: this.data.pageParent,
type: "custom",
id: this.data.customListId
});
} }
} }
} }

View File

@@ -3,7 +3,9 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
typeView: "GRID", typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1, random: 1,
dataMultiviewHeader: { dataMultiviewHeader: {
actions: [ actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid", title: "Grid",
onClick(action) { onClick(action) {
that.typeView = "GRID"; that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-table", icon: "fas fa-table",
}, },
@@ -20,6 +25,9 @@ export default {
title: "List", title: "List",
onClick(action) { onClick(action) {
that.typeView = "LIST"; that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-list", icon: "fas fa-list",
}, },
@@ -28,6 +36,9 @@ export default {
title: "Card", title: "Card",
onClick(action) { onClick(action) {
that.typeView = "CARD"; that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-th", icon: "fas fa-th",
}, },
@@ -35,7 +46,7 @@ export default {
}, },
optionsVueView: { optionsVueView: {
limit: 10, limit: 10,
dblClick:(event, item, options)=>{ dblClick: (event, item, options) => {
this.openCase(item); this.openCase(item);
}, },
headings: { headings: {
@@ -135,11 +146,11 @@ export default {
* @param {*} headings * @param {*} headings
* @returns * @returns
*/ */
formatColumnSettings(headings) { formatColumnSettings(headings) {
let res=[]; let res = [];
_.forEach(headings, function(value, key) { _.forEach(headings, function (value, key) {
if(key != "actions"){ if (key != "actions") {
res.push({value,key}); res.push({ value, key });
} }
}); });
return res; return res;
@@ -160,11 +171,25 @@ export default {
*/ */
onUpdateColumnSettings(columns) { onUpdateColumnSettings(columns) {
let cols = columns; let cols = columns;
if(_.findIndex(cols, 'actions') == -1){ if (_.findIndex(cols, 'actions') == -1) {
cols.push("actions"); cols.push("actions");
} }
this.columns = cols; this.columns = cols;
this.random = _.random(0, 10000000000); this.random = _.random(0, 10000000000);
},
/**
* Update settings for user
* @param {string} key
* @param {*} data
*/
updateRootSettings(key, data) {
this.$emit("updateSettings", {
data: data,
key: key,
page: "draft",
type: "normal",
id: this.id
});
} }
} }
} }

View File

@@ -422,6 +422,7 @@ export default {
this.page = "custom-case-list"; this.page = "custom-case-list";
if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) { if (this.config.setting[item.item.page] && this.config.setting[item.item.page]["customCaseList"]) {
this.pageData.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id]; this.pageData.settings = this.config.setting[item.item.page]["customCaseList"][item.item.id];
this.settings = this.pageData.settings;
} else { } else {
this.pageData.settings = {}; this.pageData.settings = {};
} }

View File

@@ -4,7 +4,9 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
typeView: "GRID", typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1, random: 1,
dataMultiviewHeader: { dataMultiviewHeader: {
actions: [ actions: [
@@ -13,6 +15,9 @@ export default {
title: "Grid", title: "Grid",
onClick(action) { onClick(action) {
that.typeView = "GRID"; that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-table", icon: "fas fa-table",
}, },
@@ -21,6 +26,9 @@ export default {
title: "List", title: "List",
onClick(action) { onClick(action) {
that.typeView = "LIST"; that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-list", icon: "fas fa-list",
}, },
@@ -29,6 +37,9 @@ export default {
title: "Card", title: "Card",
onClick(action) { onClick(action) {
that.typeView = "CARD"; that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-th", icon: "fas fa-th",
}, },
@@ -167,6 +178,20 @@ export default {
} }
this.columns = cols; this.columns = cols;
this.random = _.random(0, 10000000000); this.random = _.random(0, 10000000000);
},
/**
* Update settings for user
* @param {string} key
* @param {*} data
*/
updateRootSettings(key, data) {
this.$emit("updateSettings", {
data: data,
key: key,
page: "inbox",
type: "normal",
id: this.id
});
} }
} }
} }

View File

@@ -3,7 +3,9 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
typeView: "GRID", typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1, random: 1,
dataMultiviewHeader: { dataMultiviewHeader: {
actions: [ actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid", title: "Grid",
onClick(action) { onClick(action) {
that.typeView = "GRID"; that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-table", icon: "fas fa-table",
}, },
@@ -20,6 +25,9 @@ export default {
title: "List", title: "List",
onClick(action) { onClick(action) {
that.typeView = "LIST"; that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-list", icon: "fas fa-list",
}, },
@@ -28,6 +36,9 @@ export default {
title: "Card", title: "Card",
onClick(action) { onClick(action) {
that.typeView = "CARD"; that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-th", icon: "fas fa-th",
}, },
@@ -35,7 +46,7 @@ export default {
}, },
optionsVueView: { optionsVueView: {
limit: 10, limit: 10,
dblClick:(event, item, options)=>{ dblClick: (event, item, options) => {
this.openCase(item); this.openCase(item);
}, },
headings: { headings: {
@@ -137,10 +148,10 @@ export default {
* @returns * @returns
*/ */
formatColumnSettings(headings) { formatColumnSettings(headings) {
let res=[]; let res = [];
_.forEach(headings, function(value, key) { _.forEach(headings, function (value, key) {
if(key != "actions"){ if (key != "actions") {
res.push({value,key}); res.push({ value, key });
} }
}); });
return res; return res;
@@ -161,11 +172,25 @@ export default {
*/ */
onUpdateColumnSettings(columns) { onUpdateColumnSettings(columns) {
let cols = columns; let cols = columns;
if(_.findIndex(cols, 'actions') == -1){ if (_.findIndex(cols, 'actions') == -1) {
cols.push("actions"); cols.push("actions");
} }
this.columns = cols; this.columns = cols;
this.random = _.random(0, 10000000000); this.random = _.random(0, 10000000000);
},
/**
* Update settings for user
* @param {string} key
* @param {*} data
*/
updateRootSettings(key, data) {
this.$emit("updateSettings", {
data: data,
key: key,
page: "paused",
type: "normal",
id: this.id
});
} }
} }
} }

View File

@@ -1,7 +1,7 @@
<template> <template>
<div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block"> <div id="v-pm-charts" ref="v-pm-charts" class="v-pm-charts vp-inline-block">
<div class="p-1 v-flex"> <div class="p-1 v-flex">
<h6 class="v-search-title">{{$t("ID_DRILL_DOWN_NUMBER_TASKS")}}</h6> <h6 class="v-search-title">{{ $t("ID_DRILL_DOWN_NUMBER_TASKS") }}</h6>
<BreadCrumb :options="breadCrumbs.data" :settings="settingsBreadcrumbs" /> <BreadCrumb :options="breadCrumbs.data" :settings="settingsBreadcrumbs" />
<apexchart <apexchart
v-show="typeView === 'donut'" v-show="typeView === 'donut'"
@@ -85,6 +85,7 @@ export default {
id: that.currentSelection["List Name"], id: that.currentSelection["List Name"],
name: that.currentSelection["List Name"], name: that.currentSelection["List Name"],
level: 1, level: 1,
color: that.formatColor(that.currentSelection["Color"]),
data: that.currentSelection, data: that.currentSelection,
}); });
}, },
@@ -230,6 +231,29 @@ export default {
}, },
]); ]);
}, },
/**
* Format color for show in breadcrumb
* @param {string} color
* @returns {string}
*/
formatColor(color) {
let code = "#ffffff";
switch (color) {
case "green":
code = "#179a6e";
break;
case "yellow":
code = "#feb019";
break;
case "blue":
code = "#008ffb";
break;
case "gray":
code = "#8f99a0";
break;
}
return code;
},
}, },
}; };
</script> </script>

View File

@@ -106,13 +106,10 @@ export default {
onClick() { onClick() {
this.$emit("onChangeLevel", el); this.$emit("onChangeLevel", el);
}, },
data: el,
}); });
} }
}); });
res.push({
label: this.$t("ID_SELECT"),
onClick() {},
});
switch (this.level) { switch (this.level) {
case 0: case 0:
return { return {

View File

@@ -3,7 +3,9 @@ export default {
data() { data() {
let that = this; let that = this;
return { return {
typeView: "GRID", typeView: this.settings.view && this.settings.view.typeView
? this.settings.view.typeView
: "GRID",
random: 1, random: 1,
dataMultiviewHeader: { dataMultiviewHeader: {
actions: [ actions: [
@@ -12,6 +14,9 @@ export default {
title: "Grid", title: "Grid",
onClick(action) { onClick(action) {
that.typeView = "GRID"; that.typeView = "GRID";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-table", icon: "fas fa-table",
}, },
@@ -20,6 +25,9 @@ export default {
title: "List", title: "List",
onClick(action) { onClick(action) {
that.typeView = "LIST"; that.typeView = "LIST";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-list", icon: "fas fa-list",
}, },
@@ -28,6 +36,9 @@ export default {
title: "Card", title: "Card",
onClick(action) { onClick(action) {
that.typeView = "CARD"; that.typeView = "CARD";
that.updateRootSettings("view", {
typeView: that.typeView
});
}, },
icon: "fas fa-th", icon: "fas fa-th",
}, },
@@ -35,7 +46,7 @@ export default {
}, },
optionsVueList: { optionsVueList: {
limit: 10, limit: 10,
dblClick:(event, item, options)=>{ dblClick: (event, item, options) => {
this.openCase(item); this.openCase(item);
}, },
headings: { headings: {
@@ -137,10 +148,10 @@ export default {
* @returns * @returns
*/ */
formatColumnSettings(headings) { formatColumnSettings(headings) {
let res=[]; let res = [];
_.forEach(headings, function(value, key) { _.forEach(headings, function (value, key) {
if(key != "actions"){ if (key != "actions") {
res.push({value,key}); res.push({ value, key });
} }
}); });
return res; return res;
@@ -161,11 +172,25 @@ export default {
*/ */
onUpdateColumnSettings(columns) { onUpdateColumnSettings(columns) {
let cols = columns; let cols = columns;
if(_.findIndex(cols, 'actions') == -1){ if (_.findIndex(cols, 'actions') == -1) {
cols.push("actions"); cols.push("actions");
} }
this.columns = cols; this.columns = cols;
this.random = _.random(0, 10000000000); this.random = _.random(0, 10000000000);
},
/**
* Update settings for user
* @param {string} key
* @param {*} data
*/
updateRootSettings(key, data) {
this.$emit("updateSettings", {
data: data,
key: key,
page: "unassigned",
type: "normal",
id: this.id
});
} }
} }
} }

View File

@@ -933,8 +933,8 @@ class Language extends BaseLanguage
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC); $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next(); $oDataset->next();
$aRow = $oDataset->getRow(); $aRow = $oDataset->getRow();
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
if (is_array($aRow)) { if (is_array($aRow)) {
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
return $aRow; return $aRow;
} else { } else {
throw (new Exception("The language '$langId' doesn\'t exist!")); throw (new Exception("The language '$langId' doesn\'t exist!"));

View File

@@ -215,7 +215,7 @@ class StepTrigger extends BaseStepTrigger
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC ); $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next(); $oDataset->next();
$aRow = $oDataset->getRow(); $aRow = $oDataset->getRow();
if ((int)$aRow['ST_POSITION'] > 1 ) { if (is_array($aRow) && (int) $aRow['ST_POSITION'] > 1) {
$rowNro = 1; $rowNro = 1;
while ($aRow = $oDataset->getRow()) { while ($aRow = $oDataset->getRow()) {
$oStep = StepTriggerPeer::retrieveByPK( $aRow['STEP_UID'], $aRow['TAS_UID'], $aRow['TRI_UID'], $aRow['ST_TYPE'] ); $oStep = StepTriggerPeer::retrieveByPK( $aRow['STEP_UID'], $aRow['TAS_UID'], $aRow['TRI_UID'], $aRow['ST_TYPE'] );

View File

@@ -195,6 +195,9 @@ class Users extends BaseUsers
$role = $roles->loadByCode($aFields['USR_ROLE']); $role = $roles->loadByCode($aFields['USR_ROLE']);
$aFields['USR_ROLE_NAME'] = $role['ROL_NAME']; $aFields['USR_ROLE_NAME'] = $role['ROL_NAME'];
if (empty($aFields['USR_DEFAULT_LANG'])) {
$aFields['USR_DEFAULT_LANG'] = 'en';
}
$translations = new Language(); $translations = new Language();
$translation = $translations->loadByCode($aFields['USR_DEFAULT_LANG']); $translation = $translations->loadByCode($aFields['USR_DEFAULT_LANG']);
$aFields['USR_DEFAULT_LANG_NAME'] = $translation['LANGUAGE_NAME']; $aFields['USR_DEFAULT_LANG_NAME'] = $translation['LANGUAGE_NAME'];

View File

@@ -202,7 +202,8 @@
<b-form-group :label="$root.translation('ID_DEFAULT_MAIN_MENU_OPTION')"> <b-form-group :label="$root.translation('ID_DEFAULT_MAIN_MENU_OPTION')">
<b-form-select v-model="form.PREF_DEFAULT_MENUSELECTED" <b-form-select v-model="form.PREF_DEFAULT_MENUSELECTED"
:options="defaultMainMenuOptionList" :options="defaultMainMenuOptionList"
:disabled="disabledField.PREF_DEFAULT_MENUSELECTED"/> :disabled="disabledField.PREF_DEFAULT_MENUSELECTED"
@change="changeDefaultMainMenuOption"/>
</b-form-group> </b-form-group>
</b-col> </b-col>
<b-col cols="2"> <b-col cols="2">
@@ -211,7 +212,7 @@
<b-form-group :label="$root.translation('ID_DEFAULT_CASES_MENU_OPTION')"> <b-form-group :label="$root.translation('ID_DEFAULT_CASES_MENU_OPTION')">
<b-form-select v-model="form.PREF_DEFAULT_CASES_MENUSELECTED" <b-form-select v-model="form.PREF_DEFAULT_CASES_MENUSELECTED"
:options="defaultCasesMenuOptionList" :options="defaultCasesMenuOptionList"
:disabled="disabledField.PREF_DEFAULT_CASES_MENUSELECTED"/> :disabled="disabledField.PREF_DEFAULT_CASES_MENUSELECTED || switchChangeDefaultMainMenuOption"/>
</b-form-group> </b-form-group>
</b-col> </b-col>
<b-col cols="1"> <b-col cols="1">
@@ -458,7 +459,9 @@
}, },
permission: {}, permission: {},
classCustom: "", classCustom: "",
classCustom2: "" classCustom2: "",
switchChangeDefaultMainMenuOption: true,
memoryChangeDefaultMainMenuOption: ""
}; };
}, },
mounted() { mounted() {
@@ -835,6 +838,8 @@
text: response.data.user.REPLACED_NAME text: response.data.user.REPLACED_NAME
}]; }];
} }
//for Default Cases Menu option
this.changeDefaultMainMenuOption();
} }
}) })
.catch(error => { .catch(error => {
@@ -1158,6 +1163,20 @@
}, },
changeRole() { changeRole() {
this.getUserExtendedAttributesList(); this.getUserExtendedAttributesList();
},
changeDefaultMainMenuOption() {
let isPmCases = this.form.PREF_DEFAULT_MENUSELECTED === "PM_CASES";
//disable PREF_DEFAULT_CASES_MENUSELECTED
this.switchChangeDefaultMainMenuOption = !isPmCases;
//remember PREF_DEFAULT_CASES_MENUSELECTED
if (isPmCases && this.form.PREF_DEFAULT_CASES_MENUSELECTED !== "") {
this.memoryChangeDefaultMainMenuOption = this.form.PREF_DEFAULT_CASES_MENUSELECTED;
}
//restore
this.form.PREF_DEFAULT_CASES_MENUSELECTED = isPmCases ? this.memoryChangeDefaultMainMenuOption : "";
} }
} }
} }