@asdp/ferryui 0.1.22-dev.10371 → 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 CHANGED
@@ -1747,6 +1747,7 @@ declare const HARDCODED_ID: {
1747
1747
  };
1748
1748
  declare const HARDCODED_NAME: {
1749
1749
  readonly LOAD_TYPE__LAINNYA: "Lainnya";
1750
+ readonly INDUSTRY_TYPE__LAINNYA: "Lainnya";
1750
1751
  };
1751
1752
  interface LoadType {
1752
1753
  id: number;
@@ -3117,6 +3118,8 @@ interface CardVehicleOwnerFormLabels {
3117
3118
  priceLabel: string;
3118
3119
  industryTypeLabel: string;
3119
3120
  industryTypeHelperText: string;
3121
+ industryTypeOthersLabel: string;
3122
+ industryTypeOthersPlaceholder: string;
3120
3123
  cargoCategoryLabel: string;
3121
3124
  deleteCargoButton: string;
3122
3125
  addCargoButton: string;
package/dist/index.d.ts CHANGED
@@ -1747,6 +1747,7 @@ declare const HARDCODED_ID: {
1747
1747
  };
1748
1748
  declare const HARDCODED_NAME: {
1749
1749
  readonly LOAD_TYPE__LAINNYA: "Lainnya";
1750
+ readonly INDUSTRY_TYPE__LAINNYA: "Lainnya";
1750
1751
  };
1751
1752
  interface LoadType {
1752
1753
  id: number;
@@ -3117,6 +3118,8 @@ interface CardVehicleOwnerFormLabels {
3117
3118
  priceLabel: string;
3118
3119
  industryTypeLabel: string;
3119
3120
  industryTypeHelperText: string;
3121
+ industryTypeOthersLabel: string;
3122
+ industryTypeOthersPlaceholder: string;
3120
3123
  cargoCategoryLabel: string;
3121
3124
  deleteCargoButton: string;
3122
3125
  addCargoButton: string;
package/dist/index.js CHANGED
@@ -457,7 +457,8 @@ var HARDCODED_ID = {
457
457
  LOAD_TYPE__LAINNYA: 87
458
458
  };
459
459
  var HARDCODED_NAME = {
460
- LOAD_TYPE__LAINNYA: "Lainnya"
460
+ LOAD_TYPE__LAINNYA: "Lainnya",
461
+ INDUSTRY_TYPE__LAINNYA: "Lainnya"
461
462
  };
462
463
  var useStyles2 = reactComponents.makeStyles({
463
464
  carousel: {},
@@ -12654,6 +12655,8 @@ var DEFAULT_LABELS26 = {
12654
12655
  priceLabel: "Harga",
12655
12656
  industryTypeLabel: "Data Jenis Industri",
12656
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",
12657
12660
  cargoCategoryLabel: "Kategori Muatan",
12658
12661
  deleteCargoButton: "Hapus Muatan",
12659
12662
  addCargoButton: "Tambah Muatan",
@@ -12708,6 +12711,8 @@ var DEFAULT_LABELS26 = {
12708
12711
  priceLabel: "Price",
12709
12712
  industryTypeLabel: "Industry Type Data",
12710
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",
12711
12716
  cargoCategoryLabel: "Cargo Category",
12712
12717
  deleteCargoButton: "Delete Cargo",
12713
12718
  addCargoButton: "Add Cargo",
@@ -13304,7 +13309,7 @@ var CardVehicleOwnerForm = ({
13304
13309
  const watchLoadType = watch(
13305
13310
  `owners.${index}.cargo.${cargoIndex}.loadType`
13306
13311
  );
13307
- watch(
13312
+ const watchIndustryType = watch(
13308
13313
  `owners.${index}.cargo.${cargoIndex}.industryType`
13309
13314
  );
13310
13315
  let _loadTypeOptions = [];
@@ -13319,6 +13324,9 @@ var CardVehicleOwnerForm = ({
13319
13324
  const isLoadTypeOther = _loadTypeOptions.find(
13320
13325
  (lt) => lt.value.toString() === String(watchLoadType)
13321
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;
13322
13330
  return /* @__PURE__ */ jsxRuntime.jsxs(
13323
13331
  reactComponents.AccordionItem,
13324
13332
  {
@@ -13467,7 +13475,7 @@ var CardVehicleOwnerForm = ({
13467
13475
  ] })
13468
13476
  ] }),
13469
13477
  /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
13470
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
13478
+ /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: isIndustryTypeOther ? 4 : 6, children: [
13471
13479
  /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13472
13480
  mergedLabels.industryTypeLabel,
13473
13481
  " ",
@@ -13510,7 +13518,41 @@ var CardVehicleOwnerForm = ({
13510
13518
  }
13511
13519
  )
13512
13520
  ] }),
13513
- /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Col, { md: 6, children: [
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: [
13514
13556
  /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.Body1, { className: styles.label, children: [
13515
13557
  mergedLabels.cargoCategoryLabel,
13516
13558
  " ",