@asdp/ferryui 0.1.22-dev.10371 → 0.1.22-dev.10384

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.mjs CHANGED
@@ -403,8 +403,8 @@ var IDENTITY_TYPE = {
403
403
  SIM: "SIM",
404
404
  KK: "KK",
405
405
  KTA: "KTA",
406
- PASSPORT: "PASSPORT",
407
- LAINNYA: "LAINNYA"
406
+ PASSPORT: "PSP",
407
+ LAINNYA: "TGL"
408
408
  };
409
409
  var LOAD_TYPE = {
410
410
  PEDESTRIAN: 1,
@@ -448,7 +448,8 @@ var HARDCODED_ID = {
448
448
  LOAD_TYPE__LAINNYA: 87
449
449
  };
450
450
  var HARDCODED_NAME = {
451
- LOAD_TYPE__LAINNYA: "Lainnya"
451
+ LOAD_TYPE__LAINNYA: "Lainnya",
452
+ INDUSTRY_TYPE__LAINNYA: "Lainnya"
452
453
  };
453
454
  var useStyles2 = makeStyles({
454
455
  carousel: {},
@@ -12645,6 +12646,8 @@ var DEFAULT_LABELS26 = {
12645
12646
  priceLabel: "Harga",
12646
12647
  industryTypeLabel: "Data Jenis Industri",
12647
12648
  industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis industrinya.',
12649
+ industryTypeOthersLabel: "Jenis Industri Lainnya",
12650
+ industryTypeOthersPlaceholder: "Masukkan Jenis Industri",
12648
12651
  cargoCategoryLabel: "Kategori Muatan",
12649
12652
  deleteCargoButton: "Hapus Muatan",
12650
12653
  addCargoButton: "Tambah Muatan",
@@ -12699,6 +12702,8 @@ var DEFAULT_LABELS26 = {
12699
12702
  priceLabel: "Price",
12700
12703
  industryTypeLabel: "Industry Type Data",
12701
12704
  industryTypeHelperText: 'If the industry type is not available, select "Other" and enter the industry type.',
12705
+ industryTypeOthersLabel: "Other Industry Type",
12706
+ industryTypeOthersPlaceholder: "Enter Industry Type",
12702
12707
  cargoCategoryLabel: "Cargo Category",
12703
12708
  deleteCargoButton: "Delete Cargo",
12704
12709
  addCargoButton: "Add Cargo",
@@ -13295,7 +13300,7 @@ var CardVehicleOwnerForm = ({
13295
13300
  const watchLoadType = watch(
13296
13301
  `owners.${index}.cargo.${cargoIndex}.loadType`
13297
13302
  );
13298
- watch(
13303
+ const watchIndustryType = watch(
13299
13304
  `owners.${index}.cargo.${cargoIndex}.industryType`
13300
13305
  );
13301
13306
  let _loadTypeOptions = [];
@@ -13310,6 +13315,9 @@ var CardVehicleOwnerForm = ({
13310
13315
  const isLoadTypeOther = _loadTypeOptions.find(
13311
13316
  (lt) => lt.value.toString() === String(watchLoadType)
13312
13317
  )?.label.startsWith(HARDCODED_NAME.LOAD_TYPE__LAINNYA);
13318
+ const isIndustryTypeOther = industryOptions?.find(
13319
+ (it) => it.value.toString() === String(watchIndustryType)
13320
+ )?.label === HARDCODED_NAME.INDUSTRY_TYPE__LAINNYA;
13313
13321
  return /* @__PURE__ */ jsxs(
13314
13322
  AccordionItem,
13315
13323
  {
@@ -13458,7 +13466,7 @@ var CardVehicleOwnerForm = ({
13458
13466
  ] })
13459
13467
  ] }),
13460
13468
  /* @__PURE__ */ jsxs(Row, { children: [
13461
- /* @__PURE__ */ jsxs(Col, { md: 6, children: [
13469
+ /* @__PURE__ */ jsxs(Col, { md: isIndustryTypeOther ? 4 : 6, children: [
13462
13470
  /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
13463
13471
  mergedLabels.industryTypeLabel,
13464
13472
  " ",
@@ -13501,7 +13509,41 @@ var CardVehicleOwnerForm = ({
13501
13509
  }
13502
13510
  )
13503
13511
  ] }),
13504
- /* @__PURE__ */ jsxs(Col, { md: 6, children: [
13512
+ isIndustryTypeOther && /* @__PURE__ */ jsxs(Col, { xl: 4, children: [
13513
+ /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
13514
+ mergedLabels.industryTypeOthersLabel,
13515
+ " ",
13516
+ /* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
13517
+ ] }),
13518
+ /* @__PURE__ */ jsx(
13519
+ InputDynamic_default,
13520
+ {
13521
+ control,
13522
+ disabled,
13523
+ name: `owners.${index}.cargo.${cargoIndex}.industryTypeOther`,
13524
+ placeholder: mergedLabels.industryTypeOthersPlaceholder,
13525
+ required: true,
13526
+ size: "large",
13527
+ type: "text",
13528
+ onChange: (val) => {
13529
+ setValue(
13530
+ `owners.${index}.cargo.${cargoIndex}.industryTypeOther`,
13531
+ val
13532
+ );
13533
+ const updatedCargoItems = owner.cargoItems?.map(
13534
+ (c, cIdx) => cIdx === cargoIndex ? {
13535
+ ...c,
13536
+ industryTypeOther: val
13537
+ } : c
13538
+ );
13539
+ onUpdateOwner(owner.id, {
13540
+ cargoItems: updatedCargoItems
13541
+ });
13542
+ }
13543
+ }
13544
+ )
13545
+ ] }),
13546
+ /* @__PURE__ */ jsxs(Col, { md: isIndustryTypeOther ? 4 : 6, children: [
13505
13547
  /* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
13506
13548
  mergedLabels.cargoCategoryLabel,
13507
13549
  " ",