Fixed Createddocuments in Projects

Fixed FinalInvoices
This commit is contained in:
2025-09-16 18:29:20 +02:00
parent 55ac79c717
commit 4ae55a4956
3 changed files with 4 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ const selectItem = (item) => {
<UButton <UButton
@click="showFinalInvoiceConfig = true" @click="showFinalInvoiceConfig = true"
v-if="props.topLevelType === 'projects'" v-if="props.topLevelType === 'projects'"
:disabled="!props.item.createddocuments.filter(i => !i.archived && i.type === 'advanceInvoices').length > 0" :disabled="!props.item.createddocuments?.filter(i => !i.archived && i.type === 'advanceInvoices').length > 0"
> >
+ Schlussrechnung + Schlussrechnung
</UButton> </UButton>

View File

@@ -202,7 +202,8 @@ const setupPage = async () => {
} }
} else if (route.query.loadMode === "finalInvoice") { } else if (route.query.loadMode === "finalInvoice") {
let linkedDocuments = (await supabase.from("createddocuments").select().in("id", JSON.parse(route.query.linkedDocuments))).data let linkedDocuments = (await useEntities("createddocuments").select()).filter(i => JSON.parse(route.query.linkedDocuments).includes(i.id))
//let linkedDocuments = (await supabase.from("createddocuments").select().in("id", JSON.parse(route.query.linkedDocuments))).data
//TODO: Implement Checking for Same Customer, Contact and Project //TODO: Implement Checking for Same Customer, Contact and Project

View File

@@ -33,7 +33,7 @@ const createTicket = async () => {
console.log(messageError) console.log(messageError)
} else { } else {
console.log(ticketData) console.log(ticketData)
useFunctions().useSendTelegramNotification(`Ticket von ${profileStore.activeProfile.fullName} erstellt : ${itemInfo.value.content}`) //useFunctions().useSendTelegramNotification(`Ticket von ${profileStore.activeProfile.fullName} erstellt : ${itemInfo.value.content}`)
router.push(`/support/${ticketData.id}`) router.push(`/support/${ticketData.id}`)
} }
} }