feat: add cheque books and received cheques management
- Implemented ChequeBooksPage for viewing and filtering cheque books. - Added NewReceivedChequePage for recording received cheques. - Created ReceivedChequesPage for listing and managing received cheques. - Introduced API endpoints for bank accounts, cheque books, and received cheques. - Defined types for payments including bank accounts, cheque books, and received cheques.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { api } from '@/lib/api'
|
||||
import type {
|
||||
CreateReceivedChequeRequest,
|
||||
PagedResult,
|
||||
ReceivedChequeResponse,
|
||||
ReceivedChequeStatus,
|
||||
ReceivedFromType,
|
||||
UpdateReceivedChequeStatusRequest,
|
||||
} from '@/types/payments'
|
||||
|
||||
export const receivedCheques = {
|
||||
list: (params?: {
|
||||
companyId?: number
|
||||
branchId?: number
|
||||
status?: ReceivedChequeStatus
|
||||
receivedFromType?: ReceivedFromType
|
||||
page?: number
|
||||
pageSize?: number
|
||||
}) =>
|
||||
api
|
||||
.get<PagedResult<ReceivedChequeResponse>>('/received-cheques', { params })
|
||||
.then(r => r.data),
|
||||
|
||||
create: (body: CreateReceivedChequeRequest) =>
|
||||
api.post<ReceivedChequeResponse>('/received-cheques', body).then(r => r.data),
|
||||
|
||||
updateStatus: (id: string, body: UpdateReceivedChequeStatusRequest) =>
|
||||
api.put<ReceivedChequeResponse>(`/received-cheques/${id}/status`, body).then(r => r.data),
|
||||
}
|
||||
Reference in New Issue
Block a user