@asdp/ferryui 0.1.22-dev.10210 → 0.1.22-dev.10214
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/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11344,6 +11344,15 @@ var ModalPassengerForm = ({
|
|
|
11344
11344
|
const dynamicMinLengthId = idRuleLengthMatch ? parseInt(idRuleLengthMatch[1], 10) : 6;
|
|
11345
11345
|
useEffect(() => {
|
|
11346
11346
|
reset(defaultValues);
|
|
11347
|
+
if (defaultValues?.birthdate) {
|
|
11348
|
+
const { years, months } = calculateAge(defaultValues.birthdate);
|
|
11349
|
+
setValue(
|
|
11350
|
+
"age",
|
|
11351
|
+
`${years} ${mergedLabels.yearLabel} ${months} ${mergedLabels.monthLabel}`
|
|
11352
|
+
);
|
|
11353
|
+
} else {
|
|
11354
|
+
setValue("age", "");
|
|
11355
|
+
}
|
|
11347
11356
|
}, [defaultValues, reset]);
|
|
11348
11357
|
useEffect(() => {
|
|
11349
11358
|
if (watchIdentityTypeId) {
|
|
@@ -11361,6 +11370,7 @@ var ModalPassengerForm = ({
|
|
|
11361
11370
|
setValue("age", "");
|
|
11362
11371
|
}
|
|
11363
11372
|
}, [
|
|
11373
|
+
open,
|
|
11364
11374
|
watchBirthdate,
|
|
11365
11375
|
setValue,
|
|
11366
11376
|
mergedLabels.yearLabel,
|
|
@@ -12232,6 +12242,7 @@ var CardPassengerList = ({
|
|
|
12232
12242
|
title,
|
|
12233
12243
|
passengers,
|
|
12234
12244
|
onPassengerClick,
|
|
12245
|
+
onIconClick,
|
|
12235
12246
|
labels,
|
|
12236
12247
|
className
|
|
12237
12248
|
}) => {
|
|
@@ -12298,7 +12309,14 @@ var CardPassengerList = ({
|
|
|
12298
12309
|
{
|
|
12299
12310
|
icon: passenger.id && passenger.serviceName ? "fluent:edit-24-regular" : "fluent:chevron-right-24-regular",
|
|
12300
12311
|
width: 20,
|
|
12301
|
-
height: 20
|
|
12312
|
+
height: 20,
|
|
12313
|
+
onClick: (event) => {
|
|
12314
|
+
onIconClick(
|
|
12315
|
+
event,
|
|
12316
|
+
passenger,
|
|
12317
|
+
passenger.id && passenger.serviceName ? "edit" : "add"
|
|
12318
|
+
);
|
|
12319
|
+
}
|
|
12302
12320
|
}
|
|
12303
12321
|
)
|
|
12304
12322
|
]
|