@asdp/ferryui 0.1.22-dev.9513 → 0.1.22-dev.9532
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 +16 -15
- package/dist/index.d.ts +16 -15
- package/dist/index.js +333 -134
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +333 -134
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10968,7 +10968,6 @@ var ModalPassengerForm = ({
|
|
|
10968
10968
|
const { control, handleSubmit, reset, watch, setValue } = reactHookForm.useForm({
|
|
10969
10969
|
defaultValues
|
|
10970
10970
|
});
|
|
10971
|
-
watch();
|
|
10972
10971
|
const watchIdentityTypeId = watch("identityTypeId");
|
|
10973
10972
|
const watchPassportCountryId = watch("countryId");
|
|
10974
10973
|
const watchBirthdate = watch("birthdate");
|
|
@@ -12170,6 +12169,10 @@ var CardVehicleOwnerForm = ({
|
|
|
12170
12169
|
}) => {
|
|
12171
12170
|
const styles = useStyles27();
|
|
12172
12171
|
const mergedLabels = { ...DEFAULT_LABELS26[language], ...labels };
|
|
12172
|
+
const formValues = watch();
|
|
12173
|
+
React.useEffect(() => {
|
|
12174
|
+
console.log("[CardVehicleOwnerForm] Form values changed:", formValues);
|
|
12175
|
+
}, [formValues]);
|
|
12173
12176
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Card, { className: styles.card, children: [
|
|
12174
12177
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.header, children: [
|
|
12175
12178
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
|
|
@@ -12255,11 +12258,15 @@ var CardVehicleOwnerForm = ({
|
|
|
12255
12258
|
disabled,
|
|
12256
12259
|
layout: "horizontal",
|
|
12257
12260
|
value: owner.senderEntityType,
|
|
12258
|
-
onChange: (_, data) =>
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12261
|
+
onChange: (_, data) => {
|
|
12262
|
+
onUpdateOwner(owner.id, {
|
|
12263
|
+
senderEntityType: data.value,
|
|
12264
|
+
senderEntity: "",
|
|
12265
|
+
senderEntityOther: ""
|
|
12266
|
+
});
|
|
12267
|
+
setValue(`owners.${index}.senderEntity`, "");
|
|
12268
|
+
setValue(`owners.${index}.senderEntityOther`, "");
|
|
12269
|
+
},
|
|
12263
12270
|
children: [
|
|
12264
12271
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12265
12272
|
reactComponents.Radio,
|
|
@@ -12280,29 +12287,52 @@ var CardVehicleOwnerForm = ({
|
|
|
12280
12287
|
)
|
|
12281
12288
|
}
|
|
12282
12289
|
),
|
|
12283
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12288
|
-
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12300
|
-
|
|
12301
|
-
|
|
12302
|
-
|
|
12303
|
-
|
|
12304
|
-
|
|
12305
|
-
|
|
12290
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
12291
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12292
|
+
reactGridSystem.Col,
|
|
12293
|
+
{
|
|
12294
|
+
xl: owner.senderEntityType === MANIFEST_ENTITY.COMPANY && owner.senderEntity === "999999" ? 6 : 12,
|
|
12295
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12296
|
+
InputDynamic_default,
|
|
12297
|
+
{
|
|
12298
|
+
control,
|
|
12299
|
+
disabled,
|
|
12300
|
+
name: `owners.${index}.senderEntity`,
|
|
12301
|
+
placeholder: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12302
|
+
size: "large",
|
|
12303
|
+
type: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? "select" : "text",
|
|
12304
|
+
options: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? companySenderOptions : [],
|
|
12305
|
+
onChange: (val) => {
|
|
12306
|
+
setValue(`owners.${index}.senderEntity`, val);
|
|
12307
|
+
onUpdateOwner(owner.id, {
|
|
12308
|
+
senderEntity: val
|
|
12309
|
+
});
|
|
12310
|
+
}
|
|
12311
|
+
}
|
|
12312
|
+
)
|
|
12313
|
+
}
|
|
12314
|
+
),
|
|
12315
|
+
owner.senderEntityType === MANIFEST_ENTITY.COMPANY && owner.senderEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12316
|
+
InputDynamic_default,
|
|
12317
|
+
{
|
|
12318
|
+
control,
|
|
12319
|
+
disabled,
|
|
12320
|
+
name: `owners.${index}.senderEntityOther`,
|
|
12321
|
+
placeholder: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12322
|
+
size: "large",
|
|
12323
|
+
type: "text",
|
|
12324
|
+
onChange: (val) => {
|
|
12325
|
+
setValue(
|
|
12326
|
+
`owners.${index}.senderEntityOther`,
|
|
12327
|
+
val
|
|
12328
|
+
);
|
|
12329
|
+
onUpdateOwner(owner.id, {
|
|
12330
|
+
senderEntityOther: val
|
|
12331
|
+
});
|
|
12332
|
+
}
|
|
12333
|
+
}
|
|
12334
|
+
) })
|
|
12335
|
+
] })
|
|
12306
12336
|
] }),
|
|
12307
12337
|
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { lg: 6, children: [
|
|
12308
12338
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "1rem" } }),
|
|
@@ -12319,7 +12349,13 @@ var CardVehicleOwnerForm = ({
|
|
|
12319
12349
|
name: `owners.${index}.estimatedWeight`,
|
|
12320
12350
|
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
12321
12351
|
size: "large",
|
|
12322
|
-
type: "number"
|
|
12352
|
+
type: "number",
|
|
12353
|
+
onChange: (val) => {
|
|
12354
|
+
setValue(`owners.${index}.estimatedWeight`, val);
|
|
12355
|
+
onUpdateOwner(owner.id, {
|
|
12356
|
+
estimatedWeight: val
|
|
12357
|
+
});
|
|
12358
|
+
}
|
|
12323
12359
|
}
|
|
12324
12360
|
)
|
|
12325
12361
|
] })
|
|
@@ -12332,11 +12368,17 @@ var CardVehicleOwnerForm = ({
|
|
|
12332
12368
|
{
|
|
12333
12369
|
control,
|
|
12334
12370
|
disabled,
|
|
12335
|
-
name: `
|
|
12371
|
+
name: `owners.${index}.originCity`,
|
|
12336
12372
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12337
12373
|
type: "select",
|
|
12338
12374
|
options: cityOriginOptions,
|
|
12339
|
-
size: "large"
|
|
12375
|
+
size: "large",
|
|
12376
|
+
onChange: (val) => {
|
|
12377
|
+
setValue(`owners.${index}.originCity`, val);
|
|
12378
|
+
onUpdateOwner(owner.id, {
|
|
12379
|
+
originCity: val
|
|
12380
|
+
});
|
|
12381
|
+
}
|
|
12340
12382
|
}
|
|
12341
12383
|
)
|
|
12342
12384
|
] }),
|
|
@@ -12347,11 +12389,17 @@ var CardVehicleOwnerForm = ({
|
|
|
12347
12389
|
{
|
|
12348
12390
|
control,
|
|
12349
12391
|
disabled,
|
|
12350
|
-
name: `
|
|
12392
|
+
name: `owners.${index}.destinationCity`,
|
|
12351
12393
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12352
12394
|
type: "select",
|
|
12353
12395
|
options: cityDestinationOptions,
|
|
12354
|
-
size: "large"
|
|
12396
|
+
size: "large",
|
|
12397
|
+
onChange: (val) => {
|
|
12398
|
+
setValue(`owners.${index}.destinationCity`, val);
|
|
12399
|
+
onUpdateOwner(owner.id, {
|
|
12400
|
+
destinationCity: val
|
|
12401
|
+
});
|
|
12402
|
+
}
|
|
12355
12403
|
}
|
|
12356
12404
|
)
|
|
12357
12405
|
] })
|
|
@@ -12378,11 +12426,18 @@ var CardVehicleOwnerForm = ({
|
|
|
12378
12426
|
disabled,
|
|
12379
12427
|
layout: "horizontal",
|
|
12380
12428
|
value: owner.cargoOwnerEntityType || MANIFEST_ENTITY.COMPANY,
|
|
12381
|
-
onChange: (_, data) =>
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12429
|
+
onChange: (_, data) => {
|
|
12430
|
+
onUpdateOwner(owner.id, {
|
|
12431
|
+
cargoOwnerEntityType: data.value,
|
|
12432
|
+
cargoOwnerEntity: "",
|
|
12433
|
+
cargoOwnerEntityOther: ""
|
|
12434
|
+
});
|
|
12435
|
+
setValue(`owners.${index}.cargoOwnerEntity`, "");
|
|
12436
|
+
setValue(
|
|
12437
|
+
`owners.${index}.cargoOwnerEntityOther`,
|
|
12438
|
+
""
|
|
12439
|
+
);
|
|
12440
|
+
},
|
|
12386
12441
|
children: [
|
|
12387
12442
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12388
12443
|
reactComponents.Radio,
|
|
@@ -12403,18 +12458,55 @@ var CardVehicleOwnerForm = ({
|
|
|
12403
12458
|
)
|
|
12404
12459
|
}
|
|
12405
12460
|
),
|
|
12406
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12416
|
-
|
|
12417
|
-
|
|
12461
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
12462
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12463
|
+
reactGridSystem.Col,
|
|
12464
|
+
{
|
|
12465
|
+
xl: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === "999999" ? 6 : 12,
|
|
12466
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12467
|
+
InputDynamic_default,
|
|
12468
|
+
{
|
|
12469
|
+
disabled,
|
|
12470
|
+
control,
|
|
12471
|
+
name: `owners.${index}.cargoOwnerEntity`,
|
|
12472
|
+
placeholder: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.cargoOwnerCompanyPlaceholder : mergedLabels.cargoOwnerIndividualPlaceholder,
|
|
12473
|
+
size: "large",
|
|
12474
|
+
type: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY ? "select" : "text",
|
|
12475
|
+
options: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY ? companyOwnerOptions : [],
|
|
12476
|
+
onChange: (val) => {
|
|
12477
|
+
setValue(
|
|
12478
|
+
`owners.${index}.cargoOwnerEntity`,
|
|
12479
|
+
val
|
|
12480
|
+
);
|
|
12481
|
+
onUpdateOwner(owner.id, {
|
|
12482
|
+
cargoOwnerEntity: val
|
|
12483
|
+
});
|
|
12484
|
+
}
|
|
12485
|
+
}
|
|
12486
|
+
)
|
|
12487
|
+
}
|
|
12488
|
+
),
|
|
12489
|
+
owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12490
|
+
InputDynamic_default,
|
|
12491
|
+
{
|
|
12492
|
+
control,
|
|
12493
|
+
disabled,
|
|
12494
|
+
name: `owners.${index}.cargoOwnerEntityOther`,
|
|
12495
|
+
placeholder: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12496
|
+
size: "large",
|
|
12497
|
+
type: "text",
|
|
12498
|
+
onChange: (val) => {
|
|
12499
|
+
setValue(
|
|
12500
|
+
`owners.${index}.cargoOwnerEntityOther`,
|
|
12501
|
+
val
|
|
12502
|
+
);
|
|
12503
|
+
onUpdateOwner(owner.id, {
|
|
12504
|
+
cargoOwnerEntityOther: val
|
|
12505
|
+
});
|
|
12506
|
+
}
|
|
12507
|
+
}
|
|
12508
|
+
) })
|
|
12509
|
+
] }),
|
|
12418
12510
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12419
12511
|
reactComponents.Caption1,
|
|
12420
12512
|
{
|
|
@@ -12424,17 +12516,6 @@ var CardVehicleOwnerForm = ({
|
|
|
12424
12516
|
},
|
|
12425
12517
|
children: mergedLabels.otherCompanyHelperText
|
|
12426
12518
|
}
|
|
12427
|
-
),
|
|
12428
|
-
owner.senderEntityType === MANIFEST_ENTITY.COMPANY && owner.senderEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12429
|
-
InputDynamic_default,
|
|
12430
|
-
{
|
|
12431
|
-
control,
|
|
12432
|
-
disabled,
|
|
12433
|
-
name: `owners.${index}.cargoOwnerEntityOther`,
|
|
12434
|
-
placeholder: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12435
|
-
size: "large",
|
|
12436
|
-
type: "text"
|
|
12437
|
-
}
|
|
12438
12519
|
)
|
|
12439
12520
|
] }),
|
|
12440
12521
|
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
|
|
@@ -12457,11 +12538,18 @@ var CardVehicleOwnerForm = ({
|
|
|
12457
12538
|
disabled,
|
|
12458
12539
|
layout: "horizontal",
|
|
12459
12540
|
value: owner.logisticsEntityType || "Perseorangan",
|
|
12460
|
-
onChange: (_, data) =>
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12541
|
+
onChange: (_, data) => {
|
|
12542
|
+
onUpdateOwner(owner.id, {
|
|
12543
|
+
logisticsEntityType: data.value,
|
|
12544
|
+
logisticsEntity: "",
|
|
12545
|
+
logisticsEntityOther: ""
|
|
12546
|
+
});
|
|
12547
|
+
setValue(`owners.${index}.logisticsEntity`, "");
|
|
12548
|
+
setValue(
|
|
12549
|
+
`owners.${index}.logisticsEntityOther`,
|
|
12550
|
+
""
|
|
12551
|
+
);
|
|
12552
|
+
},
|
|
12465
12553
|
children: [
|
|
12466
12554
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12467
12555
|
reactComponents.Radio,
|
|
@@ -12482,18 +12570,55 @@ var CardVehicleOwnerForm = ({
|
|
|
12482
12570
|
)
|
|
12483
12571
|
}
|
|
12484
12572
|
),
|
|
12485
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
|
|
12492
|
-
|
|
12493
|
-
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12573
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
12574
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12575
|
+
reactGridSystem.Col,
|
|
12576
|
+
{
|
|
12577
|
+
xl: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === "999999" ? 6 : 12,
|
|
12578
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12579
|
+
InputDynamic_default,
|
|
12580
|
+
{
|
|
12581
|
+
control,
|
|
12582
|
+
disabled,
|
|
12583
|
+
name: `owners.${index}.logisticsEntity`,
|
|
12584
|
+
placeholder: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.logisticsCompanyPlaceholder : mergedLabels.logisticsIndividualPlaceholder,
|
|
12585
|
+
size: "large",
|
|
12586
|
+
type: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY ? "select" : "text",
|
|
12587
|
+
options: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY ? companyLogisticsOptions : [],
|
|
12588
|
+
onChange: (val) => {
|
|
12589
|
+
setValue(
|
|
12590
|
+
`owners.${index}.logisticsEntity`,
|
|
12591
|
+
val
|
|
12592
|
+
);
|
|
12593
|
+
onUpdateOwner(owner.id, {
|
|
12594
|
+
logisticsEntity: val
|
|
12595
|
+
});
|
|
12596
|
+
}
|
|
12597
|
+
}
|
|
12598
|
+
)
|
|
12599
|
+
}
|
|
12600
|
+
),
|
|
12601
|
+
owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12602
|
+
InputDynamic_default,
|
|
12603
|
+
{
|
|
12604
|
+
control,
|
|
12605
|
+
disabled,
|
|
12606
|
+
name: `owners.${index}.logisticsEntityOther`,
|
|
12607
|
+
placeholder: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12608
|
+
size: "large",
|
|
12609
|
+
type: "text",
|
|
12610
|
+
onChange: (val) => {
|
|
12611
|
+
setValue(
|
|
12612
|
+
`owners.${index}.logisticsEntityOther`,
|
|
12613
|
+
val
|
|
12614
|
+
);
|
|
12615
|
+
onUpdateOwner(owner.id, {
|
|
12616
|
+
logisticsEntityOther: val
|
|
12617
|
+
});
|
|
12618
|
+
}
|
|
12619
|
+
}
|
|
12620
|
+
) })
|
|
12621
|
+
] }),
|
|
12497
12622
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12498
12623
|
reactComponents.Caption1,
|
|
12499
12624
|
{
|
|
@@ -12503,17 +12628,6 @@ var CardVehicleOwnerForm = ({
|
|
|
12503
12628
|
},
|
|
12504
12629
|
children: mergedLabels.otherCompanyHelperText
|
|
12505
12630
|
}
|
|
12506
|
-
),
|
|
12507
|
-
owner.senderEntityType === MANIFEST_ENTITY.COMPANY && owner.senderEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12508
|
-
InputDynamic_default,
|
|
12509
|
-
{
|
|
12510
|
-
control,
|
|
12511
|
-
disabled,
|
|
12512
|
-
name: `looseCargoOwners.${index}.logisticsEntityOther`,
|
|
12513
|
-
placeholder: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12514
|
-
size: "large",
|
|
12515
|
-
type: "text"
|
|
12516
|
-
}
|
|
12517
12631
|
)
|
|
12518
12632
|
] })
|
|
12519
12633
|
] }),
|
|
@@ -12526,11 +12640,18 @@ var CardVehicleOwnerForm = ({
|
|
|
12526
12640
|
disabled,
|
|
12527
12641
|
layout: "horizontal",
|
|
12528
12642
|
value: owner.cargoReceiverEntityType || MANIFEST_ENTITY.COMPANY,
|
|
12529
|
-
onChange: (_, data) =>
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12643
|
+
onChange: (_, data) => {
|
|
12644
|
+
onUpdateOwner(owner.id, {
|
|
12645
|
+
cargoReceiverEntityType: data.value,
|
|
12646
|
+
cargoReceiverEntity: "",
|
|
12647
|
+
cargoReceiverEntityOther: ""
|
|
12648
|
+
});
|
|
12649
|
+
setValue(`owners.${index}.cargoReceiverEntity`, "");
|
|
12650
|
+
setValue(
|
|
12651
|
+
`owners.${index}.cargoReceiverEntityOther`,
|
|
12652
|
+
""
|
|
12653
|
+
);
|
|
12654
|
+
},
|
|
12534
12655
|
children: [
|
|
12535
12656
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12536
12657
|
reactComponents.Radio,
|
|
@@ -12549,18 +12670,49 @@ var CardVehicleOwnerForm = ({
|
|
|
12549
12670
|
]
|
|
12550
12671
|
}
|
|
12551
12672
|
),
|
|
12552
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12673
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
12674
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12675
|
+
InputDynamic_default,
|
|
12676
|
+
{
|
|
12677
|
+
control,
|
|
12678
|
+
disabled,
|
|
12679
|
+
name: `owners.${index}.cargoReceiverEntity`,
|
|
12680
|
+
placeholder: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.cargoReceiverCompanyPlaceholder : mergedLabels.cargoReceiverIndividualPlaceholder,
|
|
12681
|
+
size: "large",
|
|
12682
|
+
type: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY ? "select" : "text",
|
|
12683
|
+
options: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY ? companyReceiverOptions : [],
|
|
12684
|
+
onChange: (val) => {
|
|
12685
|
+
setValue(
|
|
12686
|
+
`owners.${index}.cargoReceiverEntity`,
|
|
12687
|
+
val
|
|
12688
|
+
);
|
|
12689
|
+
onUpdateOwner(owner.id, {
|
|
12690
|
+
cargoReceiverEntity: val
|
|
12691
|
+
});
|
|
12692
|
+
}
|
|
12693
|
+
}
|
|
12694
|
+
) }),
|
|
12695
|
+
owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoReceiverEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12696
|
+
InputDynamic_default,
|
|
12697
|
+
{
|
|
12698
|
+
control,
|
|
12699
|
+
disabled,
|
|
12700
|
+
name: `owners.${index}.cargoReceiverEntityOther`,
|
|
12701
|
+
placeholder: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12702
|
+
size: "large",
|
|
12703
|
+
type: "text",
|
|
12704
|
+
onChange: (val) => {
|
|
12705
|
+
setValue(
|
|
12706
|
+
`owners.${index}.cargoReceiverEntityOther`,
|
|
12707
|
+
val
|
|
12708
|
+
);
|
|
12709
|
+
onUpdateOwner(owner.id, {
|
|
12710
|
+
cargoReceiverEntityOther: val
|
|
12711
|
+
});
|
|
12712
|
+
}
|
|
12713
|
+
}
|
|
12714
|
+
) })
|
|
12715
|
+
] }),
|
|
12564
12716
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12565
12717
|
reactComponents.Caption1,
|
|
12566
12718
|
{
|
|
@@ -12570,17 +12722,6 @@ var CardVehicleOwnerForm = ({
|
|
|
12570
12722
|
},
|
|
12571
12723
|
children: mergedLabels.otherCompanyHelperText
|
|
12572
12724
|
}
|
|
12573
|
-
),
|
|
12574
|
-
owner.senderEntityType === MANIFEST_ENTITY.COMPANY && owner.senderEntity === "999999" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12575
|
-
InputDynamic_default,
|
|
12576
|
-
{
|
|
12577
|
-
control,
|
|
12578
|
-
disabled,
|
|
12579
|
-
name: `looseCargoOwners.${index}.cargoReceiverEntityOther`,
|
|
12580
|
-
placeholder: owner.senderEntityType === MANIFEST_ENTITY.COMPANY ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
12581
|
-
size: "large",
|
|
12582
|
-
type: "text"
|
|
12583
|
-
}
|
|
12584
12725
|
)
|
|
12585
12726
|
] }),
|
|
12586
12727
|
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { children: [
|
|
@@ -12595,10 +12736,16 @@ var CardVehicleOwnerForm = ({
|
|
|
12595
12736
|
{
|
|
12596
12737
|
control,
|
|
12597
12738
|
disabled,
|
|
12598
|
-
name: `
|
|
12739
|
+
name: `owners.${index}.cargoWeight`,
|
|
12599
12740
|
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
12600
12741
|
type: "number",
|
|
12601
|
-
size: "large"
|
|
12742
|
+
size: "large",
|
|
12743
|
+
onChange: (val) => {
|
|
12744
|
+
setValue(`owners.${index}.cargoWeight`, val);
|
|
12745
|
+
onUpdateOwner(owner.id, {
|
|
12746
|
+
cargoWeight: val
|
|
12747
|
+
});
|
|
12748
|
+
}
|
|
12602
12749
|
}
|
|
12603
12750
|
)
|
|
12604
12751
|
] })
|
|
@@ -12654,11 +12801,24 @@ var CardVehicleOwnerForm = ({
|
|
|
12654
12801
|
{
|
|
12655
12802
|
control,
|
|
12656
12803
|
disabled,
|
|
12657
|
-
name: `
|
|
12804
|
+
name: `owners.${index}.cargo.${cargoIndex}.commodity`,
|
|
12658
12805
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12659
12806
|
type: "select",
|
|
12660
12807
|
options: commodityOptions,
|
|
12661
|
-
size: "large"
|
|
12808
|
+
size: "large",
|
|
12809
|
+
onChange: (val) => {
|
|
12810
|
+
const name = `owners.${index}.cargo.${cargoIndex}.commodity`;
|
|
12811
|
+
setValue(name, val);
|
|
12812
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
12813
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
12814
|
+
...c,
|
|
12815
|
+
commodity: val
|
|
12816
|
+
} : c
|
|
12817
|
+
);
|
|
12818
|
+
onUpdateOwner(owner.id, {
|
|
12819
|
+
cargoItems: updatedCargoItems
|
|
12820
|
+
});
|
|
12821
|
+
}
|
|
12662
12822
|
}
|
|
12663
12823
|
),
|
|
12664
12824
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -12687,11 +12847,24 @@ var CardVehicleOwnerForm = ({
|
|
|
12687
12847
|
{
|
|
12688
12848
|
control,
|
|
12689
12849
|
disabled,
|
|
12690
|
-
name: `
|
|
12850
|
+
name: `owners.${index}.cargo.${cargoIndex}.cargoType`,
|
|
12691
12851
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12692
12852
|
type: "select",
|
|
12693
12853
|
options: loadTypeOptions,
|
|
12694
|
-
size: "large"
|
|
12854
|
+
size: "large",
|
|
12855
|
+
onChange: (val) => {
|
|
12856
|
+
const name = `owners.${index}.cargo.${cargoIndex}.cargoType`;
|
|
12857
|
+
setValue(name, val);
|
|
12858
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
12859
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
12860
|
+
...c,
|
|
12861
|
+
cargoType: val
|
|
12862
|
+
} : c
|
|
12863
|
+
);
|
|
12864
|
+
onUpdateOwner(owner.id, {
|
|
12865
|
+
cargoItems: updatedCargoItems
|
|
12866
|
+
});
|
|
12867
|
+
}
|
|
12695
12868
|
}
|
|
12696
12869
|
),
|
|
12697
12870
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12749,13 +12922,13 @@ var CardVehicleOwnerForm = ({
|
|
|
12749
12922
|
size: "small",
|
|
12750
12923
|
onClick: () => {
|
|
12751
12924
|
const currentVal = getValues(
|
|
12752
|
-
`
|
|
12925
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
12753
12926
|
) || 0;
|
|
12754
12927
|
const currentQty = Number(currentVal);
|
|
12755
12928
|
if (currentQty > 0) {
|
|
12756
12929
|
const newVal = currentQty - 1;
|
|
12757
12930
|
setValue(
|
|
12758
|
-
`
|
|
12931
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12759
12932
|
newVal
|
|
12760
12933
|
);
|
|
12761
12934
|
onUpdateCargoQuantity(
|
|
@@ -12774,7 +12947,7 @@ var CardVehicleOwnerForm = ({
|
|
|
12774
12947
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12775
12948
|
reactHookForm.Controller,
|
|
12776
12949
|
{
|
|
12777
|
-
name: `
|
|
12950
|
+
name: `owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12778
12951
|
control,
|
|
12779
12952
|
disabled,
|
|
12780
12953
|
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12816,12 +12989,12 @@ var CardVehicleOwnerForm = ({
|
|
|
12816
12989
|
size: "small",
|
|
12817
12990
|
onClick: () => {
|
|
12818
12991
|
const currentVal = getValues(
|
|
12819
|
-
`
|
|
12992
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
12820
12993
|
) || 0;
|
|
12821
12994
|
const currentQty = Number(currentVal);
|
|
12822
12995
|
const newVal = currentQty + 1;
|
|
12823
12996
|
setValue(
|
|
12824
|
-
`
|
|
12997
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
12825
12998
|
newVal
|
|
12826
12999
|
);
|
|
12827
13000
|
onUpdateCargoQuantity(
|
|
@@ -12851,7 +13024,7 @@ var CardVehicleOwnerForm = ({
|
|
|
12851
13024
|
},
|
|
12852
13025
|
children: (() => {
|
|
12853
13026
|
const type = watch(
|
|
12854
|
-
`
|
|
13027
|
+
`owners.${index}.cargo.${cargoIndex}.cargoType`
|
|
12855
13028
|
);
|
|
12856
13029
|
if (type === "karung")
|
|
12857
13030
|
return mergedLabels.cargoTypeOptions.karung;
|
|
@@ -12896,11 +13069,24 @@ var CardVehicleOwnerForm = ({
|
|
|
12896
13069
|
{
|
|
12897
13070
|
control,
|
|
12898
13071
|
disabled,
|
|
12899
|
-
name: `
|
|
13072
|
+
name: `owners.${index}.cargo.${cargoIndex}.industryType`,
|
|
12900
13073
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12901
13074
|
type: "select",
|
|
12902
13075
|
options: industryOptions,
|
|
12903
|
-
size: "large"
|
|
13076
|
+
size: "large",
|
|
13077
|
+
onChange: (val) => {
|
|
13078
|
+
const name = `owners.${index}.cargo.${cargoIndex}.industryType`;
|
|
13079
|
+
setValue(name, val);
|
|
13080
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13081
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13082
|
+
...c,
|
|
13083
|
+
industryType: val
|
|
13084
|
+
} : c
|
|
13085
|
+
);
|
|
13086
|
+
onUpdateOwner(owner.id, {
|
|
13087
|
+
cargoItems: updatedCargoItems
|
|
13088
|
+
});
|
|
13089
|
+
}
|
|
12904
13090
|
}
|
|
12905
13091
|
),
|
|
12906
13092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -12925,11 +13111,24 @@ var CardVehicleOwnerForm = ({
|
|
|
12925
13111
|
{
|
|
12926
13112
|
control,
|
|
12927
13113
|
disabled,
|
|
12928
|
-
name: `
|
|
13114
|
+
name: `owners.${index}.cargo.${cargoIndex}.cargoCategory`,
|
|
12929
13115
|
placeholder: mergedLabels.selectPlaceholder,
|
|
12930
13116
|
type: "select",
|
|
12931
13117
|
options: loadCategoryOptions,
|
|
12932
|
-
size: "large"
|
|
13118
|
+
size: "large",
|
|
13119
|
+
onChange: (val) => {
|
|
13120
|
+
const name = `owners.${index}.cargo.${cargoIndex}.cargoCategory`;
|
|
13121
|
+
setValue(name, val);
|
|
13122
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13123
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13124
|
+
...c,
|
|
13125
|
+
cargoCategory: val
|
|
13126
|
+
} : c
|
|
13127
|
+
);
|
|
13128
|
+
onUpdateOwner(owner.id, {
|
|
13129
|
+
cargoItems: updatedCargoItems
|
|
13130
|
+
});
|
|
13131
|
+
}
|
|
12933
13132
|
}
|
|
12934
13133
|
),
|
|
12935
13134
|
/* @__PURE__ */ jsxRuntime.jsxs(
|