Skip to content

Commit

Permalink
fix: fix getInvoices by uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanvanherwijnen committed Jan 4, 2025
1 parent 888afa2 commit befbf3e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/api/src/trpc/admin/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export const adminInvoiceRoutes = ({
} = input || {}
if (fastify.checkout?.invoiceHandler) {
const invoices = await fastify.checkout.invoiceHandler.getInvoices({
uuids: uuids?.length ? uuids : undefined,
uuids: uuids,
companyId,
clientId,
clientDetails,
Expand Down
6 changes: 4 additions & 2 deletions packages/app/src/pages/admin/BillsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ const lang = useLang()
const route = useRoute()
const uuids = ref((route.params.uuids as string[]) || [])
const uuids = ref<string[]>((route.params.uuids as string[]) || undefined)
onBeforeRouteUpdate((to) => {
if (to.params.uuids && Array.isArray(to.params.ids)) {
uuids.value = to.params.uuids
uuids.value = to.params.uuids as string[]
} else {
uuids.value = undefined
}
})
Expand Down
6 changes: 4 additions & 2 deletions packages/app/src/pages/admin/InvoicesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ const lang = useLang()
const route = useRoute()
const uuids = ref((route.params.uuids as string[]) || [])
const uuids = ref<string[]>((route.params.uuids as string[]) || undefined)
onBeforeRouteUpdate((to) => {
if (to.params.uuids && Array.isArray(to.params.ids)) {
uuids.value = to.params.uuids
uuids.value = to.params.uuids as string[]
} else {
uuids.value = undefined
}
})
Expand Down
6 changes: 4 additions & 2 deletions packages/app/src/pages/admin/ReceiptsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ const lang = useLang()
const route = useRoute()
const uuids = ref((route.params.uuids as string[]) || [])
const uuids = ref<string[]>((route.params.uuids as string[]) || undefined)
onBeforeRouteUpdate((to) => {
if (to.params.uuids && Array.isArray(to.params.ids)) {
uuids.value = to.params.uuids
uuids.value = to.params.uuids as string[]
} else {
uuids.value = undefined
}
})
Expand Down

0 comments on commit befbf3e

Please sign in to comment.