PMCORE-3616

This commit is contained in:
Henry Jordan
2022-01-04 20:12:31 +00:00
committed by Julio Cesar Laura Avendaño
parent dfe0c80606
commit e6afdfcdb0
2 changed files with 83 additions and 114 deletions

View File

@@ -70,7 +70,7 @@ export default {
label: that.$i18n.t("ID_INBOX"), label: that.$i18n.t("ID_INBOX"),
onClick() { onClick() {
that.$emit("updateDataLevel", { that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_INBOX"), id: "inbox",
name: that.$i18n.t("ID_INBOX"), name: that.$i18n.t("ID_INBOX"),
level: 1, level: 1,
color: "#179a6e", color: "#179a6e",
@@ -82,7 +82,7 @@ export default {
label: this.$i18n.t("ID_DRAFT"), label: this.$i18n.t("ID_DRAFT"),
onClick() { onClick() {
that.$emit("updateDataLevel", { that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_DRAFT"), id: "draft",
name: that.$i18n.t("ID_DRAFT"), name: that.$i18n.t("ID_DRAFT"),
level: 1, level: 1,
color: "#feb019", color: "#feb019",
@@ -94,7 +94,7 @@ export default {
label: this.$i18n.t("ID_PAUSED"), label: this.$i18n.t("ID_PAUSED"),
onClick() { onClick() {
that.$emit("updateDataLevel", { that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_PAUSED"), id:"paused",
name: that.$i18n.t("ID_PAUSED"), name: that.$i18n.t("ID_PAUSED"),
level: 1, level: 1,
color: "#008ffb", color: "#008ffb",
@@ -106,7 +106,7 @@ export default {
label: this.$i18n.t("ID_UNASSIGNED"), label: this.$i18n.t("ID_UNASSIGNED"),
onClick() { onClick() {
that.$emit("updateDataLevel", { that.$emit("updateDataLevel", {
id: that.$i18n.t("ID_UNASSIGNED"), id: "unassigned",
name: that.$i18n.t("ID_UNASSIGNED"), name: that.$i18n.t("ID_UNASSIGNED"),
level: 1, level: 1,
color: "#8f99a0", color: "#8f99a0",

View File

@@ -1,6 +1,9 @@
<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">
<vue-chart-lv-zero v-if="level === 0" @updateDataLevel="updateDataLevel" /> <vue-chart-lv-zero
v-if="level === 0"
@updateDataLevel="updateDataLevel"
/>
<vue-chart-lv-one <vue-chart-lv-one
:key="key1" :key="key1"
v-if="level === 1" v-if="level === 1"
@@ -57,7 +60,7 @@ export default {
mounted() {}, mounted() {},
watch: {}, watch: {},
computed: { computed: {
level: function () { level: function() {
return _.find(this.levels, { active: true }).level; return _.find(this.levels, { active: true }).level;
}, },
}, },
@@ -86,41 +89,7 @@ export default {
break; break;
} }
}, },
/**
* Format data for data beadcrumbs
*/
dataBreadCrumbs() {
let res = [],
that = this,
index = 0;
_.each(this.levels, (el) => {
if (index <= that.level && el.data) {
res.push({
label: el.name,
onClick() {
this.$emit("onChangeLevel", el);
},
data: el,
});
}
});
switch (this.level) {
case 0:
return {
data: res,
settings: this.settingsBreadCrumbs,
};
break;
default:
return {
data: res,
settings: this.settingsBreadCrumbs,
};
break;
}
},
}, },
}; };
</script> </script>
<style> <style></style>
</style>