PMCORE-3366

This commit is contained in:
Henry Jordan
2021-09-24 20:17:56 +00:00
parent f24611127e
commit c353ef77f8
7 changed files with 144 additions and 56 deletions

View File

@@ -6,7 +6,7 @@
</h6>
<div>
<BreadCrumb
:options="breadCrumbs.data"
:options="dataBreadcrumbs()"
:settings="settingsBreadcrumbs"
/>
<div class="vp-width-p30 vp-inline-block">
@@ -94,7 +94,7 @@ export default {
Multiselect,
BreadCrumb,
},
props: ["data", "breadCrumbs"],
props: ["data"],
data() {
let that = this;
return {
@@ -155,12 +155,12 @@ export default {
this.changeOption();
},
watch: {
dateFrom () {
dateFrom() {
this.validateDateTo();
},
dateTo () {
dateTo() {
this.validateDateTo();
}
},
},
computed: {},
updated() {},
@@ -282,7 +282,7 @@ export default {
* Validate range date
*/
validateDateTo() {
if (this.dateFrom !== '' && this.dateTo !== '') {
if (this.dateFrom !== "" && this.dateTo !== "") {
if (this.dateFrom > this.dateTo) {
this.stateDateTo = false;
} else {
@@ -290,6 +290,27 @@ export default {
}
}
},
/**
* Return the breadcrumbs
*/
dataBreadcrumbs() {
let res = [];
if (this.data[1]) {
res.push({
label: this.data[1]["name"],
onClick() {},
color: this.data[1]["color"],
});
}
if (this.data[2]) {
res.push({
label: this.data[2]["name"],
onClick() {},
color: null,
});
}
return res;
},
},
};
</script>