mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 06:00:55 +00:00
- 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.
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
import { PaginatedResponse } from "@edr/types";
|
|
|
|
import { ListDropdownSettingsQueryDto } from "../dto/list-dropdown-settings-query.dto";
|
|
import { DropdownOption } from "../entities/dropdown-option.entity";
|
|
import { DropdownSetting } from "../entities/dropdown-setting.entity";
|
|
|
|
/**
|
|
* Contract every DropdownSettings repository must satisfy. Lets services
|
|
* depend on the abstraction and lets tests swap in an in-memory fake.
|
|
*/
|
|
export const DROPDOWN_SETTINGS_REPOSITORY = Symbol(
|
|
"DROPDOWN_SETTINGS_REPOSITORY",
|
|
);
|
|
|
|
export interface IDropdownSettingsRepository {
|
|
findAll(): Promise<DropdownSetting[]>;
|
|
findPaged(
|
|
query: ListDropdownSettingsQueryDto,
|
|
): Promise<PaginatedResponse<DropdownSetting>>;
|
|
findById(id: string): Promise<DropdownSetting | null>;
|
|
findByCode(code: string): Promise<DropdownSetting | null>;
|
|
|
|
create(data: Partial<DropdownSetting>): Promise<DropdownSetting>;
|
|
update(
|
|
id: string,
|
|
data: Partial<DropdownSetting>,
|
|
): Promise<DropdownSetting | null>;
|
|
softDelete(id: string): Promise<void>;
|
|
|
|
/* Option-level helpers */
|
|
replaceOptions(
|
|
settingId: string,
|
|
options: Array<Partial<DropdownOption>>,
|
|
): Promise<DropdownOption[]>;
|
|
addOption(
|
|
settingId: string,
|
|
option: Partial<DropdownOption>,
|
|
): Promise<DropdownOption>;
|
|
updateOption(
|
|
optionId: string,
|
|
data: Partial<DropdownOption>,
|
|
): Promise<DropdownOption | null>;
|
|
removeOption(optionId: string): Promise<void>;
|
|
}
|