Fix user role bug for invoice actions

This commit is contained in:
2026-09-23 14:01:32 +05:30
parent c290a1e778
commit 80db899091
4 changed files with 159 additions and 38 deletions
+4 -4
View File
@@ -78,11 +78,11 @@ export const invoices = {
get: (id: string) =>
api.get<InvoiceResponse>(`/invoices/${id}`).then(r => r.data),
print: (id: string) =>
api.post<InvoiceResponse>(`/invoices/${id}/print`).then(r => r.data),
print: (id: string, printedByUserId?: string | null) =>
api.post<InvoiceResponse>(`/invoices/${id}/print`, { printedByUserId }).then(r => r.data),
finalize: (id: string) =>
api.post<InvoiceResponse>(`/invoices/${id}/finalize`).then(r => r.data),
finalize: (id: string, finalizedByUserId?: string | null) =>
api.post<InvoiceResponse>(`/invoices/${id}/finalize`, { finalizedByUserId }).then(r => r.data),
}
// ─── Payments ─────────────────────────────────────────────────────────────────