This commit is contained in:
2024-03-11 14:51:13 +01:00
parent 62b5e1bc57
commit 99b8738c31
9 changed files with 665 additions and 41 deletions

View File

@@ -786,6 +786,10 @@ export const useDataStore = defineStore('data', () => {
return createddocuments.value.filter(i => i.project === project)
})
const getWorkingTimesByProfileId = computed(() => (profileId) => {
return workingtimes.value.filter(i => i.profile === profileId)
})
const getStockByProductId = computed(() => (productId) => {
let productMovements = movements.value.filter(movement => movement.productId === productId)
@@ -1123,6 +1127,7 @@ export const useDataStore = defineStore('data', () => {
fetchInventoryItems,
fetchChats,
fetchMessages,
fetchWorkingTimes,
addHistoryItem,
//Getters
getOpenTasksCount,
@@ -1148,6 +1153,7 @@ export const useDataStore = defineStore('data', () => {
getMessagesByChatId,
getTextTemplatesByDocumentType,
getCreatedDocumentsByProject,
getWorkingTimesByProfileId,
getStockByProductId,
getIncomingInvoicesByVehicleId,
getEventTypes,