- Updated the "Nueva Sección" button in customs_sections, customs_warehouses, incoterms, invoice_types, material_types, payment_methods, pedimento_codes, pedimento_regimens, sectors, states, transport_modes, and transport_types pages to use the Plus icon from Lucide. - Updated the "Actualizar" button in the same pages to use the RefreshCw icon from Lucide. - Added a new edit dialog component for customs brokers with a comprehensive form for editing broker details, including validation and loading states.
62 lines
1.7 KiB
TypeScript
62 lines
1.7 KiB
TypeScript
/**
|
|
* API Client para Fechas de Pedimentos
|
|
*/
|
|
import { api } from '$lib/api';
|
|
|
|
export interface PedimentoDates {
|
|
id: number;
|
|
pedimento_id: number;
|
|
tenant_id: number;
|
|
entry_date?: string | null;
|
|
pedimento_date?: string | null;
|
|
payment_date?: string | null;
|
|
rectification_payment_date?: string | null;
|
|
extraction_date?: string | null;
|
|
submission_date?: string | null;
|
|
eucan_date?: string | null;
|
|
original_date?: string | null;
|
|
start_date?: string | null;
|
|
end_date?: string | null;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface CreatePedimentoDatesData {
|
|
entry_date?: string | null;
|
|
pedimento_date?: string | null;
|
|
payment_date?: string | null;
|
|
rectification_payment_date?: string | null;
|
|
extraction_date?: string | null;
|
|
submission_date?: string | null;
|
|
eucan_date?: string | null;
|
|
original_date?: string | null;
|
|
start_date?: string | null;
|
|
end_date?: string | null;
|
|
}
|
|
|
|
export interface UpdatePedimentoDatesData {
|
|
entry_date?: string | null;
|
|
pedimento_date?: string | null;
|
|
payment_date?: string | null;
|
|
rectification_payment_date?: string | null;
|
|
extraction_date?: string | null;
|
|
submission_date?: string | null;
|
|
eucan_date?: string | null;
|
|
original_date?: string | null;
|
|
start_date?: string | null;
|
|
end_date?: string | null;
|
|
}
|
|
|
|
export const pedimentoDatesApi = {
|
|
get: (pedimentoId: number) =>
|
|
api.get<PedimentoDates>(`/v1/a76/pedimentos/${pedimentoId}/dates`),
|
|
|
|
create: (pedimentoId: number, data: CreatePedimentoDatesData) =>
|
|
api.post<PedimentoDates>(`/v1/a76/pedimentos/${pedimentoId}/dates`, data),
|
|
|
|
update: (pedimentoId: number, data: UpdatePedimentoDatesData) =>
|
|
api.put<PedimentoDates>(`/v1/a76/pedimentos/${pedimentoId}/dates`, data),
|
|
|
|
delete: (pedimentoId: number) =>
|
|
api.delete(`/v1/a76/pedimentos/${pedimentoId}/dates`)
|
|
};
|