@asdp/ferryui 0.1.22-dev.9939 → 0.1.22-dev.9962
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 +8 -3
- package/dist/index.d.ts +8 -3
- package/dist/index.js +38 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3073,14 +3073,19 @@ interface CardVehicleOwnerFormProps {
|
|
|
3073
3073
|
*/
|
|
3074
3074
|
commodityOptions?: SelectOption[];
|
|
3075
3075
|
/**
|
|
3076
|
-
* Options for load type select inputs
|
|
3076
|
+
* Options for load type select inputs (raw, used as fallback)
|
|
3077
3077
|
*/
|
|
3078
3078
|
loadTypeOptions?: (LoadType & {
|
|
3079
|
-
commodityId
|
|
3079
|
+
commodityId?: number;
|
|
3080
3080
|
})[];
|
|
3081
3081
|
loadTypes?: (LoadType & {
|
|
3082
|
-
commodityId
|
|
3082
|
+
commodityId?: number;
|
|
3083
3083
|
})[];
|
|
3084
|
+
/**
|
|
3085
|
+
* Map of commodityId -> SelectOption[] fetched from backend per cargo commodity.
|
|
3086
|
+
* When provided, each cargo's cargoType dropdown will use the matching entry.
|
|
3087
|
+
*/
|
|
3088
|
+
loadTypeOptionsByCommodityId?: Record<string, SelectOption[]>;
|
|
3084
3089
|
/**
|
|
3085
3090
|
* Options for industry select inputs
|
|
3086
3091
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -3073,14 +3073,19 @@ interface CardVehicleOwnerFormProps {
|
|
|
3073
3073
|
*/
|
|
3074
3074
|
commodityOptions?: SelectOption[];
|
|
3075
3075
|
/**
|
|
3076
|
-
* Options for load type select inputs
|
|
3076
|
+
* Options for load type select inputs (raw, used as fallback)
|
|
3077
3077
|
*/
|
|
3078
3078
|
loadTypeOptions?: (LoadType & {
|
|
3079
|
-
commodityId
|
|
3079
|
+
commodityId?: number;
|
|
3080
3080
|
})[];
|
|
3081
3081
|
loadTypes?: (LoadType & {
|
|
3082
|
-
commodityId
|
|
3082
|
+
commodityId?: number;
|
|
3083
3083
|
})[];
|
|
3084
|
+
/**
|
|
3085
|
+
* Map of commodityId -> SelectOption[] fetched from backend per cargo commodity.
|
|
3086
|
+
* When provided, each cargo's cargoType dropdown will use the matching entry.
|
|
3087
|
+
*/
|
|
3088
|
+
loadTypeOptionsByCommodityId?: Record<string, SelectOption[]>;
|
|
3084
3089
|
/**
|
|
3085
3090
|
* Options for industry select inputs
|
|
3086
3091
|
*/
|
package/dist/index.js
CHANGED
|
@@ -9901,6 +9901,9 @@ var useStyles20 = reactComponents.makeStyles({
|
|
|
9901
9901
|
},
|
|
9902
9902
|
switchIconRotate: {
|
|
9903
9903
|
transform: "rotate(180deg)"
|
|
9904
|
+
},
|
|
9905
|
+
heightAuto: {
|
|
9906
|
+
height: "auto !important"
|
|
9904
9907
|
}
|
|
9905
9908
|
});
|
|
9906
9909
|
var ModalSearchTicket = ({
|
|
@@ -9998,7 +10001,7 @@ var ModalSearchTicket = ({
|
|
|
9998
10001
|
}
|
|
9999
10002
|
),
|
|
10000
10003
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit(onFormSubmit), children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { style: { width: "100%" }, className: styles.formInnerRow, children: [
|
|
10001
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, lg: 12, xl:
|
|
10004
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, lg: 12, xl: 5.75, xxl: 5.75, xxxl: 5.75, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { style: { gap: "16px" }, className: styles.formFieldRow, children: [
|
|
10002
10005
|
/* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { children: [
|
|
10003
10006
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10004
10007
|
reactGridSystem.Col,
|
|
@@ -10111,13 +10114,13 @@ var ModalSearchTicket = ({
|
|
|
10111
10114
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10112
10115
|
reactGridSystem.Col,
|
|
10113
10116
|
{
|
|
10114
|
-
xs:
|
|
10115
|
-
sm:
|
|
10116
|
-
md:
|
|
10117
|
-
lg:
|
|
10118
|
-
xl:
|
|
10119
|
-
xxl:
|
|
10120
|
-
xxxl:
|
|
10117
|
+
xs: 8,
|
|
10118
|
+
sm: 8,
|
|
10119
|
+
md: 8,
|
|
10120
|
+
lg: 8,
|
|
10121
|
+
xl: 8,
|
|
10122
|
+
xxl: 8,
|
|
10123
|
+
xxxl: 8,
|
|
10121
10124
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", zIndex: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10122
10125
|
InputDynamic_default,
|
|
10123
10126
|
{
|
|
@@ -10147,13 +10150,13 @@ var ModalSearchTicket = ({
|
|
|
10147
10150
|
showRoundTrip && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10148
10151
|
reactGridSystem.Col,
|
|
10149
10152
|
{
|
|
10150
|
-
xs:
|
|
10151
|
-
sm:
|
|
10152
|
-
md:
|
|
10153
|
-
lg:
|
|
10154
|
-
xl:
|
|
10155
|
-
xxl:
|
|
10156
|
-
xxxl:
|
|
10153
|
+
xs: 4,
|
|
10154
|
+
sm: 4,
|
|
10155
|
+
md: 4,
|
|
10156
|
+
lg: 4,
|
|
10157
|
+
xl: 4,
|
|
10158
|
+
xxl: 4,
|
|
10159
|
+
xxxl: 4,
|
|
10157
10160
|
style: { display: "flex", justifyContent: "end" },
|
|
10158
10161
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10159
10162
|
InputDynamic_default,
|
|
@@ -10214,9 +10217,9 @@ var ModalSearchTicket = ({
|
|
|
10214
10217
|
xs: 12,
|
|
10215
10218
|
sm: 12,
|
|
10216
10219
|
lg: 12,
|
|
10217
|
-
xl:
|
|
10218
|
-
xxl:
|
|
10219
|
-
xxxl:
|
|
10220
|
+
xl: 0.5,
|
|
10221
|
+
xxl: 0.5,
|
|
10222
|
+
xxxl: 0.5,
|
|
10220
10223
|
style: {
|
|
10221
10224
|
display: "flex",
|
|
10222
10225
|
alignItems: "center",
|
|
@@ -10231,11 +10234,11 @@ var ModalSearchTicket = ({
|
|
|
10231
10234
|
xs: 12,
|
|
10232
10235
|
sm: 12,
|
|
10233
10236
|
lg: 12,
|
|
10234
|
-
xl: 5,
|
|
10235
|
-
xxl: 5,
|
|
10236
|
-
xxxl: 5,
|
|
10237
|
+
xl: 5.75,
|
|
10238
|
+
xxl: 5.75,
|
|
10239
|
+
xxxl: 5.75,
|
|
10237
10240
|
className: styles.serviceCol,
|
|
10238
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { style: { height: "100%", gap: "16px" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.formField, children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { style: { height: "100%", gap: "
|
|
10241
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Row, { style: { height: "100%", gap: "16px" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactGridSystem.Col, { xs: 12, sm: 12, lg: 12, xl: 12, xxl: 12, xxxl: 12, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: reactComponents.mergeClasses(styles.formField, styles.heightAuto), children: /* @__PURE__ */ jsxRuntime.jsxs(reactGridSystem.Row, { style: { height: "100%", gap: showPassengerField ? "24px" : "" }, children: [
|
|
10239
10242
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10240
10243
|
reactGridSystem.Col,
|
|
10241
10244
|
{
|
|
@@ -12532,6 +12535,7 @@ var CardVehicleOwnerForm = ({
|
|
|
12532
12535
|
commodityOptions = [],
|
|
12533
12536
|
loadTypeOptions = [],
|
|
12534
12537
|
loadTypes = [],
|
|
12538
|
+
loadTypeOptionsByCommodityId = {},
|
|
12535
12539
|
industryOptions = [],
|
|
12536
12540
|
loadCategoryOptions = [],
|
|
12537
12541
|
language = "id",
|
|
@@ -13148,10 +13152,18 @@ var CardVehicleOwnerForm = ({
|
|
|
13148
13152
|
cargoItems: updatedCargoItems
|
|
13149
13153
|
});
|
|
13150
13154
|
},
|
|
13151
|
-
options:
|
|
13152
|
-
|
|
13153
|
-
|
|
13154
|
-
|
|
13155
|
+
options: (() => {
|
|
13156
|
+
const selectedCommodityId = watch(
|
|
13157
|
+
`owners.${index}.cargo.${cargoIndex}.commodity`
|
|
13158
|
+
);
|
|
13159
|
+
if (selectedCommodityId && loadTypeOptionsByCommodityId[selectedCommodityId]) {
|
|
13160
|
+
return loadTypeOptionsByCommodityId[selectedCommodityId];
|
|
13161
|
+
}
|
|
13162
|
+
return loadTypeOptions.map((lt) => ({
|
|
13163
|
+
value: lt.id.toString(),
|
|
13164
|
+
label: `${lt.name}${lt.unit?.name ? ` (${lt.unit.name})` : ""}`
|
|
13165
|
+
}));
|
|
13166
|
+
})(),
|
|
13155
13167
|
placeholder: mergedLabels.selectPlaceholder,
|
|
13156
13168
|
required: true,
|
|
13157
13169
|
size: "large",
|