first commit

This commit is contained in:
Rodrigo Quelca
2021-08-27 14:37:31 +00:00
parent 86901512ff
commit 59317933d5
9 changed files with 84 additions and 28 deletions

View File

@@ -18,25 +18,56 @@ export let cases = {
keys: {} keys: {}
}); });
}, },
draft(data) { inbox(data) {
let service = "INBOX_LIST",
keys = {};
if (data && data.id) {
service = "INBOX_CUSTOM_LIST";
keys["id"] = data.id;
}
return Api.get({ return Api.get({
service: "DRAFT_LIST", service,
params: data.filters,
keys
});
},
draft(data) {
let service = "DRAFT_LIST",
keys = {};
if (data && data.id) {
service = "DRAFT_CUSTOM_LIST";
keys["id"] = data.id;
}
return Api.get({
service,
params: data, params: data,
keys: {} keys
}); });
}, },
paused(data) { paused(data) {
let service = "PAUSED_LIST",
keys = {};
if (data && data.id) {
service = "PAUSED_CUSTOM_LIST";
keys["id"] = data.id;
}
return Api.get({ return Api.get({
service: "PAUSED_LIST", service,
params: data, params: data,
keys: {} keys
}); });
}, },
unassigned(data) { unassigned(data) {
let service = "UNASSIGNED_LIST",
keys = {};
if (data && data.id) {
service = "UNASSIGNED_CUSTOM_LIST";
keys["id"] = data.id;
}
return Api.get({ return Api.get({
service: "UNASSIGNED_LIST", service,
params: data, params: data,
keys: {} keys
}); });
}, },
summary(data) { summary(data) {

View File

@@ -72,5 +72,9 @@
GET_CONFIG: "/home/config/{id}/{name}", GET_CONFIG: "/home/config/{id}/{name}",
PAUSE_CASE: "/cases/{app_uid}/pause", PAUSE_CASE: "/cases/{app_uid}/pause",
REASSIGN_CASE: "/cases/{app_uid}/reassign-case", REASSIGN_CASE: "/cases/{app_uid}/reassign-case",
REASSIGN_USERS: "/light/userstoreassign/{task_uid}" REASSIGN_USERS: "/light/userstoreassign/{task_uid}",
INBOX_CUSTOM_LIST: "/home/inbox/{id}",
DRAFT_CUSTOM_LIST: "/home/draft/{id}",
PAUSED_CUSTOM_LIST: "/home/paused/{id}",
UNASSIGNED_CUSTOM_LIST: "/home/unassigned/{id}"
}; };

View File

