This commit is contained in:
Henry Jordan
2021-09-22 16:37:52 +00:00
parent b5f6097627
commit c8cb129287
4 changed files with 28 additions and 17 deletions

View File

@@ -147,6 +147,12 @@ export default {
eventBus.$on('home-update-page', (data) => {
that.onUpdatePage(data);
});
eventBus.$on('home::sidebar::click-item', (data) => {
that.OnClickSidebarItem(that.getItemMenuByValue("page",data));
});
eventBus.$on('home::update-settings', (data) => {
that.updateSettings(data);
});
eventBus.$on('home-update-datacase', (data) => {
that.onUpdateDataCase(data);
});
@@ -394,6 +400,7 @@ export default {
*/
pageFactory(item){
this.filters = [];
this.lastPage = this.page;
this.page = item.item.page;
this.filters = item.item.filters;
this.pageId = item.item.id;
@@ -423,7 +430,6 @@ export default {
&& this.$refs["component"].updateView) {
this.$refs["component"].updateView(this.pageData);
}
this.lastPage = this.page;
},
/**
* Click sidebar menu item handler

View File

@@ -387,9 +387,6 @@ export default {
id: this.id
});
});
Event.$on('inbox::update-filters', (data) => {
that.updateSettings(data);
});
},
watch: {
columns: function (val) {

View File

@@ -35,7 +35,7 @@
<b-form-group>
<b-form-checkbox-group
v-model="localSelected"
:options="options"
:options="results"
value-field="key"
text-field="value"
name="flavour-2a"
@@ -60,17 +60,19 @@
<script>
export default {
name: "ProcessPopover",
props: ["target", "options"],
props: ["target"],
data() {
return {
timeCounter:"",
options: [],
text: "",
results: [],
allColumns: false,
localSelected: [],
selected: [],
};
},
mounted() {
this.results = this.options;
this.localSelected = this.selected;
},
methods: {
@@ -80,6 +82,7 @@ export default {
*/
setOptions(options) {
this.options = options;
this.results = options;
},
/**
* Setter the selected options
@@ -115,11 +118,14 @@ export default {
* Search in the column name
*/
search() {
let that = this;
clearTimeout(this.timeCounter);
this.timeCounter = setTimeout(()=>{
that.$emit("onChange", this.text.toLowerCase())
}, 500);
let txt = this.text.toLowerCase(),
val,
opts = [];
opts = _.filter(this.options, function (o) {
val = o.value.toLowerCase();
return val.search(txt) != -1;
});
this.results = opts;
},
/**
* Toogle all options in popover
@@ -131,7 +137,7 @@ export default {
res.push(o.key);
});
}
this.localSelected = res;
this.selected = res;
},
/**
* Handler when change options event

View File

@@ -421,11 +421,13 @@ export default {
},
value: this.currentSelection["PRO_ID"],
};
eventBus.$emit("inbox::update-filters", {
params: [obj],
refresh: false,
eventBus.$emit("home::update-settings", {
data: [obj],
key: "filters",
page: taskList,
type: "normal",
});
eventBus.$emit("home-update-page", taskList);
eventBus.$emit("home::sidebar::click-item", taskList);
},
},
};