mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 05:58:18 +00:00
enhance contract and booking services with server-side search and validation improvements
- Added parameter to and for server-side free-text search on contract reference, company name, and booking details. - Introduced new validation errors in for container clashes and space issues when creating bookings. - Implemented paginated dropdown settings retrieval in . - Updated to fetch active yards using a new method that handles pagination. - Enhanced with a method to fetch all records by walking through pages. - Refactored to support filtering and pagination in schedule listings. - Improved to return a paginated list of facilities. - Updated UI components in and to utilize debounced search inputs for better performance. - Added alerts in to inform users about booking constraints related to splits and capacity. - Enhanced to display notifications for split bookings and capacity usage.
This commit is contained in:
@@ -20,6 +20,8 @@ import {
|
||||
CreateDropdownSettingDto,
|
||||
DropdownOption,
|
||||
DropdownSetting,
|
||||
DropdownSettingListQuery,
|
||||
PaginatedDropdownSettings,
|
||||
UpdateDropdownOptionDto,
|
||||
UpdateDropdownSettingDto,
|
||||
} from "@/types/dropdownSettings";
|
||||
@@ -61,7 +63,8 @@ import type {
|
||||
StaffBookingWindow,
|
||||
TrainScheduleDetail,
|
||||
TrainScheduleFilters,
|
||||
TrainScheduleListItem,
|
||||
TrainScheduleListFilters,
|
||||
TrainScheduleListResponse,
|
||||
UpdateScheduleWindowRulePayload,
|
||||
TrainSchedulePreviewPayload,
|
||||
TrainSchedulePreviewResponse,
|
||||
@@ -214,13 +217,14 @@ export const api = {
|
||||
trainScheduling: {
|
||||
// ── Queries ────────────────────────────────────────────────────────────
|
||||
scheduleList: endpoint<
|
||||
{ freightType?: FreightType },
|
||||
TrainScheduleListItem[]
|
||||
{ freightType?: FreightType; filters?: TrainScheduleListFilters },
|
||||
TrainScheduleListResponse
|
||||
>(
|
||||
"train-scheduling",
|
||||
"schedules",
|
||||
({ freightType }) => trainSchedulingService.listSchedules(freightType),
|
||||
() => QUERY_KEYS.TRAIN_SCHEDULING.schedules(),
|
||||
({ freightType, filters }) =>
|
||||
trainSchedulingService.listSchedules(freightType, filters),
|
||||
({ filters }) => QUERY_KEYS.TRAIN_SCHEDULING.schedules(filters),
|
||||
),
|
||||
|
||||
batchBoard: endpoint<
|
||||
@@ -1398,7 +1402,7 @@ export const api = {
|
||||
yards: endpoint<void, YardRef[]>(
|
||||
"routes",
|
||||
"yards",
|
||||
() => routesService.getYards().then((r) => r.data.data),
|
||||
() => routesService.getYards(),
|
||||
() => ["routes", "yards"],
|
||||
),
|
||||
|
||||
@@ -1970,6 +1974,15 @@ export const api = {
|
||||
dropdownSettingsService.list,
|
||||
),
|
||||
|
||||
listPaged: endpoint<
|
||||
{ query: DropdownSettingListQuery },
|
||||
PaginatedDropdownSettings
|
||||
>(
|
||||
"dropdown-settings",
|
||||
"listPaged",
|
||||
({ query }) => dropdownSettingsService.listPaged(query),
|
||||
),
|
||||
|
||||
getById: endpoint<{ id: string }, DropdownSetting>(
|
||||
"dropdown-settings",
|
||||
"getById",
|
||||
|
||||
Reference in New Issue
Block a user