mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 21:08:12 +00:00
fix
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { api } from '../auth/http';
|
||||
|
||||
export interface Rate {
|
||||
id: string;
|
||||
rateType: string;
|
||||
appliesTo: string;
|
||||
trigger: string;
|
||||
containerTypeId: string | null;
|
||||
cargoTypeId: string | null;
|
||||
tradeDirection: string | null;
|
||||
currency: string;
|
||||
rateValue: string;
|
||||
rateUnit: string;
|
||||
status: string;
|
||||
proposedByStaffId: string;
|
||||
approvedByCeoId: string | null;
|
||||
approvedAt: string | null;
|
||||
effectiveFrom: string;
|
||||
effectiveTo: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
deletedAt: string | null;
|
||||
}
|
||||
|
||||
export interface RatesListResponse {
|
||||
data: Rate[];
|
||||
meta: { total: number; page: number; pageSize: number; totalPages: number };
|
||||
}
|
||||
|
||||
export const ratesService = {
|
||||
list: (pageSize = 1000) =>
|
||||
api.get<RatesListResponse>(`/rates?pageSize=${pageSize}`),
|
||||
getByType: (rateType: string) =>
|
||||
api.get<RatesListResponse>(`/rates?rateType=${rateType}&pageSize=1000`),
|
||||
};
|
||||
Reference in New Issue
Block a user