@voyantjs/flights-ui 0.52.1 → 0.52.3
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.
|
@@ -20,7 +20,7 @@ export function BillingPersonPicker({ apply, onPersonSelected }) {
|
|
|
20
20
|
limit: 30,
|
|
21
21
|
enabled: open,
|
|
22
22
|
});
|
|
23
|
-
const people = (peopleQuery.data?.data ?? []).filter((person) => isAdult(person.
|
|
23
|
+
const people = (peopleQuery.data?.data ?? []).filter((person) => isAdult(person.dateOfBirth));
|
|
24
24
|
return (_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsxs(PopoverTrigger, { render: _jsx(Button, { type: "button", variant: "outline", size: "sm", className: "gap-2" }), children: [_jsx(Users, { className: "h-3.5 w-3.5" }), messages.personTrigger, _jsx(ChevronDown, { className: "h-3.5 w-3.5 text-muted-foreground" })] }), _jsx(PopoverContent, { className: "w-[340px] p-0", align: "end", children: _jsxs(Command, { shouldFilter: false, children: [_jsx(CommandInput, { value: search, onValueChange: setSearch, placeholder: messages.personSearchPlaceholder }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: peopleQuery.isLoading ? messages.peopleSearching : messages.peopleEmpty }), _jsx(CommandGroup, { children: people.map((person) => {
|
|
25
25
|
const fullName = `${person.firstName} ${person.lastName}`.trim();
|
|
26
26
|
return (_jsx(CommandItem, { value: `${fullName} ${person.email ?? ""}`, onSelect: async () => {
|
|
@@ -80,10 +80,10 @@ export function BillingOrgPicker({ apply }) {
|
|
|
80
80
|
setSearch("");
|
|
81
81
|
}, children: _jsxs("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [_jsx("span", { className: "truncate font-medium text-sm", children: org.name }), org.legalName && (_jsx("span", { className: "truncate text-muted-foreground text-xs", children: org.legalName }))] }) }, org.id))) })] })] }) })] }));
|
|
82
82
|
}
|
|
83
|
-
function isAdult(
|
|
84
|
-
if (!
|
|
83
|
+
function isAdult(dateOfBirth) {
|
|
84
|
+
if (!dateOfBirth)
|
|
85
85
|
return true;
|
|
86
|
-
const dob = new Date(
|
|
86
|
+
const dob = new Date(dateOfBirth);
|
|
87
87
|
if (Number.isNaN(dob.getTime()))
|
|
88
88
|
return true;
|
|
89
89
|
const now = new Date();
|
|
@@ -32,7 +32,7 @@ export function PassengerContactPicker({ onPick, onAddContact, onPersonSelected,
|
|
|
32
32
|
email: person.email ?? undefined,
|
|
33
33
|
phone: person.phone ?? undefined,
|
|
34
34
|
...(person.gender ? { gender: person.gender } : {}),
|
|
35
|
-
...(person.
|
|
35
|
+
...(person.dateOfBirth ? { dateOfBirth: person.dateOfBirth } : {}),
|
|
36
36
|
});
|
|
37
37
|
onPersonSelected?.(person.id);
|
|
38
38
|
setOpen(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/flights-ui",
|
|
3
|
-
"version": "0.52.
|
|
3
|
+
"version": "0.52.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"@tanstack/react-table": "^8.0.0",
|
|
45
45
|
"react": "^19.0.0",
|
|
46
46
|
"react-dom": "^19.0.0",
|
|
47
|
-
"@voyantjs/crm-react": "0.52.
|
|
48
|
-
"@voyantjs/finance": "0.52.
|
|
49
|
-
"@voyantjs/flights": "0.52.
|
|
50
|
-
"@voyantjs/flights-react": "0.52.
|
|
51
|
-
"@voyantjs/checkout-ui": "0.52.
|
|
52
|
-
"@voyantjs/ui": "0.52.
|
|
47
|
+
"@voyantjs/crm-react": "0.52.3",
|
|
48
|
+
"@voyantjs/finance": "0.52.3",
|
|
49
|
+
"@voyantjs/flights": "0.52.3",
|
|
50
|
+
"@voyantjs/flights-react": "0.52.3",
|
|
51
|
+
"@voyantjs/checkout-ui": "0.52.3",
|
|
52
|
+
"@voyantjs/ui": "0.52.3"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@voyantjs/i18n": "0.52.
|
|
55
|
+
"@voyantjs/i18n": "0.52.3"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"react-dom": "^19.2.4",
|
|
65
65
|
"typescript": "^6.0.2",
|
|
66
66
|
"vitest": "^4.1.2",
|
|
67
|
-
"@voyantjs/crm-react": "0.52.
|
|
68
|
-
"@voyantjs/finance": "0.52.
|
|
69
|
-
"@voyantjs/flights": "0.52.
|
|
70
|
-
"@voyantjs/flights-react": "0.52.
|
|
71
|
-
"@voyantjs/checkout-ui": "0.52.
|
|
72
|
-
"@voyantjs/i18n": "0.52.
|
|
73
|
-
"@voyantjs/ui": "0.52.
|
|
67
|
+
"@voyantjs/crm-react": "0.52.3",
|
|
68
|
+
"@voyantjs/finance": "0.52.3",
|
|
69
|
+
"@voyantjs/flights": "0.52.3",
|
|
70
|
+
"@voyantjs/flights-react": "0.52.3",
|
|
71
|
+
"@voyantjs/checkout-ui": "0.52.3",
|
|
72
|
+
"@voyantjs/i18n": "0.52.3",
|
|
73
|
+
"@voyantjs/ui": "0.52.3",
|
|
74
74
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
75
75
|
},
|
|
76
76
|
"files": [
|