@asdp/ferryui 0.1.22-dev.10353 → 0.1.22-dev.10378
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 +17 -9
- package/dist/index.d.ts +17 -9
- package/dist/index.js +555 -456
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +555 -457
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -452,9 +452,13 @@ var MANIFEST_ENTITY = {
|
|
|
452
452
|
INDIVIDUAL: "individual"
|
|
453
453
|
};
|
|
454
454
|
var HARDCODED_ID = {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
FAQ__PEMESANAN_TIKET: 1,
|
|
456
|
+
COMPANY__LAINNYA: "999999",
|
|
457
|
+
LOAD_TYPE__LAINNYA: 87
|
|
458
|
+
};
|
|
459
|
+
var HARDCODED_NAME = {
|
|
460
|
+
LOAD_TYPE__LAINNYA: "Lainnya",
|
|
461
|
+
INDUSTRY_TYPE__LAINNYA: "Lainnya"
|
|
458
462
|
};
|
|
459
463
|
var useStyles2 = reactComponents.makeStyles({
|
|
460
464
|
carousel: {},
|
|
@@ -12643,16 +12647,20 @@ var DEFAULT_LABELS26 = {
|
|
|
12643
12647
|
cargoItemTitle: "Muatan {index}",
|
|
12644
12648
|
commodityLabel: "Data Komoditas",
|
|
12645
12649
|
hereLinkText: "disini",
|
|
12646
|
-
|
|
12647
|
-
|
|
12650
|
+
loadTypeLabel: "Data Jenis Muatan",
|
|
12651
|
+
loadTypeOthersLabel: "Jenis Muatan Lainnya",
|
|
12652
|
+
loadTypeHelperText: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
|
|
12653
|
+
loadTypeOthersPlaceholder: "Masukkan Jenis Muatan",
|
|
12648
12654
|
cargoQuantityLabel: "Jumlah Muatan",
|
|
12649
12655
|
priceLabel: "Harga",
|
|
12650
12656
|
industryTypeLabel: "Data Jenis Industri",
|
|
12651
12657
|
industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis industrinya.',
|
|
12658
|
+
industryTypeOthersLabel: "Jenis Industri Lainnya",
|
|
12659
|
+
industryTypeOthersPlaceholder: "Masukkan Jenis Industri",
|
|
12652
12660
|
cargoCategoryLabel: "Kategori Muatan",
|
|
12653
12661
|
deleteCargoButton: "Hapus Muatan",
|
|
12654
12662
|
addCargoButton: "Tambah Muatan",
|
|
12655
|
-
|
|
12663
|
+
loadTypeOptions: {
|
|
12656
12664
|
karung: "Karung",
|
|
12657
12665
|
kg: "Kg",
|
|
12658
12666
|
ton: "Ton",
|
|
@@ -12695,16 +12703,20 @@ var DEFAULT_LABELS26 = {
|
|
|
12695
12703
|
cargoItemTitle: "Cargo {index}",
|
|
12696
12704
|
commodityLabel: "Commodity Data",
|
|
12697
12705
|
hereLinkText: "here",
|
|
12698
|
-
|
|
12699
|
-
|
|
12706
|
+
loadTypeLabel: "Cargo Type Data",
|
|
12707
|
+
loadTypeHelperText: 'If the cargo type is not available, select "Other" and enter the cargo type.',
|
|
12708
|
+
loadTypeOthersPlaceholder: "Enter Cargo Type",
|
|
12709
|
+
loadTypeOthersLabel: "Other Cargo Type",
|
|
12700
12710
|
cargoQuantityLabel: "Cargo Quantity",
|
|
12701
12711
|
priceLabel: "Price",
|
|
12702
12712
|
industryTypeLabel: "Industry Type Data",
|
|
12703
12713
|
industryTypeHelperText: 'If the industry type is not available, select "Other" and enter the industry type.',
|
|
12714
|
+
industryTypeOthersLabel: "Other Industry Type",
|
|
12715
|
+
industryTypeOthersPlaceholder: "Enter Industry Type",
|
|
12704
12716
|
cargoCategoryLabel: "Cargo Category",
|
|
12705
12717
|
deleteCargoButton: "Delete Cargo",
|
|
12706
12718
|
addCargoButton: "Add Cargo",
|
|
12707
|
-
|
|
12719
|
+
loadTypeOptions: {
|
|
12708
12720
|
karung: "Sack",
|
|
12709
12721
|
kg: "Kg",
|
|
12710
12722
|
ton: "Ton",
|
|
@@ -12916,7 +12928,7 @@ var CardVehicleOwnerForm = ({
|
|
|
12916
12928
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12917
12929
|
reactGridSystem.Col,
|
|
12918
12930
|
{
|
|
12919
|
-
lg: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === HARDCODED_ID.
|
|
12931
|
+
lg: owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === HARDCODED_ID.COMPANY__LAINNYA ? 6 : 12,
|
|
12920
12932
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12921
12933
|
InputDynamic_default,
|
|
12922
12934
|
{
|
|
@@ -12938,7 +12950,7 @@ var CardVehicleOwnerForm = ({
|
|
|
12938
12950
|
)
|
|
12939
12951
|
}
|
|
12940
12952
|
),
|
|
12941
|
-
owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === HARDCODED_ID.
|
|
12953
|
+
owner.cargoOwnerEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoOwnerEntity === HARDCODED_ID.COMPANY__LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12942
12954
|
InputDynamic_default,
|
|
12943
12955
|
{
|
|
12944
12956
|
control,
|
|
@@ -13030,7 +13042,7 @@ var CardVehicleOwnerForm = ({
|
|
|
13030
13042
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13031
13043
|
reactGridSystem.Col,
|
|
13032
13044
|
{
|
|
13033
|
-
lg: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoReceiverEntity === HARDCODED_ID.
|
|
13045
|
+
lg: owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoReceiverEntity === HARDCODED_ID.COMPANY__LAINNYA ? 6 : 12,
|
|
13034
13046
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13035
13047
|
InputDynamic_default,
|
|
13036
13048
|
{
|
|
@@ -13055,7 +13067,7 @@ var CardVehicleOwnerForm = ({
|
|
|
13055
13067
|
)
|
|
13056
13068
|
}
|
|
13057
13069
|
),
|
|
13058
|
-
owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoReceiverEntity === HARDCODED_ID.
|
|
13070
|
+
owner.cargoReceiverEntityType === MANIFEST_ENTITY.COMPANY && owner.cargoReceiverEntity === HARDCODED_ID.COMPANY__LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { lg: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13059
13071
|
InputDynamic_default,
|
|
13060
13072
|
{
|
|
13061
13073
|
control,
|
|
@@ -13147,7 +13159,7 @@ var CardVehicleOwnerForm = ({
|
|
|
13147
13159
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13148
13160
|
reactGridSystem.Col,
|
|
13149
13161
|
{
|
|
13150
|
-
xl: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === HARDCODED_ID.
|
|
13162
|
+
xl: owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === HARDCODED_ID.COMPANY__LAINNYA ? 6 : 12,
|
|
13151
13163
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13152
13164
|
InputDynamic_default,
|
|
13153
13165
|
{
|
|
@@ -13172,7 +13184,7 @@ var CardVehicleOwnerForm = ({
|
|
|
13172
13184
|
)
|
|
13173
13185
|
}
|
|
13174
13186
|
),
|
|
13175
|
-
owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === HARDCODED_ID.
|
|
13187
|
+
owner.logisticsEntityType === MANIFEST_ENTITY.COMPANY && owner.logisticsEntity === HARDCODED_ID.COMPANY__LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13176
13188
|
InputDynamic_default,
|
|
13177
13189
|
{
|
|
13178
13190
|
control,
|
|
@@ -13290,471 +13302,557 @@ var CardVehicleOwnerForm = ({
|
|
|
13290
13302
|
(cargo) => `cargo-${cargo.id}`
|
|
13291
13303
|
) || [],
|
|
13292
13304
|
multiple: true,
|
|
13293
|
-
children: owner.cargoItems?.map((cargo, cargoIndex) =>
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13330
|
-
|
|
13305
|
+
children: owner.cargoItems?.map((cargo, cargoIndex) => {
|
|
13306
|
+
const watchCommodity = watch(
|
|
13307
|
+
`owners.${index}.cargo.${cargoIndex}.commodity`
|
|
13308
|
+
);
|
|
13309
|
+
const watchLoadType = watch(
|
|
13310
|
+
`owners.${index}.cargo.${cargoIndex}.loadType`
|
|
13311
|
+
);
|
|
13312
|
+
const watchIndustryType = watch(
|
|
13313
|
+
`owners.${index}.cargo.${cargoIndex}.industryType`
|
|
13314
|
+
);
|
|
13315
|
+
let _loadTypeOptions = [];
|
|
13316
|
+
if (watchCommodity && loadTypeOptionsByCommodityId[watchCommodity]) {
|
|
13317
|
+
_loadTypeOptions = loadTypeOptionsByCommodityId[watchCommodity];
|
|
13318
|
+
} else {
|
|
13319
|
+
_loadTypeOptions = loadTypeOptions.map((lt) => ({
|
|
13320
|
+
value: lt.id.toString(),
|
|
13321
|
+
label: `${lt.name}${lt.unit?.name ? ` (${lt.unit.name})` : ""}`
|
|
13322
|
+
}));
|
|
13323
|
+
}
|
|
13324
|
+
const isLoadTypeOther = _loadTypeOptions.find(
|
|
13325
|
+
(lt) => lt.value.toString() === String(watchLoadType)
|
|
13326
|
+
)?.label.startsWith(HARDCODED_NAME.LOAD_TYPE__LAINNYA);
|
|
13327
|
+
const isIndustryTypeOther = industryOptions?.find(
|
|
13328
|
+
(it) => it.value.toString() === String(watchIndustryType)
|
|
13329
|
+
)?.label === HARDCODED_NAME.INDUSTRY_TYPE__LAINNYA;
|
|
13330
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13331
|
+
reactComponents.AccordionItem,
|
|
13332
|
+
{
|
|
13333
|
+
value: `cargo-${cargo.id}`,
|
|
13334
|
+
className: styles.accordion,
|
|
13335
|
+
children: [
|
|
13336
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13337
|
+
reactComponents.AccordionHeader,
|
|
13338
|
+
{
|
|
13339
|
+
className: styles.accordionHeader,
|
|
13340
|
+
expandIconPosition: "end",
|
|
13341
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13342
|
+
"div",
|
|
13331
13343
|
{
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
-
setValue(name, val);
|
|
13338
|
-
const updatedCargoItems = owner.cargoItems?.map(
|
|
13339
|
-
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13340
|
-
...c,
|
|
13341
|
-
commodity: val
|
|
13342
|
-
} : c
|
|
13343
|
-
);
|
|
13344
|
-
onUpdateOwner(owner.id, {
|
|
13345
|
-
cargoItems: updatedCargoItems
|
|
13346
|
-
});
|
|
13347
|
-
setValue(
|
|
13348
|
-
`owners.${index}.cargo.${cargoIndex}.cargoType`,
|
|
13349
|
-
""
|
|
13350
|
-
);
|
|
13344
|
+
style: {
|
|
13345
|
+
display: "flex",
|
|
13346
|
+
justifyContent: "space-between",
|
|
13347
|
+
alignItems: "center",
|
|
13348
|
+
width: "100%"
|
|
13351
13349
|
},
|
|
13352
|
-
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
size: "large"
|
|
13350
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: mergedLabels.cargoItemTitle.replace(
|
|
13351
|
+
"{index}",
|
|
13352
|
+
(cargoIndex + 1).toString()
|
|
13353
|
+
) })
|
|
13357
13354
|
}
|
|
13358
13355
|
)
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
|
|
13362
|
-
|
|
13363
|
-
|
|
13364
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13356
|
+
}
|
|
13357
|
+
),
|
|
13358
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.form, children: [
|
|
13359
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
13360
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: isLoadTypeOther ? 4 : 6, children: [
|
|
13361
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13362
|
+
mergedLabels.commodityLabel,
|
|
13363
|
+
" ",
|
|
13364
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13365
|
+
] }),
|
|
13366
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13367
|
+
InputDynamic_default,
|
|
13368
|
+
{
|
|
13369
|
+
control,
|
|
13370
|
+
disabled,
|
|
13371
|
+
name: `owners.${index}.cargo.${cargoIndex}.commodity`,
|
|
13372
|
+
onChange: (val) => {
|
|
13373
|
+
const name = `owners.${index}.cargo.${cargoIndex}.commodity`;
|
|
13374
|
+
setValue(name, val);
|
|
13375
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13376
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13377
|
+
...c,
|
|
13378
|
+
commodity: val
|
|
13379
|
+
} : c
|
|
13380
|
+
);
|
|
13381
|
+
onUpdateOwner(owner.id, {
|
|
13382
|
+
cargoItems: updatedCargoItems
|
|
13383
|
+
});
|
|
13384
|
+
setValue(
|
|
13385
|
+
`owners.${index}.cargo.${cargoIndex}.loadType`,
|
|
13386
|
+
""
|
|
13387
|
+
);
|
|
13388
|
+
},
|
|
13389
|
+
options: commodityOptions,
|
|
13390
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
13391
|
+
required: true,
|
|
13392
|
+
type: "select",
|
|
13393
|
+
size: "large"
|
|
13394
|
+
}
|
|
13395
|
+
)
|
|
13365
13396
|
] }),
|
|
13366
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13367
|
-
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13374
|
-
|
|
13375
|
-
|
|
13376
|
-
|
|
13377
|
-
const updatedCargoItems = owner.cargoItems?.map(
|
|
13378
|
-
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13379
|
-
...c,
|
|
13380
|
-
cargoType: val
|
|
13381
|
-
} : c
|
|
13382
|
-
);
|
|
13383
|
-
onUpdateOwner(owner.id, {
|
|
13384
|
-
cargoItems: updatedCargoItems
|
|
13385
|
-
});
|
|
13386
|
-
},
|
|
13387
|
-
options: (() => {
|
|
13388
|
-
const selectedCommodityId = watch(
|
|
13397
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: isLoadTypeOther ? 4 : 6, children: [
|
|
13398
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13399
|
+
mergedLabels.loadTypeLabel,
|
|
13400
|
+
" ",
|
|
13401
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13402
|
+
] }),
|
|
13403
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13404
|
+
InputDynamic_default,
|
|
13405
|
+
{
|
|
13406
|
+
control,
|
|
13407
|
+
disabled: disabled || (getValues(
|
|
13389
13408
|
`owners.${index}.cargo.${cargoIndex}.commodity`
|
|
13390
|
-
)
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13399
|
-
|
|
13400
|
-
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
|
|
13422
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13409
|
+
) || "") === "",
|
|
13410
|
+
name: `owners.${index}.cargo.${cargoIndex}.loadType`,
|
|
13411
|
+
onChange: (val) => {
|
|
13412
|
+
const name = `owners.${index}.cargo.${cargoIndex}.loadType`;
|
|
13413
|
+
setValue(name, val);
|
|
13414
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13415
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13416
|
+
...c,
|
|
13417
|
+
loadType: val
|
|
13418
|
+
} : c
|
|
13419
|
+
);
|
|
13420
|
+
onUpdateOwner(owner.id, {
|
|
13421
|
+
cargoItems: updatedCargoItems
|
|
13422
|
+
});
|
|
13423
|
+
},
|
|
13424
|
+
options: _loadTypeOptions,
|
|
13425
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
13426
|
+
required: true,
|
|
13427
|
+
size: "large",
|
|
13428
|
+
type: "select"
|
|
13429
|
+
}
|
|
13430
|
+
),
|
|
13431
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13432
|
+
reactComponents.Caption1,
|
|
13433
|
+
{
|
|
13434
|
+
style: {
|
|
13435
|
+
color: reactComponents.tokens.colorNeutralForeground3,
|
|
13436
|
+
marginTop: "0.25rem"
|
|
13437
|
+
},
|
|
13438
|
+
children: mergedLabels.loadTypeHelperText
|
|
13439
|
+
}
|
|
13440
|
+
)
|
|
13423
13441
|
] }),
|
|
13424
|
-
/* @__PURE__ */ jsxRuntime.
|
|
13425
|
-
|
|
13426
|
-
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
|
|
13449
|
-
|
|
13450
|
-
|
|
13451
|
-
|
|
13452
|
-
|
|
13453
|
-
|
|
13454
|
-
|
|
13455
|
-
|
|
13456
|
-
|
|
13457
|
-
|
|
13458
|
-
}
|
|
13459
|
-
)
|
|
13442
|
+
isLoadTypeOther && /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { xl: 4, children: [
|
|
13443
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13444
|
+
mergedLabels.loadTypeOthersLabel,
|
|
13445
|
+
" ",
|
|
13446
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13447
|
+
] }),
|
|
13448
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13449
|
+
InputDynamic_default,
|
|
13450
|
+
{
|
|
13451
|
+
control,
|
|
13452
|
+
disabled,
|
|
13453
|
+
name: `owners.${index}.cargo.${cargoIndex}.loadTypeOther`,
|
|
13454
|
+
placeholder: mergedLabels.loadTypeOthersPlaceholder,
|
|
13455
|
+
required: true,
|
|
13456
|
+
size: "large",
|
|
13457
|
+
type: "text",
|
|
13458
|
+
onChange: (val) => {
|
|
13459
|
+
setValue(
|
|
13460
|
+
`owners.${index}.cargo.${cargoIndex}.loadTypeOther`,
|
|
13461
|
+
val
|
|
13462
|
+
);
|
|
13463
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13464
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13465
|
+
...c,
|
|
13466
|
+
loadTypeOther: val
|
|
13467
|
+
} : c
|
|
13468
|
+
);
|
|
13469
|
+
onUpdateOwner(owner.id, {
|
|
13470
|
+
cargoItems: updatedCargoItems
|
|
13471
|
+
});
|
|
13472
|
+
}
|
|
13473
|
+
}
|
|
13474
|
+
)
|
|
13475
|
+
] })
|
|
13460
13476
|
] }),
|
|
13461
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.
|
|
13462
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13463
|
-
|
|
13464
|
-
|
|
13465
|
-
|
|
13466
|
-
|
|
13467
|
-
|
|
13468
|
-
|
|
13469
|
-
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13476
|
-
|
|
13477
|
-
|
|
13478
|
-
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
|
|
13486
|
-
|
|
13487
|
-
|
|
13488
|
-
|
|
13489
|
-
|
|
13490
|
-
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
reactComponents.Button,
|
|
13497
|
-
{
|
|
13498
|
-
disabled,
|
|
13499
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:delete-24-regular" }),
|
|
13500
|
-
onClick: (e) => {
|
|
13501
|
-
e.stopPropagation();
|
|
13502
|
-
onDeleteCargo(owner.id, cargo.id);
|
|
13503
|
-
},
|
|
13504
|
-
onKeyDown: (e) => {
|
|
13505
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
13506
|
-
e.stopPropagation();
|
|
13507
|
-
onDeleteCargo(owner.id, cargo.id);
|
|
13508
|
-
}
|
|
13509
|
-
},
|
|
13510
|
-
size: "medium",
|
|
13511
|
-
shape: "circular",
|
|
13512
|
-
style: {
|
|
13513
|
-
border: `1px solid ${reactComponents.tokens.colorPaletteRedForeground1}`,
|
|
13514
|
-
color: reactComponents.tokens.colorPaletteRedForeground1,
|
|
13515
|
-
width: "100%"
|
|
13516
|
-
},
|
|
13517
|
-
children: mergedLabels.deleteCargoButton
|
|
13518
|
-
}
|
|
13519
|
-
) }) }),
|
|
13520
|
-
(() => {
|
|
13521
|
-
const type = watch(
|
|
13522
|
-
`owners.${index}.cargo.${cargoIndex}.cargoType`
|
|
13523
|
-
);
|
|
13524
|
-
const _selectedLoadType = loadTypes.find(
|
|
13525
|
-
(loadType) => loadType.id.toString() === type
|
|
13526
|
-
);
|
|
13527
|
-
if (!_selectedLoadType) return null;
|
|
13528
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
13529
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 12, children: [
|
|
13530
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.cargoQuantityLabel }),
|
|
13531
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13532
|
-
"div",
|
|
13477
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
13478
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: isIndustryTypeOther ? 4 : 6, children: [
|
|
13479
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13480
|
+
mergedLabels.industryTypeLabel,
|
|
13481
|
+
" ",
|
|
13482
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13483
|
+
] }),
|
|
13484
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13485
|
+
InputDynamic_default,
|
|
13486
|
+
{
|
|
13487
|
+
control,
|
|
13488
|
+
disabled,
|
|
13489
|
+
name: `owners.${index}.cargo.${cargoIndex}.industryType`,
|
|
13490
|
+
options: industryOptions,
|
|
13491
|
+
onChange: (val) => {
|
|
13492
|
+
const name = `owners.${index}.cargo.${cargoIndex}.industryType`;
|
|
13493
|
+
setValue(name, val);
|
|
13494
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13495
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13496
|
+
...c,
|
|
13497
|
+
industryType: val
|
|
13498
|
+
} : c
|
|
13499
|
+
);
|
|
13500
|
+
onUpdateOwner(owner.id, {
|
|
13501
|
+
cargoItems: updatedCargoItems
|
|
13502
|
+
});
|
|
13503
|
+
},
|
|
13504
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
13505
|
+
required: true,
|
|
13506
|
+
size: "large",
|
|
13507
|
+
type: "select"
|
|
13508
|
+
}
|
|
13509
|
+
),
|
|
13510
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13511
|
+
reactComponents.Caption1,
|
|
13533
13512
|
{
|
|
13534
13513
|
style: {
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
border: `1px solid ${reactComponents.tokens.colorNeutralStroke1}`,
|
|
13538
|
-
borderRadius: reactComponents.tokens.borderRadiusMedium,
|
|
13539
|
-
height: "40px",
|
|
13540
|
-
padding: "0 12px",
|
|
13541
|
-
backgroundColor: reactComponents.tokens.colorNeutralBackground1
|
|
13514
|
+
color: reactComponents.tokens.colorNeutralForeground3,
|
|
13515
|
+
marginTop: "0.25rem"
|
|
13542
13516
|
},
|
|
13543
|
-
children:
|
|
13544
|
-
|
|
13545
|
-
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
|
|
13553
|
-
|
|
13554
|
-
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13561
|
-
|
|
13562
|
-
|
|
13563
|
-
|
|
13564
|
-
|
|
13565
|
-
|
|
13566
|
-
|
|
13567
|
-
|
|
13568
|
-
|
|
13569
|
-
|
|
13570
|
-
|
|
13571
|
-
|
|
13572
|
-
|
|
13573
|
-
|
|
13574
|
-
|
|
13575
|
-
|
|
13576
|
-
|
|
13577
|
-
|
|
13578
|
-
|
|
13579
|
-
|
|
13580
|
-
|
|
13581
|
-
|
|
13582
|
-
|
|
13583
|
-
|
|
13584
|
-
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
|
|
13592
|
-
|
|
13593
|
-
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
|
|
13598
|
-
|
|
13599
|
-
|
|
13600
|
-
|
|
13601
|
-
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13517
|
+
children: mergedLabels.industryTypeHelperText
|
|
13518
|
+
}
|
|
13519
|
+
)
|
|
13520
|
+
] }),
|
|
13521
|
+
isIndustryTypeOther && /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { xl: 4, children: [
|
|
13522
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13523
|
+
mergedLabels.industryTypeOthersLabel,
|
|
13524
|
+
" ",
|
|
13525
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13526
|
+
] }),
|
|
13527
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13528
|
+
InputDynamic_default,
|
|
13529
|
+
{
|
|
13530
|
+
control,
|
|
13531
|
+
disabled,
|
|
13532
|
+
name: `owners.${index}.cargo.${cargoIndex}.industryTypeOther`,
|
|
13533
|
+
placeholder: mergedLabels.industryTypeOthersPlaceholder,
|
|
13534
|
+
required: true,
|
|
13535
|
+
size: "large",
|
|
13536
|
+
type: "text",
|
|
13537
|
+
onChange: (val) => {
|
|
13538
|
+
setValue(
|
|
13539
|
+
`owners.${index}.cargo.${cargoIndex}.industryTypeOther`,
|
|
13540
|
+
val
|
|
13541
|
+
);
|
|
13542
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13543
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13544
|
+
...c,
|
|
13545
|
+
industryTypeOther: val
|
|
13546
|
+
} : c
|
|
13547
|
+
);
|
|
13548
|
+
onUpdateOwner(owner.id, {
|
|
13549
|
+
cargoItems: updatedCargoItems
|
|
13550
|
+
});
|
|
13551
|
+
}
|
|
13552
|
+
}
|
|
13553
|
+
)
|
|
13554
|
+
] }),
|
|
13555
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: isIndustryTypeOther ? 4 : 6, children: [
|
|
13556
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
|
|
13557
|
+
mergedLabels.cargoCategoryLabel,
|
|
13558
|
+
" ",
|
|
13559
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
|
|
13560
|
+
] }),
|
|
13561
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13562
|
+
InputDynamic_default,
|
|
13563
|
+
{
|
|
13564
|
+
control,
|
|
13565
|
+
disabled,
|
|
13566
|
+
name: `owners.${index}.cargo.${cargoIndex}.cargoCategory`,
|
|
13567
|
+
options: loadCategoryOptions,
|
|
13568
|
+
onChange: (val) => {
|
|
13569
|
+
const name = `owners.${index}.cargo.${cargoIndex}.cargoCategory`;
|
|
13570
|
+
setValue(name, val);
|
|
13571
|
+
const updatedCargoItems = owner.cargoItems?.map(
|
|
13572
|
+
(c, cIdx) => cIdx === cargoIndex ? {
|
|
13573
|
+
...c,
|
|
13574
|
+
cargoCategory: val
|
|
13575
|
+
} : c
|
|
13576
|
+
);
|
|
13577
|
+
onUpdateOwner(owner.id, {
|
|
13578
|
+
cargoItems: updatedCargoItems
|
|
13579
|
+
});
|
|
13580
|
+
},
|
|
13581
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
13582
|
+
required: true,
|
|
13583
|
+
size: "large",
|
|
13584
|
+
type: "select"
|
|
13585
|
+
}
|
|
13586
|
+
)
|
|
13587
|
+
] })
|
|
13588
|
+
] }),
|
|
13589
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
13590
|
+
reactComponents.Button,
|
|
13591
|
+
{
|
|
13592
|
+
disabled,
|
|
13593
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:delete-24-regular" }),
|
|
13594
|
+
onClick: (e) => {
|
|
13595
|
+
e.stopPropagation();
|
|
13596
|
+
onDeleteCargo(owner.id, cargo.id);
|
|
13597
|
+
},
|
|
13598
|
+
onKeyDown: (e) => {
|
|
13599
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
13600
|
+
e.stopPropagation();
|
|
13601
|
+
onDeleteCargo(
|
|
13602
|
+
owner.id,
|
|
13603
|
+
cargo.id
|
|
13604
|
+
);
|
|
13605
|
+
}
|
|
13606
|
+
},
|
|
13607
|
+
size: "medium",
|
|
13608
|
+
shape: "circular",
|
|
13609
|
+
style: {
|
|
13610
|
+
border: `1px solid ${reactComponents.tokens.colorPaletteRedForeground1}`,
|
|
13611
|
+
color: reactComponents.tokens.colorPaletteRedForeground1,
|
|
13612
|
+
width: "100%"
|
|
13613
|
+
},
|
|
13614
|
+
children: mergedLabels.deleteCargoButton
|
|
13615
|
+
}
|
|
13616
|
+
) }) }),
|
|
13617
|
+
(() => {
|
|
13618
|
+
const type = watch(
|
|
13619
|
+
`owners.${index}.cargo.${cargoIndex}.loadType`
|
|
13620
|
+
);
|
|
13621
|
+
const _selectedLoadType = loadTypes.find(
|
|
13622
|
+
(loadType) => loadType.id.toString() === type
|
|
13623
|
+
);
|
|
13624
|
+
if (!_selectedLoadType) return null;
|
|
13625
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
13626
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 12, children: [
|
|
13627
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.cargoQuantityLabel }),
|
|
13628
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13629
|
+
"div",
|
|
13630
|
+
{
|
|
13631
|
+
style: {
|
|
13632
|
+
display: "flex",
|
|
13633
|
+
alignItems: "center",
|
|
13634
|
+
border: `1px solid ${reactComponents.tokens.colorNeutralStroke1}`,
|
|
13635
|
+
borderRadius: reactComponents.tokens.borderRadiusMedium,
|
|
13636
|
+
height: "40px",
|
|
13637
|
+
padding: "0 12px",
|
|
13638
|
+
backgroundColor: reactComponents.tokens.colorNeutralBackground1
|
|
13639
|
+
},
|
|
13640
|
+
children: [
|
|
13641
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
|
|
13642
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
13643
|
+
"div",
|
|
13644
|
+
{
|
|
13645
|
+
style: {
|
|
13646
|
+
display: "flex",
|
|
13647
|
+
alignItems: "center",
|
|
13648
|
+
gap: "12px"
|
|
13649
|
+
},
|
|
13650
|
+
children: [
|
|
13651
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13652
|
+
reactComponents.Button,
|
|
13653
|
+
{
|
|
13654
|
+
appearance: "transparent",
|
|
13655
|
+
disabled,
|
|
13656
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13657
|
+
react.Icon,
|
|
13658
|
+
{
|
|
13659
|
+
icon: "fluent:subtract-circle-24-regular",
|
|
13660
|
+
style: {
|
|
13661
|
+
fontSize: "24px",
|
|
13662
|
+
color: reactComponents.tokens.colorNeutralForeground4
|
|
13636
13663
|
}
|
|
13637
|
-
}
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13664
|
+
}
|
|
13665
|
+
),
|
|
13666
|
+
"aria-label": mergedLabels.decrementQuantityAriaLabel,
|
|
13667
|
+
size: "small",
|
|
13668
|
+
onClick: () => {
|
|
13669
|
+
const currentVal = getValues(
|
|
13670
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13671
|
+
) || 0;
|
|
13672
|
+
const currentQty = Number(currentVal);
|
|
13673
|
+
if (currentQty > 1) {
|
|
13674
|
+
const newVal = currentQty - 1;
|
|
13675
|
+
setValue(
|
|
13676
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
13677
|
+
newVal
|
|
13642
13678
|
);
|
|
13643
|
-
field.onChange(e);
|
|
13644
13679
|
onUpdateCargoQuantity(
|
|
13645
13680
|
owner.id,
|
|
13646
13681
|
cargo.id,
|
|
13647
13682
|
newVal
|
|
13648
13683
|
);
|
|
13649
13684
|
}
|
|
13685
|
+
},
|
|
13686
|
+
style: {
|
|
13687
|
+
minWidth: "32px",
|
|
13688
|
+
padding: "0"
|
|
13650
13689
|
}
|
|
13651
|
-
),
|
|
13652
|
-
rules: {
|
|
13653
|
-
required: true,
|
|
13654
|
-
validate: (val) => Number(val) > 0
|
|
13655
13690
|
}
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13667
|
-
|
|
13668
|
-
|
|
13669
|
-
|
|
13691
|
+
),
|
|
13692
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13693
|
+
reactHookForm.Controller,
|
|
13694
|
+
{
|
|
13695
|
+
name: `owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
13696
|
+
control,
|
|
13697
|
+
disabled,
|
|
13698
|
+
render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
13699
|
+
"input",
|
|
13700
|
+
{
|
|
13701
|
+
...field,
|
|
13702
|
+
min: 1,
|
|
13703
|
+
step: "1",
|
|
13704
|
+
type: "number",
|
|
13705
|
+
style: {
|
|
13706
|
+
border: "none",
|
|
13707
|
+
width: "100%",
|
|
13708
|
+
textAlign: "center",
|
|
13709
|
+
outline: "none",
|
|
13710
|
+
backgroundColor: "transparent",
|
|
13711
|
+
color: reactComponents.tokens.colorNeutralForeground1,
|
|
13712
|
+
fontSize: reactComponents.tokens.fontSizeBase400,
|
|
13713
|
+
fontFamily: reactComponents.tokens.fontFamilyBase
|
|
13714
|
+
},
|
|
13715
|
+
onKeyDown: (e) => {
|
|
13716
|
+
if ([
|
|
13717
|
+
"e",
|
|
13718
|
+
"E",
|
|
13719
|
+
"+",
|
|
13720
|
+
"-",
|
|
13721
|
+
".",
|
|
13722
|
+
","
|
|
13723
|
+
].includes(e.key)) {
|
|
13724
|
+
e.preventDefault();
|
|
13725
|
+
}
|
|
13726
|
+
},
|
|
13727
|
+
onPaste: (e) => {
|
|
13728
|
+
const paste = e.clipboardData.getData(
|
|
13729
|
+
"text"
|
|
13730
|
+
);
|
|
13731
|
+
if (!/^\d+$/.test(paste)) {
|
|
13732
|
+
e.preventDefault();
|
|
13733
|
+
}
|
|
13734
|
+
},
|
|
13735
|
+
onWheel: (e) => e.target.blur(),
|
|
13736
|
+
onChange: (e) => {
|
|
13737
|
+
const newVal = Number(
|
|
13738
|
+
e.target.value
|
|
13739
|
+
);
|
|
13740
|
+
field.onChange(e);
|
|
13741
|
+
onUpdateCargoQuantity(
|
|
13742
|
+
owner.id,
|
|
13743
|
+
cargo.id,
|
|
13744
|
+
newVal
|
|
13745
|
+
);
|
|
13746
|
+
}
|
|
13670
13747
|
}
|
|
13748
|
+
),
|
|
13749
|
+
rules: {
|
|
13750
|
+
required: true,
|
|
13751
|
+
validate: (val) => Number(val) > 0
|
|
13671
13752
|
}
|
|
13672
|
-
),
|
|
13673
|
-
"aria-label": mergedLabels.incrementQuantityAriaLabel,
|
|
13674
|
-
size: "small",
|
|
13675
|
-
onClick: () => {
|
|
13676
|
-
const currentVal = getValues(
|
|
13677
|
-
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13678
|
-
) || 0;
|
|
13679
|
-
const currentQty = Number(currentVal);
|
|
13680
|
-
const newVal = currentQty + 1;
|
|
13681
|
-
setValue(
|
|
13682
|
-
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
13683
|
-
newVal
|
|
13684
|
-
);
|
|
13685
|
-
onUpdateCargoQuantity(
|
|
13686
|
-
owner.id,
|
|
13687
|
-
cargo.id,
|
|
13688
|
-
newVal
|
|
13689
|
-
);
|
|
13690
|
-
},
|
|
13691
|
-
style: {
|
|
13692
|
-
minWidth: "32px",
|
|
13693
|
-
padding: "0"
|
|
13694
13753
|
}
|
|
13695
|
-
}
|
|
13696
|
-
|
|
13697
|
-
|
|
13698
|
-
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
|
|
13742
|
-
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
|
|
13754
|
+
) }),
|
|
13755
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13756
|
+
reactComponents.Button,
|
|
13757
|
+
{
|
|
13758
|
+
appearance: "transparent",
|
|
13759
|
+
disabled,
|
|
13760
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
13761
|
+
react.Icon,
|
|
13762
|
+
{
|
|
13763
|
+
icon: "fluent:add-circle-24-regular",
|
|
13764
|
+
style: {
|
|
13765
|
+
fontSize: "24px",
|
|
13766
|
+
color: reactComponents.tokens.colorBrandStroke1
|
|
13767
|
+
}
|
|
13768
|
+
}
|
|
13769
|
+
),
|
|
13770
|
+
"aria-label": mergedLabels.incrementQuantityAriaLabel,
|
|
13771
|
+
size: "small",
|
|
13772
|
+
onClick: () => {
|
|
13773
|
+
const currentVal = getValues(
|
|
13774
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13775
|
+
) || 0;
|
|
13776
|
+
const currentQty = Number(currentVal);
|
|
13777
|
+
const newVal = currentQty + 1;
|
|
13778
|
+
setValue(
|
|
13779
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`,
|
|
13780
|
+
newVal
|
|
13781
|
+
);
|
|
13782
|
+
onUpdateCargoQuantity(
|
|
13783
|
+
owner.id,
|
|
13784
|
+
cargo.id,
|
|
13785
|
+
newVal
|
|
13786
|
+
);
|
|
13787
|
+
},
|
|
13788
|
+
style: {
|
|
13789
|
+
minWidth: "32px",
|
|
13790
|
+
padding: "0"
|
|
13791
|
+
}
|
|
13792
|
+
}
|
|
13793
|
+
)
|
|
13794
|
+
]
|
|
13795
|
+
}
|
|
13796
|
+
),
|
|
13797
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13798
|
+
"div",
|
|
13799
|
+
{
|
|
13800
|
+
style: {
|
|
13801
|
+
flex: 1,
|
|
13802
|
+
textAlign: "left",
|
|
13803
|
+
color: reactComponents.tokens.colorNeutralForeground1,
|
|
13804
|
+
fontSize: reactComponents.tokens.fontSizeBase300,
|
|
13805
|
+
paddingRight: "8px"
|
|
13806
|
+
},
|
|
13807
|
+
children: (() => {
|
|
13808
|
+
const type2 = watch(
|
|
13809
|
+
`owners.${index}.cargo.${cargoIndex}.loadType`
|
|
13810
|
+
);
|
|
13811
|
+
const selectedLoadType2 = loadTypes.find(
|
|
13812
|
+
(loadType) => loadType.id.toString() === type2
|
|
13813
|
+
);
|
|
13814
|
+
return selectedLoadType2?.unit?.name;
|
|
13815
|
+
})()
|
|
13816
|
+
}
|
|
13817
|
+
)
|
|
13818
|
+
]
|
|
13819
|
+
}
|
|
13820
|
+
)
|
|
13821
|
+
] }),
|
|
13822
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 12, children: [
|
|
13823
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
|
|
13824
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.priceLabel }),
|
|
13825
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
13826
|
+
reactComponents.Body2,
|
|
13827
|
+
{
|
|
13828
|
+
style: { marginTop: "0.5rem" },
|
|
13829
|
+
children: (() => {
|
|
13830
|
+
return new Intl.NumberFormat(
|
|
13831
|
+
"id-ID",
|
|
13832
|
+
{
|
|
13833
|
+
style: "currency",
|
|
13834
|
+
currency: "IDR",
|
|
13835
|
+
minimumFractionDigits: 0
|
|
13836
|
+
}
|
|
13837
|
+
).format(
|
|
13838
|
+
Number(
|
|
13839
|
+
getValues(
|
|
13840
|
+
`owners.${index}.cargo.${cargoIndex}.quantity`
|
|
13841
|
+
) || 0
|
|
13842
|
+
) * (_selectedLoadType?.price || 0)
|
|
13843
|
+
);
|
|
13844
|
+
})()
|
|
13845
|
+
}
|
|
13846
|
+
)
|
|
13847
|
+
] })
|
|
13848
|
+
] });
|
|
13849
|
+
})()
|
|
13850
|
+
] }) })
|
|
13851
|
+
]
|
|
13852
|
+
},
|
|
13853
|
+
cargo.id
|
|
13854
|
+
);
|
|
13855
|
+
})
|
|
13758
13856
|
}
|
|
13759
13857
|
),
|
|
13760
13858
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -17575,6 +17673,7 @@ exports.EmptyContentDefaultLabels = DEFAULT_LABELS11;
|
|
|
17575
17673
|
exports.FileUpload = FileUpload_default;
|
|
17576
17674
|
exports.GENDER = GENDER;
|
|
17577
17675
|
exports.HARDCODED_ID = HARDCODED_ID;
|
|
17676
|
+
exports.HARDCODED_NAME = HARDCODED_NAME;
|
|
17578
17677
|
exports.HTTP_STATUS = HTTP_STATUS;
|
|
17579
17678
|
exports.IDENTITY_TYPE = IDENTITY_TYPE;
|
|
17580
17679
|
exports.InputDynamic = InputDynamic_default;
|