KI-AGENT: Tab und Pagination der Ausgangsbelege im Profil speichern
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 23s
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 21s
Build and Push Docker Images / build-docs (push) Successful in 22s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 23s
Build and Push Docker Images / build-frontend (push) Successful in 1m13s
Build and Push Docker Images / build-central-services-api (push) Successful in 22s
Build and Push Docker Images / build-website (push) Successful in 22s
Build and Push Docker Images / build-central-services-admin (push) Successful in 21s
Build and Push Docker Images / build-docs (push) Successful in 22s
This commit is contained in:
@@ -46,7 +46,12 @@
|
|||||||
</USelectMenu>
|
</USelectMenu>
|
||||||
</template>
|
</template>
|
||||||
</UDashboardToolbar>
|
</UDashboardToolbar>
|
||||||
<UTabs :items="selectedTypes" class="m-3">
|
<UTabs
|
||||||
|
v-model="activeTabIndex"
|
||||||
|
:items="selectedTypes"
|
||||||
|
class="m-3"
|
||||||
|
@update:model-value="storeActiveTab"
|
||||||
|
>
|
||||||
<template #default="{item}">
|
<template #default="{item}">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
<UBadge
|
<UBadge
|
||||||
@@ -149,6 +154,7 @@
|
|||||||
:items-per-page="rowsPerPage"
|
:items-per-page="rowsPerPage"
|
||||||
:total="getRowsForTab(item.key).length"
|
:total="getRowsForTab(item.key).length"
|
||||||
:show-edges="true"
|
:show-edges="true"
|
||||||
|
@update:page="page => storeTabPage(item.key, page)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -171,8 +177,8 @@ const dataType = dataStore.dataTypes[type]
|
|||||||
|
|
||||||
const items = ref([])
|
const items = ref([])
|
||||||
const selectedItem = ref(0)
|
const selectedItem = ref(0)
|
||||||
const activeTabIndex = ref(0)
|
|
||||||
const rowsPerPage = 100
|
const rowsPerPage = 100
|
||||||
|
const storedListNavigation = tempStore.settings?.createddocumentsList || {}
|
||||||
const tabPages = reactive({
|
const tabPages = reactive({
|
||||||
drafts: 1,
|
drafts: 1,
|
||||||
invoices: 1,
|
invoices: 1,
|
||||||
@@ -180,7 +186,8 @@ const tabPages = reactive({
|
|||||||
costEstimates: 1,
|
costEstimates: 1,
|
||||||
deliveryNotes: 1,
|
deliveryNotes: 1,
|
||||||
packingSlips: 1,
|
packingSlips: 1,
|
||||||
confirmationOrders: 1
|
confirmationOrders: 1,
|
||||||
|
...(storedListNavigation.tabPages || {})
|
||||||
})
|
})
|
||||||
const sum = useSum()
|
const sum = useSum()
|
||||||
|
|
||||||
@@ -276,6 +283,8 @@ const templateTypes = [
|
|||||||
{ key: "confirmationOrders", label: "Auftragsbestätigungen" }
|
{ key: "confirmationOrders", label: "Auftragsbestätigungen" }
|
||||||
]
|
]
|
||||||
const selectedTypes = ref(tempStore.filters["createddocuments"] ? tempStore.filters["createddocuments"] : templateTypes)
|
const selectedTypes = ref(tempStore.filters["createddocuments"] ? tempStore.filters["createddocuments"] : templateTypes)
|
||||||
|
const storedTabIndex = selectedTypes.value.findIndex(type => type.key === storedListNavigation.activeTabKey)
|
||||||
|
const activeTabIndex = ref(String(storedTabIndex >= 0 ? storedTabIndex : 0))
|
||||||
const types = computed(() => {
|
const types = computed(() => {
|
||||||
return templateTypes.filter((type) => selectedTypes.value.find(i => i.key === type.key))
|
return templateTypes.filter((type) => selectedTypes.value.find(i => i.key === type.key))
|
||||||
})
|
})
|
||||||
@@ -413,6 +422,24 @@ const rowsByTab = computed(() => {
|
|||||||
|
|
||||||
const getRowsForTab = (tabKey) => rowsByTab.value[tabKey] || []
|
const getRowsForTab = (tabKey) => rowsByTab.value[tabKey] || []
|
||||||
|
|
||||||
|
const storeListNavigation = () => {
|
||||||
|
const activeTab = selectedTypes.value[Number(activeTabIndex.value)]
|
||||||
|
|
||||||
|
tempStore.modifySettings('createddocumentsList', {
|
||||||
|
activeTabKey: activeTab?.key || selectedTypes.value[0]?.key,
|
||||||
|
tabPages: {...tabPages}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const storeActiveTab = () => {
|
||||||
|
storeListNavigation()
|
||||||
|
}
|
||||||
|
|
||||||
|
const storeTabPage = (tabKey, page) => {
|
||||||
|
tabPages[tabKey] = page
|
||||||
|
storeListNavigation()
|
||||||
|
}
|
||||||
|
|
||||||
const getVisibleRowsForTab = (tabKey) => {
|
const getVisibleRowsForTab = (tabKey) => {
|
||||||
const rows = getRowsForTab(tabKey)
|
const rows = getRowsForTab(tabKey)
|
||||||
const start = (tabPages[tabKey] - 1) * rowsPerPage
|
const start = (tabPages[tabKey] - 1) * rowsPerPage
|
||||||
@@ -423,5 +450,6 @@ watch([debouncedSearchString, selectedFilters, selectedTypes], () => {
|
|||||||
Object.keys(tabPages).forEach((key) => {
|
Object.keys(tabPages).forEach((key) => {
|
||||||
tabPages[key] = 1
|
tabPages[key] = 1
|
||||||
})
|
})
|
||||||
|
storeListNavigation()
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user