mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-05 03:12:34 -06:00
редактирование и удаление сопоставлений
список накладных с позициями
This commit is contained in:
@@ -24,7 +24,8 @@ import type {
|
||||
DictionariesResponse,
|
||||
UnifiedInvoice,
|
||||
ServerUser,
|
||||
UserRole
|
||||
UserRole,
|
||||
InvoiceDetails
|
||||
} from './types';
|
||||
|
||||
// Базовый URL
|
||||
@@ -134,6 +135,18 @@ export const api = {
|
||||
const { data } = await apiClient.post<{ status: string }>('/ocr/match', payload);
|
||||
return data;
|
||||
},
|
||||
deleteMatch: async (rawName: string): Promise<{ status: string }> => {
|
||||
const { data } = await apiClient.delete<{ status: string }>('/ocr/match', {
|
||||
params: { raw_name: rawName }
|
||||
});
|
||||
return data;
|
||||
},
|
||||
deleteUnmatched: async (rawName: string): Promise<{ status: string }> => {
|
||||
const { data } = await apiClient.delete<{ status: string }>('/ocr/unmatched', {
|
||||
params: { raw_name: rawName }
|
||||
});
|
||||
return data;
|
||||
},
|
||||
|
||||
createInvoice: async (payload: CreateInvoiceRequest): Promise<InvoiceResponse> => {
|
||||
const { data } = await apiClient.post<InvoiceResponse>('/invoices/send', payload);
|
||||
@@ -233,4 +246,9 @@ export const api = {
|
||||
const { data } = await apiClient.delete<{ status: string }>(`/settings/users/${userId}`);
|
||||
return data;
|
||||
},
|
||||
|
||||
getInvoice: async (id: string): Promise<InvoiceDetails> => {
|
||||
const { data } = await apiClient.get<InvoiceDetails>(`/invoices/${id}`);
|
||||
return data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user