mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-14 00:13:17 +03:30
fix : pagination of my-items -list packages display item.udi -items details
This commit is contained in:
+23
-13
@@ -31,17 +31,19 @@
|
||||
<v-flex xs12 sm6 md6 lg2 xl3 class="WM-Align-R">
|
||||
<v-tooltip bottom open-on-hover>
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn v-bind="attrs" v-on="on" color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2" @click="load()">
|
||||
<v-btn v-bind="attrs" v-on="on"
|
||||
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||
@click="load()">
|
||||
<v-icon class="black--text caption">fas fa-search</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<!-- <v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>-->
|
||||
<!-- <v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>-->
|
||||
|
||||
<router-link :to="{ name: 'AddItem' }">
|
||||
<v-btn class="WM-CyanBlueGradient-BG WM-Margin-BT-0" style="padding:10px 30px">
|
||||
@@ -207,16 +209,22 @@ export default {
|
||||
items() {
|
||||
return this.getMyItems;
|
||||
},
|
||||
currentPage() {
|
||||
return this.getCurrentPage;
|
||||
currentPage: {
|
||||
get() {
|
||||
return this.getCurrentPage;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('myItems/SET_MY_ITEMS_CURRENT_PAGE', val);
|
||||
this.$store.dispatch('myItems/loadMyItem', val);
|
||||
}
|
||||
},
|
||||
lastPage() {
|
||||
return this.getLastPage;
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('myItems', ["SET_FILTER"]),
|
||||
...mapMutations("modal", ["changeCurrentModal",'closeModal']),
|
||||
...mapMutations("modal", ["changeCurrentModal", 'closeModal']),
|
||||
...mapActions('myItems', ['loadMyItem', 'removeItem', 'showItem', 'generateBarcode']),
|
||||
onFilterClick() {
|
||||
this.loadMyItem();
|
||||
@@ -281,8 +289,8 @@ export default {
|
||||
getStatus(item) {
|
||||
if (item.status === 'pending') {
|
||||
return [
|
||||
{status: 'approved', label: 'approve', color: 'cyan', font_color : 'white', icon: 'fa-check'},
|
||||
{status: 'rejected', label: 'reject', color: 'light-gray',font_color : 'black', icon: 'fa-close'},
|
||||
{status: 'approved', label: 'approve', color: 'cyan', font_color: 'white', icon: 'fa-check'},
|
||||
{status: 'rejected', label: 'reject', color: 'light-gray', font_color: 'black', icon: 'fa-close'},
|
||||
]
|
||||
} else {
|
||||
const nextStatus = item.status === 'rejected' ? 'approved' : 'rejected'
|
||||
@@ -307,10 +315,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
currentPage(page) {
|
||||
this.loadMyItem(page);
|
||||
},
|
||||
this.$store.dispatch('myItems/loadMyItem', page);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user