feat(directory) : add client detail page with contact/address/report tabs
This commit is contained in:
@@ -10,6 +10,10 @@ export function useClientService() {
|
||||
return extractHydraMembers(data)
|
||||
}
|
||||
|
||||
async function getById(id: number): Promise<Client> {
|
||||
return api.get<Client>(`/clients/${id}`)
|
||||
}
|
||||
|
||||
async function create(payload: ClientWrite): Promise<Client> {
|
||||
return api.post<Client>('/clients', payload as Record<string, unknown>, {
|
||||
toastSuccessKey: 'clients.created',
|
||||
@@ -28,5 +32,5 @@ export function useClientService() {
|
||||
})
|
||||
}
|
||||
|
||||
return { getAll, create, update, remove }
|
||||
return { getAll, getById, create, update, remove }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user