Improve product cards/pagination, Farsi locale fonts, and super-admin migrate UI.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2e40d5eb4c
commit
f5b2193ba1
@@ -12,6 +12,7 @@ import type {
|
||||
InvoicesListResponse,
|
||||
PublicInvoice,
|
||||
UpdateInvoiceItemTemplatePayload,
|
||||
UpdateInvoicePayload,
|
||||
UpdateInvoiceTemplatePayload,
|
||||
} from '../types/invoice'
|
||||
|
||||
@@ -122,6 +123,18 @@ export function createBusinessInvoice(businessId: string, payload: CreateInvoice
|
||||
})
|
||||
}
|
||||
|
||||
export function updateBusinessInvoice(
|
||||
businessId: string,
|
||||
invoiceId: string,
|
||||
payload: UpdateInvoicePayload,
|
||||
) {
|
||||
return apiRequest<Invoice>(`/businesses/${businessId}/invoices/${invoiceId}`, {
|
||||
method: 'PUT',
|
||||
auth: true,
|
||||
body: payload,
|
||||
})
|
||||
}
|
||||
|
||||
export function updateBusinessInvoiceStatus(
|
||||
businessId: string,
|
||||
invoiceId: string,
|
||||
@@ -148,3 +161,11 @@ export function getPublicInvoice(publicId: string, signal?: AbortSignal) {
|
||||
signal,
|
||||
})
|
||||
}
|
||||
|
||||
/** Public approve (no auth). issued → approved. */
|
||||
export function approvePublicInvoice(publicId: string) {
|
||||
return apiRequest<PublicInvoice>(`/public/invoices/${publicId}/approve`, {
|
||||
method: 'POST',
|
||||
auth: false,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user