diff --git a/resources/assets/js/components/iconPicker/IconPicker.vue b/resources/assets/js/components/iconPicker/IconPicker.vue index e682f29ff..abfc98e76 100644 --- a/resources/assets/js/components/iconPicker/IconPicker.vue +++ b/resources/assets/js/components/iconPicker/IconPicker.vue @@ -166,7 +166,6 @@ export default { }, watch: { color() { - console.log("colores"); }, }, methods: { diff --git a/resources/assets/js/components/utils/BreadCrumb.vue b/resources/assets/js/components/utils/BreadCrumb.vue index 8a921c945..f92c129ea 100644 --- a/resources/assets/js/components/utils/BreadCrumb.vue +++ b/resources/assets/js/components/utils/BreadCrumb.vue @@ -6,13 +6,15 @@ :key="item.label" :class="item.classObject" > - -
- {{ item.label }} + + +
+ {{ item.label }} +
-
+
@@ -68,7 +69,6 @@ export default { results: [], allColumns: false, localSelected: [], - selected: [], }; }, mounted() { @@ -137,7 +137,7 @@ export default { res.push(o.key); }); } - this.selected = res; + this.localSelected = res; }, /** * Handler when change options event @@ -167,4 +167,11 @@ export default { .v-popover-footer { display: flow-root; } + +.process-view-popover { + margin-bottom: 1rem; + overflow-y: auto; + display: block; + max-height: 200px; +} \ No newline at end of file diff --git a/resources/assets/js/home/TaskMetrics/TaskMetrics.vue b/resources/assets/js/home/TaskMetrics/TaskMetrics.vue index 690a4d1f2..430e5a908 100644 --- a/resources/assets/js/home/TaskMetrics/TaskMetrics.vue +++ b/resources/assets/js/home/TaskMetrics/TaskMetrics.vue @@ -10,6 +10,7 @@
-
+
diff --git a/resources/assets/js/home/TaskMetrics/VueChartLvOne.vue b/resources/assets/js/home/TaskMetrics/VueChartLvOne.vue index 718a99382..542eece02 100644 --- a/resources/assets/js/home/TaskMetrics/VueChartLvOne.vue +++ b/resources/assets/js/home/TaskMetrics/VueChartLvOne.vue @@ -6,11 +6,12 @@
- +
n.key); + this.changeOption(); + }, + }, computed: {}, updated() {}, beforeCreate() {}, @@ -221,9 +236,6 @@ export default { .processList(query || "") .then((response) => { that.formatDataProcesses(response.data); - that.changeOption({ - id: "all", - }); }) .catch((e) => { console.error(err); @@ -247,25 +259,19 @@ export default { array.push({ name: el["CATEGORY_NAME"], id: el["CATEGORY_ID"] }); }); this.optionsCategory = array; - this.category = array[0]; }, /** * Format processes for popover * @param {*} data */ formatDataProcesses(data) { - let sels = [], - labels = [], + let labels = [], array = []; - _.each(data, (el) => { array.push({ value: el["PRO_TITLE"], key: el["PRO_ID"] }); - sels.push(el["PRO_ID"]); labels; }); this.optionsProcesses = array; - this.selectedProcesses = sels; - //Update the labels this.dataProcesses = data; }, @@ -273,25 +279,25 @@ export default { * Change the options in TOTAL CASES BY PROCESS * @param {*} option */ - changeOption(option) { + changeOption() { let that = this, dt = {}; - if (this.data.length > 1) { + if (this.category && this.selectedProcesses.length > 0 && this.data[1]) { dt = { - category: option.id, + category: this.category.id, caseList: this.data[1].id.toLowerCase(), processes: this.selectedProcesses, top: this.top, }; - option.id == "all" ? delete dt.category : null; + this.category.id == "all" ? delete dt.category : null; Api.process .totalCasesByProcess(dt) .then((response) => { that.totalCases = response.data; that.formatTotalCases(response.data); - }) + }) .catch((e) => { - console.error(err); + console.error(e); }); } }, @@ -327,17 +333,8 @@ export default { * @param {*} data */ onUpdateColumnSettings(data) { - let res; this.selectedProcesses = data; - res = _.intersectionBy(this.totalCases, data, (el) => { - if (_.isNumber(el)) { - return el; - } - if (_.isObject(el) && el["PRO_ID"]) { - return el["PRO_ID"]; - } - }); - this.formatTotalCases(res); + this.changeOption(); }, /** * Update labels in chart @@ -365,9 +362,7 @@ export default { * Force update view when update level */ forceUpdateView() { - this.changeOption({ - id: 0, - }); + this.changeOption(); }, /** * Event handler change input search popover @@ -402,7 +397,11 @@ export default { id: this.currentSelection["PRO_ID"], name: this.currentSelection["PRO_TITLE"], level: 2, - data: this.currentSelection, + data: { + top: this.top, + category: this.category, + selectedProcesses: this.selectedProcesses, + }, }); }, /** @@ -429,6 +428,20 @@ export default { }); eventBus.$emit("home::sidebar::click-item", taskList); }, + /** + * Return the breadcrumbs + */ + dataBreadcrumbs() { + let res = []; + if (this.data[1]) { + res.push({ + label: this.data[1]["name"], + onClick() {}, + color: this.data[1]["color"], + }); + } + return res; + }, }, }; diff --git a/resources/assets/js/home/TaskMetrics/VueChartLvThree.vue b/resources/assets/js/home/TaskMetrics/VueChartLvThree.vue index 103973bb6..d81f91f47 100644 --- a/resources/assets/js/home/TaskMetrics/VueChartLvThree.vue +++ b/resources/assets/js/home/TaskMetrics/VueChartLvThree.vue @@ -1,10 +1,10 @@ @@ -44,13 +38,13 @@ export default { VueChartLvTwo, VueChartLvThree, }, - props: ["levels"], + props: ["levels"], data() { - let that = this; + let that = this; return { - key1: _.random(0,100), - key2: _.random(0,100), - key3: _.random(0,100), + key1: _.random(0, 100), + key2: _.random(0, 100), + key3: _.random(0, 100), settingsBreadCrumbs: [ { class: "fas fa-info-circle", @@ -63,9 +57,9 @@ export default { mounted() {}, watch: {}, computed: { - level: function () { - return _.find(this.levels, {'active': true }).level; - } + level: function () { + return _.find(this.levels, { active: true }).level; + }, }, updated() {}, beforeCreate() {}, @@ -104,7 +98,7 @@ export default { res.push({ label: el.name, onClick() { - this.$emit("onChangeLevel", el); + this.$emit("onChangeLevel", el); }, data: el, }); @@ -124,7 +118,7 @@ export default { }; break; } - } + }, }, }; diff --git a/resources/assets/js/home/modal/ModalPauseCase.vue b/resources/assets/js/home/modal/ModalPauseCase.vue index 4392c66ae..014d25ad1 100644 --- a/resources/assets/js/home/modal/ModalPauseCase.vue +++ b/resources/assets/js/home/modal/ModalPauseCase.vue @@ -164,7 +164,6 @@ export default { this.data.reasonPause = this.pauseData.reasonPause; api.cases.pauseCase(this.data) .then((response) => { - console.log(response); if (response.statusText == "OK" || response.status === 200) { that.$refs["modal-pause-case"].hide(); that.$parent.$refs['ellipsis-' + that.data.TAS_UID].hideActionButtons()