Nuevo formulario de extension para partes SCAI con nuevas tablas de aphis con catalogos fijos nuevos
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { api } from '$lib/api';
|
||||
|
||||
export interface AgencyTariffCode {
|
||||
id: number;
|
||||
tariff_flag_code: string;
|
||||
agency_code: string;
|
||||
requirement_level: string;
|
||||
program_code: string;
|
||||
definition: string;
|
||||
}
|
||||
|
||||
export const agencyTariffCodesApi = {
|
||||
list: async (page = 1, pageSize = 50, q = '') => {
|
||||
const params = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
page_size: pageSize.toString(),
|
||||
q: q
|
||||
});
|
||||
return api.get<{ items: AgencyTariffCode[]; total: number }>(
|
||||
`/v1/public/reference_data/agency-tariff-codes/?${params.toString()}`
|
||||
);
|
||||
},
|
||||
get: async (id: number) => {
|
||||
return api.get<AgencyTariffCode>(`/v1/public/reference_data/agency_tariff_codes/${id}`);
|
||||
}
|
||||
};
|
||||
27
frontend/src/lib/api/dashboard/reference_data/carta_porte.ts
Normal file
27
frontend/src/lib/api/dashboard/reference_data/carta_porte.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { api } from '$lib/api';
|
||||
|
||||
export interface CartaPorte {
|
||||
id: number;
|
||||
code: string;
|
||||
description: string;
|
||||
similar_words?: string;
|
||||
is_hazardous?: number;
|
||||
start_date?: string;
|
||||
end_date?: string;
|
||||
}
|
||||
|
||||
export const cartaPorteApi = {
|
||||
list: async (page = 1, pageSize = 50, q = '') => {
|
||||
const params = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
page_size: pageSize.toString(),
|
||||
q: q
|
||||
});
|
||||
return api.get<{ items: CartaPorte[]; total: number }>(
|
||||
`/v1/public/reference_data/carta-porte/?${params.toString()}`
|
||||
);
|
||||
},
|
||||
get: async (id: number) => {
|
||||
return api.get<CartaPorte>(`/v1/public/reference_data/carta-porte/${id}`);
|
||||
}
|
||||
};
|
||||
25
frontend/src/lib/api/dashboard/reference_data/identifiers.ts
Normal file
25
frontend/src/lib/api/dashboard/reference_data/identifiers.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { api } from '$lib/api';
|
||||
|
||||
export interface IdentifierCatalog {
|
||||
id?: number;
|
||||
key: string;
|
||||
description: string;
|
||||
level: string;
|
||||
complement: string;
|
||||
}
|
||||
|
||||
export const identifiersApi = {
|
||||
list: async (page = 1, pageSize = 50, q = '') => {
|
||||
const params = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
page_size: pageSize.toString(),
|
||||
q: q
|
||||
});
|
||||
return api.get<{ items: IdentifierCatalog[]; total: number }>(
|
||||
`/v1/public/reference_data/identifiers/?${params.toString()}`
|
||||
);
|
||||
},
|
||||
get: async (id: number) => {
|
||||
return api.get<IdentifierCatalog>(`/v1/public/reference_data/identifiers/${id}`);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
import { api } from '$lib/api';
|
||||
|
||||
export interface LicenseException {
|
||||
id?: number;
|
||||
key: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export const licenseExceptionsApi = {
|
||||
list: async (page = 1, pageSize = 50, q = '') => {
|
||||
const params = new URLSearchParams({
|
||||
page: page.toString(),
|
||||
page_size: pageSize.toString(),
|
||||
q: q
|
||||
});
|
||||
return api.get<{ items: LicenseException[]; total: number }>(
|
||||
`/v1/public/reference_data/license-exceptions/?${params.toString()}`
|
||||
);
|
||||
},
|
||||
get: async (id: number) => {
|
||||
return api.get<LicenseException>(`/v1/public/reference_data/license-exceptions/${id}`);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user