@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.js CHANGED
@@ -452,9 +452,13 @@ var MANIFEST_ENTITY = {
452
452
  INDIVIDUAL: "individual"
453
453
  };
454
454
  var HARDCODED_ID = {
455
- FAQ_ID_PEMESANAN_TIKET: 1,
456
- COMPANY_ID_LAINNYA: "999999",
457
- LOAD_TYPE_ID_LAINNYA: 87
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
- cargoTypeLabel: "Data Jenis Muatan",
12647
- cargoTypeHelperText: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
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
- cargoTypeOptions: {
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
- cargoTypeLabel: "Cargo Type Data",
12699
- cargoTypeHelperText: 'If the cargo type is not available, select "Other" and enter the cargo type.',
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
- cargoTypeOptions: {
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.COMPANY_ID_LAINNYA ? 6 : 12,
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.COMPANY_ID_LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
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.COMPANY_ID_LAINNYA ? 6 : 12,
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.COMPANY_ID_LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { lg: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
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.COMPANY_ID_LAINNYA ? 6 : 12,
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.COMPANY_ID_LAINNYA && /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xl: 6, children: /* @__PURE__ */ jsxRuntime.jsx(
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) => /* @__PURE__ */ jsxRuntime.jsxs(
13294
- reactComponents.AccordionItem,
13295
- {
13296
- value: `cargo-${cargo.id}`,
13297
- className: styles.accordion,
13298
- children: [
13299
- /* @__PURE__ */ jsxRuntime.jsx(
13300
- reactComponents.AccordionHeader,
13301
- {
13302
- className: styles.accordionHeader,
13303
- expandIconPosition: "end",
13304
- children: /* @__PURE__ */ jsxRuntime.jsx(
13305
- "div",
13306
- {
13307
- style: {
13308
- display: "flex",
13309
- justifyContent: "space-between",
13310
- alignItems: "center",
13311
- width: "100%"
13312
- },
13313
- children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1Strong, { children: mergedLabels.cargoItemTitle.replace(
13314
- "{index}",
13315
- (cargoIndex + 1).toString()
13316
- ) })
13317
- }
13318
- )
13319
- }
13320
- ),
13321
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.form, children: [
13322
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
13323
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
13324
- /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13325
- mergedLabels.commodityLabel,
13326
- " ",
13327
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
13328
- ] }),
13329
- /* @__PURE__ */ jsxRuntime.jsx(
13330
- InputDynamic_default,
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
- control,
13333
- disabled,
13334
- name: `owners.${index}.cargo.${cargoIndex}.commodity`,
13335
- onChange: (val) => {
13336
- const name = `owners.${index}.cargo.${cargoIndex}.commodity`;
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
- options: commodityOptions,
13353
- placeholder: mergedLabels.selectPlaceholder,
13354
- required: true,
13355
- type: "select",
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
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
13361
- /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13362
- mergedLabels.cargoTypeLabel,
13363
- " ",
13364
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
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.jsx(
13367
- InputDynamic_default,
13368
- {
13369
- control,
13370
- disabled: disabled || (getValues(
13371
- `owners.${index}.cargo.${cargoIndex}.commodity`
13372
- ) || "") === "",
13373
- name: `owners.${index}.cargo.${cargoIndex}.cargoType`,
13374
- onChange: (val) => {
13375
- const name = `owners.${index}.cargo.${cargoIndex}.cargoType`;
13376
- setValue(name, val);
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
- if (selectedCommodityId && loadTypeOptionsByCommodityId[selectedCommodityId]) {
13392
- return loadTypeOptionsByCommodityId[selectedCommodityId];
13393
- }
13394
- return loadTypeOptions.map((lt) => ({
13395
- value: lt.id.toString(),
13396
- label: `${lt.name}${lt.unit?.name ? ` (${lt.unit.name})` : ""}`
13397
- }));
13398
- })(),
13399
- placeholder: mergedLabels.selectPlaceholder,
13400
- required: true,
13401
- size: "large",
13402
- type: "select"
13403
- }
13404
- ),
13405
- /* @__PURE__ */ jsxRuntime.jsx(
13406
- reactComponents.Caption1,
13407
- {
13408
- style: {
13409
- color: reactComponents.tokens.colorNeutralForeground3,
13410
- marginTop: "0.25rem"
13411
- },
13412
- children: mergedLabels.cargoTypeHelperText
13413
- }
13414
- )
13415
- ] })
13416
- ] }),
13417
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
13418
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
13419
- /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13420
- mergedLabels.industryTypeLabel,
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.jsx(
13425
- InputDynamic_default,
13426
- {
13427
- control,
13428
- disabled,
13429
- name: `owners.${index}.cargo.${cargoIndex}.industryType`,
13430
- options: industryOptions,
13431
- onChange: (val) => {
13432
- const name = `owners.${index}.cargo.${cargoIndex}.industryType`;
13433
- setValue(name, val);
13434
- const updatedCargoItems = owner.cargoItems?.map(
13435
- (c, cIdx) => cIdx === cargoIndex ? {
13436
- ...c,
13437
- industryType: val
13438
- } : c
13439
- );
13440
- onUpdateOwner(owner.id, {
13441
- cargoItems: updatedCargoItems
13442
- });
13443
- },
13444
- placeholder: mergedLabels.selectPlaceholder,
13445
- required: true,
13446
- size: "large",
13447
- type: "select"
13448
- }
13449
- ),
13450
- /* @__PURE__ */ jsxRuntime.jsx(
13451
- reactComponents.Caption1,
13452
- {
13453
- style: {
13454
- color: reactComponents.tokens.colorNeutralForeground3,
13455
- marginTop: "0.25rem"
13456
- },
13457
- children: mergedLabels.industryTypeHelperText
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.Col, { md: 6, children: [
13462
- /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13463
- mergedLabels.cargoCategoryLabel,
13464
- " ",
13465
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "red" }, children: "*" })
13466
- ] }),
13467
- /* @__PURE__ */ jsxRuntime.jsx(
13468
- InputDynamic_default,
13469
- {
13470
- control,
13471
- disabled,
13472
- name: `owners.${index}.cargo.${cargoIndex}.cargoCategory`,
13473
- options: loadCategoryOptions,
13474
- onChange: (val) => {
13475
- const name = `owners.${index}.cargo.${cargoIndex}.cargoCategory`;
13476
- setValue(name, val);
13477
- const updatedCargoItems = owner.cargoItems?.map(
13478
- (c, cIdx) => cIdx === cargoIndex ? {
13479
- ...c,
13480
- cargoCategory: val
13481
- } : c
13482
- );
13483
- onUpdateOwner(owner.id, {
13484
- cargoItems: updatedCargoItems
13485
- });
13486
- },
13487
- placeholder: mergedLabels.selectPlaceholder,
13488
- required: true,
13489
- size: "large",
13490
- type: "select"
13491
- }
13492
- )
13493
- ] })
13494
- ] }),
13495
- /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsxRuntime.jsx(
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
- display: "flex",
13536
- alignItems: "center",
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
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
13545
- /* @__PURE__ */ jsxRuntime.jsxs(
13546
- "div",
13547
- {
13548
- style: {
13549
- display: "flex",
13550
- alignItems: "center",
13551
- gap: "12px"
13552
- },
13553
- children: [
13554
- /* @__PURE__ */ jsxRuntime.jsx(
13555
- reactComponents.Button,
13556
- {
13557
- appearance: "transparent",
13558
- disabled,
13559
- icon: /* @__PURE__ */ jsxRuntime.jsx(
13560
- react.Icon,
13561
- {
13562
- icon: "fluent:subtract-circle-24-regular",
13563
- style: {
13564
- fontSize: "24px",
13565
- color: reactComponents.tokens.colorNeutralForeground4
13566
- }
13567
- }
13568
- ),
13569
- "aria-label": mergedLabels.decrementQuantityAriaLabel,
13570
- size: "small",
13571
- onClick: () => {
13572
- const currentVal = getValues(
13573
- `owners.${index}.cargo.${cargoIndex}.quantity`
13574
- ) || 0;
13575
- const currentQty = Number(currentVal);
13576
- if (currentQty > 1) {
13577
- const newVal = currentQty - 1;
13578
- setValue(
13579
- `owners.${index}.cargo.${cargoIndex}.quantity`,
13580
- newVal
13581
- );
13582
- onUpdateCargoQuantity(
13583
- owner.id,
13584
- cargo.id,
13585
- newVal
13586
- );
13587
- }
13588
- },
13589
- style: {
13590
- minWidth: "32px",
13591
- padding: "0"
13592
- }
13593
- }
13594
- ),
13595
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
13596
- reactHookForm.Controller,
13597
- {
13598
- name: `owners.${index}.cargo.${cargoIndex}.quantity`,
13599
- control,
13600
- disabled,
13601
- render: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
13602
- "input",
13603
- {
13604
- ...field,
13605
- min: 1,
13606
- step: "1",
13607
- type: "number",
13608
- style: {
13609
- border: "none",
13610
- width: "100%",
13611
- textAlign: "center",
13612
- outline: "none",
13613
- backgroundColor: "transparent",
13614
- color: reactComponents.tokens.colorNeutralForeground1,
13615
- fontSize: reactComponents.tokens.fontSizeBase400,
13616
- fontFamily: reactComponents.tokens.fontFamilyBase
13617
- },
13618
- onKeyDown: (e) => {
13619
- if ([
13620
- "e",
13621
- "E",
13622
- "+",
13623
- "-",
13624
- ".",
13625
- ","
13626
- ].includes(e.key)) {
13627
- e.preventDefault();
13628
- }
13629
- },
13630
- onPaste: (e) => {
13631
- const paste = e.clipboardData.getData(
13632
- "text"
13633
- );
13634
- if (!/^\d+$/.test(paste)) {
13635
- e.preventDefault();
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
- onWheel: (e) => e.target.blur(),
13639
- onChange: (e) => {
13640
- const newVal = Number(
13641
- e.target.value
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
- /* @__PURE__ */ jsxRuntime.jsx(
13659
- reactComponents.Button,
13660
- {
13661
- appearance: "transparent",
13662
- disabled,
13663
- icon: /* @__PURE__ */ jsxRuntime.jsx(
13664
- react.Icon,
13665
- {
13666
- icon: "fluent:add-circle-24-regular",
13667
- style: {
13668
- fontSize: "24px",
13669
- color: reactComponents.tokens.colorBrandStroke1
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
- /* @__PURE__ */ jsxRuntime.jsx(
13701
- "div",
13702
- {
13703
- style: {
13704
- flex: 1,
13705
- textAlign: "left",
13706
- color: reactComponents.tokens.colorNeutralForeground1,
13707
- fontSize: reactComponents.tokens.fontSizeBase300,
13708
- paddingRight: "8px"
13709
- },
13710
- children: (() => {
13711
- const type2 = watch(
13712
- `owners.${index}.cargo.${cargoIndex}.cargoType`
13713
- );
13714
- const selectedLoadType2 = loadTypes.find(
13715
- (loadType) => loadType.id.toString() === type2
13716
- );
13717
- return selectedLoadType2?.unit?.name;
13718
- })()
13719
- }
13720
- )
13721
- ]
13722
- }
13723
- )
13724
- ] }),
13725
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 12, children: [
13726
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 0.5 } }),
13727
- /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { className: styles.label, children: mergedLabels.priceLabel }),
13728
- /* @__PURE__ */ jsxRuntime.jsx(
13729
- reactComponents.Body2,
13730
- {
13731
- style: { marginTop: "0.5rem" },
13732
- children: (() => {
13733
- return new Intl.NumberFormat(
13734
- "id-ID",
13735
- {
13736
- style: "currency",
13737
- currency: "IDR",
13738
- minimumFractionDigits: 0
13739
- }
13740
- ).format(
13741
- Number(
13742
- getValues(
13743
- `owners.${index}.cargo.${cargoIndex}.quantity`
13744
- ) || 0
13745
- ) * (_selectedLoadType?.price || 0)
13746
- );
13747
- })()
13748
- }
13749
- )
13750
- ] })
13751
- ] });
13752
- })()
13753
- ] }) })
13754
- ]
13755
- },
13756
- cargo.id
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;