@@ -5,7 +5,7 @@
:title="labelTooltip" :title="labelTooltip"
> >
{{ data.title }} {{ data.title }}
<b-tooltip :target="`label-${data.id}`" :ref="`tooltip-${data.id}`"> <b-tooltip :target="`label-${data.page}`" :ref="`tooltip-${data.page}`">
{{ labelTooltip }} {{ labelTooltip }}
</b-tooltip> </b-tooltip>
</span> </span>
@@ -45,7 +45,7 @@ export default {
* Reset the delay and hide the tooltip * Reset the delay and hide the tooltip
*/ */
unhoverHandler() { unhoverHandler() {
let key = `tooltip-${this.data.id}`; let key = `tooltip-${this.data.page}`;
this.labelTooltip = ""; this.labelTooltip = "";
this.$refs[key].$emit("close"); this.$refs[key].$emit("close");
}, },
@@ -54,8 +54,8 @@ export default {
*/ */
setTooltip() { setTooltip() {
let that = this; let that = this;
api.menu.getTooltip(that.data.id).then((response) => { api.menu.getTooltip(that.data.page).then((response) => {
let key = `tooltip-${that.data.id}`; let key = `tooltip-${that.data.page}`;
that.labelTooltip = response.data.label; that.labelTooltip = response.data.label;
that.$refs[key].$emit("open"); that.$refs[key].$emit("open");
}); });

View File

@@ -40,7 +40,7 @@
<b-form-group> <b-form-group>
<b-form-checkbox-group <b-form-checkbox-group
v-model="localSelected" v-model="localSelected"
:options="results" :options="options"
value-field="key" value-field="key"
text-field="value" text-field="value"
name="flavour-2a" name="flavour-2a"
@@ -80,6 +80,11 @@ export default {
this.results = this.options; this.results = this.options;
this.localSelected = this.selected || []; this.localSelected = this.selected || [];
}, },
watch: {
selected: function (newSelection, oldSelection) {
this.localSelected = newSelection;
}
},
methods: { methods: {
/** /**
* Close buton click handler * Close buton click handler

View File

@@ -127,7 +127,7 @@
</div> </div>
</b-col> </b-col>
<b-col sm="12"> <b-col sm="12">
<div class="ellipsis-container" @click="updateDataEllipsis(props.row)"> <div class="ellipsis-container" @click="updateDataEllipsis(props.item)">
<ellipsis ref="ellipsis" v-if="dataEllipsis" :data="dataEllipsis"> </ellipsis> <ellipsis ref="ellipsis" v-if="dataEllipsis" :data="dataEllipsis"> </ellipsis>
</div> </div>
</b-col> </b-col>
@@ -491,6 +491,7 @@ export default {
* @param {object} item * @param {object} item
*/ */
openCase(item) { openCase(item) {
debugger;
this.$emit("onUpdateDataCase", { this.$emit("onUpdateDataCase", {
APP_UID: item.APP_UID, APP_UID: item.APP_UID,
DEL_INDEX: item.DEL_INDEX, DEL_INDEX: item.DEL_INDEX,
@@ -557,6 +558,7 @@ export default {
* @param {object} data * @param {object} data
*/ */
updateDataEllipsis(data) { updateDataEllipsis(data) {
debugger;
let that = this; let that = this;
this.showEllipsis = !this.showEllipsis; this.showEllipsis = !this.showEllipsis;
if (this.showEllipsis) { if (this.showEllipsis) {

View File

@@ -50,7 +50,6 @@ export default {
priority: this.$i18n.t("ID_PRIORITY") priority: this.$i18n.t("ID_PRIORITY")
}, },
columns: [ columns: [
"detail",
"case_number", "case_number",
"case_title", "case_title",
"process_name", "process_name",

View File

@@ -26,6 +26,7 @@
:defaultOption="defaultOption" :defaultOption="defaultOption"
:settings="config.setting[page]" :settings="config.setting[page]"
:filters="filters" :filters="filters"
:data="pageData"
@onSubmitFilter="onSubmitFilter" @onSubmitFilter="onSubmitFilter"
@onRemoveFilter="onRemoveFilter" @onRemoveFilter="onRemoveFilter"
@onUpdatePage="onUpdatePage" @onUpdatePage="onUpdatePage"
@@ -53,6 +54,7 @@ import XCase from "./XCase";
import TaskReassignments from "./TaskReassignments"; import TaskReassignments from "./TaskReassignments";
import AdvancedSearch from "./AdvancedSearch/AdvancedSearch.vue"; import AdvancedSearch from "./AdvancedSearch/AdvancedSearch.vue";
import LegacyFrame from "./LegacyFrame"; import LegacyFrame from "./LegacyFrame";
import CustomCaseList from "./CustomCaseList/CustomCaseList.vue"
import api from "./../api/index"; import api from "./../api/index";
import eventBus from './EventBus/eventBus' import eventBus from './EventBus/eventBus'
@@ -71,7 +73,8 @@ export default {
Paused, Paused,
Unassigned, Unassigned,
CaseDetail, CaseDetail,
LegacyFrame LegacyFrame,
CustomCaseList,
}, },
data() { data() {
return { return {
@@ -105,7 +108,8 @@ export default {
CASES_TO_REASSIGN: "task-reassignments", CASES_TO_REASSIGN: "task-reassignments",
CASES_FOLDERS: "my-documents" CASES_FOLDERS: "my-documents"
}, },
defaultOption: window.config.defaultOption || '' defaultOption: window.config.defaultOption || '',
pageData: {}
}; };
}, },
mounted() { mounted() {
@@ -243,11 +247,11 @@ export default {
newData = data, newData = data,
auxId; auxId;
for (i = 0; i < data.length; i += 1) { for (i = 0; i < data.length; i += 1) {
auxId = data[i].id || ""; auxId = data[i].page || "";
if (auxId !== "" && this.menuMap[auxId]) { if (auxId !== "" && this.menuMap[auxId]) {
newData[i].id = this.menuMap[auxId]; newData[i].page = this.menuMap[auxId];
} else if (newData[i].href) { } else if (newData[i].href) {
newData[i].id = "LegacyFrame"; newData[i].page = "LegacyFrame";
} }
// Tasks group need pie chart icon // Tasks group need pie chart icon
if (data[i].header && data[i].id === "FOLDERS") { if (data[i].header && data[i].id === "FOLDERS") {
@@ -267,8 +271,7 @@ export default {
} }
} }
} }
if (data[i].id === "inbox" || data[i].id === "draft" if (data[i].customCasesList) {
|| data[i].id === "paused" || data[i].id === "unassigned") {
data[i]["child"] = this.sortCustomCasesList( data[i]["child"] = this.sortCustomCasesList(
data[i].customCasesList, data[i].customCasesList,
this.config.setting[this.page] && this.config.setting[this.page] &&
@@ -345,7 +348,7 @@ export default {
this.defaultOption = ""; this.defaultOption = "";
}, },
OnClickSidebarItem(item) { OnClickSidebarItem(item) {
if (item.item.page && item.item.page === "/advanced-search") { if (item.item.page && item.item.page === "advanced-search") {
this.page = "advanced-search"; this.page = "advanced-search";
this.filters = item.item.filters; this.filters = item.item.filters;
this.pageId = item.item.id; this.pageId = item.item.id;
@@ -355,11 +358,21 @@ export default {
this.filters = []; this.filters = [];
this.pageId = null; this.pageId = null;
this.pageUri = item.item.href; this.pageUri = item.item.href;
this.page = item.item.id || "MyCases"; this.page = item.item.page || "MyCases";
if (!item.item.customCasesList) {
this.page = "custom-case-list";
this.pageData = {
pageUri: item.item.pageUri,
pageParent: item.item.page,
pageName: item.item.title,
pageIcon: item.item.icon,
customListId: item.item.id
}
}
if (this.page === this.lastPage if (this.page === this.lastPage
&& this.$refs["component"] && this.$refs["component"]
&& this.$refs["component"].updateView) { && this.$refs["component"].updateView) {
this.$refs["component"].updateView(); this.$refs["component"].updateView(this.pageData);
} }
this.lastPage = this.page; this.lastPage = this.page;
} }

View File

@@ -111,7 +111,7 @@
} }
.vsm--link_level-2>.vsm--icon { .vsm--link_level-2>.vsm--icon {
margin-top: 8px; margin-top: 0px;
} }
.v-sidebar-menu .vsm--arrow { .v-sidebar-menu .vsm--arrow {

View File

@@ -657,6 +657,7 @@ class Home extends Api
$option->href = $menuInstance->Options[$i]; $option->href = $menuInstance->Options[$i];
$option->id = $menuInstance->Id[$i]; $option->id = $menuInstance->Id[$i];
$option->title = $menuInstance->Labels[$i]; $option->title = $menuInstance->Labels[$i];
$option->page = $menuInstance->Id[$i];
$option->icon = $menuInstance->Icons[$i]; $option->icon = $menuInstance->Icons[$i];
} }
@@ -669,7 +670,7 @@ class Home extends Api
foreach ($filters as $filter) { foreach ($filters as $filter) {
$childFilter = new stdClass(); $childFilter = new stdClass();
$childFilter->id = $filter->id; $childFilter->id = $filter->id;
$childFilter->page = '/advanced-search'; $childFilter->page = 'advanced-search';
$childFilter->href = "{$childFilter->page}/{$filter->id}"; $childFilter->href = "{$childFilter->page}/{$filter->id}";
$childFilter->title = $filter->name; $childFilter->title = $filter->name;
$childFilter->icon = 'fas fa-circle'; $childFilter->icon = 'fas fa-circle';
@@ -699,7 +700,8 @@ class Home extends Api
"id" => $value['id'], "id" => $value['id'],
"title" => $value['name'], "title" => $value['name'],
"description" => $value['description'], "description" => $value['description'],
"icon" => $value['iconList'] "icon" => $value['iconList'],
"page" => $mapKeys[$menuInstance->Id[$i]]
]; ];
} }
} }