@voyantjs/allocation-ui 0.62.3 → 0.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/slot-allocation-page.d.ts +8 -1
- package/dist/components/slot-allocation-page.d.ts.map +1 -1
- package/dist/components/slot-allocation-page.js +2 -2
- package/dist/components/slot-allocation-resource-view.d.ts +6 -1
- package/dist/components/slot-allocation-resource-view.d.ts.map +1 -1
- package/dist/components/slot-allocation-resource-view.js +45 -12
- package/dist/components/slot-allocation-seat-view.d.ts +3 -1
- package/dist/components/slot-allocation-seat-view.d.ts.map +1 -1
- package/dist/components/slot-allocation-seat-view.js +4 -4
- package/dist/i18n/provider.d.ts +21 -0
- package/dist/i18n/provider.d.ts.map +1 -1
- package/dist/i18n/provider.js +10 -0
- package/package.json +8 -8
|
@@ -19,6 +19,13 @@ export interface SlotAllocationPageProps {
|
|
|
19
19
|
slotId: string;
|
|
20
20
|
className?: string;
|
|
21
21
|
onBack?: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Fired when the operator clicks a booking number on an allocation
|
|
24
|
+
* chip. The host owns the side-panel / drawer / route — this hook
|
|
25
|
+
* just supplies the booking id. When omitted, booking numbers render
|
|
26
|
+
* as plain text.
|
|
27
|
+
*/
|
|
28
|
+
onBookingOpen?: (bookingId: string) => void;
|
|
22
29
|
renderExtraActions?: (context: {
|
|
23
30
|
slotId: string;
|
|
24
31
|
kind: string;
|
|
@@ -36,5 +43,5 @@ export interface SlotAllocationPageProps {
|
|
|
36
43
|
*/
|
|
37
44
|
embed?: boolean;
|
|
38
45
|
}
|
|
39
|
-
export declare function SlotAllocationPage({ slotId, className, onBack, renderExtraActions, renderTravelerActions, renderHeaderEnd, renderBefore, renderAfter, extraTabs, embed, }: SlotAllocationPageProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function SlotAllocationPage({ slotId, className, onBack, onBookingOpen, renderExtraActions, renderTravelerActions, renderHeaderEnd, renderBefore, renderAfter, extraTabs, embed, }: SlotAllocationPageProps): import("react/jsx-runtime").JSX.Element;
|
|
40
47
|
//# sourceMappingURL=slot-allocation-page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-allocation-page.d.ts","sourceRoot":"","sources":["../../src/components/slot-allocation-page.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,sBAAsB,EAO5B,MAAM,8BAA8B,CAAA;AAuBrC,OAAO,EAAkB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAiBzE,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,SAAS,EAAE,0BAA0B,EAAE,CAAA;IACvC,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;CAChE;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAA;IAC7E,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,SAAS,CAAA;IAC3E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACzE,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACtE,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACrE,SAAS,CAAC,EAAE,0BAA0B,EAAE,CAAA;IACxC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,SAAc,EACd,KAAa,GACd,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"slot-allocation-page.d.ts","sourceRoot":"","sources":["../../src/components/slot-allocation-page.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,sBAAsB,EAO5B,MAAM,8BAA8B,CAAA;AAuBrC,OAAO,EAAkB,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAA;AAiBzE,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,sBAAsB,CAAA;IAChC,SAAS,EAAE,0BAA0B,EAAE,CAAA;IACvC,eAAe,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,MAAM,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;CAChE;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,SAAS,CAAA;IAC7E,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,SAAS,CAAA;IAC3E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACzE,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACtE,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,+BAA+B,KAAK,SAAS,CAAA;IACrE,SAAS,CAAC,EAAE,0BAA0B,EAAE,CAAA;IACxC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,SAAS,EACT,MAAM,EACN,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,SAAc,EACd,KAAa,GACd,EAAE,uBAAuB,2CAqdzB"}
|
|
@@ -9,7 +9,7 @@ import { useAllocationUiMessagesOrDefault } from "../i18n/index.js";
|
|
|
9
9
|
import { collectOccupants, defaultCapacityFor, kindLabel, PARENT_ONLY_KINDS, parentKindFor, ROOM_KIND, summarizeResourceCapacity, VEHICLE_SEAT_KIND, } from "./slot-allocation-model.js";
|
|
10
10
|
import { ResourceColumnsView } from "./slot-allocation-resource-view.js";
|
|
11
11
|
import { VehicleSeatsView } from "./slot-allocation-seat-view.js";
|
|
12
|
-
export function SlotAllocationPage({ slotId, className, onBack, renderExtraActions, renderTravelerActions, renderHeaderEnd, renderBefore, renderAfter, extraTabs = [], embed = false, }) {
|
|
12
|
+
export function SlotAllocationPage({ slotId, className, onBack, onBookingOpen, renderExtraActions, renderTravelerActions, renderHeaderEnd, renderBefore, renderAfter, extraTabs = [], embed = false, }) {
|
|
13
13
|
const messages = useAllocationUiMessagesOrDefault();
|
|
14
14
|
const availabilityClient = useVoyantAvailabilityContext();
|
|
15
15
|
const allocation = useSlotAllocation({ slotId });
|
|
@@ -222,7 +222,7 @@ export function SlotAllocationPage({ slotId, className, onBack, renderExtraActio
|
|
|
222
222
|
}
|
|
223
223
|
}, children: [_jsx(SelectTrigger, { id: "allocation-resource-option", className: "w-full", children: _jsx(SelectValue, { placeholder: messages.resourceOptionPlaceholder, children: (value) => value === "__none__"
|
|
224
224
|
? messages.resourceOptionNone
|
|
225
|
-
: ((templates.data?.data ?? []).find((option) => option.id === value)?.name ?? value) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "__none__", children: messages.resourceOptionNone }), (templates.data?.data ?? []).map((option) => (_jsx(SelectItem, { value: option.id, children: option.name }, option.id)))] })] })] })) : null, _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "allocation-resource-label", children: messages.resourceLabel }), _jsx(Input, { id: "allocation-resource-label", value: resourceLabel, onChange: (event) => setResourceLabel(event.target.value), placeholder: activeKind === ROOM_KIND ? "102" : kindLabel(activeKind, messages), autoFocus: true })] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "allocation-resource-capacity", children: messages.resourceCapacity }), _jsx(Input, { id: "allocation-resource-capacity", type: "number", min: 1, value: resourceCapacity, onChange: (event) => setResourceCapacity(Number(event.target.value) || 1) })] }), projectedSummary?.status === "over" && projectedSummary.delta != null ? (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-300/60 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-200", role: "status", children: [_jsx(AlertTriangle, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }), _jsxs("span", { children: [messages.overCapacityWarning, " ", projectedSummary.resourceCapacity, "/", projectedSummary.slotPax ?? "—", " (", messages.resourceCapacityOver, ":", " ", projectedSummary.delta, ")"] })] })) : null] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => setAddingResource(false), children: messages.cancel }), _jsx(Button, { type: "submit", disabled: resourceMutation.create.isPending, children: messages.createResource })] })] })] }) })) : null, isSeatMap ? (_jsx(VehicleSeatsView, { seats: resources, vehicles: parentResources, occupants: occupants, sharingGroupLabels: data.sharingGroupLabels, onAssignTraveler: (travelerId, resourceId) => void assignTraveler(travelerId, resourceId), onUnassignTraveler: (travelerId) => void assignTraveler(travelerId, null), renderTravelerActions: renderTravelerActions })) : (_jsx(ResourceColumnsView, { kind: activeKind, resources: resources, travelers: travelers, occupants: occupants, sharingGroupLabels: data.sharingGroupLabels, optionNamesById: optionNamesById, onAssignTraveler: (travelerId, resourceId) => void assignTraveler(travelerId, resourceId), onUnassignTraveler: (travelerId) => void assignTraveler(travelerId, null), onRemoveResource: (resourceId) => void resourceMutation.remove.mutateAsync(resourceId), onEditResource: editResource, renderTravelerActions: renderTravelerActions }))] })), renderAfter?.(context)] }));
|
|
225
|
+
: ((templates.data?.data ?? []).find((option) => option.id === value)?.name ?? value) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: "__none__", children: messages.resourceOptionNone }), (templates.data?.data ?? []).map((option) => (_jsx(SelectItem, { value: option.id, children: option.name }, option.id)))] })] })] })) : null, _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "allocation-resource-label", children: messages.resourceLabel }), _jsx(Input, { id: "allocation-resource-label", value: resourceLabel, onChange: (event) => setResourceLabel(event.target.value), placeholder: activeKind === ROOM_KIND ? "102" : kindLabel(activeKind, messages), autoFocus: true })] }), _jsxs("div", { className: "grid gap-1.5", children: [_jsx(Label, { htmlFor: "allocation-resource-capacity", children: messages.resourceCapacity }), _jsx(Input, { id: "allocation-resource-capacity", type: "number", min: 1, value: resourceCapacity, onChange: (event) => setResourceCapacity(Number(event.target.value) || 1) })] }), projectedSummary?.status === "over" && projectedSummary.delta != null ? (_jsxs("div", { className: "flex items-start gap-2 rounded-md border border-amber-300/60 bg-amber-50 px-3 py-2 text-sm text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-200", role: "status", children: [_jsx(AlertTriangle, { className: "mt-0.5 size-4 shrink-0", "aria-hidden": "true" }), _jsxs("span", { children: [messages.overCapacityWarning, " ", projectedSummary.resourceCapacity, "/", projectedSummary.slotPax ?? "—", " (", messages.resourceCapacityOver, ":", " ", projectedSummary.delta, ")"] })] })) : null] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => setAddingResource(false), children: messages.cancel }), _jsx(Button, { type: "submit", disabled: resourceMutation.create.isPending, children: messages.createResource })] })] })] }) })) : null, isSeatMap ? (_jsx(VehicleSeatsView, { seats: resources, vehicles: parentResources, occupants: occupants, sharingGroupLabels: data.sharingGroupLabels, onAssignTraveler: (travelerId, resourceId) => void assignTraveler(travelerId, resourceId), onUnassignTraveler: (travelerId) => void assignTraveler(travelerId, null), onBookingOpen: onBookingOpen, renderTravelerActions: renderTravelerActions })) : (_jsx(ResourceColumnsView, { kind: activeKind, resources: resources, travelers: travelers, occupants: occupants, sharingGroupLabels: data.sharingGroupLabels, optionNamesById: optionNamesById, onAssignTraveler: (travelerId, resourceId) => void assignTraveler(travelerId, resourceId), onUnassignTraveler: (travelerId) => void assignTraveler(travelerId, null), onRemoveResource: (resourceId) => void resourceMutation.remove.mutateAsync(resourceId), onEditResource: editResource, onBookingOpen: onBookingOpen, renderTravelerActions: renderTravelerActions }))] })), renderAfter?.(context)] }));
|
|
226
226
|
}
|
|
227
227
|
function CapacitySummaryBadges({ summary, messages, kind, }) {
|
|
228
228
|
if (summary.resourceCount === 0 && summary.slotPax == null)
|
|
@@ -5,7 +5,7 @@ export interface EditResourceInput {
|
|
|
5
5
|
label: string | null;
|
|
6
6
|
capacity: number;
|
|
7
7
|
}
|
|
8
|
-
export declare function ResourceColumnsView({ kind, resources, travelers, occupants, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, renderTravelerActions, }: {
|
|
8
|
+
export declare function ResourceColumnsView({ kind, resources, travelers, occupants, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, onBookingOpen, renderTravelerActions, }: {
|
|
9
9
|
kind: string;
|
|
10
10
|
resources: AllocationResource[];
|
|
11
11
|
travelers: AllocationManifestTraveler[];
|
|
@@ -24,6 +24,11 @@ export declare function ResourceColumnsView({ kind, resources, travelers, occupa
|
|
|
24
24
|
onUnassignTraveler: (travelerId: string) => void;
|
|
25
25
|
onRemoveResource: (resourceId: string) => void;
|
|
26
26
|
onEditResource?: (resourceId: string, input: EditResourceInput) => Promise<void> | void;
|
|
27
|
+
/**
|
|
28
|
+
* Fired when the operator clicks a booking number on a chip. The
|
|
29
|
+
* host decides whether to open a side panel, navigate, etc.
|
|
30
|
+
*/
|
|
31
|
+
onBookingOpen?: (bookingId: string) => void;
|
|
27
32
|
renderTravelerActions?: (traveler: AllocationManifestTraveler) => ReactNode;
|
|
28
33
|
}): import("react/jsx-runtime").JSX.Element;
|
|
29
34
|
//# sourceMappingURL=slot-allocation-resource-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-allocation-resource-view.d.ts","sourceRoot":"","sources":["../../src/components/slot-allocation-resource-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"slot-allocation-resource-view.d.ts","sourceRoot":"","sources":["../../src/components/slot-allocation-resource-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,0BAA0B,EAE1B,kBAAkB,EACnB,MAAM,8BAA8B,CAAA;AAmCrC,OAAO,EAAkB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAA;AAG3E,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,4BAA4B,CAAA;AAGnC,MAAM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, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, Input, Label, Popover, PopoverContent, PopoverTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyantjs/ui/components";
|
|
3
|
+
import { Badge, Button, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, cn, Input, Label, Popover, PopoverContent, PopoverTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyantjs/ui/components";
|
|
4
4
|
import { Accessibility, Bed, Crown, Pencil, Plus, Trash2, UserMinus, Users, UtensilsCrossed, X, } from "lucide-react";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
6
|
import { useAllocationUiMessagesOrDefault } from "../i18n/index.js";
|
|
7
7
|
import { groupResourcesBySubType, kindLabel, } from "./slot-allocation-model.js";
|
|
8
8
|
import { AllocationColumn } from "./slot-allocation-shared.js";
|
|
9
|
-
export function ResourceColumnsView({ kind, resources, travelers, occupants, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, renderTravelerActions, }) {
|
|
9
|
+
export function ResourceColumnsView({ kind, resources, travelers, occupants, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, onBookingOpen, renderTravelerActions, }) {
|
|
10
10
|
const messages = useAllocationUiMessagesOrDefault();
|
|
11
|
-
return (_jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(18rem,22rem)_1fr]", children: [_jsx(AllocationColumn, { id: "unallocated", icon: _jsx(Users, { className: "size-4", "aria-hidden": "true" }), title: messages.unallocated, description: messages.unallocatedDescription, count: occupants.unallocated.length, capacity: travelers.length, children: occupants.unallocated.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground", children: messages.unallocatedEmpty })) : (_jsx(UnallocatedTravelersTable, { travelers: occupants.unallocated, sharingGroupLabels: sharingGroupLabels, renderActions: renderTravelerActions })) }), _jsx("div", { className: "flex min-w-0 flex-col gap-6", children: resources.length === 0 ? (_jsx("div", { className: "rounded-md border border-dashed p-6 text-sm text-muted-foreground", children: messages.noResources })) : (groupResourcesBySubType(resources).map((group) => {
|
|
11
|
+
return (_jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(18rem,22rem)_1fr]", children: [_jsx(AllocationColumn, { id: "unallocated", icon: _jsx(Users, { className: "size-4", "aria-hidden": "true" }), title: messages.unallocated, description: messages.unallocatedDescription, count: occupants.unallocated.length, capacity: travelers.length, children: occupants.unallocated.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground", children: messages.unallocatedEmpty })) : (_jsx(UnallocatedTravelersTable, { travelers: occupants.unallocated, sharingGroupLabels: sharingGroupLabels, onBookingOpen: onBookingOpen, renderActions: renderTravelerActions })) }), _jsx("div", { className: "flex min-w-0 flex-col gap-6", children: resources.length === 0 ? (_jsx("div", { className: "rounded-md border border-dashed p-6 text-sm text-muted-foreground", children: messages.noResources })) : (groupResourcesBySubType(resources).map((group) => {
|
|
12
12
|
// The grouping function uses the raw `refId` as the label fallback.
|
|
13
13
|
// Resolve product-option ids back to human names so the section
|
|
14
14
|
// header reads "Standard double" instead of "POPT_01KRS8…".
|
|
15
15
|
const resolvedLabel = (group.label ? optionNamesById?.get(group.label) : null) ?? group.label;
|
|
16
16
|
const groupLabel = resolvedLabel ?? messages.resourceOtherGroup;
|
|
17
|
-
return (_jsxs("section", { "aria-label": groupLabel, className: "flex flex-col gap-2", children: [_jsx("header", { className: "flex items-baseline gap-2 border-b pb-1", children: _jsx("h3", { className: "text-sm font-semibold tracking-wide uppercase text-muted-foreground", children: groupLabel }) }), _jsx(ResourceGroupTable, { kind: kind, resources: group.resources, occupants: occupants, unallocated: occupants.unallocated, sharingGroupLabels: sharingGroupLabels, optionNamesById: optionNamesById, onAssignTraveler: onAssignTraveler, onUnassignTraveler: onUnassignTraveler, onRemoveResource: onRemoveResource, onEditResource: onEditResource })] }, group.key));
|
|
17
|
+
return (_jsxs("section", { "aria-label": groupLabel, className: "flex flex-col gap-2", children: [_jsx("header", { className: "flex items-baseline gap-2 border-b pb-1", children: _jsx("h3", { className: "text-sm font-semibold tracking-wide uppercase text-muted-foreground", children: groupLabel }) }), _jsx(ResourceGroupTable, { kind: kind, resources: group.resources, occupants: occupants, unallocated: occupants.unallocated, sharingGroupLabels: sharingGroupLabels, optionNamesById: optionNamesById, onAssignTraveler: onAssignTraveler, onUnassignTraveler: onUnassignTraveler, onRemoveResource: onRemoveResource, onEditResource: onEditResource, onBookingOpen: onBookingOpen })] }, group.key));
|
|
18
18
|
})) })] }));
|
|
19
19
|
}
|
|
20
|
-
function ResourceGroupTable({ kind, resources, occupants, unallocated, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, }) {
|
|
20
|
+
function ResourceGroupTable({ kind, resources, occupants, unallocated, sharingGroupLabels, optionNamesById, onAssignTraveler, onUnassignTraveler, onRemoveResource, onEditResource, onBookingOpen, }) {
|
|
21
21
|
const messages = useAllocationUiMessagesOrDefault();
|
|
22
22
|
const [editingId, setEditingId] = useState(null);
|
|
23
23
|
return (_jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { className: "bg-muted/40", children: [_jsx(TableHead, { className: "w-48", children: messages.resourceLabel }), _jsx(TableHead, { className: "w-20 text-center", children: messages.capacity }), _jsx(TableHead, { children: messages.travelers }), _jsx(TableHead, { className: "w-40 text-right", children: "\u00A0" })] }) }), _jsx(TableBody, { children: resources.map((resource) => {
|
|
@@ -29,10 +29,10 @@ function ResourceGroupTable({ kind, resources, occupants, unallocated, sharingGr
|
|
|
29
29
|
: null, isEditing: isEditing, isFull: isFull, canEdit: Boolean(onEditResource), onBeginEdit: () => setEditingId(resource.id), onCancelEdit: () => setEditingId(null), onSaveEdit: async (input) => {
|
|
30
30
|
await Promise.resolve(onEditResource?.(resource.id, input));
|
|
31
31
|
setEditingId(null);
|
|
32
|
-
}, onAssignTraveler: (travelerId) => onAssignTraveler(travelerId, resource.id), onUnassignTraveler: onUnassignTraveler, onRemoveResource: () => onRemoveResource(resource.id) }, resource.id));
|
|
32
|
+
}, onAssignTraveler: (travelerId) => onAssignTraveler(travelerId, resource.id), onUnassignTraveler: onUnassignTraveler, onRemoveResource: () => onRemoveResource(resource.id), onBookingOpen: onBookingOpen }, resource.id));
|
|
33
33
|
}) })] }) }));
|
|
34
34
|
}
|
|
35
|
-
function ResourceRow({ kind, resource, seated, unallocated, sharingGroupLabels, optionName, isEditing, isFull, canEdit, onBeginEdit, onCancelEdit, onSaveEdit, onAssignTraveler, onUnassignTraveler, onRemoveResource, }) {
|
|
35
|
+
function ResourceRow({ kind, resource, seated, unallocated, sharingGroupLabels, optionName, isEditing, isFull, canEdit, onBeginEdit, onCancelEdit, onSaveEdit, onAssignTraveler, onUnassignTraveler, onRemoveResource, onBookingOpen, }) {
|
|
36
36
|
const messages = useAllocationUiMessagesOrDefault();
|
|
37
37
|
const overCapacity = seated.length > resource.capacity;
|
|
38
38
|
if (isEditing && canEdit) {
|
|
@@ -40,11 +40,29 @@ function ResourceRow({ kind, resource, seated, unallocated, sharingGroupLabels,
|
|
|
40
40
|
}
|
|
41
41
|
return (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-medium", children: _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Bed, { className: "size-4 text-muted-foreground", "aria-hidden": "true" }), resource.label ?? kindLabel(kind, messages), optionName ? (_jsx(Badge, { variant: "secondary", className: "text-[10px] font-normal", children: optionName })) : null] }) }), _jsx(TableCell, { className: "text-center", children: _jsxs(Badge, { variant: overCapacity ? "destructive" : "outline", children: [seated.length, "/", resource.capacity] }) }), _jsx(TableCell, { className: "whitespace-normal py-2", children: _jsxs("div", { className: "flex flex-wrap items-center gap-1.5", children: [seated.map((traveler) => (_jsx(TravelerChip, { traveler: traveler, sharingGroupLabel: traveler.sharingGroupId
|
|
42
42
|
? (sharingGroupLabels[traveler.sharingGroupId] ?? null)
|
|
43
|
-
: null, onUnassign: () => onUnassignTraveler(traveler.id) }, traveler.id))), !isFull ? (_jsx(AssignTravelerPopover, { unallocated: unallocated, seatedBookingIds: new Set(seated.map((t) => t.bookingId)), onSelect: (travelerId) => onAssignTraveler(travelerId) })) : null] }) }), _jsx(TableCell, { className: "text-right", children: _jsxs("div", { className: "inline-flex items-center justify-end gap-1", children: [canEdit ? (_jsx(Button, { type: "button", variant: "ghost", size: "icon", onClick: onBeginEdit, "aria-label": messages.editResource, children: _jsx(Pencil, { className: "size-4", "aria-hidden": "true" }) })) : null, _jsx(Button, { type: "button", variant: "ghost", size: "icon", onClick: onRemoveResource, "aria-label": messages.remove, children: _jsx(Trash2, { className: "size-4", "aria-hidden": "true" }) })] }) })] }));
|
|
43
|
+
: null, onUnassign: () => onUnassignTraveler(traveler.id), onBookingOpen: onBookingOpen }, traveler.id))), !isFull ? (_jsx(AssignTravelerPopover, { unallocated: unallocated, seatedBookingIds: new Set(seated.map((t) => t.bookingId)), onSelect: (travelerId) => onAssignTraveler(travelerId) })) : null] }) }), _jsx(TableCell, { className: "text-right", children: _jsxs("div", { className: "inline-flex items-center justify-end gap-1", children: [canEdit ? (_jsx(Button, { type: "button", variant: "ghost", size: "icon", onClick: onBeginEdit, "aria-label": messages.editResource, children: _jsx(Pencil, { className: "size-4", "aria-hidden": "true" }) })) : null, _jsx(Button, { type: "button", variant: "ghost", size: "icon", onClick: onRemoveResource, "aria-label": messages.remove, children: _jsx(Trash2, { className: "size-4", "aria-hidden": "true" }) })] }) })] }));
|
|
44
44
|
}
|
|
45
|
-
function TravelerChip({ traveler, sharingGroupLabel, onUnassign, }) {
|
|
45
|
+
function TravelerChip({ traveler, sharingGroupLabel, onUnassign, onBookingOpen, }) {
|
|
46
46
|
const messages = useAllocationUiMessagesOrDefault();
|
|
47
|
-
return (_jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border bg-background px-2 py-0.5 text-xs", children: [_jsx("span", { className: "truncate font-medium", title: sharingGroupLabel ?? undefined, children: traveler.fullName }), _jsx("span", { className: "text-muted-foreground", children: traveler.bookingNumber }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-4 rounded-full", onClick: onUnassign, "aria-label": `${messages.remove}: ${traveler.fullName}`, children: _jsx(X, { className: "size-3", "aria-hidden": "true" }) })] }));
|
|
47
|
+
return (_jsxs("span", { className: cn("inline-flex items-center gap-1 rounded-full border bg-background px-2 py-0.5 text-xs", paymentStatusChipClass(traveler.paymentStatus)), title: paymentStatusTooltip(traveler.paymentStatus, messages), children: [_jsx("span", { className: "truncate font-medium", title: sharingGroupLabel ?? undefined, children: traveler.fullName }), onBookingOpen ? (_jsx("button", { type: "button", onClick: () => onBookingOpen(traveler.bookingId), className: "text-muted-foreground hover:text-foreground hover:underline", children: traveler.bookingNumber })) : (_jsx("span", { className: "text-muted-foreground", children: traveler.bookingNumber })), _jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-4 rounded-full", onClick: onUnassign, "aria-label": `${messages.remove}: ${traveler.fullName}`, children: _jsx(X, { className: "size-3", "aria-hidden": "true" }) })] }));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Border + background tint that mirrors the booking's payment status:
|
|
51
|
+
* red for unpaid, amber for partial, emerald for paid. Tailwind classes
|
|
52
|
+
* are explicit (no template strings) so the v4 JIT scanner picks them up.
|
|
53
|
+
*/
|
|
54
|
+
function paymentStatusChipClass(status) {
|
|
55
|
+
switch (status) {
|
|
56
|
+
case "paid":
|
|
57
|
+
return "border-emerald-500/40 bg-emerald-500/5";
|
|
58
|
+
case "partial":
|
|
59
|
+
return "border-amber-500/40 bg-amber-500/5";
|
|
60
|
+
case "unpaid":
|
|
61
|
+
return "border-rose-500/40 bg-rose-500/5";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function paymentStatusTooltip(status, messages) {
|
|
65
|
+
return messages.paymentStatusLabels?.[status] ?? status;
|
|
48
66
|
}
|
|
49
67
|
function AssignTravelerPopover({ unallocated, seatedBookingIds, onSelect, }) {
|
|
50
68
|
const messages = useAllocationUiMessagesOrDefault();
|
|
@@ -94,8 +112,23 @@ function ResourceEditForm({ kind, resource, minCapacity, onCancel, onSave, }) {
|
|
|
94
112
|
* small slot scroll. Keeps the same metadata (lead flag, sharing group,
|
|
95
113
|
* accessibility / dietary icons, booking number) but in a single row.
|
|
96
114
|
*/
|
|
97
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Lighter tint than the chip — the row already has a left-column status
|
|
117
|
+
* bar via the booking-number cell, and a full-width tint would fight
|
|
118
|
+
* the table's striping. Just enough color to skim a denied row.
|
|
119
|
+
*/
|
|
120
|
+
function paymentStatusUnallocatedRowClass(status) {
|
|
121
|
+
switch (status) {
|
|
122
|
+
case "paid":
|
|
123
|
+
return "text-emerald-700 dark:text-emerald-300";
|
|
124
|
+
case "partial":
|
|
125
|
+
return "text-amber-700 dark:text-amber-300";
|
|
126
|
+
case "unpaid":
|
|
127
|
+
return "text-rose-700 dark:text-rose-300";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function UnallocatedTravelersTable({ travelers, sharingGroupLabels, onBookingOpen, renderActions, }) {
|
|
98
131
|
const messages = useAllocationUiMessagesOrDefault();
|
|
99
132
|
const hasActions = Boolean(renderActions);
|
|
100
|
-
return (_jsx("div", { className: "overflow-hidden rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { className: "bg-muted/40", children: [_jsx(TableHead, { className: "px-3 py-1.5 text-xs", children: messages.travelers }), _jsx(TableHead, { className: "px-3 py-1.5 text-xs", children: "\u00A0" }), hasActions ? _jsx(TableHead, { className: "w-12 px-3 py-1.5" }) : null] }) }), _jsx(TableBody, { children: travelers.map((traveler) => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "px-3 py-1.5", children: _jsxs("div", { className: "flex items-center gap-1.5", children: [traveler.isLeadTraveler ? (_jsx(Crown, { className: "size-3.5 shrink-0 text-amber-500", "aria-label": messages.lead })) : null, _jsx("span", { className: "truncate font-medium text-sm", children: traveler.fullName }), traveler.sharingGroupId ? (_jsx(Badge, { variant: "secondary", className: "max-w-full truncate text-[10px]", children: sharingGroupLabels[traveler.sharingGroupId] ?? messages.sharingGroup })) : null, traveler.hasAccessibilityNeeds ? (_jsx(Accessibility, { className: "size-3.5 shrink-0 text-muted-foreground", "aria-label": messages.accessibility })) : null, traveler.hasDietaryRequirements ? (_jsx(UtensilsCrossed, { className: "size-3.5 shrink-0 text-muted-foreground", "aria-label": messages.dietary })) : null] }) }), _jsx(TableCell, { className: "px-3 py-1.5 text-muted-foreground text-
|
|
133
|
+
return (_jsx("div", { className: "overflow-hidden rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { className: "bg-muted/40", children: [_jsx(TableHead, { className: "px-3 py-1.5 text-xs", children: messages.travelers }), _jsx(TableHead, { className: "px-3 py-1.5 text-xs", children: "\u00A0" }), hasActions ? _jsx(TableHead, { className: "w-12 px-3 py-1.5" }) : null] }) }), _jsx(TableBody, { children: travelers.map((traveler) => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "px-3 py-1.5", children: _jsxs("div", { className: "flex items-center gap-1.5", children: [traveler.isLeadTraveler ? (_jsx(Crown, { className: "size-3.5 shrink-0 text-amber-500", "aria-label": messages.lead })) : null, _jsx("span", { className: "truncate font-medium text-sm", children: traveler.fullName }), traveler.sharingGroupId ? (_jsx(Badge, { variant: "secondary", className: "max-w-full truncate text-[10px]", children: sharingGroupLabels[traveler.sharingGroupId] ?? messages.sharingGroup })) : null, traveler.hasAccessibilityNeeds ? (_jsx(Accessibility, { className: "size-3.5 shrink-0 text-muted-foreground", "aria-label": messages.accessibility })) : null, traveler.hasDietaryRequirements ? (_jsx(UtensilsCrossed, { className: "size-3.5 shrink-0 text-muted-foreground", "aria-label": messages.dietary })) : null] }) }), _jsx(TableCell, { className: cn("px-3 py-1.5 text-xs", paymentStatusUnallocatedRowClass(traveler.paymentStatus)), children: onBookingOpen ? (_jsx("button", { type: "button", onClick: () => onBookingOpen(traveler.bookingId), className: "text-muted-foreground hover:text-foreground hover:underline", children: traveler.bookingNumber })) : (_jsx("span", { className: "text-muted-foreground", children: traveler.bookingNumber })) }), hasActions ? (_jsx(TableCell, { className: "px-3 py-1.5 text-right", children: renderActions?.(traveler) })) : null] }, traveler.id))) })] }) }));
|
|
101
134
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AllocationManifestTraveler, AllocationResource } from "@voyantjs/availability-react";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
3
|
import { type AllocationOccupants } from "./slot-allocation-model.js";
|
|
4
|
-
export declare function VehicleSeatsView({ seats, vehicles, occupants, sharingGroupLabels, onAssignTraveler, onUnassignTraveler, renderTravelerActions, }: {
|
|
4
|
+
export declare function VehicleSeatsView({ seats, vehicles, occupants, sharingGroupLabels, onAssignTraveler, onUnassignTraveler, onBookingOpen, renderTravelerActions, }: {
|
|
5
5
|
seats: AllocationResource[];
|
|
6
6
|
vehicles: AllocationResource[];
|
|
7
7
|
occupants: AllocationOccupants;
|
|
@@ -10,6 +10,8 @@ export declare function VehicleSeatsView({ seats, vehicles, occupants, sharingGr
|
|
|
10
10
|
onAssignTraveler: (travelerId: string, resourceId: string) => void;
|
|
11
11
|
/** Remove a traveler from their current seat (no resource id required). */
|
|
12
12
|
onUnassignTraveler: (travelerId: string) => void;
|
|
13
|
+
/** Fired when the operator clicks a booking number on a seat / tile. */
|
|
14
|
+
onBookingOpen?: (bookingId: string) => void;
|
|
13
15
|
renderTravelerActions?: (traveler: AllocationManifestTraveler) => ReactNode;
|
|
14
16
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
//# sourceMappingURL=slot-allocation-seat-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slot-allocation-seat-view.d.ts","sourceRoot":"","sources":["../../src/components/slot-allocation-seat-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,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EAAE,CAAA;IAC9B,SAAS,EAAE,mBAAmB,CAAA;IAC9B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,kEAAkE;IAClE,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAClE,2EAA2E;IAC3E,kBAAkB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD,wEAAwE;IACxE,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,0BAA0B,KAAK,SAAS,CAAA;CAC5E,2CA4FA"}
|
|
@@ -6,7 +6,7 @@ import { useState } from "react";
|
|
|
6
6
|
import { useAllocationUiMessagesOrDefault } from "../i18n/index.js";
|
|
7
7
|
import { groupSeatsByVehicle, seatName, seatRows, } from "./slot-allocation-model.js";
|
|
8
8
|
import { AllocationColumn, SeatPositionBadge, TravelerTile } from "./slot-allocation-shared.js";
|
|
9
|
-
export function VehicleSeatsView({ seats, vehicles, occupants, sharingGroupLabels, onAssignTraveler, onUnassignTraveler, renderTravelerActions, }) {
|
|
9
|
+
export function VehicleSeatsView({ seats, vehicles, occupants, sharingGroupLabels, onAssignTraveler, onUnassignTraveler, onBookingOpen, renderTravelerActions, }) {
|
|
10
10
|
const messages = useAllocationUiMessagesOrDefault();
|
|
11
11
|
const groups = groupSeatsByVehicle(seats, vehicles, messages);
|
|
12
12
|
return (_jsxs("div", { className: "grid gap-4 xl:grid-cols-[minmax(18rem,22rem)_1fr]", children: [_jsx(AllocationColumn, { id: "unallocated", icon: _jsx(Users, { className: "size-4", "aria-hidden": "true" }), title: messages.unallocated, description: messages.unallocatedDescription, count: occupants.unallocated.length, capacity: occupants.byTravelerId.size, children: occupants.unallocated.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground", children: messages.unallocatedEmpty })) : (occupants.unallocated.map((traveler) => (_jsx(TravelerTile, { traveler: traveler, sharingGroupLabel: traveler.sharingGroupId ? sharingGroupLabels[traveler.sharingGroupId] : null, renderActions: renderTravelerActions }, traveler.id)))) }), _jsx("div", { className: "grid min-w-0 gap-4", children: seats.length === 0 ? (_jsx("div", { className: "rounded-md border border-dashed p-6 text-sm text-muted-foreground", children: messages.noSeats })) : (groups.map((group) => (_jsxs(Card, { children: [_jsx(CardHeader, { className: "pb-3", children: _jsxs(CardTitle, { className: "flex flex-wrap items-center gap-2 text-base", children: [_jsx(Armchair, { className: "size-4", "aria-hidden": "true" }), _jsx("span", { children: group.label }), _jsxs(Badge, { variant: "outline", children: [group.seats.filter((seat) => (occupants.byResource.get(seat.id) ?? []).length > 0).length, "/", group.seats.length] })] }) }), _jsx(CardContent, { children: _jsx("div", { className: "grid gap-2", children: seatRows(group.seats).map((row) => (_jsx("div", { className: "grid items-stretch gap-2", style: {
|
|
@@ -15,15 +15,15 @@ export function VehicleSeatsView({ seats, vehicles, occupants, sharingGroupLabel
|
|
|
15
15
|
const seatOccupants = occupants.byResource.get(seat.id) ?? [];
|
|
16
16
|
return (_jsx(VehicleSeatCell, { seat: seat, occupant: seatOccupants[0] ?? null, overflow: seatOccupants.length > 1, unallocated: occupants.unallocated, sharingGroupLabel: seatOccupants[0]?.sharingGroupId
|
|
17
17
|
? sharingGroupLabels[seatOccupants[0].sharingGroupId]
|
|
18
|
-
: null, onAssignTraveler: (travelerId) => onAssignTraveler(travelerId, seat.id), onUnassignTraveler: onUnassignTraveler }, seat.id));
|
|
18
|
+
: null, onAssignTraveler: (travelerId) => onAssignTraveler(travelerId, seat.id), onUnassignTraveler: onUnassignTraveler, onBookingOpen: onBookingOpen }, seat.id));
|
|
19
19
|
}) }, row.rowKey))) }) })] }, group.id)))) })] }));
|
|
20
20
|
}
|
|
21
|
-
function VehicleSeatCell({ seat, occupant, overflow, unallocated, sharingGroupLabel, onAssignTraveler, onUnassignTraveler, }) {
|
|
21
|
+
function VehicleSeatCell({ seat, occupant, overflow, unallocated, sharingGroupLabel, onAssignTraveler, onUnassignTraveler, onBookingOpen, }) {
|
|
22
22
|
const messages = useAllocationUiMessagesOrDefault();
|
|
23
23
|
const [pickerOpen, setPickerOpen] = useState(false);
|
|
24
24
|
const cellClasses = cn("flex min-h-24 flex-col rounded-md border bg-background p-2 text-left text-xs", overflow ? "border-destructive bg-destructive/5" /* i18n-literal-ok CSS class token */ : null);
|
|
25
25
|
if (occupant) {
|
|
26
|
-
return (_jsxs("div", { id: `seat:${seat.id}`, className: cellClasses, children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("span", { className: "font-medium", children: seat.label ?? seatName(seat, messages) }), _jsx(SeatPositionBadge, { seat: seat })] }), _jsxs("div", { className: "mt-2 min-w-0", children: [_jsxs("div", { className: "flex items-center gap-1", children: [occupant.isLeadTraveler ? (_jsx(Crown, { className: "size-3 text-amber-500", "aria-label": messages.lead })) : null, _jsx("span", { className: "truncate font-medium", children: occupant.fullName })] }), _jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-1 text-muted-foreground", children: [_jsx("span", { children: occupant.bookingNumber }), sharingGroupLabel ? (_jsx(Badge, { variant: "secondary", className: "max-w-full truncate text-[10px]", children: sharingGroupLabel })) : null] })] }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "mt-auto h-6 self-end px-1 text-xs", onClick: () => onUnassignTraveler(occupant.id), "aria-label": `${messages.remove}: ${occupant.fullName}`, children: _jsx(X, { className: "size-3", "aria-hidden": "true" }) })] }));
|
|
26
|
+
return (_jsxs("div", { id: `seat:${seat.id}`, className: cellClasses, children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("span", { className: "font-medium", children: seat.label ?? seatName(seat, messages) }), _jsx(SeatPositionBadge, { seat: seat })] }), _jsxs("div", { className: "mt-2 min-w-0", children: [_jsxs("div", { className: "flex items-center gap-1", children: [occupant.isLeadTraveler ? (_jsx(Crown, { className: "size-3 text-amber-500", "aria-label": messages.lead })) : null, _jsx("span", { className: "truncate font-medium", children: occupant.fullName })] }), _jsxs("div", { className: "mt-1 flex flex-wrap items-center gap-1 text-muted-foreground", children: [onBookingOpen ? (_jsx("button", { type: "button", onClick: () => onBookingOpen(occupant.bookingId), className: "hover:text-foreground hover:underline", children: occupant.bookingNumber })) : (_jsx("span", { children: occupant.bookingNumber })), sharingGroupLabel ? (_jsx(Badge, { variant: "secondary", className: "max-w-full truncate text-[10px]", children: sharingGroupLabel })) : null] })] }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "mt-auto h-6 self-end px-1 text-xs", onClick: () => onUnassignTraveler(occupant.id), "aria-label": `${messages.remove}: ${occupant.fullName}`, children: _jsx(X, { className: "size-3", "aria-hidden": "true" }) })] }));
|
|
27
27
|
}
|
|
28
28
|
const disabled = unallocated.length === 0;
|
|
29
29
|
return (_jsxs("div", { id: `seat:${seat.id}`, className: cellClasses, children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("span", { className: "font-medium", children: seat.label ?? seatName(seat, messages) }), _jsx(SeatPositionBadge, { seat: seat })] }), _jsxs(Popover, { open: pickerOpen, onOpenChange: setPickerOpen, children: [_jsx(PopoverTrigger, { render: _jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "mt-auto h-7 w-full justify-center rounded border border-dashed text-muted-foreground", disabled: disabled, "aria-label": messages.assignTraveler, children: disabled ? messages.assignTravelerEmpty : messages.assignTraveler }) }), _jsx(PopoverContent, { className: "w-72 p-0", align: "start", children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: messages.assignTravelerSearch }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: messages.assignTravelerEmpty }), _jsx(CommandGroup, { children: unallocated.map((traveler) => (_jsx(CommandItem, { value: `${traveler.fullName} ${traveler.bookingNumber}`, onSelect: () => {
|
package/dist/i18n/provider.d.ts
CHANGED
|
@@ -81,6 +81,7 @@ export type AllocationUiMessages = Record<string, unknown> & {
|
|
|
81
81
|
generateRoomsFailed: string;
|
|
82
82
|
generateResourcesFailed: string;
|
|
83
83
|
autoAllocateFailed: string;
|
|
84
|
+
paymentStatusLabels: Record<"paid" | "partial" | "unpaid", string>;
|
|
84
85
|
};
|
|
85
86
|
export declare const allocationUiEn: {
|
|
86
87
|
pageTitle: string;
|
|
@@ -175,6 +176,11 @@ export declare const allocationUiEn: {
|
|
|
175
176
|
generateRoomsFailed: string;
|
|
176
177
|
generateResourcesFailed: string;
|
|
177
178
|
autoAllocateFailed: string;
|
|
179
|
+
paymentStatusLabels: {
|
|
180
|
+
paid: string;
|
|
181
|
+
partial: string;
|
|
182
|
+
unpaid: string;
|
|
183
|
+
};
|
|
178
184
|
};
|
|
179
185
|
export declare const allocationUiRo: {
|
|
180
186
|
pageTitle: string;
|
|
@@ -269,6 +275,11 @@ export declare const allocationUiRo: {
|
|
|
269
275
|
generateRoomsFailed: string;
|
|
270
276
|
generateResourcesFailed: string;
|
|
271
277
|
autoAllocateFailed: string;
|
|
278
|
+
paymentStatusLabels: {
|
|
279
|
+
paid: string;
|
|
280
|
+
partial: string;
|
|
281
|
+
unpaid: string;
|
|
282
|
+
};
|
|
272
283
|
};
|
|
273
284
|
export declare const allocationUiMessageDefinitions: {
|
|
274
285
|
en: {
|
|
@@ -364,6 +375,11 @@ export declare const allocationUiMessageDefinitions: {
|
|
|
364
375
|
generateRoomsFailed: string;
|
|
365
376
|
generateResourcesFailed: string;
|
|
366
377
|
autoAllocateFailed: string;
|
|
378
|
+
paymentStatusLabels: {
|
|
379
|
+
paid: string;
|
|
380
|
+
partial: string;
|
|
381
|
+
unpaid: string;
|
|
382
|
+
};
|
|
367
383
|
};
|
|
368
384
|
ro: {
|
|
369
385
|
pageTitle: string;
|
|
@@ -458,6 +474,11 @@ export declare const allocationUiMessageDefinitions: {
|
|
|
458
474
|
generateRoomsFailed: string;
|
|
459
475
|
generateResourcesFailed: string;
|
|
460
476
|
autoAllocateFailed: string;
|
|
477
|
+
paymentStatusLabels: {
|
|
478
|
+
paid: string;
|
|
479
|
+
partial: string;
|
|
480
|
+
unpaid: string;
|
|
481
|
+
};
|
|
461
482
|
};
|
|
462
483
|
};
|
|
463
484
|
export type AllocationUiMessageOverrides = LocaleMessageOverrides<AllocationUiMessages>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/i18n/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,YAAY,EAAE,MAAM,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,yBAAyB,EAAE,M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,11 @@ export const allocationUiEn = {
|
|
|
94
94
|
generateRoomsFailed: "Could not generate rooms.",
|
|
95
95
|
generateResourcesFailed: "Could not generate resources.",
|
|
96
96
|
autoAllocateFailed: "Could not auto-allocate travelers.",
|
|
97
|
+
paymentStatusLabels: {
|
|
98
|
+
paid: "Paid",
|
|
99
|
+
partial: "Partially paid",
|
|
100
|
+
unpaid: "Unpaid",
|
|
101
|
+
},
|
|
97
102
|
};
|
|
98
103
|
export const allocationUiRo = {
|
|
99
104
|
pageTitle: "Alocare",
|
|
@@ -188,6 +193,11 @@ export const allocationUiRo = {
|
|
|
188
193
|
generateRoomsFailed: "Camerele nu au putut fi generate.",
|
|
189
194
|
generateResourcesFailed: "Resursele nu au putut fi generate.",
|
|
190
195
|
autoAllocateFailed: "Calatorii nu au putut fi auto-alocati.",
|
|
196
|
+
paymentStatusLabels: {
|
|
197
|
+
paid: "Achitata",
|
|
198
|
+
partial: "Partial achitata",
|
|
199
|
+
unpaid: "Neachitata",
|
|
200
|
+
},
|
|
191
201
|
};
|
|
192
202
|
const fallbackLocale = "en";
|
|
193
203
|
export const allocationUiMessageDefinitions = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/allocation-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"lucide-react": "^0.475.0",
|
|
35
35
|
"react": "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
|
-
"@voyantjs/availability-react": "0.
|
|
38
|
-
"@voyantjs/i18n": "0.
|
|
39
|
-
"@voyantjs/ui": "0.
|
|
37
|
+
"@voyantjs/availability-react": "0.63.1",
|
|
38
|
+
"@voyantjs/i18n": "0.63.1",
|
|
39
|
+
"@voyantjs/ui": "0.63.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"react-dom": "^19.2.4",
|
|
48
48
|
"typescript": "^6.0.2",
|
|
49
49
|
"vitest": "^4.1.2",
|
|
50
|
-
"@voyantjs/
|
|
51
|
-
"@voyantjs/
|
|
52
|
-
"@voyantjs/
|
|
53
|
-
"@voyantjs/
|
|
50
|
+
"@voyantjs/i18n": "0.63.1",
|
|
51
|
+
"@voyantjs/ui": "0.63.1",
|
|
52
|
+
"@voyantjs/voyant-typescript-config": "0.1.0",
|
|
53
|
+
"@voyantjs/availability-react": "0.63.1"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
56
56
|
"dist",
|