@asdp/ferryui 0.1.22-dev.8633 → 0.1.22-dev.8649
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 +346 -120
- package/dist/index.d.ts +346 -120
- package/dist/index.js +1702 -1069
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1699 -1066
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,77 @@ import moment from 'moment';
|
|
|
12
12
|
import { Range } from 'react-range';
|
|
13
13
|
import { SubtractRegular, AddRegular, DeleteRegular, InfoRegular } from '@fluentui/react-icons';
|
|
14
14
|
|
|
15
|
+
// src/components/ModalIllustration/ModalIllustration.constants.ts
|
|
16
|
+
var DEFAULT_LABELS = {
|
|
17
|
+
id: {
|
|
18
|
+
defaultImageAlt: "Ilustrasi",
|
|
19
|
+
defaultTitle: "Informasi",
|
|
20
|
+
defaultButtonText: "Tutup"
|
|
21
|
+
},
|
|
22
|
+
en: {
|
|
23
|
+
defaultImageAlt: "Illustration",
|
|
24
|
+
defaultTitle: "Information",
|
|
25
|
+
defaultButtonText: "Close"
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var PRESET_CONTENT = {
|
|
29
|
+
RADIUS: {
|
|
30
|
+
id: {
|
|
31
|
+
title: "Anda berada di luar area pemesanan",
|
|
32
|
+
message: "Pemesanan tiket tidak dapat dilakukan dari lokasi Anda saat ini. Fitur pembatasan wilayah sedang aktif untuk mencegah pemesanan tidak sah.",
|
|
33
|
+
imageSrc: "/assets/images/illustrations/radius.svg",
|
|
34
|
+
imageAlt: "Radius Limitation Illustration"
|
|
35
|
+
},
|
|
36
|
+
en: {
|
|
37
|
+
title: "You are outside the booking area",
|
|
38
|
+
message: "Ticket booking cannot be done from your current location. Location restriction feature is active to prevent unauthorized booking.",
|
|
39
|
+
imageSrc: "/assets/images/illustrations/radius.svg",
|
|
40
|
+
imageAlt: "Radius Limitation Illustration"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
SESSION_EXPIRED: {
|
|
44
|
+
id: {
|
|
45
|
+
title: "Sesi anda telah berakhir",
|
|
46
|
+
message: "Waktu sesi Anda telah habis untuk alasan keamanan. Silakan klik tombol dibawah untuk masuk kembali.",
|
|
47
|
+
imageSrc: "/assets/images/illustrations/sessionexp.svg",
|
|
48
|
+
imageAlt: "Session Expired Illustration"
|
|
49
|
+
},
|
|
50
|
+
en: {
|
|
51
|
+
title: "Your session has expired",
|
|
52
|
+
message: "Your session time has run out for security reasons. Please click the button below to sign in again.",
|
|
53
|
+
imageSrc: "/assets/images/illustrations/sessionexp.svg",
|
|
54
|
+
imageAlt: "Session Expired Illustration"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
PURCHASE_PERIOD_EXPIRED: {
|
|
58
|
+
id: {
|
|
59
|
+
title: "Waktu pembelian telah berakhir",
|
|
60
|
+
message: "Pemesanan tiket ditutup 1 jam sebelum jadwal keberangkatan. Silakan pilih jadwal keberangkatan lain yang masih tersedia.",
|
|
61
|
+
imageSrc: "/assets/images/illustrations/pay.svg",
|
|
62
|
+
imageAlt: "Purchase Period Expired Illustration"
|
|
63
|
+
},
|
|
64
|
+
en: {
|
|
65
|
+
title: "Purchase period has expired",
|
|
66
|
+
message: "Ticket booking closes 1 hour before departure schedule. Please choose another available departure schedule.",
|
|
67
|
+
imageSrc: "/assets/images/illustrations/pay.svg",
|
|
68
|
+
imageAlt: "Purchase Period Expired Illustration"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
TRANSACTION_LIMIT: {
|
|
72
|
+
id: {
|
|
73
|
+
title: "Anda mencapai batas transaksi tertunda",
|
|
74
|
+
message: "Anda telah mencapai batas transaksi tertunda. Pemesanan dapat dilakukan kembali setelah transaksi sebelumnya diselesaikan.",
|
|
75
|
+
imageSrc: "/assets/images/illustrations/mobile-pay.svg",
|
|
76
|
+
imageAlt: "Transaction Limit Illustration"
|
|
77
|
+
},
|
|
78
|
+
en: {
|
|
79
|
+
title: "Pending transaction limit reached",
|
|
80
|
+
message: "You have reached the pending transaction limit. Booking can be done again after the previous transaction is completed.",
|
|
81
|
+
imageSrc: "/assets/images/illustrations/mobile-pay.svg",
|
|
82
|
+
imageAlt: "Transaction Limit Illustration"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
15
86
|
var useStyles = makeStyles({
|
|
16
87
|
dialogSurface: {
|
|
17
88
|
maxWidth: "600px",
|
|
@@ -42,96 +113,82 @@ var ModalIllustration = ({
|
|
|
42
113
|
title,
|
|
43
114
|
message,
|
|
44
115
|
imageSrc = "/assets/images/illustrations/radius.svg",
|
|
45
|
-
imageAlt
|
|
116
|
+
imageAlt,
|
|
46
117
|
imageWidth = 361,
|
|
47
118
|
imageHeight = 203,
|
|
48
119
|
primaryButton,
|
|
49
|
-
secondaryButton
|
|
120
|
+
secondaryButton,
|
|
121
|
+
language = "id",
|
|
122
|
+
labels
|
|
50
123
|
}) => {
|
|
51
124
|
const styles = useStyles();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
125
|
+
const mergedLabels = { ...DEFAULT_LABELS[language], ...labels };
|
|
126
|
+
const displayImageAlt = imageAlt || mergedLabels.defaultImageAlt;
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
Dialog,
|
|
129
|
+
{
|
|
130
|
+
open,
|
|
131
|
+
onOpenChange: (_, data) => !data.open && onClose(),
|
|
132
|
+
modalType: "modal",
|
|
133
|
+
children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
134
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
135
|
+
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
136
|
+
/* @__PURE__ */ jsxs("div", { className: styles.iconContainer, children: [
|
|
137
|
+
/* @__PURE__ */ jsx(
|
|
138
|
+
"img",
|
|
139
|
+
{
|
|
140
|
+
src: imageSrc,
|
|
141
|
+
alt: displayImageAlt,
|
|
142
|
+
width: imageWidth,
|
|
143
|
+
height: imageHeight,
|
|
144
|
+
className: styles.image
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
typeof message === "string" ? /* @__PURE__ */ jsx(Body1, { style: { textAlign: "center" }, children: message }) : message
|
|
148
|
+
] }),
|
|
149
|
+
/* @__PURE__ */ jsxs("div", { className: styles.buttonContainer, children: [
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
Button,
|
|
152
|
+
{
|
|
153
|
+
style: { width: "100%" },
|
|
154
|
+
type: "button",
|
|
155
|
+
appearance: primaryButton.appearance || "primary",
|
|
156
|
+
onClick: primaryButton.onClick,
|
|
157
|
+
children: primaryButton.text
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
secondaryButton && /* @__PURE__ */ jsx(
|
|
161
|
+
Button,
|
|
162
|
+
{
|
|
163
|
+
style: { width: "100%" },
|
|
164
|
+
type: "button",
|
|
165
|
+
appearance: secondaryButton.appearance || "outline",
|
|
166
|
+
onClick: secondaryButton.onClick,
|
|
167
|
+
children: secondaryButton.text
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
] })
|
|
171
|
+
] })
|
|
172
|
+
] }) })
|
|
173
|
+
}
|
|
174
|
+
);
|
|
92
175
|
};
|
|
93
176
|
|
|
94
177
|
// src/components/ModalIllustration/presets.ts
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
imageAlt: "Radius Limitation Illustration"
|
|
104
|
-
},
|
|
105
|
-
/**
|
|
106
|
-
* Modal for expired session
|
|
107
|
-
*/
|
|
108
|
-
SESSION_EXPIRED: {
|
|
109
|
-
title: "Sesi anda telah berakhir",
|
|
110
|
-
message: "Waktu sesi Anda telah habis untuk alasan keamanan. Silakan klik tombol dibawah untuk masuk kembali.",
|
|
111
|
-
imageSrc: "/assets/images/illustrations/sessionexp.svg",
|
|
112
|
-
imageAlt: "Session Expired Illustration"
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Modal for purchase period expired
|
|
116
|
-
*/
|
|
117
|
-
PURCHASE_PERIOD_EXPIRED: {
|
|
118
|
-
title: "Waktu pembelian telah berakhir",
|
|
119
|
-
message: "Pemesanan tiket ditutup 1 jam sebelum jadwal keberangkatan. Silakan pilih jadwal keberangkatan lain yang masih tersedia.",
|
|
120
|
-
imageSrc: "/assets/images/illustrations/pay.svg",
|
|
121
|
-
imageAlt: "Purchase Period Expired Illustration"
|
|
122
|
-
},
|
|
123
|
-
/**
|
|
124
|
-
* Modal for transaction limit reached
|
|
125
|
-
*/
|
|
126
|
-
TRANSACTION_LIMIT: {
|
|
127
|
-
title: "Anda mencapai batas transaksi tertunda",
|
|
128
|
-
message: "Anda telah mencapai batas transaksi tertunda. Pemesanan dapat dilakukan kembali setelah transaksi sebelumnya diselesaikan.",
|
|
129
|
-
imageSrc: "/assets/images/illustrations/mobile-pay.svg",
|
|
130
|
-
imageAlt: "Transaction Limit Illustration"
|
|
131
|
-
}
|
|
178
|
+
var getModalPreset = (presetKey, language = "id") => {
|
|
179
|
+
const content = PRESET_CONTENT[presetKey][language];
|
|
180
|
+
return {
|
|
181
|
+
title: content.title,
|
|
182
|
+
message: content.message,
|
|
183
|
+
imageSrc: content.imageSrc,
|
|
184
|
+
imageAlt: content.imageAlt
|
|
185
|
+
};
|
|
132
186
|
};
|
|
133
|
-
var
|
|
134
|
-
|
|
187
|
+
var MODAL_PRESETS = {
|
|
188
|
+
RADIUS: getModalPreset("RADIUS", "id"),
|
|
189
|
+
SESSION_EXPIRED: getModalPreset("SESSION_EXPIRED", "id"),
|
|
190
|
+
PURCHASE_PERIOD_EXPIRED: getModalPreset("PURCHASE_PERIOD_EXPIRED", "id"),
|
|
191
|
+
TRANSACTION_LIMIT: getModalPreset("TRANSACTION_LIMIT", "id")
|
|
135
192
|
};
|
|
136
193
|
var useStyles2 = makeStyles({
|
|
137
194
|
carousel: {},
|
|
@@ -254,7 +311,7 @@ var CarouselWithCustomNav = ({
|
|
|
254
311
|
};
|
|
255
312
|
|
|
256
313
|
// src/components/CardPromo/CardPromo.constants.ts
|
|
257
|
-
var
|
|
314
|
+
var DEFAULT_LABELS2 = {
|
|
258
315
|
id: {
|
|
259
316
|
defaultImageAlt: "Gambar Promo",
|
|
260
317
|
defaultButtonText: "Lihat Detail"
|
|
@@ -365,7 +422,7 @@ var CardPromo = ({
|
|
|
365
422
|
labels
|
|
366
423
|
}) => {
|
|
367
424
|
const classes = useStyles3();
|
|
368
|
-
const mergedLabels = { ...
|
|
425
|
+
const mergedLabels = { ...DEFAULT_LABELS2[language], ...labels };
|
|
369
426
|
const displayImageAlt = imageAlt || mergedLabels.defaultImageAlt;
|
|
370
427
|
const displayButtonText = buttonText || mergedLabels.defaultButtonText;
|
|
371
428
|
const ariaLabel = totalCards ? `Card ${index + 1} of ${totalCards}` : `Promo card ${index + 1}`;
|
|
@@ -464,6 +521,20 @@ var CardPromo = ({
|
|
|
464
521
|
}
|
|
465
522
|
);
|
|
466
523
|
};
|
|
524
|
+
|
|
525
|
+
// src/components/CardBanner/CardBanner.constants.ts
|
|
526
|
+
var DEFAULT_LABELS3 = {
|
|
527
|
+
id: {
|
|
528
|
+
bannerAriaLabel: "Banner {index} dari {total}",
|
|
529
|
+
bannerAriaLabelSingle: "Banner {index}",
|
|
530
|
+
loadingBanner: "Memuat banner"
|
|
531
|
+
},
|
|
532
|
+
en: {
|
|
533
|
+
bannerAriaLabel: "Banner {index} of {total}",
|
|
534
|
+
bannerAriaLabelSingle: "Banner {index}",
|
|
535
|
+
loadingBanner: "Loading banner"
|
|
536
|
+
}
|
|
537
|
+
};
|
|
467
538
|
var useStyles4 = makeStyles({
|
|
468
539
|
bannerCard: {
|
|
469
540
|
overflow: "hidden",
|
|
@@ -491,41 +562,50 @@ var CardBanner = ({
|
|
|
491
562
|
index = 0,
|
|
492
563
|
totalBanners,
|
|
493
564
|
onClick,
|
|
494
|
-
isLoading = false
|
|
565
|
+
isLoading = false,
|
|
566
|
+
language = "id",
|
|
567
|
+
labels
|
|
495
568
|
}) => {
|
|
496
569
|
const classes = useStyles4();
|
|
497
|
-
const
|
|
570
|
+
const mergedLabels = {
|
|
571
|
+
...DEFAULT_LABELS3[language],
|
|
572
|
+
...labels
|
|
573
|
+
};
|
|
574
|
+
const ariaLabel = totalBanners ? mergedLabels.bannerAriaLabel.replace("{index}", (index + 1).toString()).replace("{total}", totalBanners.toString()) : mergedLabels.bannerAriaLabelSingle.replace(
|
|
575
|
+
"{index}",
|
|
576
|
+
(index + 1).toString()
|
|
577
|
+
);
|
|
498
578
|
if (isLoading) {
|
|
499
|
-
return /* @__PURE__ */ jsx(CarouselCard, { className: classes.bannerCard, children: /* @__PURE__ */ jsx(
|
|
500
|
-
|
|
579
|
+
return /* @__PURE__ */ jsx(CarouselCard, { className: classes.bannerCard, children: /* @__PURE__ */ jsx(
|
|
580
|
+
Skeleton,
|
|
501
581
|
{
|
|
502
|
-
|
|
503
|
-
style: {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
582
|
+
"aria-label": mergedLabels.loadingBanner,
|
|
583
|
+
style: { width: "100%", height: "100%" },
|
|
584
|
+
children: /* @__PURE__ */ jsx(
|
|
585
|
+
SkeletonItem,
|
|
586
|
+
{
|
|
587
|
+
shape: "rectangle",
|
|
588
|
+
style: {
|
|
589
|
+
width: "100%",
|
|
590
|
+
height: "100%",
|
|
591
|
+
borderRadius: tokens.borderRadiusXLarge
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
)
|
|
508
595
|
}
|
|
509
|
-
) })
|
|
596
|
+
) });
|
|
510
597
|
}
|
|
511
|
-
return /* @__PURE__ */ jsx(
|
|
512
|
-
|
|
598
|
+
return /* @__PURE__ */ jsx(CarouselCard, { className: classes.bannerCard, "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(
|
|
599
|
+
"img",
|
|
513
600
|
{
|
|
514
|
-
className: classes.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
src: imageUrl,
|
|
521
|
-
alt,
|
|
522
|
-
role: "presentation",
|
|
523
|
-
onClick,
|
|
524
|
-
style: { cursor: onClick ? "pointer" : "default" }
|
|
525
|
-
}
|
|
526
|
-
)
|
|
601
|
+
className: classes.bannerImage,
|
|
602
|
+
src: imageUrl,
|
|
603
|
+
alt,
|
|
604
|
+
role: "presentation",
|
|
605
|
+
onClick,
|
|
606
|
+
style: { cursor: onClick ? "pointer" : "default" }
|
|
527
607
|
}
|
|
528
|
-
);
|
|
608
|
+
) });
|
|
529
609
|
};
|
|
530
610
|
function useWindowSize() {
|
|
531
611
|
const [windowSize, setWindowSize] = useState({
|
|
@@ -671,7 +751,7 @@ var extendedTokens = {
|
|
|
671
751
|
colorBrandForegroundLinkSelected: customBrand[110]});
|
|
672
752
|
|
|
673
753
|
// src/components/CardTicket/CardTicket.constants.ts
|
|
674
|
-
var
|
|
754
|
+
var DEFAULT_LABELS4 = {
|
|
675
755
|
id: {
|
|
676
756
|
availableSeatsLabel: "Tersedia",
|
|
677
757
|
estimationPrefix: "Estimasi",
|
|
@@ -913,7 +993,7 @@ var CardTicket = ({
|
|
|
913
993
|
}) => {
|
|
914
994
|
const styles = useStyles5();
|
|
915
995
|
const { width } = useWindowSize();
|
|
916
|
-
const mergedLabels = { ...
|
|
996
|
+
const mergedLabels = { ...DEFAULT_LABELS4[language], ...labels };
|
|
917
997
|
const getCircularVerticalConfig = () => {
|
|
918
998
|
if (width <= 1600) return { count: 6, spacing: 60, top: 10 };
|
|
919
999
|
return { count: 5, spacing: 60, top: 18 };
|
|
@@ -1417,6 +1497,56 @@ var BackgroundTicketCardVertical = (props) => /* @__PURE__ */ jsxs(
|
|
|
1417
1497
|
}
|
|
1418
1498
|
);
|
|
1419
1499
|
var BackgroundTicketCardVertical_default = BackgroundTicketCardVertical;
|
|
1500
|
+
|
|
1501
|
+
// src/components/CardServiceMenu/CardServiceMenu.constants.ts
|
|
1502
|
+
var DEFAULT_LABELS5 = {
|
|
1503
|
+
id: {
|
|
1504
|
+
ferryLabel: "Ferry",
|
|
1505
|
+
ferryDescription: "Layanan penyeberangan ferry ASDP",
|
|
1506
|
+
ifcsLabel: "IFCS",
|
|
1507
|
+
ifcsDescription: "Integrated Ferry Control System",
|
|
1508
|
+
skptLabel: "SKPT",
|
|
1509
|
+
skptDescription: "Sistem Karcis Penumpang Terpadu",
|
|
1510
|
+
hotelLabel: "Hotel",
|
|
1511
|
+
hotelDescription: "Layanan pemesanan hotel",
|
|
1512
|
+
otherLabel: "Lainnya",
|
|
1513
|
+
otherDescription: "Layanan lainnya"
|
|
1514
|
+
},
|
|
1515
|
+
en: {
|
|
1516
|
+
ferryLabel: "Ferry",
|
|
1517
|
+
ferryDescription: "ASDP Ferry Crossing Service",
|
|
1518
|
+
ifcsLabel: "IFCS",
|
|
1519
|
+
ifcsDescription: "Integrated Ferry Control System",
|
|
1520
|
+
skptLabel: "SKPT",
|
|
1521
|
+
skptDescription: "Integrated Passenger Ticketing System",
|
|
1522
|
+
hotelLabel: "Hotel",
|
|
1523
|
+
hotelDescription: "Hotel Booking Service",
|
|
1524
|
+
otherLabel: "Other",
|
|
1525
|
+
otherDescription: "Other Services"
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
var ALIAS_MENU_ITEMS = {
|
|
1529
|
+
ferry: {
|
|
1530
|
+
id: "ferry",
|
|
1531
|
+
logo: "/assets/images/icons/ferry.svg"
|
|
1532
|
+
},
|
|
1533
|
+
ifcs: {
|
|
1534
|
+
id: "ifcs",
|
|
1535
|
+
logo: "/assets/logo/asdp-default.svg"
|
|
1536
|
+
},
|
|
1537
|
+
skpt: {
|
|
1538
|
+
id: "skpt",
|
|
1539
|
+
logo: "/assets/logo/asdp-default.svg"
|
|
1540
|
+
},
|
|
1541
|
+
hotel: {
|
|
1542
|
+
id: "hotel",
|
|
1543
|
+
logo: "/assets/images/icons/hotel.svg"
|
|
1544
|
+
},
|
|
1545
|
+
other: {
|
|
1546
|
+
id: "other",
|
|
1547
|
+
logo: "/assets/images/icons/other.svg"
|
|
1548
|
+
}
|
|
1549
|
+
};
|
|
1420
1550
|
var useStyles6 = makeStyles({
|
|
1421
1551
|
card: {
|
|
1422
1552
|
width: "100%",
|
|
@@ -1509,66 +1639,26 @@ var useStyles6 = makeStyles({
|
|
|
1509
1639
|
}
|
|
1510
1640
|
}
|
|
1511
1641
|
});
|
|
1512
|
-
var SERVICE_MENU_ITEMS = {
|
|
1513
|
-
ferry: {
|
|
1514
|
-
id: "ferry",
|
|
1515
|
-
logo: "/assets/images/icons/ferry.svg",
|
|
1516
|
-
labels: {
|
|
1517
|
-
id: { label: "Ferry", description: "Layanan penyeberangan ferry ASDP" },
|
|
1518
|
-
en: { label: "Ferry", description: "ASDP Ferry Crossing Service" }
|
|
1519
|
-
}
|
|
1520
|
-
},
|
|
1521
|
-
ifcs: {
|
|
1522
|
-
id: "ifcs",
|
|
1523
|
-
logo: "/assets/logo/asdp-default.svg",
|
|
1524
|
-
labels: {
|
|
1525
|
-
id: { label: "IFCS", description: "Integrated Ferry Control System" },
|
|
1526
|
-
en: { label: "IFCS", description: "Integrated Ferry Control System" }
|
|
1527
|
-
}
|
|
1528
|
-
},
|
|
1529
|
-
skpt: {
|
|
1530
|
-
id: "skpt",
|
|
1531
|
-
logo: "/assets/logo/asdp-default.svg",
|
|
1532
|
-
labels: {
|
|
1533
|
-
id: { label: "SKPT", description: "Sistem Karcis Penumpang Terpadu" },
|
|
1534
|
-
en: { label: "SKPT", description: "Integrated Passenger Ticketing System" }
|
|
1535
|
-
}
|
|
1536
|
-
},
|
|
1537
|
-
hotel: {
|
|
1538
|
-
id: "hotel",
|
|
1539
|
-
logo: "/assets/images/icons/hotel.svg",
|
|
1540
|
-
labels: {
|
|
1541
|
-
id: { label: "Hotel", description: "Layanan pemesanan hotel" },
|
|
1542
|
-
en: { label: "Hotel", description: "Hotel Booking Service" }
|
|
1543
|
-
}
|
|
1544
|
-
},
|
|
1545
|
-
other: {
|
|
1546
|
-
id: "other",
|
|
1547
|
-
logo: "/assets/images/icons/other.svg",
|
|
1548
|
-
labels: {
|
|
1549
|
-
id: { label: "Lainnya", description: "Layanan lainnya" },
|
|
1550
|
-
en: { label: "Other", description: "Other Services" }
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
};
|
|
1554
1642
|
var CardServiceMenu = ({
|
|
1555
1643
|
activeServiceId = "ferry",
|
|
1556
1644
|
language = "id",
|
|
1557
1645
|
onServiceClick,
|
|
1558
1646
|
showDescriptions = true,
|
|
1559
|
-
className
|
|
1647
|
+
className,
|
|
1648
|
+
labels
|
|
1560
1649
|
}) => {
|
|
1561
1650
|
const styles = useStyles6();
|
|
1651
|
+
const mergedLabels = { ...DEFAULT_LABELS5[language], ...labels };
|
|
1562
1652
|
const getMenuItemClass = (serviceId) => {
|
|
1563
1653
|
const isActive = activeServiceId === serviceId;
|
|
1564
|
-
return mergeClasses(
|
|
1565
|
-
styles.menuItem,
|
|
1566
|
-
isActive && styles.menuItemActive
|
|
1567
|
-
);
|
|
1654
|
+
return mergeClasses(styles.menuItem, isActive && styles.menuItemActive);
|
|
1568
1655
|
};
|
|
1569
|
-
const menuItems = Object.values(
|
|
1656
|
+
const menuItems = Object.values(ALIAS_MENU_ITEMS);
|
|
1570
1657
|
return /* @__PURE__ */ jsx(Card, { className: mergeClasses(styles.card, className), children: /* @__PURE__ */ jsx("div", { className: styles.menuList, children: menuItems.map((item, index) => {
|
|
1571
|
-
const
|
|
1658
|
+
const labelKey = `${item.id}Label`;
|
|
1659
|
+
const descriptionKey = `${item.id}Description`;
|
|
1660
|
+
const label = mergedLabels[labelKey];
|
|
1661
|
+
const description = mergedLabels[descriptionKey];
|
|
1572
1662
|
return /* @__PURE__ */ jsxs(React5.Fragment, { children: [
|
|
1573
1663
|
/* @__PURE__ */ jsxs(
|
|
1574
1664
|
Button,
|
|
@@ -1576,14 +1666,7 @@ var CardServiceMenu = ({
|
|
|
1576
1666
|
className: getMenuItemClass(item.id),
|
|
1577
1667
|
onClick: () => onServiceClick?.(item.id),
|
|
1578
1668
|
children: [
|
|
1579
|
-
/* @__PURE__ */ jsx(
|
|
1580
|
-
"img",
|
|
1581
|
-
{
|
|
1582
|
-
src: item.logo,
|
|
1583
|
-
alt: label,
|
|
1584
|
-
className: styles.logo
|
|
1585
|
-
}
|
|
1586
|
-
),
|
|
1669
|
+
/* @__PURE__ */ jsx("img", { src: item.logo, alt: label, className: styles.logo }),
|
|
1587
1670
|
/* @__PURE__ */ jsxs("div", { className: styles.textContent, children: [
|
|
1588
1671
|
/* @__PURE__ */ jsx("span", { className: styles.label, children: label }),
|
|
1589
1672
|
showDescriptions && /* @__PURE__ */ jsx("span", { className: styles.description, children: description })
|
|
@@ -1689,6 +1772,26 @@ var DatePickerInput = forwardRef(
|
|
|
1689
1772
|
);
|
|
1690
1773
|
DatePickerInput.displayName = "DatePickerInput";
|
|
1691
1774
|
var DatePickerInput_default = DatePickerInput;
|
|
1775
|
+
|
|
1776
|
+
// src/components/InputDynamic/InputDynamic.constants.ts
|
|
1777
|
+
var DEFAULT_LABELS6 = {
|
|
1778
|
+
id: {
|
|
1779
|
+
emailOrPhonePlaceholder: "Email atau Nomor HP",
|
|
1780
|
+
emailPlaceholder: "Email",
|
|
1781
|
+
phonePlaceholder: "Nomor HP",
|
|
1782
|
+
identityPlaceholder: "Email, KTP, SIM, Passport, atau Nomor Telepon",
|
|
1783
|
+
identityPhonePlaceholder: "Nomor telepon",
|
|
1784
|
+
identityIdPlaceholder: "KTP, SIM, atau Passport"
|
|
1785
|
+
},
|
|
1786
|
+
en: {
|
|
1787
|
+
emailOrPhonePlaceholder: "Email or Phone Number",
|
|
1788
|
+
emailPlaceholder: "Email",
|
|
1789
|
+
phonePlaceholder: "Phone Number",
|
|
1790
|
+
identityPlaceholder: "Email, ID Card, Driving License, Passport, or Phone Number",
|
|
1791
|
+
identityPhonePlaceholder: "Phone Number",
|
|
1792
|
+
identityIdPlaceholder: "ID Card, Driving License, or Passport"
|
|
1793
|
+
}
|
|
1794
|
+
};
|
|
1692
1795
|
var PhoneInput = PhoneInputComponent.default || PhoneInputComponent;
|
|
1693
1796
|
var useStyles7 = makeStyles({
|
|
1694
1797
|
field: {
|
|
@@ -1931,13 +2034,18 @@ var InputDynamic = ({
|
|
|
1931
2034
|
autoComplete,
|
|
1932
2035
|
onInput,
|
|
1933
2036
|
contentAfter,
|
|
1934
|
-
onChange
|
|
2037
|
+
onChange,
|
|
2038
|
+
language = "id",
|
|
2039
|
+
labels
|
|
1935
2040
|
}) => {
|
|
1936
2041
|
const styles = useStyles7();
|
|
2042
|
+
const mergedLabels = { ...DEFAULT_LABELS6[language], ...labels };
|
|
1937
2043
|
const [showPassword, setShowPassword] = useState(false);
|
|
1938
2044
|
const [isPhoneMode, setIsPhoneMode] = useState(false);
|
|
1939
2045
|
const [emailOrPhoneType, setEmailOrPhoneType] = useState("none");
|
|
1940
|
-
const [identityType, setIdentityType] = useState(
|
|
2046
|
+
const [identityType, setIdentityType] = useState(
|
|
2047
|
+
"id"
|
|
2048
|
+
);
|
|
1941
2049
|
const [lastPhoneValue, setLastPhoneValue] = useState("");
|
|
1942
2050
|
const [lastEmailOrPhoneValue, setLastEmailOrPhoneValue] = useState("");
|
|
1943
2051
|
const inputRef = useRef(null);
|
|
@@ -2102,13 +2210,13 @@ var InputDynamic = ({
|
|
|
2102
2210
|
updateEmailOrPhoneType(field.value);
|
|
2103
2211
|
const stringValue = typeof field.value === "string" ? field.value : "";
|
|
2104
2212
|
let inputType = "text";
|
|
2105
|
-
let inputPlaceholder = placeholder ||
|
|
2213
|
+
let inputPlaceholder = placeholder || mergedLabels.emailOrPhonePlaceholder;
|
|
2106
2214
|
if (emailOrPhoneType === "email") {
|
|
2107
2215
|
inputType = "email";
|
|
2108
|
-
inputPlaceholder = placeholder ||
|
|
2216
|
+
inputPlaceholder = placeholder || mergedLabels.emailPlaceholder;
|
|
2109
2217
|
} else if (emailOrPhoneType === "phone") {
|
|
2110
2218
|
inputType = "tel";
|
|
2111
|
-
inputPlaceholder = placeholder ||
|
|
2219
|
+
inputPlaceholder = placeholder || mergedLabels.phonePlaceholder;
|
|
2112
2220
|
}
|
|
2113
2221
|
const normalizePhoneNumber = (val) => {
|
|
2114
2222
|
if (!val) return val;
|
|
@@ -2209,16 +2317,16 @@ var InputDynamic = ({
|
|
|
2209
2317
|
updateIdentityType(field.value);
|
|
2210
2318
|
const stringValue = typeof field.value === "string" ? field.value : "";
|
|
2211
2319
|
let inputType = "text";
|
|
2212
|
-
let inputPlaceholder = placeholder ||
|
|
2320
|
+
let inputPlaceholder = placeholder || mergedLabels.identityPlaceholder;
|
|
2213
2321
|
if (identityType === "email") {
|
|
2214
2322
|
inputType = "email";
|
|
2215
|
-
inputPlaceholder = placeholder ||
|
|
2323
|
+
inputPlaceholder = placeholder || mergedLabels.emailPlaceholder;
|
|
2216
2324
|
} else if (identityType === "phone") {
|
|
2217
2325
|
inputType = "tel";
|
|
2218
|
-
inputPlaceholder = placeholder ||
|
|
2326
|
+
inputPlaceholder = placeholder || mergedLabels.identityPhonePlaceholder;
|
|
2219
2327
|
} else if (identityType === "id") {
|
|
2220
2328
|
inputType = "text";
|
|
2221
|
-
inputPlaceholder = placeholder ||
|
|
2329
|
+
inputPlaceholder = placeholder || mergedLabels.identityIdPlaceholder;
|
|
2222
2330
|
}
|
|
2223
2331
|
const cleanPhoneValue = (val) => {
|
|
2224
2332
|
if (!val) return val;
|
|
@@ -2324,7 +2432,9 @@ var InputDynamic = ({
|
|
|
2324
2432
|
autoCapitalize: "off",
|
|
2325
2433
|
spellCheck: "false"
|
|
2326
2434
|
},
|
|
2327
|
-
value: isMultiSelect ? options.filter(
|
|
2435
|
+
value: isMultiSelect ? options.filter(
|
|
2436
|
+
(option) => field.value?.includes(option.value)
|
|
2437
|
+
) : options.find((option) => option.value === field.value) || null,
|
|
2328
2438
|
onChange: (selectedOption) => {
|
|
2329
2439
|
if (isMultiSelect) {
|
|
2330
2440
|
const values = selectedOption ? selectedOption.map((opt) => opt.value) : [];
|
|
@@ -2349,21 +2459,27 @@ var InputDynamic = ({
|
|
|
2349
2459
|
return stringVal;
|
|
2350
2460
|
};
|
|
2351
2461
|
const cleanedFieldValue = cleanPhoneValue(field.value || "");
|
|
2352
|
-
return /* @__PURE__ */ jsx(
|
|
2353
|
-
|
|
2462
|
+
return /* @__PURE__ */ jsx(
|
|
2463
|
+
"div",
|
|
2354
2464
|
{
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2465
|
+
className: `${styles.phoneInputWrapper} ${error ? styles.phoneInputError : ""}`,
|
|
2466
|
+
children: /* @__PURE__ */ jsx(
|
|
2467
|
+
PhoneInput,
|
|
2468
|
+
{
|
|
2469
|
+
country: defaultCountry.toLowerCase(),
|
|
2470
|
+
value: cleanedFieldValue,
|
|
2471
|
+
onChange: (value, data) => {
|
|
2472
|
+
const cleanedValue = cleanPhoneValue(value || "");
|
|
2473
|
+
field.onChange(cleanedValue);
|
|
2474
|
+
},
|
|
2475
|
+
placeholder: placeholder || "Nomor telepon",
|
|
2476
|
+
disabled,
|
|
2477
|
+
enableSearch: true,
|
|
2478
|
+
disableSearchIcon: true
|
|
2479
|
+
}
|
|
2480
|
+
)
|
|
2365
2481
|
}
|
|
2366
|
-
)
|
|
2482
|
+
);
|
|
2367
2483
|
}
|
|
2368
2484
|
case "file":
|
|
2369
2485
|
return /* @__PURE__ */ jsx(
|
|
@@ -2408,15 +2524,23 @@ var InputDynamic = ({
|
|
|
2408
2524
|
);
|
|
2409
2525
|
}
|
|
2410
2526
|
case "radio":
|
|
2411
|
-
return /* @__PURE__ */ jsx(
|
|
2412
|
-
|
|
2527
|
+
return /* @__PURE__ */ jsx(
|
|
2528
|
+
RadioGroup,
|
|
2413
2529
|
{
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2530
|
+
...field,
|
|
2531
|
+
disabled,
|
|
2532
|
+
layout: layout ?? "vertical",
|
|
2533
|
+
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
2534
|
+
Radio,
|
|
2535
|
+
{
|
|
2536
|
+
value: option.value,
|
|
2537
|
+
label: option.label,
|
|
2538
|
+
disabled: option.disabled
|
|
2539
|
+
},
|
|
2540
|
+
option.value
|
|
2541
|
+
))
|
|
2542
|
+
}
|
|
2543
|
+
);
|
|
2420
2544
|
case "radiobutton":
|
|
2421
2545
|
return /* @__PURE__ */ jsx(
|
|
2422
2546
|
RadioGroup,
|
|
@@ -2551,7 +2675,9 @@ var InputDynamic = ({
|
|
|
2551
2675
|
if (otpIndex2) {
|
|
2552
2676
|
let lastFilledIndex = 0;
|
|
2553
2677
|
for (let i = 1; i <= 6; i++) {
|
|
2554
|
-
const input = document.querySelector(
|
|
2678
|
+
const input = document.querySelector(
|
|
2679
|
+
`[data-otp-index="${i}"]`
|
|
2680
|
+
);
|
|
2555
2681
|
if (input && input.value) {
|
|
2556
2682
|
lastFilledIndex = i;
|
|
2557
2683
|
} else {
|
|
@@ -2751,7 +2877,15 @@ var InputDynamic = ({
|
|
|
2751
2877
|
children: [
|
|
2752
2878
|
label && type !== "checkbox" && /* @__PURE__ */ jsx(Label, { required, children: label }),
|
|
2753
2879
|
renderInput(field, error?.message),
|
|
2754
|
-
helperText && !error && /* @__PURE__ */ jsx(
|
|
2880
|
+
helperText && !error && /* @__PURE__ */ jsx(
|
|
2881
|
+
Text,
|
|
2882
|
+
{
|
|
2883
|
+
size: 200,
|
|
2884
|
+
style: { textAlign: "left" },
|
|
2885
|
+
className: styles.helperText,
|
|
2886
|
+
children: helperText
|
|
2887
|
+
}
|
|
2888
|
+
)
|
|
2755
2889
|
]
|
|
2756
2890
|
}
|
|
2757
2891
|
)
|
|
@@ -3003,7 +3137,7 @@ var DEFAULT_COUNTRY_CODES = [
|
|
|
3003
3137
|
];
|
|
3004
3138
|
|
|
3005
3139
|
// src/components/CardTicketSearch/CardTicketSearch.constants.ts
|
|
3006
|
-
var
|
|
3140
|
+
var DEFAULT_LABELS7 = {
|
|
3007
3141
|
id: {
|
|
3008
3142
|
fromLabel: "Dari",
|
|
3009
3143
|
toLabel: "Ke",
|
|
@@ -3179,7 +3313,7 @@ var CardTicketSearch = ({
|
|
|
3179
3313
|
}) => {
|
|
3180
3314
|
const styles = useStyles8();
|
|
3181
3315
|
const labels = React5.useMemo(
|
|
3182
|
-
() => ({ ...
|
|
3316
|
+
() => ({ ...DEFAULT_LABELS7[language], ...customLabels }),
|
|
3183
3317
|
[language, customLabels]
|
|
3184
3318
|
);
|
|
3185
3319
|
const { control, setValue, getValues, handleSubmit } = useForm({
|
|
@@ -3565,7 +3699,7 @@ var CardTicketSearch = ({
|
|
|
3565
3699
|
};
|
|
3566
3700
|
|
|
3567
3701
|
// src/components/CardTicketSearchSummary/CardTicketSearchSummary.constants.ts
|
|
3568
|
-
var
|
|
3702
|
+
var DEFAULT_LABELS8 = {
|
|
3569
3703
|
id: {
|
|
3570
3704
|
originHarbor: "Pelabuhan Keberangkatan",
|
|
3571
3705
|
destinationHarbor: "Pelabuhan Tujuan",
|
|
@@ -3666,7 +3800,7 @@ var CardTicketSearchSummary = ({
|
|
|
3666
3800
|
children
|
|
3667
3801
|
}) => {
|
|
3668
3802
|
const styles = useStyles9();
|
|
3669
|
-
const mergedLabels = { ...
|
|
3803
|
+
const mergedLabels = { ...DEFAULT_LABELS8[language], ...labels };
|
|
3670
3804
|
const { width } = useWindowSize();
|
|
3671
3805
|
const getCircularConfig = () => {
|
|
3672
3806
|
if (width <= parseInt(extendedTokens.breakpointXs))
|
|
@@ -3991,7 +4125,7 @@ var CardTicketSearchSummary = ({
|
|
|
3991
4125
|
};
|
|
3992
4126
|
|
|
3993
4127
|
// src/components/ModalSearchHarbor/ModalSearchHarbor.constants.ts
|
|
3994
|
-
var
|
|
4128
|
+
var DEFAULT_LABELS9 = {
|
|
3995
4129
|
id: {
|
|
3996
4130
|
title: "Pilih Pelabuhan",
|
|
3997
4131
|
searchPlaceholder: "Cari Pelabuhan...",
|
|
@@ -4143,7 +4277,7 @@ var ModalSearchHarbor = ({
|
|
|
4143
4277
|
onClearLastSearched
|
|
4144
4278
|
}) => {
|
|
4145
4279
|
const styles = useStyles10();
|
|
4146
|
-
const mergedLabels = { ...
|
|
4280
|
+
const mergedLabels = { ...DEFAULT_LABELS9[language], ...labels };
|
|
4147
4281
|
const handleSelect = (harbor) => {
|
|
4148
4282
|
onAddLastSearched(harbor);
|
|
4149
4283
|
onSelectHarbor(harbor);
|
|
@@ -4291,7 +4425,7 @@ var ModalSearchHarbor = ({
|
|
|
4291
4425
|
};
|
|
4292
4426
|
|
|
4293
4427
|
// src/components/ModalSelectDate/ModalSelectDate.constants.ts
|
|
4294
|
-
var
|
|
4428
|
+
var DEFAULT_LABELS10 = {
|
|
4295
4429
|
id: {
|
|
4296
4430
|
title: "Pilih Tanggal",
|
|
4297
4431
|
oneWay: "Sekali Jalan",
|
|
@@ -4424,7 +4558,7 @@ var ModalSelectDate = ({
|
|
|
4424
4558
|
showRoundtrip = true
|
|
4425
4559
|
}) => {
|
|
4426
4560
|
const styles = useStyles11();
|
|
4427
|
-
const mergedLabels = { ...
|
|
4561
|
+
const mergedLabels = { ...DEFAULT_LABELS10[language], ...labels };
|
|
4428
4562
|
useEffect(() => {
|
|
4429
4563
|
moment.locale(language === "id" ? "id" : "en");
|
|
4430
4564
|
}, [language]);
|
|
@@ -4645,6 +4779,24 @@ var ModalSelectDate = ({
|
|
|
4645
4779
|
}
|
|
4646
4780
|
);
|
|
4647
4781
|
};
|
|
4782
|
+
|
|
4783
|
+
// src/components/ModalService/ModalService.constants.ts
|
|
4784
|
+
var DEFAULT_LABELS11 = {
|
|
4785
|
+
id: {
|
|
4786
|
+
title: "Pilih Kelas Layanan",
|
|
4787
|
+
loading: "Memuat...",
|
|
4788
|
+
error: "Gagal memuat layanan",
|
|
4789
|
+
selectAll: "Pilih Semua",
|
|
4790
|
+
saveButton: "Simpan"
|
|
4791
|
+
},
|
|
4792
|
+
en: {
|
|
4793
|
+
title: "Select Service Class",
|
|
4794
|
+
loading: "Loading...",
|
|
4795
|
+
error: "Error loading services",
|
|
4796
|
+
selectAll: "Select All",
|
|
4797
|
+
saveButton: "Save"
|
|
4798
|
+
}
|
|
4799
|
+
};
|
|
4648
4800
|
var useStyles12 = makeStyles({
|
|
4649
4801
|
dialogSurface: {
|
|
4650
4802
|
maxWidth: "600px",
|
|
@@ -4719,9 +4871,11 @@ var useStyles12 = makeStyles({
|
|
|
4719
4871
|
}
|
|
4720
4872
|
});
|
|
4721
4873
|
var ModalService = ({
|
|
4874
|
+
language = "id",
|
|
4875
|
+
labels,
|
|
4722
4876
|
open,
|
|
4723
4877
|
onClose,
|
|
4724
|
-
title
|
|
4878
|
+
title,
|
|
4725
4879
|
services,
|
|
4726
4880
|
selectedServiceIds,
|
|
4727
4881
|
onSave,
|
|
@@ -4729,6 +4883,8 @@ var ModalService = ({
|
|
|
4729
4883
|
isError = false
|
|
4730
4884
|
}) => {
|
|
4731
4885
|
const styles = useStyles12();
|
|
4886
|
+
const mergedLabels = { ...DEFAULT_LABELS11[language], ...labels };
|
|
4887
|
+
const displayTitle = title || mergedLabels.title;
|
|
4732
4888
|
const [selectedServices, setSelectedServices] = useState(selectedServiceIds);
|
|
4733
4889
|
useEffect(() => {
|
|
4734
4890
|
if (open) {
|
|
@@ -4760,85 +4916,80 @@ var ModalService = ({
|
|
|
4760
4916
|
}
|
|
4761
4917
|
};
|
|
4762
4918
|
const handleSave = () => {
|
|
4763
|
-
const selectedServiceItems = services.filter(
|
|
4919
|
+
const selectedServiceItems = services.filter(
|
|
4920
|
+
(s) => selectedServices.includes(s.id)
|
|
4921
|
+
);
|
|
4764
4922
|
onSave(selectedServiceItems);
|
|
4765
4923
|
};
|
|
4766
|
-
return /* @__PURE__ */ jsx(
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4772
|
-
/* @__PURE__ */ jsx(
|
|
4773
|
-
DialogTitle,
|
|
4924
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (_, data) => !data.open && onClose(), children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
4925
|
+
/* @__PURE__ */ jsx(
|
|
4926
|
+
DialogTitle,
|
|
4927
|
+
{
|
|
4928
|
+
action: /* @__PURE__ */ jsx(
|
|
4929
|
+
Button,
|
|
4774
4930
|
{
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
|
|
4781
|
-
onClick: handleClose,
|
|
4782
|
-
className: styles.closeButton
|
|
4783
|
-
}
|
|
4784
|
-
),
|
|
4785
|
-
children: title
|
|
4931
|
+
appearance: "subtle",
|
|
4932
|
+
"aria-label": "close",
|
|
4933
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:dismiss-24-regular" }),
|
|
4934
|
+
onClick: handleClose,
|
|
4935
|
+
className: styles.closeButton
|
|
4786
4936
|
}
|
|
4787
4937
|
),
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4938
|
+
children: displayTitle
|
|
4939
|
+
}
|
|
4940
|
+
),
|
|
4941
|
+
/* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: isLoading ? /* @__PURE__ */ jsx(Body1, { children: mergedLabels.loading }) : isError ? /* @__PURE__ */ jsx(Body1, { children: mergedLabels.error }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4942
|
+
/* @__PURE__ */ jsxs("div", { className: styles.serviceList, children: [
|
|
4943
|
+
/* @__PURE__ */ jsxs("div", { className: styles.headerRow, children: [
|
|
4944
|
+
/* @__PURE__ */ jsx(Body1, { children: mergedLabels.selectAll }),
|
|
4945
|
+
/* @__PURE__ */ jsx(
|
|
4946
|
+
Checkbox,
|
|
4947
|
+
{
|
|
4948
|
+
checked: selectedServices.length === services.length,
|
|
4949
|
+
onChange: handleToggleAll
|
|
4950
|
+
}
|
|
4951
|
+
)
|
|
4952
|
+
] }),
|
|
4953
|
+
services.map((service) => /* @__PURE__ */ jsxs(
|
|
4954
|
+
"div",
|
|
4955
|
+
{
|
|
4956
|
+
className: styles.serviceItem,
|
|
4957
|
+
onClick: () => handleToggleService(service.id),
|
|
4958
|
+
children: [
|
|
4959
|
+
/* @__PURE__ */ jsxs("div", { className: styles.serviceContent, children: [
|
|
4960
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.serviceName, children: service.serviceTypeName }),
|
|
4961
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.serviceType, children: service.serviceTypeCode }),
|
|
4962
|
+
/* @__PURE__ */ jsx(Caption1, { className: styles.serviceDescription, children: service.serviceDescription })
|
|
4963
|
+
] }),
|
|
4792
4964
|
/* @__PURE__ */ jsx(
|
|
4793
4965
|
Checkbox,
|
|
4794
4966
|
{
|
|
4795
|
-
checked: selectedServices.
|
|
4796
|
-
onChange:
|
|
4967
|
+
checked: selectedServices.includes(service.id),
|
|
4968
|
+
onChange: () => handleToggleService(service.id)
|
|
4797
4969
|
}
|
|
4798
4970
|
)
|
|
4799
|
-
]
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
)
|
|
4818
|
-
]
|
|
4819
|
-
},
|
|
4820
|
-
service.id
|
|
4821
|
-
))
|
|
4822
|
-
] }),
|
|
4823
|
-
/* @__PURE__ */ jsx("div", { className: styles.footer, children: /* @__PURE__ */ jsx(
|
|
4824
|
-
Button,
|
|
4825
|
-
{
|
|
4826
|
-
appearance: "primary",
|
|
4827
|
-
size: "medium",
|
|
4828
|
-
className: styles.saveButton,
|
|
4829
|
-
onClick: handleSave,
|
|
4830
|
-
disabled: selectedServices.length === 0,
|
|
4831
|
-
children: "Simpan"
|
|
4832
|
-
}
|
|
4833
|
-
) })
|
|
4834
|
-
] }) })
|
|
4835
|
-
] }) })
|
|
4836
|
-
}
|
|
4837
|
-
);
|
|
4971
|
+
]
|
|
4972
|
+
},
|
|
4973
|
+
service.id
|
|
4974
|
+
))
|
|
4975
|
+
] }),
|
|
4976
|
+
/* @__PURE__ */ jsx("div", { className: styles.footer, children: /* @__PURE__ */ jsx(
|
|
4977
|
+
Button,
|
|
4978
|
+
{
|
|
4979
|
+
appearance: "primary",
|
|
4980
|
+
size: "medium",
|
|
4981
|
+
className: styles.saveButton,
|
|
4982
|
+
onClick: handleSave,
|
|
4983
|
+
disabled: selectedServices.length === 0,
|
|
4984
|
+
children: mergedLabels.saveButton
|
|
4985
|
+
}
|
|
4986
|
+
) })
|
|
4987
|
+
] }) })
|
|
4988
|
+
] }) }) });
|
|
4838
4989
|
};
|
|
4839
4990
|
|
|
4840
4991
|
// src/components/ModalTotalPassengers/ModalTotalPassengers.constants.ts
|
|
4841
|
-
var
|
|
4992
|
+
var DEFAULT_LABELS12 = {
|
|
4842
4993
|
id: {
|
|
4843
4994
|
title: "Pilih Jumlah Penumpang",
|
|
4844
4995
|
infoMessage: "Anda dapat menambahkan hingga {maxPassengers} penumpang pada golongan kendaraan ini.",
|
|
@@ -4945,7 +5096,7 @@ var ModalTotalPassengers = ({
|
|
|
4945
5096
|
infoMessage
|
|
4946
5097
|
}) => {
|
|
4947
5098
|
const styles = useStyles13();
|
|
4948
|
-
const mergedLabels = { ...
|
|
5099
|
+
const mergedLabels = { ...DEFAULT_LABELS12[language], ...labels };
|
|
4949
5100
|
const [passengers, setPassengers] = useState([]);
|
|
4950
5101
|
const [openItems, setOpenItems] = useState([]);
|
|
4951
5102
|
const defaultInfoMessage = mergedLabels.infoMessage.replace(
|
|
@@ -5210,7 +5361,7 @@ var ModalTotalPassengers = ({
|
|
|
5210
5361
|
};
|
|
5211
5362
|
|
|
5212
5363
|
// src/components/ModalTypeOfService/ModalTypeOfService.constants.ts
|
|
5213
|
-
var
|
|
5364
|
+
var DEFAULT_LABELS13 = {
|
|
5214
5365
|
id: {
|
|
5215
5366
|
title: "Pilih Tipe Layanan",
|
|
5216
5367
|
cancelButton: "Batal",
|
|
@@ -5291,7 +5442,7 @@ var ModalTypeOfService = ({
|
|
|
5291
5442
|
renderImage
|
|
5292
5443
|
}) => {
|
|
5293
5444
|
const styles = useStyles14();
|
|
5294
|
-
const mergedLabels = { ...
|
|
5445
|
+
const mergedLabels = { ...DEFAULT_LABELS13[language], ...labels };
|
|
5295
5446
|
const [selectedServiceTitle, setSelectedServiceTitle] = useState(
|
|
5296
5447
|
selectedService?.title || ""
|
|
5297
5448
|
);
|
|
@@ -5644,7 +5795,7 @@ var SortMenu = ({
|
|
|
5644
5795
|
};
|
|
5645
5796
|
|
|
5646
5797
|
// src/components/ModalFilterTicket/ModalFilterTicket.constants.ts
|
|
5647
|
-
var
|
|
5798
|
+
var DEFAULT_LABELS14 = {
|
|
5648
5799
|
id: {
|
|
5649
5800
|
title: "Filter dengan",
|
|
5650
5801
|
serviceTypeLabel: "Jenis Layanan",
|
|
@@ -5809,7 +5960,7 @@ var ModalFilterTicket = ({
|
|
|
5809
5960
|
maxDuration = DEFAULT_DURATION_RANGE.max
|
|
5810
5961
|
}) => {
|
|
5811
5962
|
const styles = useStyles16();
|
|
5812
|
-
const mergedLabels = { ...
|
|
5963
|
+
const mergedLabels = { ...DEFAULT_LABELS14[language], ...labels };
|
|
5813
5964
|
const [rangeReady, setRangeReady] = useState(false);
|
|
5814
5965
|
useEffect(() => {
|
|
5815
5966
|
if (open) {
|
|
@@ -6115,7 +6266,7 @@ var ModalFilterTicket = ({
|
|
|
6115
6266
|
};
|
|
6116
6267
|
|
|
6117
6268
|
// src/components/DateFilter/DateFilter.constants.ts
|
|
6118
|
-
var
|
|
6269
|
+
var DEFAULT_LABELS15 = {
|
|
6119
6270
|
prevButtonAriaLabel: "Previous dates",
|
|
6120
6271
|
nextButtonAriaLabel: "Next dates",
|
|
6121
6272
|
calendarButtonAriaLabel: "Open calendar"
|
|
@@ -6204,7 +6355,7 @@ var DateFilter = ({
|
|
|
6204
6355
|
}) => {
|
|
6205
6356
|
const styles = useStyles17();
|
|
6206
6357
|
const scrollRef = useRef(null);
|
|
6207
|
-
const mergedLabels = { ...
|
|
6358
|
+
const mergedLabels = { ...DEFAULT_LABELS15, ...labels };
|
|
6208
6359
|
const handlePrev = () => {
|
|
6209
6360
|
scrollRef.current?.scrollBy({ left: -scrollAmount, behavior: "smooth" });
|
|
6210
6361
|
};
|
|
@@ -6262,7 +6413,7 @@ var DateFilter = ({
|
|
|
6262
6413
|
};
|
|
6263
6414
|
|
|
6264
6415
|
// src/components/ModalSearchTicket/ModalSearchTicket.constants.ts
|
|
6265
|
-
var
|
|
6416
|
+
var DEFAULT_LABELS16 = {
|
|
6266
6417
|
id: {
|
|
6267
6418
|
title: "Cari Jadwal Lainnya",
|
|
6268
6419
|
fromLabel: "Dari",
|
|
@@ -6423,7 +6574,7 @@ var ModalSearchTicket = ({
|
|
|
6423
6574
|
...props
|
|
6424
6575
|
}) => {
|
|
6425
6576
|
const styles = useStyles18();
|
|
6426
|
-
const mergedLabels = { ...
|
|
6577
|
+
const mergedLabels = { ...DEFAULT_LABELS16[language], ...labels };
|
|
6427
6578
|
const { control, setValue, handleSubmit, watch } = useForm({
|
|
6428
6579
|
defaultValues: {
|
|
6429
6580
|
...DEFAULT_FORM_VALUES,
|
|
@@ -6858,6 +7009,18 @@ var ModalSearchTicket = ({
|
|
|
6858
7009
|
}
|
|
6859
7010
|
);
|
|
6860
7011
|
};
|
|
7012
|
+
|
|
7013
|
+
// src/components/Stepper/Stepper.constants.ts
|
|
7014
|
+
var DEFAULT_LABELS17 = {
|
|
7015
|
+
id: {
|
|
7016
|
+
stepperBackgroundAlt: "Latar Belakang Stepper",
|
|
7017
|
+
ferryIconAlt: "Ikon Kapal"
|
|
7018
|
+
},
|
|
7019
|
+
en: {
|
|
7020
|
+
stepperBackgroundAlt: "Stepper Background",
|
|
7021
|
+
ferryIconAlt: "Ferry Icon"
|
|
7022
|
+
}
|
|
7023
|
+
};
|
|
6861
7024
|
var useStyles19 = makeStyles({
|
|
6862
7025
|
stepperWrapper: {
|
|
6863
7026
|
position: "relative",
|
|
@@ -6979,9 +7142,12 @@ var useStyles19 = makeStyles({
|
|
|
6979
7142
|
var Stepper = ({
|
|
6980
7143
|
steps,
|
|
6981
7144
|
currentStep,
|
|
6982
|
-
className
|
|
7145
|
+
className,
|
|
7146
|
+
language = "id",
|
|
7147
|
+
labels
|
|
6983
7148
|
}) => {
|
|
6984
7149
|
const styles = useStyles19();
|
|
7150
|
+
const mergedLabels = { ...DEFAULT_LABELS17[language], ...labels };
|
|
6985
7151
|
const currentStepIndex = useMemo(() => {
|
|
6986
7152
|
if (typeof currentStep === "number") {
|
|
6987
7153
|
return steps.findIndex((step) => step.number === currentStep);
|
|
@@ -7000,7 +7166,8 @@ var Stepper = ({
|
|
|
7000
7166
|
const status = getStepStatus(stepNumber);
|
|
7001
7167
|
const baseClass = styles.stepCircle;
|
|
7002
7168
|
if (status === "active") return `${baseClass} ${styles.stepCircleActive}`;
|
|
7003
|
-
if (status === "completed")
|
|
7169
|
+
if (status === "completed")
|
|
7170
|
+
return `${baseClass} ${styles.stepCircleCompleted}`;
|
|
7004
7171
|
return `${baseClass} ${styles.stepCircleInactive}`;
|
|
7005
7172
|
};
|
|
7006
7173
|
const getConnectorClass = (currentStepNumber) => {
|
|
@@ -7014,7 +7181,7 @@ var Stepper = ({
|
|
|
7014
7181
|
"img",
|
|
7015
7182
|
{
|
|
7016
7183
|
src: "/assets/images/reservation/stepper_bg.svg",
|
|
7017
|
-
alt:
|
|
7184
|
+
alt: mergedLabels.stepperBackgroundAlt,
|
|
7018
7185
|
className: styles.stepperBackground
|
|
7019
7186
|
}
|
|
7020
7187
|
),
|
|
@@ -7024,7 +7191,7 @@ var Stepper = ({
|
|
|
7024
7191
|
"img",
|
|
7025
7192
|
{
|
|
7026
7193
|
src: "/assets/images/reservation/ferry_step.svg",
|
|
7027
|
-
alt:
|
|
7194
|
+
alt: mergedLabels.ferryIconAlt,
|
|
7028
7195
|
className: styles.ferryIcon
|
|
7029
7196
|
}
|
|
7030
7197
|
) : /* @__PURE__ */ jsx("div", { className: getCircleClass(step.number), children: step.number }),
|
|
@@ -7036,7 +7203,7 @@ var Stepper = ({
|
|
|
7036
7203
|
};
|
|
7037
7204
|
|
|
7038
7205
|
// src/components/CardOrdererInfo/CardOrdererInfo.constants.ts
|
|
7039
|
-
var
|
|
7206
|
+
var DEFAULT_LABELS18 = {
|
|
7040
7207
|
id: {
|
|
7041
7208
|
title: "Informasi Pemesan",
|
|
7042
7209
|
ordererName: "Nama Pemesan",
|
|
@@ -7081,7 +7248,7 @@ var CardOrdererInfo = ({
|
|
|
7081
7248
|
className
|
|
7082
7249
|
}) => {
|
|
7083
7250
|
const styles = useStyles20();
|
|
7084
|
-
const mergedLabels = { ...
|
|
7251
|
+
const mergedLabels = { ...DEFAULT_LABELS18[language], ...labels };
|
|
7085
7252
|
return /* @__PURE__ */ jsxs(Card, { className: className || styles.card, children: [
|
|
7086
7253
|
/* @__PURE__ */ jsx(Title3, { children: mergedLabels.title }),
|
|
7087
7254
|
/* @__PURE__ */ jsxs("div", { className: styles.container, children: [
|
|
@@ -7100,6 +7267,24 @@ var CardOrdererInfo = ({
|
|
|
7100
7267
|
] })
|
|
7101
7268
|
] });
|
|
7102
7269
|
};
|
|
7270
|
+
|
|
7271
|
+
// src/components/ModalListPassenger/ModalListPassenger.constants.ts
|
|
7272
|
+
var DEFAULT_LABELS19 = {
|
|
7273
|
+
id: {
|
|
7274
|
+
title: "Detail Penumpang",
|
|
7275
|
+
sameAsOrderer: "Sama Dengan Pemesan",
|
|
7276
|
+
searchPlaceholder: "Cari Penumpang",
|
|
7277
|
+
addPassengerButton: "Tambah Penumpang",
|
|
7278
|
+
cancelButton: "Batal"
|
|
7279
|
+
},
|
|
7280
|
+
en: {
|
|
7281
|
+
title: "Passenger Details",
|
|
7282
|
+
sameAsOrderer: "Same as Orderer",
|
|
7283
|
+
searchPlaceholder: "Search Passenger",
|
|
7284
|
+
addPassengerButton: "Add Passenger",
|
|
7285
|
+
cancelButton: "Cancel"
|
|
7286
|
+
}
|
|
7287
|
+
};
|
|
7103
7288
|
var useStyles21 = makeStyles({
|
|
7104
7289
|
dialogSurface: {
|
|
7105
7290
|
maxWidth: "600px",
|
|
@@ -7141,9 +7326,11 @@ var useStyles21 = makeStyles({
|
|
|
7141
7326
|
}
|
|
7142
7327
|
});
|
|
7143
7328
|
var ModalListPassenger = ({
|
|
7329
|
+
language = "id",
|
|
7330
|
+
labels,
|
|
7144
7331
|
open,
|
|
7145
7332
|
onClose,
|
|
7146
|
-
title
|
|
7333
|
+
title,
|
|
7147
7334
|
passengers,
|
|
7148
7335
|
searchQuery,
|
|
7149
7336
|
onSearchChange,
|
|
@@ -7154,6 +7341,8 @@ var ModalListPassenger = ({
|
|
|
7154
7341
|
onSameAsOrdererChange
|
|
7155
7342
|
}) => {
|
|
7156
7343
|
const styles = useStyles21();
|
|
7344
|
+
const mergedLabels = { ...DEFAULT_LABELS19[language], ...labels };
|
|
7345
|
+
const displayTitle = title || mergedLabels.title;
|
|
7157
7346
|
const handleClose = () => {
|
|
7158
7347
|
onClose();
|
|
7159
7348
|
onSearchChange("");
|
|
@@ -7165,7 +7354,7 @@ var ModalListPassenger = ({
|
|
|
7165
7354
|
const filteredPassengers = passengers.filter((passenger) => {
|
|
7166
7355
|
if (!searchQuery) return true;
|
|
7167
7356
|
const query = searchQuery.toLowerCase();
|
|
7168
|
-
return passenger.name
|
|
7357
|
+
return passenger.name && passenger.name.toLowerCase().includes(query) || passenger.category && passenger.category.toLowerCase().includes(query);
|
|
7169
7358
|
});
|
|
7170
7359
|
return /* @__PURE__ */ jsx(
|
|
7171
7360
|
Dialog,
|
|
@@ -7183,12 +7372,12 @@ var ModalListPassenger = ({
|
|
|
7183
7372
|
action: /* @__PURE__ */ jsx(
|
|
7184
7373
|
Switch,
|
|
7185
7374
|
{
|
|
7186
|
-
label:
|
|
7375
|
+
label: mergedLabels.sameAsOrderer,
|
|
7187
7376
|
checked: sameAsOrderer,
|
|
7188
7377
|
onChange: (_, data) => onSameAsOrdererChange(data.checked)
|
|
7189
7378
|
}
|
|
7190
7379
|
),
|
|
7191
|
-
children: /* @__PURE__ */ jsx(Subtitle1, { children:
|
|
7380
|
+
children: /* @__PURE__ */ jsx(Subtitle1, { children: displayTitle })
|
|
7192
7381
|
}
|
|
7193
7382
|
),
|
|
7194
7383
|
/* @__PURE__ */ jsxs(DialogContent, { className: styles.content, children: [
|
|
@@ -7197,7 +7386,7 @@ var ModalListPassenger = ({
|
|
|
7197
7386
|
{
|
|
7198
7387
|
className: styles.searchInput,
|
|
7199
7388
|
contentBefore: /* @__PURE__ */ jsx(Icon, { icon: "fluent:search-24-regular" }),
|
|
7200
|
-
placeholder:
|
|
7389
|
+
placeholder: mergedLabels.searchPlaceholder,
|
|
7201
7390
|
value: searchQuery,
|
|
7202
7391
|
onChange: (_, data) => onSearchChange(data.value),
|
|
7203
7392
|
size: "large"
|
|
@@ -7248,7 +7437,7 @@ var ModalListPassenger = ({
|
|
|
7248
7437
|
size: "large",
|
|
7249
7438
|
shape: "circular",
|
|
7250
7439
|
onClick: onAddPassenger,
|
|
7251
|
-
children:
|
|
7440
|
+
children: mergedLabels.addPassengerButton
|
|
7252
7441
|
}
|
|
7253
7442
|
),
|
|
7254
7443
|
/* @__PURE__ */ jsx(
|
|
@@ -7258,7 +7447,7 @@ var ModalListPassenger = ({
|
|
|
7258
7447
|
size: "large",
|
|
7259
7448
|
shape: "circular",
|
|
7260
7449
|
onClick: handleClose,
|
|
7261
|
-
children:
|
|
7450
|
+
children: mergedLabels.cancelButton
|
|
7262
7451
|
}
|
|
7263
7452
|
)
|
|
7264
7453
|
] })
|
|
@@ -7267,6 +7456,76 @@ var ModalListPassenger = ({
|
|
|
7267
7456
|
}
|
|
7268
7457
|
);
|
|
7269
7458
|
};
|
|
7459
|
+
|
|
7460
|
+
// src/components/ModalPassengerForm/ModalPassengerForm.constants.ts
|
|
7461
|
+
var DEFAULT_LABELS20 = {
|
|
7462
|
+
id: {
|
|
7463
|
+
title: "Detail Penumpang",
|
|
7464
|
+
titleLabel: "Title",
|
|
7465
|
+
titlePlaceholder: "Pilih",
|
|
7466
|
+
nameLabel: "Nama Lengkap",
|
|
7467
|
+
namePlaceholder: "Masukkan Nama",
|
|
7468
|
+
idTypeLabel: "Jenis ID",
|
|
7469
|
+
idTypePlaceholder: "Pilih",
|
|
7470
|
+
idNumberLabel: "Nomor Identitas",
|
|
7471
|
+
idNumberPlaceholder: "Masukkan Nomor Identitas",
|
|
7472
|
+
ageLabel: "Usia",
|
|
7473
|
+
agePlaceholder: "Masukkan Usia",
|
|
7474
|
+
dateLabel: "Tanggal Lahir",
|
|
7475
|
+
datePlaceholder: "Masukkan Tanggal Lahir",
|
|
7476
|
+
cityLabel: "Kota Kabupaten",
|
|
7477
|
+
cityPlaceholder: "Masukkan Nama Kota/Kabupaten",
|
|
7478
|
+
ticketClassLabel: "Kelas penumpang",
|
|
7479
|
+
saveButton: "Simpan",
|
|
7480
|
+
cancelButton: "Batal",
|
|
7481
|
+
errors: {
|
|
7482
|
+
requiredTitle: "Title harus dipilih",
|
|
7483
|
+
requiredName: "Nama lengkap harus diisi",
|
|
7484
|
+
minLengthName: "Nama minimal 3 karakter",
|
|
7485
|
+
requiredIdType: "Jenis ID harus dipilih",
|
|
7486
|
+
requiredIdNumber: "Nomor identitas harus diisi",
|
|
7487
|
+
minLengthIdNumber: "Nomor identitas minimal 6 karakter",
|
|
7488
|
+
requiredAge: "Usia harus diisi",
|
|
7489
|
+
minAge: "Usia minimal 1 tahun",
|
|
7490
|
+
maxAge: "Usia maksimal 150 tahun",
|
|
7491
|
+
requiredDate: "Tanggal lahir harus diisi",
|
|
7492
|
+
requiredCity: "Kota/Kabupaten harus diisi"
|
|
7493
|
+
}
|
|
7494
|
+
},
|
|
7495
|
+
en: {
|
|
7496
|
+
title: "Passenger Details",
|
|
7497
|
+
titleLabel: "Title",
|
|
7498
|
+
titlePlaceholder: "Select",
|
|
7499
|
+
nameLabel: "Full Name",
|
|
7500
|
+
namePlaceholder: "Enter Name",
|
|
7501
|
+
idTypeLabel: "ID Type",
|
|
7502
|
+
idTypePlaceholder: "Select",
|
|
7503
|
+
idNumberLabel: "Identity Number",
|
|
7504
|
+
idNumberPlaceholder: "Enter Identity Number",
|
|
7505
|
+
ageLabel: "Age",
|
|
7506
|
+
agePlaceholder: "Enter Age",
|
|
7507
|
+
dateLabel: "Date of Birth",
|
|
7508
|
+
datePlaceholder: "Enter Date of Birth",
|
|
7509
|
+
cityLabel: "City/Regency",
|
|
7510
|
+
cityPlaceholder: "Enter City/Regency Name",
|
|
7511
|
+
ticketClassLabel: "Passenger Class",
|
|
7512
|
+
saveButton: "Save",
|
|
7513
|
+
cancelButton: "Cancel",
|
|
7514
|
+
errors: {
|
|
7515
|
+
requiredTitle: "Title is required",
|
|
7516
|
+
requiredName: "Full name is required",
|
|
7517
|
+
minLengthName: "Name must be at least 3 characters",
|
|
7518
|
+
requiredIdType: "ID type is required",
|
|
7519
|
+
requiredIdNumber: "Identity number is required",
|
|
7520
|
+
minLengthIdNumber: "Identity number must be at least 6 characters",
|
|
7521
|
+
requiredAge: "Age is required",
|
|
7522
|
+
minAge: "Age must be at least 1 year",
|
|
7523
|
+
maxAge: "Age must be at most 150 years",
|
|
7524
|
+
requiredDate: "Date of birth is required",
|
|
7525
|
+
requiredCity: "City/Regency is required"
|
|
7526
|
+
}
|
|
7527
|
+
}
|
|
7528
|
+
};
|
|
7270
7529
|
var useStyles22 = makeStyles({
|
|
7271
7530
|
dialogSurface: {
|
|
7272
7531
|
maxWidth: "600px",
|
|
@@ -7286,9 +7545,11 @@ var useStyles22 = makeStyles({
|
|
|
7286
7545
|
}
|
|
7287
7546
|
});
|
|
7288
7547
|
var ModalPassengerForm = ({
|
|
7548
|
+
language = "id",
|
|
7549
|
+
labels,
|
|
7289
7550
|
open,
|
|
7290
7551
|
onClose,
|
|
7291
|
-
title
|
|
7552
|
+
title,
|
|
7292
7553
|
onSubmit,
|
|
7293
7554
|
defaultValues,
|
|
7294
7555
|
isAdultForm = true,
|
|
@@ -7298,6 +7559,12 @@ var ModalPassengerForm = ({
|
|
|
7298
7559
|
ticketClassOptions
|
|
7299
7560
|
}) => {
|
|
7300
7561
|
const styles = useStyles22();
|
|
7562
|
+
const mergedLabels = { ...DEFAULT_LABELS20[language], ...labels };
|
|
7563
|
+
const mergedErrors = {
|
|
7564
|
+
...DEFAULT_LABELS20[language].errors,
|
|
7565
|
+
...labels?.errors
|
|
7566
|
+
};
|
|
7567
|
+
const displayTitle = title || mergedLabels.title;
|
|
7301
7568
|
const { control, handleSubmit, reset } = useForm({
|
|
7302
7569
|
defaultValues
|
|
7303
7570
|
});
|
|
@@ -7322,7 +7589,7 @@ var ModalPassengerForm = ({
|
|
|
7322
7589
|
}
|
|
7323
7590
|
},
|
|
7324
7591
|
children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.dialogSurface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
7325
|
-
/* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(Subtitle1, { children:
|
|
7592
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: /* @__PURE__ */ jsx(Subtitle1, { children: displayTitle }) }),
|
|
7326
7593
|
/* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(handleFormSubmit), children: [
|
|
7327
7594
|
/* @__PURE__ */ jsx(
|
|
7328
7595
|
InputDynamic_default,
|
|
@@ -7330,13 +7597,13 @@ var ModalPassengerForm = ({
|
|
|
7330
7597
|
name: "title",
|
|
7331
7598
|
control,
|
|
7332
7599
|
type: "select",
|
|
7333
|
-
label:
|
|
7334
|
-
placeholder:
|
|
7600
|
+
label: mergedLabels.titleLabel,
|
|
7601
|
+
placeholder: mergedLabels.titlePlaceholder,
|
|
7335
7602
|
options: titleOptions,
|
|
7336
7603
|
size: "large",
|
|
7337
7604
|
required: true,
|
|
7338
7605
|
validationRules: {
|
|
7339
|
-
required:
|
|
7606
|
+
required: mergedErrors.requiredTitle
|
|
7340
7607
|
}
|
|
7341
7608
|
}
|
|
7342
7609
|
),
|
|
@@ -7346,15 +7613,15 @@ var ModalPassengerForm = ({
|
|
|
7346
7613
|
name: "name",
|
|
7347
7614
|
control,
|
|
7348
7615
|
type: "text",
|
|
7349
|
-
label:
|
|
7350
|
-
placeholder:
|
|
7616
|
+
label: mergedLabels.nameLabel,
|
|
7617
|
+
placeholder: mergedLabels.namePlaceholder,
|
|
7351
7618
|
size: "large",
|
|
7352
7619
|
required: true,
|
|
7353
7620
|
validationRules: {
|
|
7354
|
-
required:
|
|
7621
|
+
required: mergedErrors.requiredName,
|
|
7355
7622
|
minLength: {
|
|
7356
7623
|
value: 3,
|
|
7357
|
-
message:
|
|
7624
|
+
message: mergedErrors.minLengthName
|
|
7358
7625
|
}
|
|
7359
7626
|
}
|
|
7360
7627
|
}
|
|
@@ -7366,13 +7633,13 @@ var ModalPassengerForm = ({
|
|
|
7366
7633
|
name: "idType",
|
|
7367
7634
|
control,
|
|
7368
7635
|
type: "select",
|
|
7369
|
-
label:
|
|
7370
|
-
placeholder:
|
|
7636
|
+
label: mergedLabels.idTypeLabel,
|
|
7637
|
+
placeholder: mergedLabels.idTypePlaceholder,
|
|
7371
7638
|
options: idTypeOptions,
|
|
7372
7639
|
size: "large",
|
|
7373
7640
|
required: true,
|
|
7374
7641
|
validationRules: {
|
|
7375
|
-
required:
|
|
7642
|
+
required: mergedErrors.requiredIdType
|
|
7376
7643
|
}
|
|
7377
7644
|
}
|
|
7378
7645
|
),
|
|
@@ -7382,15 +7649,15 @@ var ModalPassengerForm = ({
|
|
|
7382
7649
|
name: "idNumber",
|
|
7383
7650
|
control,
|
|
7384
7651
|
type: "text",
|
|
7385
|
-
label:
|
|
7386
|
-
placeholder:
|
|
7652
|
+
label: mergedLabels.idNumberLabel,
|
|
7653
|
+
placeholder: mergedLabels.idNumberPlaceholder,
|
|
7387
7654
|
size: "large",
|
|
7388
7655
|
required: true,
|
|
7389
7656
|
validationRules: {
|
|
7390
|
-
required:
|
|
7657
|
+
required: mergedErrors.requiredIdNumber,
|
|
7391
7658
|
minLength: {
|
|
7392
7659
|
value: 6,
|
|
7393
|
-
message:
|
|
7660
|
+
message: mergedErrors.minLengthIdNumber
|
|
7394
7661
|
}
|
|
7395
7662
|
}
|
|
7396
7663
|
}
|
|
@@ -7401,19 +7668,19 @@ var ModalPassengerForm = ({
|
|
|
7401
7668
|
name: "age",
|
|
7402
7669
|
control,
|
|
7403
7670
|
type: "number",
|
|
7404
|
-
label:
|
|
7405
|
-
placeholder:
|
|
7671
|
+
label: mergedLabels.ageLabel,
|
|
7672
|
+
placeholder: mergedLabels.agePlaceholder,
|
|
7406
7673
|
size: "large",
|
|
7407
7674
|
required: true,
|
|
7408
7675
|
validationRules: {
|
|
7409
|
-
required:
|
|
7676
|
+
required: mergedErrors.requiredAge,
|
|
7410
7677
|
min: {
|
|
7411
7678
|
value: 1,
|
|
7412
|
-
message:
|
|
7679
|
+
message: mergedErrors.minAge
|
|
7413
7680
|
},
|
|
7414
7681
|
max: {
|
|
7415
7682
|
value: 150,
|
|
7416
|
-
message:
|
|
7683
|
+
message: mergedErrors.maxAge
|
|
7417
7684
|
}
|
|
7418
7685
|
}
|
|
7419
7686
|
}
|
|
@@ -7424,12 +7691,12 @@ var ModalPassengerForm = ({
|
|
|
7424
7691
|
name: "date",
|
|
7425
7692
|
control,
|
|
7426
7693
|
type: "date",
|
|
7427
|
-
label:
|
|
7428
|
-
placeholder:
|
|
7694
|
+
label: mergedLabels.dateLabel,
|
|
7695
|
+
placeholder: mergedLabels.datePlaceholder,
|
|
7429
7696
|
size: "large",
|
|
7430
7697
|
required: true,
|
|
7431
7698
|
validationRules: {
|
|
7432
|
-
required:
|
|
7699
|
+
required: mergedErrors.requiredDate
|
|
7433
7700
|
}
|
|
7434
7701
|
}
|
|
7435
7702
|
) }),
|
|
@@ -7439,13 +7706,13 @@ var ModalPassengerForm = ({
|
|
|
7439
7706
|
name: "cityId",
|
|
7440
7707
|
control,
|
|
7441
7708
|
type: "select",
|
|
7442
|
-
label:
|
|
7709
|
+
label: mergedLabels.cityLabel,
|
|
7443
7710
|
options: cityOptions,
|
|
7444
|
-
placeholder:
|
|
7711
|
+
placeholder: mergedLabels.cityPlaceholder,
|
|
7445
7712
|
size: "large",
|
|
7446
7713
|
required: true,
|
|
7447
7714
|
validationRules: {
|
|
7448
|
-
required:
|
|
7715
|
+
required: mergedErrors.requiredCity
|
|
7449
7716
|
}
|
|
7450
7717
|
}
|
|
7451
7718
|
),
|
|
@@ -7458,14 +7725,23 @@ var ModalPassengerForm = ({
|
|
|
7458
7725
|
name: "ticketClass",
|
|
7459
7726
|
control,
|
|
7460
7727
|
type: "radiobutton",
|
|
7461
|
-
label:
|
|
7728
|
+
label: mergedLabels.ticketClassLabel,
|
|
7462
7729
|
options: ticketClassOptions,
|
|
7463
7730
|
required: true,
|
|
7464
7731
|
disabled: true
|
|
7465
7732
|
}
|
|
7466
7733
|
),
|
|
7467
7734
|
/* @__PURE__ */ jsxs("div", { className: styles.actions, children: [
|
|
7468
|
-
/* @__PURE__ */ jsx(
|
|
7735
|
+
/* @__PURE__ */ jsx(
|
|
7736
|
+
Button,
|
|
7737
|
+
{
|
|
7738
|
+
appearance: "primary",
|
|
7739
|
+
size: "large",
|
|
7740
|
+
shape: "circular",
|
|
7741
|
+
type: "submit",
|
|
7742
|
+
children: mergedLabels.saveButton
|
|
7743
|
+
}
|
|
7744
|
+
),
|
|
7469
7745
|
/* @__PURE__ */ jsx(
|
|
7470
7746
|
Button,
|
|
7471
7747
|
{
|
|
@@ -7474,7 +7750,7 @@ var ModalPassengerForm = ({
|
|
|
7474
7750
|
shape: "circular",
|
|
7475
7751
|
type: "button",
|
|
7476
7752
|
onClick: handleClose,
|
|
7477
|
-
children:
|
|
7753
|
+
children: mergedLabels.cancelButton
|
|
7478
7754
|
}
|
|
7479
7755
|
)
|
|
7480
7756
|
] })
|
|
@@ -7485,7 +7761,7 @@ var ModalPassengerForm = ({
|
|
|
7485
7761
|
};
|
|
7486
7762
|
|
|
7487
7763
|
// src/components/CardPassengerList/CardPassengerList.constants.ts
|
|
7488
|
-
var
|
|
7764
|
+
var DEFAULT_LABELS21 = {
|
|
7489
7765
|
id: {
|
|
7490
7766
|
defaultTitle: "Data Penumpang",
|
|
7491
7767
|
passengerPrefix: "Penumpang"
|
|
@@ -7607,7 +7883,7 @@ var CardPassengerList = ({
|
|
|
7607
7883
|
className
|
|
7608
7884
|
}) => {
|
|
7609
7885
|
const styles = useStyles23();
|
|
7610
|
-
const mergedLabels = { ...
|
|
7886
|
+
const mergedLabels = { ...DEFAULT_LABELS21[language], ...labels };
|
|
7611
7887
|
const displayTitle = title || mergedLabels.defaultTitle;
|
|
7612
7888
|
return /* @__PURE__ */ jsxs(Card, { className: className || styles.card, children: [
|
|
7613
7889
|
/* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
|
|
@@ -7678,6 +7954,26 @@ var CardPassengerList = ({
|
|
|
7678
7954
|
}) })
|
|
7679
7955
|
] });
|
|
7680
7956
|
};
|
|
7957
|
+
|
|
7958
|
+
// src/components/CardVehicleDetail/CardVehicleDetail.constants.ts
|
|
7959
|
+
var DEFAULT_LABELS22 = {
|
|
7960
|
+
id: {
|
|
7961
|
+
title: "Detail Kendaraan",
|
|
7962
|
+
vehicleNumberLabel: "Nomor Kendaraan",
|
|
7963
|
+
vehicleNumberPlaceholder: "Contoh: B1234CD",
|
|
7964
|
+
hasLoadLabel: "Apakah kendaraan membawa muatan?",
|
|
7965
|
+
yesLabel: "Ya",
|
|
7966
|
+
noLabel: "Tidak"
|
|
7967
|
+
},
|
|
7968
|
+
en: {
|
|
7969
|
+
title: "Vehicle Details",
|
|
7970
|
+
vehicleNumberLabel: "Vehicle Number",
|
|
7971
|
+
vehicleNumberPlaceholder: "Example: B1234CD",
|
|
7972
|
+
hasLoadLabel: "Does the vehicle carry a load?",
|
|
7973
|
+
yesLabel: "Yes",
|
|
7974
|
+
noLabel: "No"
|
|
7975
|
+
}
|
|
7976
|
+
};
|
|
7681
7977
|
var useStyles24 = makeStyles({
|
|
7682
7978
|
card: {
|
|
7683
7979
|
padding: "1.5rem",
|
|
@@ -7713,14 +8009,27 @@ var CardVehicleDetail = ({
|
|
|
7713
8009
|
vehicleNumberName = "vehicleNumber",
|
|
7714
8010
|
showLoadOption = false,
|
|
7715
8011
|
hasLoad,
|
|
7716
|
-
onHasLoadChange
|
|
8012
|
+
onHasLoadChange,
|
|
8013
|
+
language = "id",
|
|
8014
|
+
labels
|
|
7717
8015
|
}) => {
|
|
7718
8016
|
const styles = useStyles24();
|
|
8017
|
+
const mergedLabels = { ...DEFAULT_LABELS22[language], ...labels };
|
|
7719
8018
|
return /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
|
|
7720
|
-
/* @__PURE__ */ jsxs(
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
8019
|
+
/* @__PURE__ */ jsxs(
|
|
8020
|
+
"div",
|
|
8021
|
+
{
|
|
8022
|
+
style: {
|
|
8023
|
+
display: "flex",
|
|
8024
|
+
justifyContent: "space-between",
|
|
8025
|
+
alignItems: "center"
|
|
8026
|
+
},
|
|
8027
|
+
children: [
|
|
8028
|
+
/* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: mergedLabels.title }),
|
|
8029
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, marginLeft: "1rem" }, children: /* @__PURE__ */ jsx(Divider, {}) })
|
|
8030
|
+
]
|
|
8031
|
+
}
|
|
8032
|
+
),
|
|
7724
8033
|
/* @__PURE__ */ jsxs("div", { className: styles.vehicleType, children: [
|
|
7725
8034
|
/* @__PURE__ */ jsx(
|
|
7726
8035
|
"img",
|
|
@@ -7735,19 +8044,19 @@ var CardVehicleDetail = ({
|
|
|
7735
8044
|
/* @__PURE__ */ jsx(Body1Strong, { children: serviceTitle })
|
|
7736
8045
|
] }),
|
|
7737
8046
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "0.25rem" }, children: [
|
|
7738
|
-
/* @__PURE__ */ jsx(Body1, { style: { color: tokens.colorNeutralForeground1 }, children:
|
|
8047
|
+
/* @__PURE__ */ jsx(Body1, { style: { color: tokens.colorNeutralForeground1 }, children: mergedLabels.vehicleNumberLabel }),
|
|
7739
8048
|
/* @__PURE__ */ jsx(
|
|
7740
8049
|
InputDynamic_default,
|
|
7741
8050
|
{
|
|
7742
8051
|
control,
|
|
7743
8052
|
name: vehicleNumberName,
|
|
7744
|
-
placeholder:
|
|
8053
|
+
placeholder: mergedLabels.vehicleNumberPlaceholder,
|
|
7745
8054
|
type: "text"
|
|
7746
8055
|
}
|
|
7747
8056
|
)
|
|
7748
8057
|
] }),
|
|
7749
8058
|
showLoadOption && /* @__PURE__ */ jsxs("div", { className: styles.radioGroup, children: [
|
|
7750
|
-
/* @__PURE__ */ jsx(Body1, { className: styles.question, children:
|
|
8059
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.question, children: mergedLabels.hasLoadLabel }),
|
|
7751
8060
|
/* @__PURE__ */ jsxs(
|
|
7752
8061
|
RadioGroup,
|
|
7753
8062
|
{
|
|
@@ -7755,14 +8064,112 @@ var CardVehicleDetail = ({
|
|
|
7755
8064
|
onChange: (_, data) => onHasLoadChange?.(data.value),
|
|
7756
8065
|
layout: "horizontal",
|
|
7757
8066
|
children: [
|
|
7758
|
-
/* @__PURE__ */ jsx(Radio, { value: "true", label:
|
|
7759
|
-
/* @__PURE__ */ jsx(Radio, { value: "false", label:
|
|
8067
|
+
/* @__PURE__ */ jsx(Radio, { value: "true", label: mergedLabels.yesLabel }),
|
|
8068
|
+
/* @__PURE__ */ jsx(Radio, { value: "false", label: mergedLabels.noLabel })
|
|
7760
8069
|
]
|
|
7761
8070
|
}
|
|
7762
8071
|
)
|
|
7763
8072
|
] })
|
|
7764
8073
|
] });
|
|
7765
8074
|
};
|
|
8075
|
+
|
|
8076
|
+
// src/components/CardVehicleOwnerForm/CardVehicleOwnerForm.constants.ts
|
|
8077
|
+
var DEFAULT_LABELS23 = {
|
|
8078
|
+
id: {
|
|
8079
|
+
title: "Informasi Pemilik & Muatan",
|
|
8080
|
+
addOwnerButton: "Tambah Pemilik",
|
|
8081
|
+
ownerInfoTitle: "Informasi Pemilik {index}",
|
|
8082
|
+
senderNameLabel: "Nama Pengirim",
|
|
8083
|
+
senderTypeCompany: "Perusahaan",
|
|
8084
|
+
senderTypeIndividual: "Perseorangan",
|
|
8085
|
+
selectCompanyPlaceholder: "Pilih Nama Perusahaan",
|
|
8086
|
+
inputSenderNamePlaceholder: "Masukkan Nama Pengirim",
|
|
8087
|
+
estimatedWeightLabel: "Data Estimasi Berat Muatan dan Kendaraan (Ton)",
|
|
8088
|
+
inputNumberPlaceholder: "Masukkan Angka",
|
|
8089
|
+
originCityLabel: "Kota Asal",
|
|
8090
|
+
destinationCityLabel: "Kota Tujuan",
|
|
8091
|
+
selectPlaceholder: "Pilih",
|
|
8092
|
+
cargoOwnerTitle: "Nama Perusahaan Pemilik Barang",
|
|
8093
|
+
cargoOwnerCompanyPlaceholder: "Pilih Nama Perusahaan Pemilik Barang",
|
|
8094
|
+
cargoOwnerIndividualPlaceholder: "Masukkan Nama Pemilik Barang",
|
|
8095
|
+
otherCompanyHelperText: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan',
|
|
8096
|
+
logisticsCompanyTitle: "Nama Perusahaan Logistik",
|
|
8097
|
+
logisticsCompanyPlaceholder: "Pilih Nama Perusahaan Logistik",
|
|
8098
|
+
logisticsIndividualPlaceholder: "Masukkan Nama Logistik",
|
|
8099
|
+
cargoReceiverTitle: "Nama Perusahaan Penerima Barang",
|
|
8100
|
+
cargoReceiverCompanyPlaceholder: "Pilih Nama Perusahaan Penerima Barang",
|
|
8101
|
+
cargoReceiverIndividualPlaceholder: "Masukkan Nama Penerima Barang",
|
|
8102
|
+
totalWeightLabel: "Berat Muatan dan Kendaraan (Ton)",
|
|
8103
|
+
cargoListTitle: "Daftar Muatan",
|
|
8104
|
+
cargoItemTitle: "Muatan {index}",
|
|
8105
|
+
commodityLabel: "Data Komoditas",
|
|
8106
|
+
commodityHelperTextPrefix: "Pahami definisi, jenis dan contoh komoditas",
|
|
8107
|
+
hereLinkText: "disini",
|
|
8108
|
+
cargoTypeLabel: "Data Jenis Muatan",
|
|
8109
|
+
cargoTypeHelperText: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
|
|
8110
|
+
cargoQuantityLabel: "Jumlah Muatan",
|
|
8111
|
+
priceLabel: "Harga",
|
|
8112
|
+
industryTypeLabel: "Data Jenis Industri",
|
|
8113
|
+
industryTypeHelperText: 'Apabila jenis industri belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.',
|
|
8114
|
+
cargoCategoryLabel: "Kategori Muatan",
|
|
8115
|
+
cargoCategoryHelperTextPrefix: "Pahami definisi, jenis dan contoh kategori muatan",
|
|
8116
|
+
deleteCargoButton: "Hapus Muatan",
|
|
8117
|
+
addCargoButton: "Tambah Muatan",
|
|
8118
|
+
cargoTypeOptions: {
|
|
8119
|
+
karung: "Karung",
|
|
8120
|
+
kg: "Kg",
|
|
8121
|
+
ton: "Ton",
|
|
8122
|
+
unit: "Unit"
|
|
8123
|
+
}
|
|
8124
|
+
},
|
|
8125
|
+
en: {
|
|
8126
|
+
title: "Owner & Cargo Information",
|
|
8127
|
+
addOwnerButton: "Add Owner",
|
|
8128
|
+
ownerInfoTitle: "Owner Information {index}",
|
|
8129
|
+
senderNameLabel: "Sender Name",
|
|
8130
|
+
senderTypeCompany: "Company",
|
|
8131
|
+
senderTypeIndividual: "Individual",
|
|
8132
|
+
selectCompanyPlaceholder: "Select Company Name",
|
|
8133
|
+
inputSenderNamePlaceholder: "Enter Sender Name",
|
|
8134
|
+
estimatedWeightLabel: "Estimated Cargo & Vehicle Weight (Ton)",
|
|
8135
|
+
inputNumberPlaceholder: "Enter Number",
|
|
8136
|
+
originCityLabel: "Origin City",
|
|
8137
|
+
destinationCityLabel: "Destination City",
|
|
8138
|
+
selectPlaceholder: "Select",
|
|
8139
|
+
cargoOwnerTitle: "Cargo Owner Company Name",
|
|
8140
|
+
cargoOwnerCompanyPlaceholder: "Select Cargo Owner Company",
|
|
8141
|
+
cargoOwnerIndividualPlaceholder: "Enter Cargo Owner Name",
|
|
8142
|
+
otherCompanyHelperText: 'If the company name is not available, select "Other" and enter the company name',
|
|
8143
|
+
logisticsCompanyTitle: "Logistics Company Name",
|
|
8144
|
+
logisticsCompanyPlaceholder: "Select Logistics Company",
|
|
8145
|
+
logisticsIndividualPlaceholder: "Enter Logistics Name",
|
|
8146
|
+
cargoReceiverTitle: "Cargo Receiver Company Name",
|
|
8147
|
+
cargoReceiverCompanyPlaceholder: "Select Cargo Receiver Company",
|
|
8148
|
+
cargoReceiverIndividualPlaceholder: "Enter Cargo Receiver Name",
|
|
8149
|
+
totalWeightLabel: "Cargo & Vehicle Weight (Ton)",
|
|
8150
|
+
cargoListTitle: "Cargo List",
|
|
8151
|
+
cargoItemTitle: "Cargo {index}",
|
|
8152
|
+
commodityLabel: "Commodity Data",
|
|
8153
|
+
commodityHelperTextPrefix: "Understand definition, types and examples of commodities",
|
|
8154
|
+
hereLinkText: "here",
|
|
8155
|
+
cargoTypeLabel: "Cargo Type Data",
|
|
8156
|
+
cargoTypeHelperText: 'If the cargo type is not available, select "Other" and enter the cargo type.',
|
|
8157
|
+
cargoQuantityLabel: "Cargo Quantity",
|
|
8158
|
+
priceLabel: "Price",
|
|
8159
|
+
industryTypeLabel: "Industry Type Data",
|
|
8160
|
+
industryTypeHelperText: 'If the industry type is not available, select "Other" and enter the industry type.',
|
|
8161
|
+
cargoCategoryLabel: "Cargo Category",
|
|
8162
|
+
cargoCategoryHelperTextPrefix: "Understand definition, types and examples of cargo categories",
|
|
8163
|
+
deleteCargoButton: "Delete Cargo",
|
|
8164
|
+
addCargoButton: "Add Cargo",
|
|
8165
|
+
cargoTypeOptions: {
|
|
8166
|
+
karung: "Sack",
|
|
8167
|
+
kg: "Kg",
|
|
8168
|
+
ton: "Ton",
|
|
8169
|
+
unit: "Unit"
|
|
8170
|
+
}
|
|
8171
|
+
}
|
|
8172
|
+
};
|
|
7766
8173
|
var useStyles25 = makeStyles({
|
|
7767
8174
|
card: {
|
|
7768
8175
|
padding: "1.5rem",
|
|
@@ -7818,13 +8225,16 @@ var CardVehicleOwnerForm = ({
|
|
|
7818
8225
|
onDeleteCargo,
|
|
7819
8226
|
onUpdateCargoQuantity,
|
|
7820
8227
|
companyOptions = [],
|
|
7821
|
-
cityOptions = []
|
|
8228
|
+
cityOptions = [],
|
|
8229
|
+
language = "id",
|
|
8230
|
+
labels
|
|
7822
8231
|
}) => {
|
|
7823
8232
|
const styles = useStyles25();
|
|
8233
|
+
const mergedLabels = { ...DEFAULT_LABELS23[language], ...labels };
|
|
7824
8234
|
return /* @__PURE__ */ jsxs(Card, { className: styles.card, children: [
|
|
7825
8235
|
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
7826
8236
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", flex: 1 }, children: [
|
|
7827
|
-
/* @__PURE__ */ jsx(Title3, { style: { marginRight: "1rem" }, children:
|
|
8237
|
+
/* @__PURE__ */ jsx(Title3, { style: { marginRight: "1rem" }, children: mergedLabels.title }),
|
|
7828
8238
|
/* @__PURE__ */ jsx(Divider, { style: { flex: 1 } })
|
|
7829
8239
|
] }),
|
|
7830
8240
|
/* @__PURE__ */ jsx(
|
|
@@ -7834,639 +8244,768 @@ var CardVehicleOwnerForm = ({
|
|
|
7834
8244
|
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:add-24-regular" }),
|
|
7835
8245
|
style: { color: tokens.colorNeutralForeground2 },
|
|
7836
8246
|
onClick: onAddOwner,
|
|
7837
|
-
children:
|
|
8247
|
+
children: mergedLabels.addOwnerButton
|
|
7838
8248
|
}
|
|
7839
8249
|
)
|
|
7840
8250
|
] }),
|
|
7841
|
-
/* @__PURE__ */ jsx(
|
|
7842
|
-
|
|
8251
|
+
/* @__PURE__ */ jsx(
|
|
8252
|
+
Accordion,
|
|
7843
8253
|
{
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
] }),
|
|
7861
|
-
owners.length > 1 && /* @__PURE__ */ jsx(
|
|
7862
|
-
Button,
|
|
7863
|
-
{
|
|
7864
|
-
appearance: "transparent",
|
|
7865
|
-
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
7866
|
-
onClick: (e) => {
|
|
7867
|
-
e.stopPropagation();
|
|
7868
|
-
onDeleteOwner(owner.id);
|
|
7869
|
-
},
|
|
7870
|
-
style: { color: tokens.colorPaletteRedForeground1 }
|
|
7871
|
-
}
|
|
7872
|
-
)
|
|
7873
|
-
]
|
|
7874
|
-
}
|
|
7875
|
-
) }),
|
|
7876
|
-
/* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: styles.form, children: [
|
|
7877
|
-
/* @__PURE__ */ jsxs(Row, { children: [
|
|
7878
|
-
/* @__PURE__ */ jsx(Col, { lg: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Nama Pengirim" }) }),
|
|
7879
|
-
/* @__PURE__ */ jsxs(Col, { lg: 6, children: [
|
|
7880
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
|
|
7881
|
-
RadioGroup,
|
|
7882
|
-
{
|
|
7883
|
-
layout: "horizontal",
|
|
7884
|
-
value: owner.senderType,
|
|
7885
|
-
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
7886
|
-
senderType: data.value
|
|
7887
|
-
}),
|
|
7888
|
-
children: [
|
|
7889
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
|
|
7890
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
|
|
7891
|
-
]
|
|
7892
|
-
}
|
|
7893
|
-
) }),
|
|
7894
|
-
/* @__PURE__ */ jsx(
|
|
7895
|
-
InputDynamic_default,
|
|
7896
|
-
{
|
|
7897
|
-
control,
|
|
7898
|
-
name: `owners.${index}.senderName`,
|
|
7899
|
-
placeholder: owner.senderType === "Perusahaan" ? "Pilih Nama Perusahaan" : "Masukkan Nama Pengirim",
|
|
7900
|
-
size: "large",
|
|
7901
|
-
type: owner.senderType === "Perusahaan" ? "select" : "text",
|
|
7902
|
-
options: owner.senderType === "Perusahaan" ? companyOptions : []
|
|
7903
|
-
}
|
|
7904
|
-
)
|
|
7905
|
-
] }),
|
|
7906
|
-
/* @__PURE__ */ jsxs(Col, { lg: 6, children: [
|
|
7907
|
-
/* @__PURE__ */ jsx("div", { style: { height: "1rem" } }),
|
|
7908
|
-
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
7909
|
-
"Data Estimasi Berat Muatan dan Kendaraan (Ton)",
|
|
7910
|
-
" ",
|
|
7911
|
-
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
7912
|
-
] }),
|
|
7913
|
-
/* @__PURE__ */ jsx(
|
|
7914
|
-
InputDynamic_default,
|
|
7915
|
-
{
|
|
7916
|
-
control,
|
|
7917
|
-
name: `owners.${index}.estimatedWeight`,
|
|
7918
|
-
placeholder: "Masukkan Angka",
|
|
7919
|
-
size: "large",
|
|
7920
|
-
type: "number"
|
|
7921
|
-
}
|
|
7922
|
-
)
|
|
7923
|
-
] })
|
|
7924
|
-
] }),
|
|
7925
|
-
/* @__PURE__ */ jsxs(Row, { children: [
|
|
7926
|
-
/* @__PURE__ */ jsxs(Col, { children: [
|
|
7927
|
-
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Kota Asal" }),
|
|
7928
|
-
/* @__PURE__ */ jsx(
|
|
7929
|
-
InputDynamic_default,
|
|
7930
|
-
{
|
|
7931
|
-
control,
|
|
7932
|
-
name: `looseCargoOwners.${index}.originCity`,
|
|
7933
|
-
placeholder: "Pilih",
|
|
7934
|
-
type: "select",
|
|
7935
|
-
options: cityOptions
|
|
7936
|
-
}
|
|
7937
|
-
)
|
|
7938
|
-
] }),
|
|
7939
|
-
/* @__PURE__ */ jsxs(Col, { children: [
|
|
7940
|
-
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Kota Tujuan" }),
|
|
7941
|
-
/* @__PURE__ */ jsx(
|
|
7942
|
-
InputDynamic_default,
|
|
7943
|
-
{
|
|
7944
|
-
control,
|
|
7945
|
-
name: `looseCargoOwners.${index}.destinationCity`,
|
|
7946
|
-
placeholder: "Pilih",
|
|
7947
|
-
type: "select",
|
|
7948
|
-
options: cityOptions
|
|
7949
|
-
}
|
|
7950
|
-
)
|
|
7951
|
-
] })
|
|
7952
|
-
] }),
|
|
7953
|
-
hasLoad && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7954
|
-
/* @__PURE__ */ jsxs(Row, { children: [
|
|
7955
|
-
/* @__PURE__ */ jsxs(Col, { children: [
|
|
7956
|
-
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
7957
|
-
"Nama Perusahaan Pemilik Barang ",
|
|
7958
|
-
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
7959
|
-
] }),
|
|
7960
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
|
|
7961
|
-
RadioGroup,
|
|
7962
|
-
{
|
|
7963
|
-
layout: "horizontal",
|
|
7964
|
-
value: owner.cargoOwnerType || "Perusahaan",
|
|
7965
|
-
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
7966
|
-
cargoOwnerType: data.value
|
|
7967
|
-
}),
|
|
7968
|
-
children: [
|
|
7969
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
|
|
7970
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
|
|
7971
|
-
]
|
|
7972
|
-
}
|
|
7973
|
-
) }),
|
|
7974
|
-
/* @__PURE__ */ jsx(
|
|
7975
|
-
InputDynamic_default,
|
|
7976
|
-
{
|
|
7977
|
-
control,
|
|
7978
|
-
name: `looseCargoOwners.${index}.cargoOwnerName`,
|
|
7979
|
-
placeholder: owner.cargoOwnerType === "Perusahaan" ? "Pilih Nama Perusahaan Pemilik Barang" : "Masukkan Nama Pemilik Barang",
|
|
7980
|
-
size: "large",
|
|
7981
|
-
type: owner.cargoOwnerType === "Perusahaan" ? "select" : "text",
|
|
7982
|
-
options: owner.cargoOwnerType === "Perusahaan" ? companyOptions : []
|
|
7983
|
-
}
|
|
7984
|
-
),
|
|
7985
|
-
/* @__PURE__ */ jsx(
|
|
7986
|
-
Caption1,
|
|
8254
|
+
collapsible: true,
|
|
8255
|
+
defaultOpenItems: owners.map((o) => String(o.id)),
|
|
8256
|
+
multiple: true,
|
|
8257
|
+
children: owners.map((owner, index) => /* @__PURE__ */ jsxs(
|
|
8258
|
+
AccordionItem,
|
|
8259
|
+
{
|
|
8260
|
+
value: String(owner.id),
|
|
8261
|
+
className: styles.accordion,
|
|
8262
|
+
children: [
|
|
8263
|
+
/* @__PURE__ */ jsx(
|
|
8264
|
+
AccordionHeader,
|
|
8265
|
+
{
|
|
8266
|
+
className: styles.accordionHeader,
|
|
8267
|
+
expandIconPosition: "end",
|
|
8268
|
+
children: /* @__PURE__ */ jsxs(
|
|
8269
|
+
"div",
|
|
7987
8270
|
{
|
|
7988
8271
|
style: {
|
|
7989
|
-
|
|
7990
|
-
|
|
8272
|
+
display: "flex",
|
|
8273
|
+
justifyContent: "space-between",
|
|
8274
|
+
alignItems: "center",
|
|
8275
|
+
width: "100%"
|
|
7991
8276
|
},
|
|
7992
|
-
children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
|
|
7993
|
-
}
|
|
7994
|
-
)
|
|
7995
|
-
] }),
|
|
7996
|
-
/* @__PURE__ */ jsxs(Col, { children: [
|
|
7997
|
-
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
7998
|
-
"Nama Perusahaan Logistik ",
|
|
7999
|
-
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8000
|
-
] }),
|
|
8001
|
-
/* @__PURE__ */ jsx("div", { style: { display: "flex", gap: "2rem", marginBottom: "0.5rem" }, children: /* @__PURE__ */ jsxs(
|
|
8002
|
-
RadioGroup,
|
|
8003
|
-
{
|
|
8004
|
-
layout: "horizontal",
|
|
8005
|
-
value: owner.logisticsCompanyType || "Perseorangan",
|
|
8006
|
-
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8007
|
-
logisticsCompanyType: data.value
|
|
8008
|
-
}),
|
|
8009
8277
|
children: [
|
|
8010
|
-
/* @__PURE__ */ jsx(
|
|
8011
|
-
|
|
8278
|
+
/* @__PURE__ */ jsx(Body1Strong, { children: mergedLabels.ownerInfoTitle.replace(
|
|
8279
|
+
"{index}",
|
|
8280
|
+
(index + 1).toString()
|
|
8281
|
+
) }),
|
|
8282
|
+
owners.length > 1 && /* @__PURE__ */ jsx(
|
|
8283
|
+
Button,
|
|
8284
|
+
{
|
|
8285
|
+
appearance: "transparent",
|
|
8286
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
8287
|
+
onClick: (e) => {
|
|
8288
|
+
e.stopPropagation();
|
|
8289
|
+
onDeleteOwner(owner.id);
|
|
8290
|
+
},
|
|
8291
|
+
style: { color: tokens.colorPaletteRedForeground1 }
|
|
8292
|
+
}
|
|
8293
|
+
)
|
|
8012
8294
|
]
|
|
8013
8295
|
}
|
|
8014
|
-
) }),
|
|
8015
|
-
/* @__PURE__ */ jsx(
|
|
8016
|
-
InputDynamic_default,
|
|
8017
|
-
{
|
|
8018
|
-
control,
|
|
8019
|
-
name: `looseCargoOwners.${index}.logisticsCompanyName`,
|
|
8020
|
-
placeholder: owner.logisticsCompanyType === "Perusahaan" ? "Pilih Nama Perusahaan Logistik" : "Masukkan Nama Logistik",
|
|
8021
|
-
size: "large",
|
|
8022
|
-
type: owner.logisticsCompanyType === "Perusahaan" ? "select" : "text",
|
|
8023
|
-
options: owner.logisticsCompanyType === "Perusahaan" ? companyOptions : []
|
|
8024
|
-
}
|
|
8025
|
-
),
|
|
8026
|
-
/* @__PURE__ */ jsx(
|
|
8027
|
-
Caption1,
|
|
8028
|
-
{
|
|
8029
|
-
style: {
|
|
8030
|
-
color: tokens.colorNeutralForeground3,
|
|
8031
|
-
marginTop: "0.25rem"
|
|
8032
|
-
},
|
|
8033
|
-
children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
|
|
8034
|
-
}
|
|
8035
8296
|
)
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
/* @__PURE__ */ jsxs(
|
|
8039
|
-
/* @__PURE__ */
|
|
8040
|
-
|
|
8041
|
-
/* @__PURE__ */ jsxs(
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
layout: "horizontal",
|
|
8045
|
-
value: owner.cargoReceiverType || "Perusahaan",
|
|
8046
|
-
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8047
|
-
cargoReceiverType: data.value
|
|
8048
|
-
}),
|
|
8049
|
-
children: [
|
|
8050
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perusahaan", label: "Perusahaan" }),
|
|
8051
|
-
/* @__PURE__ */ jsx(Radio, { value: "Perseorangan", label: "Perseorangan" })
|
|
8052
|
-
]
|
|
8053
|
-
}
|
|
8054
|
-
),
|
|
8055
|
-
/* @__PURE__ */ jsx(
|
|
8056
|
-
InputDynamic_default,
|
|
8057
|
-
{
|
|
8058
|
-
control,
|
|
8059
|
-
name: `looseCargoOwners.${index}.cargoReceiverName`,
|
|
8060
|
-
placeholder: owner.cargoReceiverType === "Perusahaan" ? "Pilih Nama Perusahaan Penerima Barang" : "Masukkan Nama Penerima Barang",
|
|
8061
|
-
size: "large",
|
|
8062
|
-
type: owner.cargoReceiverType === "Perusahaan" ? "select" : "text",
|
|
8063
|
-
options: owner.cargoReceiverType === "Perusahaan" ? companyOptions : []
|
|
8064
|
-
}
|
|
8065
|
-
),
|
|
8066
|
-
/* @__PURE__ */ jsx(
|
|
8067
|
-
Caption1,
|
|
8068
|
-
{
|
|
8069
|
-
style: {
|
|
8070
|
-
color: tokens.colorNeutralForeground3,
|
|
8071
|
-
marginTop: "0.25rem"
|
|
8072
|
-
},
|
|
8073
|
-
children: 'Apabila nama perusahaan belum tersedia dapat memilih "Lainnya" dan silakan isi nama perusahaan'
|
|
8074
|
-
}
|
|
8075
|
-
)
|
|
8076
|
-
] }),
|
|
8077
|
-
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8078
|
-
/* @__PURE__ */ jsx("div", { style: { height: ".5rem" } }),
|
|
8079
|
-
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8080
|
-
"Berat Muatan dan Kendaraan (Ton)",
|
|
8081
|
-
" ",
|
|
8082
|
-
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8083
|
-
] }),
|
|
8084
|
-
/* @__PURE__ */ jsx(
|
|
8085
|
-
InputDynamic_default,
|
|
8086
|
-
{
|
|
8087
|
-
control,
|
|
8088
|
-
name: `looseCargoOwners.${index}.cargoWeight`,
|
|
8089
|
-
placeholder: "Masukkan Angka",
|
|
8090
|
-
type: "number",
|
|
8091
|
-
size: "large"
|
|
8092
|
-
}
|
|
8093
|
-
)
|
|
8094
|
-
] })
|
|
8095
|
-
] }),
|
|
8096
|
-
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: "Daftar Muatan" }) }) }),
|
|
8097
|
-
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsxs(Col, { xs: 12, children: [
|
|
8098
|
-
/* @__PURE__ */ jsx(
|
|
8099
|
-
Accordion,
|
|
8100
|
-
{
|
|
8101
|
-
collapsible: true,
|
|
8102
|
-
defaultOpenItems: owner.cargoItems?.map((cargo) => `cargo-${cargo.id}`) || [],
|
|
8103
|
-
multiple: true,
|
|
8104
|
-
children: owner.cargoItems?.map((cargo, cargoIndex) => /* @__PURE__ */ jsxs(
|
|
8105
|
-
AccordionItem,
|
|
8297
|
+
}
|
|
8298
|
+
),
|
|
8299
|
+
/* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: styles.form, children: [
|
|
8300
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8301
|
+
/* @__PURE__ */ jsx(Col, { lg: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.senderNameLabel }) }),
|
|
8302
|
+
/* @__PURE__ */ jsxs(Col, { lg: 6, children: [
|
|
8303
|
+
/* @__PURE__ */ jsx(
|
|
8304
|
+
"div",
|
|
8106
8305
|
{
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8306
|
+
style: {
|
|
8307
|
+
display: "flex",
|
|
8308
|
+
gap: "2rem",
|
|
8309
|
+
marginBottom: "0.5rem"
|
|
8310
|
+
},
|
|
8311
|
+
children: /* @__PURE__ */ jsxs(
|
|
8312
|
+
RadioGroup,
|
|
8313
|
+
{
|
|
8314
|
+
layout: "horizontal",
|
|
8315
|
+
value: owner.senderType,
|
|
8316
|
+
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8317
|
+
senderType: data.value
|
|
8318
|
+
}),
|
|
8319
|
+
children: [
|
|
8320
|
+
/* @__PURE__ */ jsx(
|
|
8321
|
+
Radio,
|
|
8117
8322
|
{
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
] })
|
|
8323
|
+
value: "Perusahaan",
|
|
8324
|
+
label: mergedLabels.senderTypeCompany
|
|
8325
|
+
}
|
|
8326
|
+
),
|
|
8327
|
+
/* @__PURE__ */ jsx(
|
|
8328
|
+
Radio,
|
|
8329
|
+
{
|
|
8330
|
+
value: "Perseorangan",
|
|
8331
|
+
label: mergedLabels.senderTypeIndividual
|
|
8128
8332
|
}
|
|
8129
8333
|
)
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8334
|
+
]
|
|
8335
|
+
}
|
|
8336
|
+
)
|
|
8337
|
+
}
|
|
8338
|
+
),
|
|
8339
|
+
/* @__PURE__ */ jsx(
|
|
8340
|
+
InputDynamic_default,
|
|
8341
|
+
{
|
|
8342
|
+
control,
|
|
8343
|
+
name: `owners.${index}.senderName`,
|
|
8344
|
+
placeholder: owner.senderType === "Perusahaan" ? mergedLabels.selectCompanyPlaceholder : mergedLabels.inputSenderNamePlaceholder,
|
|
8345
|
+
size: "large",
|
|
8346
|
+
type: owner.senderType === "Perusahaan" ? "select" : "text",
|
|
8347
|
+
options: owner.senderType === "Perusahaan" ? companyOptions : []
|
|
8348
|
+
}
|
|
8349
|
+
)
|
|
8350
|
+
] }),
|
|
8351
|
+
/* @__PURE__ */ jsxs(Col, { lg: 6, children: [
|
|
8352
|
+
/* @__PURE__ */ jsx("div", { style: { height: "1rem" } }),
|
|
8353
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8354
|
+
mergedLabels.estimatedWeightLabel,
|
|
8355
|
+
" ",
|
|
8356
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8357
|
+
] }),
|
|
8358
|
+
/* @__PURE__ */ jsx(
|
|
8359
|
+
InputDynamic_default,
|
|
8360
|
+
{
|
|
8361
|
+
control,
|
|
8362
|
+
name: `owners.${index}.estimatedWeight`,
|
|
8363
|
+
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
8364
|
+
size: "large",
|
|
8365
|
+
type: "number"
|
|
8366
|
+
}
|
|
8367
|
+
)
|
|
8368
|
+
] })
|
|
8369
|
+
] }),
|
|
8370
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8371
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8372
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.originCityLabel }),
|
|
8373
|
+
/* @__PURE__ */ jsx(
|
|
8374
|
+
InputDynamic_default,
|
|
8375
|
+
{
|
|
8376
|
+
control,
|
|
8377
|
+
name: `looseCargoOwners.${index}.originCity`,
|
|
8378
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8379
|
+
type: "select",
|
|
8380
|
+
options: cityOptions
|
|
8381
|
+
}
|
|
8382
|
+
)
|
|
8383
|
+
] }),
|
|
8384
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8385
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.destinationCityLabel }),
|
|
8386
|
+
/* @__PURE__ */ jsx(
|
|
8387
|
+
InputDynamic_default,
|
|
8388
|
+
{
|
|
8389
|
+
control,
|
|
8390
|
+
name: `looseCargoOwners.${index}.destinationCity`,
|
|
8391
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8392
|
+
type: "select",
|
|
8393
|
+
options: cityOptions
|
|
8394
|
+
}
|
|
8395
|
+
)
|
|
8396
|
+
] })
|
|
8397
|
+
] }),
|
|
8398
|
+
hasLoad && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8399
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8400
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8401
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8402
|
+
mergedLabels.cargoOwnerTitle,
|
|
8403
|
+
" ",
|
|
8404
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8405
|
+
] }),
|
|
8406
|
+
/* @__PURE__ */ jsx(
|
|
8407
|
+
"div",
|
|
8408
|
+
{
|
|
8409
|
+
style: {
|
|
8410
|
+
display: "flex",
|
|
8411
|
+
gap: "2rem",
|
|
8412
|
+
marginBottom: "0.5rem"
|
|
8413
|
+
},
|
|
8414
|
+
children: /* @__PURE__ */ jsxs(
|
|
8415
|
+
RadioGroup,
|
|
8416
|
+
{
|
|
8417
|
+
layout: "horizontal",
|
|
8418
|
+
value: owner.cargoOwnerType || "Perusahaan",
|
|
8419
|
+
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8420
|
+
cargoOwnerType: data.value
|
|
8421
|
+
}),
|
|
8422
|
+
children: [
|
|
8139
8423
|
/* @__PURE__ */ jsx(
|
|
8140
|
-
|
|
8424
|
+
Radio,
|
|
8141
8425
|
{
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
placeholder: "Pilih",
|
|
8145
|
-
type: "select",
|
|
8146
|
-
options: []
|
|
8426
|
+
value: "Perusahaan",
|
|
8427
|
+
label: mergedLabels.senderTypeCompany
|
|
8147
8428
|
}
|
|
8148
8429
|
),
|
|
8149
|
-
/* @__PURE__ */
|
|
8150
|
-
|
|
8430
|
+
/* @__PURE__ */ jsx(
|
|
8431
|
+
Radio,
|
|
8151
8432
|
{
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
marginTop: "0.25rem"
|
|
8155
|
-
},
|
|
8156
|
-
children: [
|
|
8157
|
-
"Pahami definisi, jenis dan contoh komoditas",
|
|
8158
|
-
" ",
|
|
8159
|
-
/* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: "disini" })
|
|
8160
|
-
]
|
|
8433
|
+
value: "Perseorangan",
|
|
8434
|
+
label: mergedLabels.senderTypeIndividual
|
|
8161
8435
|
}
|
|
8162
8436
|
)
|
|
8163
|
-
]
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
|
|
8437
|
+
]
|
|
8438
|
+
}
|
|
8439
|
+
)
|
|
8440
|
+
}
|
|
8441
|
+
),
|
|
8442
|
+
/* @__PURE__ */ jsx(
|
|
8443
|
+
InputDynamic_default,
|
|
8444
|
+
{
|
|
8445
|
+
control,
|
|
8446
|
+
name: `looseCargoOwners.${index}.cargoOwnerName`,
|
|
8447
|
+
placeholder: owner.cargoOwnerType === "Perusahaan" ? mergedLabels.cargoOwnerCompanyPlaceholder : mergedLabels.cargoOwnerIndividualPlaceholder,
|
|
8448
|
+
size: "large",
|
|
8449
|
+
type: owner.cargoOwnerType === "Perusahaan" ? "select" : "text",
|
|
8450
|
+
options: owner.cargoOwnerType === "Perusahaan" ? companyOptions : []
|
|
8451
|
+
}
|
|
8452
|
+
),
|
|
8453
|
+
/* @__PURE__ */ jsx(
|
|
8454
|
+
Caption1,
|
|
8455
|
+
{
|
|
8456
|
+
style: {
|
|
8457
|
+
color: tokens.colorNeutralForeground3,
|
|
8458
|
+
marginTop: "0.25rem"
|
|
8459
|
+
},
|
|
8460
|
+
children: mergedLabels.otherCompanyHelperText
|
|
8461
|
+
}
|
|
8462
|
+
)
|
|
8463
|
+
] }),
|
|
8464
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8465
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8466
|
+
mergedLabels.logisticsCompanyTitle,
|
|
8467
|
+
" ",
|
|
8468
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8469
|
+
] }),
|
|
8470
|
+
/* @__PURE__ */ jsx(
|
|
8471
|
+
"div",
|
|
8472
|
+
{
|
|
8473
|
+
style: {
|
|
8474
|
+
display: "flex",
|
|
8475
|
+
gap: "2rem",
|
|
8476
|
+
marginBottom: "0.5rem"
|
|
8477
|
+
},
|
|
8478
|
+
children: /* @__PURE__ */ jsxs(
|
|
8479
|
+
RadioGroup,
|
|
8480
|
+
{
|
|
8481
|
+
layout: "horizontal",
|
|
8482
|
+
value: owner.logisticsCompanyType || "Perseorangan",
|
|
8483
|
+
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8484
|
+
logisticsCompanyType: data.value
|
|
8485
|
+
}),
|
|
8486
|
+
children: [
|
|
8170
8487
|
/* @__PURE__ */ jsx(
|
|
8171
|
-
|
|
8488
|
+
Radio,
|
|
8172
8489
|
{
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
placeholder: "Pilih",
|
|
8176
|
-
type: "select",
|
|
8177
|
-
options: [
|
|
8178
|
-
{ value: "karung", label: "Karung" },
|
|
8179
|
-
{ value: "kg", label: "Kg" },
|
|
8180
|
-
{ value: "ton", label: "Ton" },
|
|
8181
|
-
{ value: "unit", label: "Unit" }
|
|
8182
|
-
]
|
|
8490
|
+
value: "Perusahaan",
|
|
8491
|
+
label: mergedLabels.senderTypeCompany
|
|
8183
8492
|
}
|
|
8184
8493
|
),
|
|
8185
8494
|
/* @__PURE__ */ jsx(
|
|
8186
|
-
|
|
8495
|
+
Radio,
|
|
8187
8496
|
{
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
marginTop: "0.25rem"
|
|
8191
|
-
},
|
|
8192
|
-
children: 'Apabila jenis muatan belum tersedia dapat memilih "Lainnya" dan silakan isi jenis muatannya.'
|
|
8497
|
+
value: "Perseorangan",
|
|
8498
|
+
label: mergedLabels.senderTypeIndividual
|
|
8193
8499
|
}
|
|
8194
8500
|
)
|
|
8195
|
-
]
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8501
|
+
]
|
|
8502
|
+
}
|
|
8503
|
+
)
|
|
8504
|
+
}
|
|
8505
|
+
),
|
|
8506
|
+
/* @__PURE__ */ jsx(
|
|
8507
|
+
InputDynamic_default,
|
|
8508
|
+
{
|
|
8509
|
+
control,
|
|
8510
|
+
name: `looseCargoOwners.${index}.logisticsCompanyName`,
|
|
8511
|
+
placeholder: owner.logisticsCompanyType === "Perusahaan" ? mergedLabels.logisticsCompanyPlaceholder : mergedLabels.logisticsIndividualPlaceholder,
|
|
8512
|
+
size: "large",
|
|
8513
|
+
type: owner.logisticsCompanyType === "Perusahaan" ? "select" : "text",
|
|
8514
|
+
options: owner.logisticsCompanyType === "Perusahaan" ? companyOptions : []
|
|
8515
|
+
}
|
|
8516
|
+
),
|
|
8517
|
+
/* @__PURE__ */ jsx(
|
|
8518
|
+
Caption1,
|
|
8519
|
+
{
|
|
8520
|
+
style: {
|
|
8521
|
+
color: tokens.colorNeutralForeground3,
|
|
8522
|
+
marginTop: "0.25rem"
|
|
8523
|
+
},
|
|
8524
|
+
children: mergedLabels.otherCompanyHelperText
|
|
8525
|
+
}
|
|
8526
|
+
)
|
|
8527
|
+
] })
|
|
8528
|
+
] }),
|
|
8529
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8530
|
+
/* @__PURE__ */ jsx(Col, { xs: 12, md: 12, lg: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.cargoReceiverTitle }) }),
|
|
8531
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8532
|
+
/* @__PURE__ */ jsxs(
|
|
8533
|
+
RadioGroup,
|
|
8534
|
+
{
|
|
8535
|
+
layout: "horizontal",
|
|
8536
|
+
value: owner.cargoReceiverType || "Perusahaan",
|
|
8537
|
+
onChange: (_, data) => onUpdateOwner(owner.id, {
|
|
8538
|
+
cargoReceiverType: data.value
|
|
8539
|
+
}),
|
|
8540
|
+
children: [
|
|
8541
|
+
/* @__PURE__ */ jsx(
|
|
8542
|
+
Radio,
|
|
8543
|
+
{
|
|
8544
|
+
value: "Perusahaan",
|
|
8545
|
+
label: mergedLabels.senderTypeCompany
|
|
8546
|
+
}
|
|
8547
|
+
),
|
|
8548
|
+
/* @__PURE__ */ jsx(
|
|
8549
|
+
Radio,
|
|
8550
|
+
{
|
|
8551
|
+
value: "Perseorangan",
|
|
8552
|
+
label: mergedLabels.senderTypeIndividual
|
|
8553
|
+
}
|
|
8554
|
+
)
|
|
8555
|
+
]
|
|
8556
|
+
}
|
|
8557
|
+
),
|
|
8558
|
+
/* @__PURE__ */ jsx(
|
|
8559
|
+
InputDynamic_default,
|
|
8560
|
+
{
|
|
8561
|
+
control,
|
|
8562
|
+
name: `looseCargoOwners.${index}.cargoReceiverName`,
|
|
8563
|
+
placeholder: owner.cargoReceiverType === "Perusahaan" ? mergedLabels.cargoReceiverCompanyPlaceholder : mergedLabels.cargoReceiverIndividualPlaceholder,
|
|
8564
|
+
size: "large",
|
|
8565
|
+
type: owner.cargoReceiverType === "Perusahaan" ? "select" : "text",
|
|
8566
|
+
options: owner.cargoReceiverType === "Perusahaan" ? companyOptions : []
|
|
8567
|
+
}
|
|
8568
|
+
),
|
|
8569
|
+
/* @__PURE__ */ jsx(
|
|
8570
|
+
Caption1,
|
|
8571
|
+
{
|
|
8572
|
+
style: {
|
|
8573
|
+
color: tokens.colorNeutralForeground3,
|
|
8574
|
+
marginTop: "0.25rem"
|
|
8575
|
+
},
|
|
8576
|
+
children: mergedLabels.otherCompanyHelperText
|
|
8577
|
+
}
|
|
8578
|
+
)
|
|
8579
|
+
] }),
|
|
8580
|
+
/* @__PURE__ */ jsxs(Col, { children: [
|
|
8581
|
+
/* @__PURE__ */ jsx("div", { style: { height: ".5rem" } }),
|
|
8582
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8583
|
+
mergedLabels.totalWeightLabel,
|
|
8584
|
+
" ",
|
|
8585
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8586
|
+
] }),
|
|
8587
|
+
/* @__PURE__ */ jsx(
|
|
8588
|
+
InputDynamic_default,
|
|
8589
|
+
{
|
|
8590
|
+
control,
|
|
8591
|
+
name: `looseCargoOwners.${index}.cargoWeight`,
|
|
8592
|
+
placeholder: mergedLabels.inputNumberPlaceholder,
|
|
8593
|
+
type: "number",
|
|
8594
|
+
size: "large"
|
|
8595
|
+
}
|
|
8596
|
+
)
|
|
8597
|
+
] })
|
|
8598
|
+
] }),
|
|
8599
|
+
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { xs: 12, children: /* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.cargoListTitle }) }) }),
|
|
8600
|
+
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsxs(Col, { xs: 12, children: [
|
|
8601
|
+
/* @__PURE__ */ jsx(
|
|
8602
|
+
Accordion,
|
|
8603
|
+
{
|
|
8604
|
+
collapsible: true,
|
|
8605
|
+
defaultOpenItems: owner.cargoItems?.map(
|
|
8606
|
+
(cargo) => `cargo-${cargo.id}`
|
|
8607
|
+
) || [],
|
|
8608
|
+
multiple: true,
|
|
8609
|
+
children: owner.cargoItems?.map((cargo, cargoIndex) => /* @__PURE__ */ jsxs(
|
|
8610
|
+
AccordionItem,
|
|
8611
|
+
{
|
|
8612
|
+
value: `cargo-${cargo.id}`,
|
|
8613
|
+
className: styles.accordion,
|
|
8614
|
+
children: [
|
|
8615
|
+
/* @__PURE__ */ jsx(
|
|
8616
|
+
AccordionHeader,
|
|
8617
|
+
{
|
|
8618
|
+
className: styles.accordionHeader,
|
|
8619
|
+
expandIconPosition: "end",
|
|
8620
|
+
children: /* @__PURE__ */ jsx(
|
|
8621
|
+
"div",
|
|
8622
|
+
{
|
|
8623
|
+
style: {
|
|
8624
|
+
display: "flex",
|
|
8625
|
+
justifyContent: "space-between",
|
|
8626
|
+
alignItems: "center",
|
|
8627
|
+
width: "100%"
|
|
8628
|
+
},
|
|
8629
|
+
children: /* @__PURE__ */ jsx(Body1Strong, { children: mergedLabels.cargoItemTitle.replace(
|
|
8630
|
+
"{index}",
|
|
8631
|
+
(cargoIndex + 1).toString()
|
|
8632
|
+
) })
|
|
8633
|
+
}
|
|
8634
|
+
)
|
|
8635
|
+
}
|
|
8636
|
+
),
|
|
8637
|
+
/* @__PURE__ */ jsx(AccordionPanel, { children: /* @__PURE__ */ jsxs("div", { className: styles.form, children: [
|
|
8638
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8639
|
+
/* @__PURE__ */ jsxs(Col, { md: 3, children: [
|
|
8640
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8641
|
+
mergedLabels.commodityLabel,
|
|
8642
|
+
" ",
|
|
8643
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8644
|
+
] }),
|
|
8645
|
+
/* @__PURE__ */ jsx(
|
|
8646
|
+
InputDynamic_default,
|
|
8647
|
+
{
|
|
8648
|
+
control,
|
|
8649
|
+
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.commodity`,
|
|
8650
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8651
|
+
type: "select",
|
|
8652
|
+
options: []
|
|
8653
|
+
}
|
|
8654
|
+
),
|
|
8655
|
+
/* @__PURE__ */ jsxs(
|
|
8656
|
+
Caption1,
|
|
8657
|
+
{
|
|
8658
|
+
style: {
|
|
8659
|
+
color: tokens.colorNeutralForeground3,
|
|
8660
|
+
marginTop: "0.25rem"
|
|
8661
|
+
},
|
|
8662
|
+
children: [
|
|
8663
|
+
mergedLabels.commodityHelperTextPrefix,
|
|
8664
|
+
" ",
|
|
8665
|
+
/* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: mergedLabels.hereLinkText })
|
|
8666
|
+
]
|
|
8667
|
+
}
|
|
8668
|
+
)
|
|
8669
|
+
] }),
|
|
8670
|
+
/* @__PURE__ */ jsxs(Col, { md: 3, children: [
|
|
8671
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8672
|
+
mergedLabels.cargoTypeLabel,
|
|
8673
|
+
" ",
|
|
8674
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8675
|
+
] }),
|
|
8676
|
+
/* @__PURE__ */ jsx(
|
|
8677
|
+
InputDynamic_default,
|
|
8678
|
+
{
|
|
8679
|
+
control,
|
|
8680
|
+
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`,
|
|
8681
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8682
|
+
type: "select",
|
|
8683
|
+
options: [
|
|
8684
|
+
{
|
|
8685
|
+
value: "karung",
|
|
8686
|
+
label: mergedLabels.cargoTypeOptions.karung
|
|
8687
|
+
},
|
|
8688
|
+
{
|
|
8689
|
+
value: "kg",
|
|
8690
|
+
label: mergedLabels.cargoTypeOptions.kg
|
|
8691
|
+
},
|
|
8692
|
+
{
|
|
8693
|
+
value: "ton",
|
|
8694
|
+
label: mergedLabels.cargoTypeOptions.ton
|
|
8219
8695
|
},
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8696
|
+
{
|
|
8697
|
+
value: "unit",
|
|
8698
|
+
label: mergedLabels.cargoTypeOptions.unit
|
|
8699
|
+
}
|
|
8700
|
+
]
|
|
8701
|
+
}
|
|
8702
|
+
),
|
|
8703
|
+
/* @__PURE__ */ jsx(
|
|
8704
|
+
Caption1,
|
|
8705
|
+
{
|
|
8706
|
+
style: {
|
|
8707
|
+
color: tokens.colorNeutralForeground3,
|
|
8708
|
+
marginTop: "0.25rem"
|
|
8709
|
+
},
|
|
8710
|
+
children: mergedLabels.cargoTypeHelperText
|
|
8711
|
+
}
|
|
8712
|
+
)
|
|
8713
|
+
] }),
|
|
8714
|
+
/* @__PURE__ */ jsxs(Col, { md: 3, children: [
|
|
8715
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.cargoQuantityLabel }),
|
|
8716
|
+
/* @__PURE__ */ jsxs(
|
|
8717
|
+
"div",
|
|
8718
|
+
{
|
|
8719
|
+
style: {
|
|
8720
|
+
display: "flex",
|
|
8721
|
+
alignItems: "center",
|
|
8722
|
+
border: `1px solid ${tokens.colorNeutralStroke1}`,
|
|
8723
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
8724
|
+
height: "40px",
|
|
8725
|
+
padding: "0 12px",
|
|
8726
|
+
backgroundColor: tokens.colorNeutralBackground1
|
|
8727
|
+
},
|
|
8728
|
+
children: [
|
|
8729
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 0.5 } }),
|
|
8730
|
+
/* @__PURE__ */ jsxs(
|
|
8731
|
+
"div",
|
|
8732
|
+
{
|
|
8733
|
+
style: {
|
|
8734
|
+
display: "flex",
|
|
8735
|
+
alignItems: "center",
|
|
8736
|
+
gap: "12px"
|
|
8737
|
+
},
|
|
8738
|
+
children: [
|
|
8739
|
+
/* @__PURE__ */ jsx(
|
|
8740
|
+
Button,
|
|
8227
8741
|
{
|
|
8228
|
-
|
|
8742
|
+
appearance: "transparent",
|
|
8743
|
+
icon: /* @__PURE__ */ jsx(
|
|
8744
|
+
Icon,
|
|
8745
|
+
{
|
|
8746
|
+
icon: "fluent:subtract-circle-24-regular",
|
|
8747
|
+
style: {
|
|
8748
|
+
fontSize: "24px",
|
|
8749
|
+
color: tokens.colorNeutralForeground4
|
|
8750
|
+
}
|
|
8751
|
+
}
|
|
8752
|
+
),
|
|
8753
|
+
size: "small",
|
|
8754
|
+
onClick: () => {
|
|
8755
|
+
const currentVal = getValues(
|
|
8756
|
+
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
|
|
8757
|
+
) || 0;
|
|
8758
|
+
const currentQty = Number(currentVal);
|
|
8759
|
+
if (currentQty > 0) {
|
|
8760
|
+
const newVal = currentQty - 1;
|
|
8761
|
+
setValue(
|
|
8762
|
+
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
8763
|
+
newVal
|
|
8764
|
+
);
|
|
8765
|
+
onUpdateCargoQuantity(
|
|
8766
|
+
owner.id,
|
|
8767
|
+
cargo.id,
|
|
8768
|
+
newVal
|
|
8769
|
+
);
|
|
8770
|
+
}
|
|
8771
|
+
},
|
|
8229
8772
|
style: {
|
|
8230
|
-
|
|
8231
|
-
|
|
8773
|
+
minWidth: "32px",
|
|
8774
|
+
padding: "0"
|
|
8232
8775
|
}
|
|
8233
8776
|
}
|
|
8234
8777
|
),
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
const currentVal = getValues(
|
|
8238
|
-
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
|
|
8239
|
-
) || 0;
|
|
8240
|
-
const currentQty = Number(currentVal);
|
|
8241
|
-
if (currentQty > 0) {
|
|
8242
|
-
const newVal = currentQty - 1;
|
|
8243
|
-
setValue(
|
|
8244
|
-
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
8245
|
-
newVal
|
|
8246
|
-
);
|
|
8247
|
-
onUpdateCargoQuantity(owner.id, cargo.id, newVal);
|
|
8248
|
-
}
|
|
8249
|
-
},
|
|
8250
|
-
style: { minWidth: "32px", padding: "0" }
|
|
8251
|
-
}
|
|
8252
|
-
),
|
|
8253
|
-
/* @__PURE__ */ jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsx(
|
|
8254
|
-
Controller,
|
|
8255
|
-
{
|
|
8256
|
-
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
8257
|
-
control,
|
|
8258
|
-
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
8259
|
-
"input",
|
|
8778
|
+
/* @__PURE__ */ jsx("div", { style: { width: "40px" }, children: /* @__PURE__ */ jsx(
|
|
8779
|
+
Controller,
|
|
8260
8780
|
{
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8781
|
+
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
8782
|
+
control,
|
|
8783
|
+
render: ({ field }) => /* @__PURE__ */ jsx(
|
|
8784
|
+
"input",
|
|
8785
|
+
{
|
|
8786
|
+
...field,
|
|
8787
|
+
type: "number",
|
|
8788
|
+
style: {
|
|
8789
|
+
border: "none",
|
|
8790
|
+
width: "100%",
|
|
8791
|
+
textAlign: "center",
|
|
8792
|
+
outline: "none",
|
|
8793
|
+
backgroundColor: "transparent",
|
|
8794
|
+
color: tokens.colorNeutralForeground1,
|
|
8795
|
+
fontSize: tokens.fontSizeBase400,
|
|
8796
|
+
fontFamily: tokens.fontFamilyBase
|
|
8797
|
+
},
|
|
8798
|
+
onWheel: (e) => e.target.blur()
|
|
8799
|
+
}
|
|
8800
|
+
)
|
|
8274
8801
|
}
|
|
8275
|
-
)
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
/* @__PURE__ */ jsx(
|
|
8279
|
-
Button,
|
|
8280
|
-
{
|
|
8281
|
-
appearance: "transparent",
|
|
8282
|
-
icon: /* @__PURE__ */ jsx(
|
|
8283
|
-
Icon,
|
|
8802
|
+
) }),
|
|
8803
|
+
/* @__PURE__ */ jsx(
|
|
8804
|
+
Button,
|
|
8284
8805
|
{
|
|
8285
|
-
|
|
8806
|
+
appearance: "transparent",
|
|
8807
|
+
icon: /* @__PURE__ */ jsx(
|
|
8808
|
+
Icon,
|
|
8809
|
+
{
|
|
8810
|
+
icon: "fluent:add-circle-24-regular",
|
|
8811
|
+
style: {
|
|
8812
|
+
fontSize: "24px",
|
|
8813
|
+
color: tokens.colorBrandStroke1
|
|
8814
|
+
}
|
|
8815
|
+
}
|
|
8816
|
+
),
|
|
8817
|
+
size: "small",
|
|
8818
|
+
onClick: () => {
|
|
8819
|
+
const currentVal = getValues(
|
|
8820
|
+
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`
|
|
8821
|
+
) || 0;
|
|
8822
|
+
const currentQty = Number(currentVal);
|
|
8823
|
+
const newVal = currentQty + 1;
|
|
8824
|
+
setValue(
|
|
8825
|
+
`looseCargoOwners.${index}.cargo.${cargoIndex}.quantity`,
|
|
8826
|
+
newVal
|
|
8827
|
+
);
|
|
8828
|
+
onUpdateCargoQuantity(
|
|
8829
|
+
owner.id,
|
|
8830
|
+
cargo.id,
|
|
8831
|
+
newVal
|
|
8832
|
+
);
|
|
8833
|
+
},
|
|
8286
8834
|
style: {
|
|
8287
|
-
|
|
8288
|
-
|
|
8835
|
+
minWidth: "32px",
|
|
8836
|
+
padding: "0"
|
|
8289
8837
|
}
|
|
8290
8838
|
}
|
|
8291
|
-
)
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
}
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
/* @__PURE__ */ jsx(
|
|
8340
|
-
InputDynamic_default,
|
|
8341
|
-
{
|
|
8342
|
-
control,
|
|
8343
|
-
name: `owners.${index}.price`,
|
|
8344
|
-
placeholder: "Rp. 0",
|
|
8345
|
-
disabled: true,
|
|
8346
|
-
size: "large",
|
|
8347
|
-
type: "text"
|
|
8348
|
-
}
|
|
8349
|
-
)
|
|
8350
|
-
] })
|
|
8351
|
-
] }),
|
|
8352
|
-
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8353
|
-
/* @__PURE__ */ jsxs(Col, { md: 6, children: [
|
|
8354
|
-
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8355
|
-
"Data Jenis Industri",
|
|
8356
|
-
" ",
|
|
8357
|
-
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8839
|
+
)
|
|
8840
|
+
]
|
|
8841
|
+
}
|
|
8842
|
+
),
|
|
8843
|
+
/* @__PURE__ */ jsx(
|
|
8844
|
+
"div",
|
|
8845
|
+
{
|
|
8846
|
+
style: {
|
|
8847
|
+
flex: 1,
|
|
8848
|
+
textAlign: "left",
|
|
8849
|
+
color: tokens.colorNeutralForeground1,
|
|
8850
|
+
fontSize: tokens.fontSizeBase300,
|
|
8851
|
+
paddingRight: "8px"
|
|
8852
|
+
},
|
|
8853
|
+
children: (() => {
|
|
8854
|
+
const type = watch(
|
|
8855
|
+
`looseCargoOwners.${index}.cargo.${cargoIndex}.cargoType`
|
|
8856
|
+
);
|
|
8857
|
+
if (type === "karung")
|
|
8858
|
+
return mergedLabels.cargoTypeOptions.karung;
|
|
8859
|
+
if (type === "kg")
|
|
8860
|
+
return mergedLabels.cargoTypeOptions.kg;
|
|
8861
|
+
if (type === "ton")
|
|
8862
|
+
return mergedLabels.cargoTypeOptions.ton;
|
|
8863
|
+
if (type === "unit")
|
|
8864
|
+
return mergedLabels.cargoTypeOptions.unit;
|
|
8865
|
+
return "";
|
|
8866
|
+
})()
|
|
8867
|
+
}
|
|
8868
|
+
)
|
|
8869
|
+
]
|
|
8870
|
+
}
|
|
8871
|
+
)
|
|
8872
|
+
] }),
|
|
8873
|
+
/* @__PURE__ */ jsxs(Col, { md: 3, children: [
|
|
8874
|
+
/* @__PURE__ */ jsx(Body1, { className: styles.label, children: mergedLabels.priceLabel }),
|
|
8875
|
+
/* @__PURE__ */ jsx(
|
|
8876
|
+
InputDynamic_default,
|
|
8877
|
+
{
|
|
8878
|
+
control,
|
|
8879
|
+
name: `owners.${index}.price`,
|
|
8880
|
+
placeholder: "Rp. 0",
|
|
8881
|
+
disabled: true,
|
|
8882
|
+
size: "large",
|
|
8883
|
+
type: "text"
|
|
8884
|
+
}
|
|
8885
|
+
)
|
|
8886
|
+
] })
|
|
8358
8887
|
] }),
|
|
8359
|
-
/* @__PURE__ */
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8888
|
+
/* @__PURE__ */ jsxs(Row, { children: [
|
|
8889
|
+
/* @__PURE__ */ jsxs(Col, { md: 6, children: [
|
|
8890
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8891
|
+
mergedLabels.industryTypeLabel,
|
|
8892
|
+
" ",
|
|
8893
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8894
|
+
] }),
|
|
8895
|
+
/* @__PURE__ */ jsx(
|
|
8896
|
+
InputDynamic_default,
|
|
8897
|
+
{
|
|
8898
|
+
control,
|
|
8899
|
+
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.industryType`,
|
|
8900
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8901
|
+
type: "select",
|
|
8902
|
+
options: []
|
|
8903
|
+
}
|
|
8904
|
+
),
|
|
8905
|
+
/* @__PURE__ */ jsx(
|
|
8906
|
+
Caption1,
|
|
8907
|
+
{
|
|
8908
|
+
style: {
|
|
8909
|
+
color: tokens.colorNeutralForeground3,
|
|
8910
|
+
marginTop: "0.25rem"
|
|
8911
|
+
},
|
|
8912
|
+
children: mergedLabels.industryTypeHelperText
|
|
8913
|
+
}
|
|
8914
|
+
)
|
|
8915
|
+
] }),
|
|
8916
|
+
/* @__PURE__ */ jsxs(Col, { md: 6, children: [
|
|
8917
|
+
/* @__PURE__ */ jsxs(Body1, { className: styles.label, children: [
|
|
8918
|
+
mergedLabels.cargoCategoryLabel,
|
|
8919
|
+
" ",
|
|
8920
|
+
/* @__PURE__ */ jsx("span", { style: { color: "red" }, children: "*" })
|
|
8921
|
+
] }),
|
|
8922
|
+
/* @__PURE__ */ jsx(
|
|
8923
|
+
InputDynamic_default,
|
|
8924
|
+
{
|
|
8925
|
+
control,
|
|
8926
|
+
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoCategory`,
|
|
8927
|
+
placeholder: mergedLabels.selectPlaceholder,
|
|
8928
|
+
type: "select",
|
|
8929
|
+
options: []
|
|
8930
|
+
}
|
|
8931
|
+
),
|
|
8932
|
+
/* @__PURE__ */ jsxs(
|
|
8933
|
+
Caption1,
|
|
8934
|
+
{
|
|
8935
|
+
style: {
|
|
8936
|
+
color: tokens.colorNeutralForeground3,
|
|
8937
|
+
marginTop: "0.25rem"
|
|
8938
|
+
},
|
|
8939
|
+
children: [
|
|
8940
|
+
mergedLabels.cargoCategoryHelperTextPrefix,
|
|
8941
|
+
" ",
|
|
8942
|
+
/* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: mergedLabels.hereLinkText })
|
|
8943
|
+
]
|
|
8944
|
+
}
|
|
8945
|
+
)
|
|
8946
|
+
] })
|
|
8384
8947
|
] }),
|
|
8385
|
-
/* @__PURE__ */ jsx(
|
|
8386
|
-
|
|
8387
|
-
{
|
|
8388
|
-
control,
|
|
8389
|
-
name: `looseCargoOwners.${index}.cargo.${cargoIndex}.cargoCategory`,
|
|
8390
|
-
placeholder: "Pilih",
|
|
8391
|
-
type: "select",
|
|
8392
|
-
options: []
|
|
8393
|
-
}
|
|
8394
|
-
),
|
|
8395
|
-
/* @__PURE__ */ jsxs(
|
|
8396
|
-
Caption1,
|
|
8948
|
+
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsx(
|
|
8949
|
+
Button,
|
|
8397
8950
|
{
|
|
8951
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
8952
|
+
onClick: (e) => {
|
|
8953
|
+
e.stopPropagation();
|
|
8954
|
+
onDeleteCargo(owner.id, cargo.id);
|
|
8955
|
+
},
|
|
8956
|
+
onKeyDown: (e) => {
|
|
8957
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
8958
|
+
e.stopPropagation();
|
|
8959
|
+
onDeleteCargo(owner.id, cargo.id);
|
|
8960
|
+
}
|
|
8961
|
+
},
|
|
8962
|
+
size: "medium",
|
|
8963
|
+
shape: "circular",
|
|
8398
8964
|
style: {
|
|
8399
|
-
|
|
8400
|
-
|
|
8965
|
+
border: `1px solid ${tokens.colorPaletteRedForeground1}`,
|
|
8966
|
+
color: tokens.colorPaletteRedForeground1,
|
|
8967
|
+
width: "100%"
|
|
8401
8968
|
},
|
|
8402
|
-
children:
|
|
8403
|
-
"Pahami definisi, jenis dan contoh kategori muatan",
|
|
8404
|
-
" ",
|
|
8405
|
-
/* @__PURE__ */ jsx("a", { href: "#", className: styles.link, children: "disini" })
|
|
8406
|
-
]
|
|
8407
|
-
}
|
|
8408
|
-
)
|
|
8409
|
-
] })
|
|
8410
|
-
] }),
|
|
8411
|
-
/* @__PURE__ */ jsx(Row, { children: /* @__PURE__ */ jsx(Col, { children: (owner.cargoItems?.length || 0) > 1 && /* @__PURE__ */ jsx(
|
|
8412
|
-
Button,
|
|
8413
|
-
{
|
|
8414
|
-
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:delete-24-regular" }),
|
|
8415
|
-
onClick: (e) => {
|
|
8416
|
-
e.stopPropagation();
|
|
8417
|
-
onDeleteCargo(owner.id, cargo.id);
|
|
8418
|
-
},
|
|
8419
|
-
onKeyDown: (e) => {
|
|
8420
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
8421
|
-
e.stopPropagation();
|
|
8422
|
-
onDeleteCargo(owner.id, cargo.id);
|
|
8969
|
+
children: mergedLabels.deleteCargoButton
|
|
8423
8970
|
}
|
|
8424
|
-
}
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
color: tokens.colorBrandBackground,
|
|
8451
|
-
marginTop: "1rem",
|
|
8452
|
-
width: "100%"
|
|
8453
|
-
},
|
|
8454
|
-
onClick: () => onAddCargo(owner.id),
|
|
8455
|
-
children: "Tambah Muatan"
|
|
8456
|
-
}
|
|
8457
|
-
)
|
|
8971
|
+
) }) })
|
|
8972
|
+
] }) })
|
|
8973
|
+
]
|
|
8974
|
+
},
|
|
8975
|
+
cargo.id
|
|
8976
|
+
))
|
|
8977
|
+
}
|
|
8978
|
+
),
|
|
8979
|
+
/* @__PURE__ */ jsx(
|
|
8980
|
+
Button,
|
|
8981
|
+
{
|
|
8982
|
+
appearance: "secondary",
|
|
8983
|
+
icon: /* @__PURE__ */ jsx(Icon, { icon: "fluent:add-24-regular" }),
|
|
8984
|
+
shape: "circular",
|
|
8985
|
+
style: {
|
|
8986
|
+
borderColor: tokens.colorBrandStroke1,
|
|
8987
|
+
color: tokens.colorBrandBackground,
|
|
8988
|
+
marginTop: "1rem",
|
|
8989
|
+
width: "100%"
|
|
8990
|
+
},
|
|
8991
|
+
onClick: () => onAddCargo(owner.id),
|
|
8992
|
+
children: mergedLabels.addCargoButton
|
|
8993
|
+
}
|
|
8994
|
+
)
|
|
8995
|
+
] }) })
|
|
8996
|
+
] })
|
|
8458
8997
|
] }) })
|
|
8459
|
-
]
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
)
|
|
8998
|
+
]
|
|
8999
|
+
},
|
|
9000
|
+
owner.id
|
|
9001
|
+
))
|
|
9002
|
+
}
|
|
9003
|
+
)
|
|
8465
9004
|
] });
|
|
8466
9005
|
};
|
|
8467
9006
|
|
|
8468
9007
|
// src/components/CardBookingTicket/CardBookingTicket.constants.ts
|
|
8469
|
-
var
|
|
9008
|
+
var DEFAULT_LABELS24 = {
|
|
8470
9009
|
id: {
|
|
8471
9010
|
bookingDetails: "Booking Details",
|
|
8472
9011
|
routeTitle: "Rute Perjalanan",
|
|
@@ -8623,7 +9162,7 @@ var CardBookingTicket = ({
|
|
|
8623
9162
|
className
|
|
8624
9163
|
}) => {
|
|
8625
9164
|
const styles = useStyles26();
|
|
8626
|
-
const mergedLabels = { ...
|
|
9165
|
+
const mergedLabels = { ...DEFAULT_LABELS24[language], ...labels };
|
|
8627
9166
|
return /* @__PURE__ */ jsx("div", { className: `${styles.container} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.bookingDetail, children: [
|
|
8628
9167
|
/* @__PURE__ */ jsxs(Card, { className: styles.bookingDetailTop, children: [
|
|
8629
9168
|
/* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.bookingDetails }),
|
|
@@ -8760,14 +9299,60 @@ var CardBookingTicket = ({
|
|
|
8760
9299
|
};
|
|
8761
9300
|
|
|
8762
9301
|
// src/components/CardFAQ/CardFAQ.constants.ts
|
|
8763
|
-
var
|
|
9302
|
+
var DEFAULT_LABELS25 = {
|
|
8764
9303
|
id: {
|
|
8765
|
-
title: "
|
|
9304
|
+
title: "Pertanyaan yang sering diajukan"
|
|
8766
9305
|
},
|
|
8767
9306
|
en: {
|
|
8768
|
-
title: "
|
|
9307
|
+
title: "Frequently Asked Questions"
|
|
8769
9308
|
}
|
|
8770
9309
|
};
|
|
9310
|
+
var DEFAULT_FAQ_ITEMS = {
|
|
9311
|
+
id: [
|
|
9312
|
+
{
|
|
9313
|
+
value: "1",
|
|
9314
|
+
question: "Bagaimana cara memesan tiket?",
|
|
9315
|
+
answer: "Anda dapat memesan tiket melalui halaman pencarian tiket dengan memilih pelabuhan asal, tujuan, dan tanggal keberangkatan."
|
|
9316
|
+
},
|
|
9317
|
+
{
|
|
9318
|
+
value: "2",
|
|
9319
|
+
question: "Apakah bisa mengajukan refund?",
|
|
9320
|
+
answer: "Ya, pengajuan refund dapat dilakukan melalui menu Riwayat Pesanan sesuai dengan syarat dan ketentuan yang berlaku."
|
|
9321
|
+
},
|
|
9322
|
+
{
|
|
9323
|
+
value: "3",
|
|
9324
|
+
question: "Metode pembayaran apa saja yang tersedia?",
|
|
9325
|
+
answer: "Kami mendukung berbagai metode pembayaran termasuk Virtual Account, E-Wallet, dan Kartu Kredit/Debit."
|
|
9326
|
+
},
|
|
9327
|
+
{
|
|
9328
|
+
value: "4",
|
|
9329
|
+
question: "Apakah tiket perlu dicetak?",
|
|
9330
|
+
answer: "Tidak perlu. Anda dapat menunjukkan E-Tiket atau QR Code pada saat check-in di pelabuhan."
|
|
9331
|
+
}
|
|
9332
|
+
],
|
|
9333
|
+
en: [
|
|
9334
|
+
{
|
|
9335
|
+
value: "1",
|
|
9336
|
+
question: "How to book a ticket?",
|
|
9337
|
+
answer: "You can book tickets through the ticket search page by selecting origin, destination, and departure date."
|
|
9338
|
+
},
|
|
9339
|
+
{
|
|
9340
|
+
value: "2",
|
|
9341
|
+
question: "Can I request a refund?",
|
|
9342
|
+
answer: "Yes, refund requests can be made via the Order History menu subject to applicable terms and conditions."
|
|
9343
|
+
},
|
|
9344
|
+
{
|
|
9345
|
+
value: "3",
|
|
9346
|
+
question: "What payment methods are available?",
|
|
9347
|
+
answer: "We support various payment methods including Virtual Account, E-Wallet, and Credit/Debit Cards."
|
|
9348
|
+
},
|
|
9349
|
+
{
|
|
9350
|
+
value: "4",
|
|
9351
|
+
question: "Do I need to print the ticket?",
|
|
9352
|
+
answer: "No physically printed ticket needed. You can show your E-Ticket or QR Code during check-in at the port."
|
|
9353
|
+
}
|
|
9354
|
+
]
|
|
9355
|
+
};
|
|
8771
9356
|
var useStyles27 = makeStyles({
|
|
8772
9357
|
faqSection: {
|
|
8773
9358
|
// marginTop: '2rem', // Let parent control spacing if needed, or keep consistent
|
|
@@ -8786,38 +9371,18 @@ var useStyles27 = makeStyles({
|
|
|
8786
9371
|
fontWeight: tokens.fontWeightBold
|
|
8787
9372
|
}
|
|
8788
9373
|
});
|
|
8789
|
-
var FAQ_ITEMS = [
|
|
8790
|
-
{
|
|
8791
|
-
value: "1",
|
|
8792
|
-
question: "FAQ 1",
|
|
8793
|
-
answer: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Minus saepe repudiandae dolore pariatur veniam! Aliquam nesciunt saepe, optio inventore fuga quam dignissimos possimus, dolorem alias, blanditiis veniam voluptatibus eaque ex?"
|
|
8794
|
-
},
|
|
8795
|
-
{
|
|
8796
|
-
value: "2",
|
|
8797
|
-
question: "FAQ 2",
|
|
8798
|
-
answer: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae dolor consequatur, sit facere ex, ullam quos natus sapiente nihil cum libero velit, labore necessitatibus rem? Tenetur omnis tempora alias totam."
|
|
8799
|
-
},
|
|
8800
|
-
{
|
|
8801
|
-
value: "3",
|
|
8802
|
-
question: "FAQ 3",
|
|
8803
|
-
answer: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Recusandae officiis modi quaerat eum illo, consectetur aperiam atque? Corrupti cupiditate sequi iusto reiciendis dignissimos, eius, nihil temporibus eaque delectus, saepe ullam!"
|
|
8804
|
-
},
|
|
8805
|
-
{
|
|
8806
|
-
value: "4",
|
|
8807
|
-
question: "FAQ 4",
|
|
8808
|
-
answer: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint maiores debitis, earum animi dolorum unde asperiores accusantium nemo consectetur nulla reiciendis eveniet pariatur autem rerum adipisci sequi officia vero ipsam!"
|
|
8809
|
-
}
|
|
8810
|
-
];
|
|
8811
9374
|
var CardFAQ = ({
|
|
8812
9375
|
language = "id",
|
|
8813
9376
|
labels,
|
|
9377
|
+
items,
|
|
8814
9378
|
className
|
|
8815
9379
|
}) => {
|
|
8816
9380
|
const styles = useStyles27();
|
|
8817
|
-
const mergedLabels = { ...
|
|
9381
|
+
const mergedLabels = { ...DEFAULT_LABELS25[language], ...labels };
|
|
9382
|
+
const faqItems = items || DEFAULT_FAQ_ITEMS[language];
|
|
8818
9383
|
return /* @__PURE__ */ jsxs(Card, { className: styles.faqCard, children: [
|
|
8819
9384
|
/* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.title }),
|
|
8820
|
-
/* @__PURE__ */ jsx(Accordion, { collapsible: true, children:
|
|
9385
|
+
/* @__PURE__ */ jsx(Accordion, { collapsible: true, children: faqItems.map((item) => /* @__PURE__ */ jsxs(
|
|
8821
9386
|
AccordionItem,
|
|
8822
9387
|
{
|
|
8823
9388
|
value: item.value,
|
|
@@ -8850,7 +9415,7 @@ var CardFAQ = ({
|
|
|
8850
9415
|
};
|
|
8851
9416
|
|
|
8852
9417
|
// src/components/CardAddon/CardAddon.constants.ts
|
|
8853
|
-
var
|
|
9418
|
+
var DEFAULT_LABELS26 = {
|
|
8854
9419
|
id: {
|
|
8855
9420
|
viewDetail: "Lihat detail",
|
|
8856
9421
|
totalPrice: "Total Harga",
|
|
@@ -9038,7 +9603,7 @@ var CardAddon = ({
|
|
|
9038
9603
|
className
|
|
9039
9604
|
}) => {
|
|
9040
9605
|
const styles = useStyles28();
|
|
9041
|
-
const mergedLabels = { ...
|
|
9606
|
+
const mergedLabels = { ...DEFAULT_LABELS26[language], ...labels };
|
|
9042
9607
|
return /* @__PURE__ */ jsx(Card, { className: `${styles.card} ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: styles.gapRow, children: [
|
|
9043
9608
|
/* @__PURE__ */ jsxs("div", { className: styles.titleDivider, children: [
|
|
9044
9609
|
/* @__PURE__ */ jsx(Title3, { className: styles.textTitle, children: title }),
|
|
@@ -9230,7 +9795,7 @@ var CardAddon = ({
|
|
|
9230
9795
|
};
|
|
9231
9796
|
|
|
9232
9797
|
// src/components/CardMealCatalog/CardMealCatalog.constants.ts
|
|
9233
|
-
var
|
|
9798
|
+
var DEFAULT_LABELS27 = {
|
|
9234
9799
|
id: {
|
|
9235
9800
|
addButton: "Tambah"
|
|
9236
9801
|
},
|
|
@@ -9378,7 +9943,7 @@ var CardMealCatalog = ({
|
|
|
9378
9943
|
className
|
|
9379
9944
|
}) => {
|
|
9380
9945
|
const styles = useStyles29();
|
|
9381
|
-
const mergedLabels = { ...
|
|
9946
|
+
const mergedLabels = { ...DEFAULT_LABELS27[language], ...labels };
|
|
9382
9947
|
return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
|
|
9383
9948
|
/* @__PURE__ */ jsxs("div", { className: styles.banner, children: [
|
|
9384
9949
|
/* @__PURE__ */ jsx("div", { className: styles.bannerOverlay }),
|
|
@@ -9468,7 +10033,7 @@ var CardMealCatalog = ({
|
|
|
9468
10033
|
};
|
|
9469
10034
|
|
|
9470
10035
|
// src/components/CardReview/CardReview.constants.ts
|
|
9471
|
-
var
|
|
10036
|
+
var DEFAULT_LABELS28 = {
|
|
9472
10037
|
id: {},
|
|
9473
10038
|
en: {}
|
|
9474
10039
|
};
|
|
@@ -9524,7 +10089,7 @@ var CardReview = ({
|
|
|
9524
10089
|
headerAction
|
|
9525
10090
|
}) => {
|
|
9526
10091
|
const styles = useStyles30();
|
|
9527
|
-
({ ...
|
|
10092
|
+
({ ...DEFAULT_LABELS28[language], ...labels });
|
|
9528
10093
|
return /* @__PURE__ */ jsxs(Card, { className: `${styles.card} ${className || ""}`, children: [
|
|
9529
10094
|
/* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
|
|
9530
10095
|
/* @__PURE__ */ jsx(Subtitle1, { className: styles.headerTitle, children: title }),
|
|
@@ -9571,7 +10136,7 @@ var CardReview = ({
|
|
|
9571
10136
|
};
|
|
9572
10137
|
|
|
9573
10138
|
// src/components/CardReviewPassenger/CardReviewPassenger.constants.ts
|
|
9574
|
-
var
|
|
10139
|
+
var DEFAULT_LABELS29 = {
|
|
9575
10140
|
id: {
|
|
9576
10141
|
title: "Penumpang",
|
|
9577
10142
|
idNumber: "Nomor ID"
|
|
@@ -9680,7 +10245,7 @@ var CardReviewPassenger = ({
|
|
|
9680
10245
|
className
|
|
9681
10246
|
}) => {
|
|
9682
10247
|
const styles = useStyles31();
|
|
9683
|
-
const mergedLabels = { ...
|
|
10248
|
+
const mergedLabels = { ...DEFAULT_LABELS29[language], ...labels };
|
|
9684
10249
|
const displayTitle = title || mergedLabels.title;
|
|
9685
10250
|
return /* @__PURE__ */ jsxs(Card, { className: `${styles.card} ${className || ""}`, children: [
|
|
9686
10251
|
/* @__PURE__ */ jsxs("div", { className: styles.headerContainer, children: [
|
|
@@ -9723,7 +10288,7 @@ var CardReviewPassenger = ({
|
|
|
9723
10288
|
};
|
|
9724
10289
|
|
|
9725
10290
|
// src/components/CardPriceDetails/CardPriceDetails.constants.ts
|
|
9726
|
-
var
|
|
10291
|
+
var DEFAULT_LABELS30 = {
|
|
9727
10292
|
id: {
|
|
9728
10293
|
defaultTitle: "Rincian Harga",
|
|
9729
10294
|
totalPayment: "Total Pembayaran",
|
|
@@ -9738,7 +10303,8 @@ var DEFAULT_LABELS20 = {
|
|
|
9738
10303
|
agreementLinkFerizy: "Syarat & Ketentuan",
|
|
9739
10304
|
agreementCovidInfo: "Ketentuan persyaratan menyeberang sesuai dengan\xA0",
|
|
9740
10305
|
agreementCovidLink: "Surat Edaran Satgas Covid-19 Nomor 23 Tahun 2022.",
|
|
9741
|
-
agreementFinal: "Bahwa apabila saya didapati tidak memenuhi ketentuan persyaratan menyeberang pada butir 2 (dua) diatas yang mengakibatkan saya terlambat atau tidak dapat melakukan Check-In di pelabuhan tepat waktu, maka saya menerima dan menyetujui untuk diproses sesuai dengan Syarat & Ketentuan Ferizy sebagaimana tersebut pada butir 1 (satu) di atas."
|
|
10306
|
+
agreementFinal: "Bahwa apabila saya didapati tidak memenuhi ketentuan persyaratan menyeberang pada butir 2 (dua) diatas yang mengakibatkan saya terlambat atau tidak dapat melakukan Check-In di pelabuhan tepat waktu, maka saya menerima dan menyetujui untuk diproses sesuai dengan Syarat & Ketentuan Ferizy sebagaimana tersebut pada butir 1 (satu) di atas.",
|
|
10307
|
+
currencyPrefix: "Rp. "
|
|
9742
10308
|
},
|
|
9743
10309
|
en: {
|
|
9744
10310
|
defaultTitle: "Price Details",
|
|
@@ -9754,7 +10320,8 @@ var DEFAULT_LABELS20 = {
|
|
|
9754
10320
|
agreementLinkFerizy: "Ferizy Terms & Conditions",
|
|
9755
10321
|
agreementCovidInfo: "Crossing requirement provisions in accordance with\xA0",
|
|
9756
10322
|
agreementCovidLink: "Covid-19 Task Force Circular Letter Number 23 of 2022.",
|
|
9757
|
-
agreementFinal: "That if I am found not to meet the crossing requirement provisions in point 2 (two) above which results in me being late or unable to Check-In at the port on time, then I accept and agree to be processed in accordance with the Ferizy Terms & Conditions as mentioned in point 1 (one) above."
|
|
10323
|
+
agreementFinal: "That if I am found not to meet the crossing requirement provisions in point 2 (two) above which results in me being late or unable to Check-In at the port on time, then I accept and agree to be processed in accordance with the Ferizy Terms & Conditions as mentioned in point 1 (one) above.",
|
|
10324
|
+
currencyPrefix: "Rp. "
|
|
9758
10325
|
}
|
|
9759
10326
|
};
|
|
9760
10327
|
var useStyles32 = makeStyles({
|
|
@@ -9776,11 +10343,11 @@ var useStyles32 = makeStyles({
|
|
|
9776
10343
|
}
|
|
9777
10344
|
});
|
|
9778
10345
|
var PriceDetailsTerms = ({
|
|
9779
|
-
language = "id"
|
|
10346
|
+
language = "id",
|
|
10347
|
+
labels
|
|
9780
10348
|
}) => {
|
|
9781
10349
|
const styles = useStyles32();
|
|
9782
10350
|
const linkColor = tokens.colorBrandBackground;
|
|
9783
|
-
const labels = DEFAULT_LABELS20[language];
|
|
9784
10351
|
const bookingTerms = labels.bookingTerms;
|
|
9785
10352
|
const agreementTerms = [
|
|
9786
10353
|
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -9880,7 +10447,7 @@ var CardPriceDetails = ({
|
|
|
9880
10447
|
labels
|
|
9881
10448
|
}) => {
|
|
9882
10449
|
const styles = useStyles33();
|
|
9883
|
-
const mergedLabels = { ...
|
|
10450
|
+
const mergedLabels = { ...DEFAULT_LABELS30[language], ...labels };
|
|
9884
10451
|
const displayTitle = title || mergedLabels.defaultTitle;
|
|
9885
10452
|
const getVariantClass = (variant) => {
|
|
9886
10453
|
switch (variant) {
|
|
@@ -9899,10 +10466,10 @@ var CardPriceDetails = ({
|
|
|
9899
10466
|
/* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
9900
10467
|
isTaxLike ? /* @__PURE__ */ jsx(Body1Strong, { className: variantClass, children: item.name }) : /* @__PURE__ */ jsx(Caption1, { className: mergeClasses(styles.label, variantClass), children: item.name }),
|
|
9901
10468
|
isTaxLike ? /* @__PURE__ */ jsxs(Body1Strong, { className: mergeClasses(styles.value, variantClass), children: [
|
|
9902
|
-
|
|
10469
|
+
mergedLabels.currencyPrefix,
|
|
9903
10470
|
item.price.toLocaleString("id-ID")
|
|
9904
10471
|
] }) : /* @__PURE__ */ jsxs(Body1, { className: mergeClasses(styles.value, variantClass), children: [
|
|
9905
|
-
item.isRedeem ? "-" :
|
|
10472
|
+
item.isRedeem ? "-" : mergedLabels.currencyPrefix,
|
|
9906
10473
|
item.price.toLocaleString("id-ID")
|
|
9907
10474
|
] })
|
|
9908
10475
|
] }),
|
|
@@ -9928,18 +10495,18 @@ var CardPriceDetails = ({
|
|
|
9928
10495
|
/* @__PURE__ */ jsxs("div", { className: styles.totalRow, children: [
|
|
9929
10496
|
/* @__PURE__ */ jsx(Subtitle1, { className: styles.totalLabel, children: mergedLabels.totalPayment }),
|
|
9930
10497
|
/* @__PURE__ */ jsxs(Subtitle1, { className: styles.totalValue, children: [
|
|
9931
|
-
|
|
10498
|
+
mergedLabels.currencyPrefix,
|
|
9932
10499
|
total.toLocaleString("id-ID")
|
|
9933
10500
|
] })
|
|
9934
10501
|
] }),
|
|
9935
10502
|
/* @__PURE__ */ jsx(Divider, {}),
|
|
9936
|
-
/* @__PURE__ */ jsx(PriceDetailsTerms, { language })
|
|
10503
|
+
/* @__PURE__ */ jsx(PriceDetailsTerms, { language, labels: mergedLabels })
|
|
9937
10504
|
] })
|
|
9938
10505
|
] });
|
|
9939
10506
|
};
|
|
9940
10507
|
|
|
9941
10508
|
// src/components/CardPaymentMethodList/CardPaymentMethodList.constants.ts
|
|
9942
|
-
var
|
|
10509
|
+
var DEFAULT_LABELS31 = {
|
|
9943
10510
|
id: {},
|
|
9944
10511
|
en: {}
|
|
9945
10512
|
};
|
|
@@ -10004,7 +10571,7 @@ var CardPaymentMethodList = ({
|
|
|
10004
10571
|
onSelect
|
|
10005
10572
|
}) => {
|
|
10006
10573
|
const styles = useStyles34();
|
|
10007
|
-
({ ...
|
|
10574
|
+
({ ...DEFAULT_LABELS31[language], ...labels });
|
|
10008
10575
|
return /* @__PURE__ */ jsx("div", { className: styles.card, children: /* @__PURE__ */ jsx("div", { className: `${styles.container}`, children: methods.map((category, index) => /* @__PURE__ */ jsxs("div", { children: [
|
|
10009
10576
|
index > 0 && /* @__PURE__ */ jsx("div", { className: styles.dividerContainer, children: /* @__PURE__ */ jsx(Divider, {}) }),
|
|
10010
10577
|
/* @__PURE__ */ jsx(Accordion, { multiple: true, collapsible: true, children: /* @__PURE__ */ jsxs(AccordionItem, { value: category.value, children: [
|
|
@@ -10039,7 +10606,8 @@ var CardPaymentMethodList = ({
|
|
|
10039
10606
|
checked: selectedValue === option.value,
|
|
10040
10607
|
onChange: () => onSelect(option.value),
|
|
10041
10608
|
value: option.value,
|
|
10042
|
-
name: "payment-method"
|
|
10609
|
+
name: "payment-method",
|
|
10610
|
+
disabled: option.disabled
|
|
10043
10611
|
}
|
|
10044
10612
|
)
|
|
10045
10613
|
]
|
|
@@ -10051,7 +10619,7 @@ var CardPaymentMethodList = ({
|
|
|
10051
10619
|
};
|
|
10052
10620
|
|
|
10053
10621
|
// src/components/CardPaymentGuide/CardPaymentGuide.constants.ts
|
|
10054
|
-
var
|
|
10622
|
+
var DEFAULT_LABELS32 = {
|
|
10055
10623
|
id: {
|
|
10056
10624
|
title: "Cara Pembayaran"
|
|
10057
10625
|
},
|
|
@@ -10097,7 +10665,7 @@ var CardPaymentGuide = ({
|
|
|
10097
10665
|
className
|
|
10098
10666
|
}) => {
|
|
10099
10667
|
const styles = useStyles35();
|
|
10100
|
-
const mergedLabels = { ...
|
|
10668
|
+
const mergedLabels = { ...DEFAULT_LABELS32[language], ...labels };
|
|
10101
10669
|
const displayTitle = title || mergedLabels.title;
|
|
10102
10670
|
return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${className || ""}`, children: [
|
|
10103
10671
|
title && /* @__PURE__ */ jsx("div", { className: styles.titleContainer, children: /* @__PURE__ */ jsx(Subtitle1, { className: styles.title, children: displayTitle }) }),
|
|
@@ -10116,7 +10684,7 @@ var CardPaymentGuide = ({
|
|
|
10116
10684
|
};
|
|
10117
10685
|
|
|
10118
10686
|
// src/components/CardPaymentInfo/CardPaymentInfo.constants.ts
|
|
10119
|
-
var
|
|
10687
|
+
var DEFAULT_LABELS33 = {
|
|
10120
10688
|
id: {
|
|
10121
10689
|
expiryPrefix: "Kode virtual akun berlaku sampai",
|
|
10122
10690
|
copyCodeButton: "Salin Kode",
|
|
@@ -10215,7 +10783,7 @@ var CardPaymentInfo = ({
|
|
|
10215
10783
|
onCheckStatus
|
|
10216
10784
|
}) => {
|
|
10217
10785
|
const styles = useStyles36();
|
|
10218
|
-
const mergedLabels = { ...
|
|
10786
|
+
const mergedLabels = { ...DEFAULT_LABELS33[language], ...labels };
|
|
10219
10787
|
return /* @__PURE__ */ jsx("div", { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
|
|
10220
10788
|
/* @__PURE__ */ jsxs("div", { className: styles.headerRow, children: [
|
|
10221
10789
|
/* @__PURE__ */ jsx(Subtitle1, { children: mergedLabels.expiryPrefix }),
|
|
@@ -10276,7 +10844,7 @@ var CardPaymentInfo = ({
|
|
|
10276
10844
|
};
|
|
10277
10845
|
|
|
10278
10846
|
// src/components/CardStatusOrder/CardStatusOrder.constants.ts
|
|
10279
|
-
var
|
|
10847
|
+
var DEFAULT_LABELS34 = {
|
|
10280
10848
|
id: {
|
|
10281
10849
|
detailTitle: "Detail Pemesanan",
|
|
10282
10850
|
statusLabel: "Status",
|
|
@@ -10375,7 +10943,7 @@ var CardStatusOrder = ({
|
|
|
10375
10943
|
className
|
|
10376
10944
|
}) => {
|
|
10377
10945
|
const styles = useStyles37();
|
|
10378
|
-
const mergedLabels = { ...
|
|
10946
|
+
const mergedLabels = { ...DEFAULT_LABELS34[language], ...labels };
|
|
10379
10947
|
const displayStatus = statusLabel || mergedLabels.defaultStatus;
|
|
10380
10948
|
const displayTitle = title || mergedLabels.defaultTitle;
|
|
10381
10949
|
const displayDescription = description || mergedLabels.defaultDescription;
|
|
@@ -10470,6 +11038,32 @@ var CardStatusOrder = ({
|
|
|
10470
11038
|
) }) })
|
|
10471
11039
|
] }) });
|
|
10472
11040
|
};
|
|
11041
|
+
|
|
11042
|
+
// src/components/ModalPriceDetail/ModalPriceDetail.constants.ts
|
|
11043
|
+
var DEFAULT_LABELS35 = {
|
|
11044
|
+
id: {
|
|
11045
|
+
title: "Rincian Harga",
|
|
11046
|
+
addonHeader: "Add On",
|
|
11047
|
+
subTotalLabel: "Sub Tagihan",
|
|
11048
|
+
totalTagihanLabel: "Total Tagihan",
|
|
11049
|
+
ppnLabel: "PPN (Pajak Pertambahan Nilai) 11%",
|
|
11050
|
+
ppnNote: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin",
|
|
11051
|
+
grandTotalLabel: "Total Pembayaran",
|
|
11052
|
+
currencyPrefix: "Rp.",
|
|
11053
|
+
currencyCode: "IDR."
|
|
11054
|
+
},
|
|
11055
|
+
en: {
|
|
11056
|
+
title: "Price Details",
|
|
11057
|
+
addonHeader: "Add On",
|
|
11058
|
+
subTotalLabel: "Sub Total",
|
|
11059
|
+
totalTagihanLabel: "Total Bill",
|
|
11060
|
+
ppnLabel: "VAT (Value Added Tax) 11%",
|
|
11061
|
+
ppnNote: "*VAT 11% is charged for service fees and admin fees",
|
|
11062
|
+
grandTotalLabel: "Total Payment",
|
|
11063
|
+
currencyPrefix: "Rp.",
|
|
11064
|
+
currencyCode: "IDR."
|
|
11065
|
+
}
|
|
11066
|
+
};
|
|
10473
11067
|
var useStyles38 = makeStyles({
|
|
10474
11068
|
surface: {
|
|
10475
11069
|
width: "680px",
|
|
@@ -10486,7 +11080,10 @@ var useStyles38 = makeStyles({
|
|
|
10486
11080
|
card: {
|
|
10487
11081
|
backgroundColor: tokens.colorNeutralBackground1,
|
|
10488
11082
|
...shorthands.border("1px", "solid", tokens.colorNeutralStroke2),
|
|
10489
|
-
...shorthands.padding(
|
|
11083
|
+
...shorthands.padding(
|
|
11084
|
+
tokens.spacingVerticalXXL,
|
|
11085
|
+
tokens.spacingHorizontalXXL
|
|
11086
|
+
),
|
|
10490
11087
|
boxShadow: "none"
|
|
10491
11088
|
},
|
|
10492
11089
|
content: {
|
|
@@ -10583,6 +11180,8 @@ var useStyles38 = makeStyles({
|
|
|
10583
11180
|
}
|
|
10584
11181
|
});
|
|
10585
11182
|
var ModalPriceDetail = ({
|
|
11183
|
+
language = "id",
|
|
11184
|
+
labels,
|
|
10586
11185
|
isOpen,
|
|
10587
11186
|
onOpenChange,
|
|
10588
11187
|
detailItems,
|
|
@@ -10593,99 +11192,133 @@ var ModalPriceDetail = ({
|
|
|
10593
11192
|
...props
|
|
10594
11193
|
}) => {
|
|
10595
11194
|
const styles = useStyles38();
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
11195
|
+
const mergedLabels = { ...DEFAULT_LABELS35[language], ...labels };
|
|
11196
|
+
return /* @__PURE__ */ jsx(
|
|
11197
|
+
Dialog,
|
|
11198
|
+
{
|
|
11199
|
+
open: isOpen,
|
|
11200
|
+
onOpenChange: (_, data) => onOpenChange(data.open),
|
|
11201
|
+
...props,
|
|
11202
|
+
children: /* @__PURE__ */ jsx(DialogSurface, { className: styles.surface, children: /* @__PURE__ */ jsxs(DialogBody, { children: [
|
|
11203
|
+
/* @__PURE__ */ jsx(
|
|
11204
|
+
DialogTitle,
|
|
10603
11205
|
{
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
"path",
|
|
11206
|
+
className: styles.dialogTitle,
|
|
11207
|
+
action: /* @__PURE__ */ jsx(DialogTrigger, { action: "close", children: /* @__PURE__ */ jsx(
|
|
11208
|
+
Button,
|
|
10608
11209
|
{
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
11210
|
+
appearance: "subtle",
|
|
11211
|
+
"aria-label": "close",
|
|
11212
|
+
icon: /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
11213
|
+
"path",
|
|
11214
|
+
{
|
|
11215
|
+
d: "M18 6L6 18M6 6L18 18",
|
|
11216
|
+
stroke: "currentColor",
|
|
11217
|
+
strokeWidth: "2",
|
|
11218
|
+
strokeLinecap: "round",
|
|
11219
|
+
strokeLinejoin: "round"
|
|
11220
|
+
}
|
|
11221
|
+
) })
|
|
10614
11222
|
}
|
|
10615
|
-
) })
|
|
11223
|
+
) }),
|
|
11224
|
+
children: mergedLabels.title
|
|
10616
11225
|
}
|
|
10617
|
-
)
|
|
10618
|
-
children: "
|
|
10619
|
-
|
|
10620
|
-
|
|
10621
|
-
|
|
10622
|
-
|
|
10623
|
-
|
|
10624
|
-
|
|
10625
|
-
|
|
10626
|
-
|
|
11226
|
+
),
|
|
11227
|
+
/* @__PURE__ */ jsx(DialogContent, { className: styles.content, children: /* @__PURE__ */ jsx(Card, { className: styles.card, children: /* @__PURE__ */ jsxs("div", { className: styles.section, children: [
|
|
11228
|
+
detailItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
|
|
11229
|
+
/* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
11230
|
+
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
11231
|
+
/* @__PURE__ */ jsx("span", { className: styles.vehicleTitle, children: item.label }),
|
|
11232
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
11233
|
+
Badge,
|
|
11234
|
+
{
|
|
11235
|
+
size: "medium",
|
|
11236
|
+
shape: "rounded",
|
|
11237
|
+
className: styles.badge,
|
|
11238
|
+
children: item.badge
|
|
11239
|
+
}
|
|
11240
|
+
)
|
|
11241
|
+
] }),
|
|
11242
|
+
/* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
|
|
11243
|
+
mergedLabels.currencyPrefix,
|
|
11244
|
+
" ",
|
|
11245
|
+
item.price.toLocaleString("id-ID")
|
|
11246
|
+
] })
|
|
11247
|
+
] }),
|
|
11248
|
+
item.list && item.list.map((subItem) => /* @__PURE__ */ jsxs(
|
|
11249
|
+
"div",
|
|
11250
|
+
{
|
|
11251
|
+
className: styles.passengerDetail,
|
|
11252
|
+
children: [
|
|
11253
|
+
/* @__PURE__ */ jsx("span", { children: subItem.label }),
|
|
11254
|
+
/* @__PURE__ */ jsxs("span", { style: { float: "right" }, children: [
|
|
11255
|
+
mergedLabels.currencyCode,
|
|
11256
|
+
" ",
|
|
11257
|
+
item.price.toLocaleString("id-ID")
|
|
11258
|
+
] })
|
|
11259
|
+
]
|
|
11260
|
+
},
|
|
11261
|
+
subItem.key
|
|
11262
|
+
))
|
|
11263
|
+
] }, item.key)),
|
|
11264
|
+
addonItems.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11265
|
+
/* @__PURE__ */ jsx("div", { className: styles.addonHeader, children: mergedLabels.addonHeader }),
|
|
11266
|
+
addonItems.map((item) => /* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
11267
|
+
/* @__PURE__ */ jsx("span", { className: styles.itemLabel, children: item.label }),
|
|
11268
|
+
/* @__PURE__ */ jsxs("span", { className: styles.priceValue, children: [
|
|
11269
|
+
mergedLabels.currencyCode,
|
|
11270
|
+
" ",
|
|
11271
|
+
item.price.toLocaleString("id-ID")
|
|
11272
|
+
] })
|
|
11273
|
+
] }, item.key))
|
|
10627
11274
|
] }),
|
|
10628
|
-
/* @__PURE__ */
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10662
|
-
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
taxAmount.toLocaleString("id-ID")
|
|
10672
|
-
] })
|
|
10673
|
-
] }),
|
|
10674
|
-
/* @__PURE__ */ jsx("div", { className: styles.ppnNote, children: "*PPN 11% dikenakan untuk biaya layanan dan biaya admin" })
|
|
10675
|
-
] }),
|
|
10676
|
-
/* @__PURE__ */ jsxs("div", { className: styles.row, style: { marginTop: tokens.spacingVerticalXXL }, children: [
|
|
10677
|
-
/* @__PURE__ */ jsx("span", { className: styles.grandTotalLabel, children: "Total Pembayaran" }),
|
|
10678
|
-
/* @__PURE__ */ jsxs("span", { className: styles.grandTotalValue, children: [
|
|
10679
|
-
"Rp.",
|
|
10680
|
-
grandTotal.toLocaleString("id-ID")
|
|
10681
|
-
] })
|
|
10682
|
-
] })
|
|
10683
|
-
] }) }) })
|
|
10684
|
-
] }) }) });
|
|
11275
|
+
/* @__PURE__ */ jsx(Divider, { className: styles.divider }),
|
|
11276
|
+
/* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
11277
|
+
/* @__PURE__ */ jsx("span", { className: styles.totalLabel, children: mergedLabels.subTotalLabel }),
|
|
11278
|
+
/* @__PURE__ */ jsxs("span", { className: styles.totalValue, children: [
|
|
11279
|
+
mergedLabels.currencyCode,
|
|
11280
|
+
subTotal.toLocaleString("id-ID")
|
|
11281
|
+
] })
|
|
11282
|
+
] }),
|
|
11283
|
+
/* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
11284
|
+
/* @__PURE__ */ jsx("span", { className: styles.totalTagihanLabel, children: mergedLabels.totalTagihanLabel }),
|
|
11285
|
+
/* @__PURE__ */ jsxs("span", { className: styles.totalTagihanValue, children: [
|
|
11286
|
+
mergedLabels.currencyCode,
|
|
11287
|
+
subTotal.toLocaleString("id-ID")
|
|
11288
|
+
] })
|
|
11289
|
+
] }),
|
|
11290
|
+
/* @__PURE__ */ jsxs("div", { style: { marginTop: tokens.spacingVerticalL }, children: [
|
|
11291
|
+
/* @__PURE__ */ jsxs("div", { className: styles.row, children: [
|
|
11292
|
+
/* @__PURE__ */ jsx("span", { className: styles.ppnLabel, children: mergedLabels.ppnLabel }),
|
|
11293
|
+
/* @__PURE__ */ jsxs("span", { className: styles.ppnValue, children: [
|
|
11294
|
+
mergedLabels.currencyCode,
|
|
11295
|
+
taxAmount.toLocaleString("id-ID")
|
|
11296
|
+
] })
|
|
11297
|
+
] }),
|
|
11298
|
+
/* @__PURE__ */ jsx("div", { className: styles.ppnNote, children: mergedLabels.ppnNote })
|
|
11299
|
+
] }),
|
|
11300
|
+
/* @__PURE__ */ jsxs(
|
|
11301
|
+
"div",
|
|
11302
|
+
{
|
|
11303
|
+
className: styles.row,
|
|
11304
|
+
style: { marginTop: tokens.spacingVerticalXXL },
|
|
11305
|
+
children: [
|
|
11306
|
+
/* @__PURE__ */ jsx("span", { className: styles.grandTotalLabel, children: mergedLabels.grandTotalLabel }),
|
|
11307
|
+
/* @__PURE__ */ jsxs("span", { className: styles.grandTotalValue, children: [
|
|
11308
|
+
mergedLabels.currencyPrefix,
|
|
11309
|
+
grandTotal.toLocaleString("id-ID")
|
|
11310
|
+
] })
|
|
11311
|
+
]
|
|
11312
|
+
}
|
|
11313
|
+
)
|
|
11314
|
+
] }) }) })
|
|
11315
|
+
] }) })
|
|
11316
|
+
}
|
|
11317
|
+
);
|
|
10685
11318
|
};
|
|
10686
11319
|
|
|
10687
11320
|
// src/components/CardProfileMenu/CardProfileMenu.constants.ts
|
|
10688
|
-
var
|
|
11321
|
+
var DEFAULT_LABELS36 = {
|
|
10689
11322
|
id: {},
|
|
10690
11323
|
en: {}
|
|
10691
11324
|
};
|
|
@@ -10748,7 +11381,7 @@ var CardProfileMenu = ({
|
|
|
10748
11381
|
onTabSelect
|
|
10749
11382
|
}) => {
|
|
10750
11383
|
const styles = useStyles39();
|
|
10751
|
-
({ ...
|
|
11384
|
+
({ ...DEFAULT_LABELS36[language], ...labels });
|
|
10752
11385
|
const handleTabSelect = (_, data) => {
|
|
10753
11386
|
onTabSelect(data.value);
|
|
10754
11387
|
};
|
|
@@ -10777,6 +11410,6 @@ var CardProfileMenu = ({
|
|
|
10777
11410
|
) });
|
|
10778
11411
|
};
|
|
10779
11412
|
|
|
10780
|
-
export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardProfileMenu, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch,
|
|
11413
|
+
export { BackgroundTicketCard_default as BackgroundTicketCard, BackgroundTicketCardVertical_default as BackgroundTicketCardVertical, CardAddon, CardBanner, CardBookingTicket, CardFAQ, CardMealCatalog, CardOrdererInfo, CardPassengerList, CardPaymentGuide, CardPaymentInfo, CardPaymentMethodList, CardPriceDetails, CardProfileMenu, CardPromo, CardReview, CardReviewPassenger, CardServiceMenu, CardStatusOrder, CardTicket, CardTicketSearch, DEFAULT_LABELS7 as CardTicketSearchDefaultLabels, CardTicketSearchSummary, DEFAULT_LABELS8 as CardTicketSearchSummaryDefaultLabels, CardVehicleDetail, CardVehicleOwnerForm, CarouselWithCustomNav, DEFAULT_COUNTRY_CODES, DEFAULT_DURATION_RANGE, DEFAULT_PRICE_RANGE, DEFAULT_SCROLL_AMOUNT, DEFAULT_SERVICE_CLASSES, DEFAULT_SERVICE_TYPES, DEFAULT_SORT_OPTIONS, DEFAULT_TIME_SLOTS, DEFAULT_VEHICLE_ICONS, DateFilter, DEFAULT_LABELS15 as DateFilterDefaultLabels, InputDynamic_default as InputDynamic, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS14 as ModalFilterTicketDefaultLabels, ModalIllustration, ModalListPassenger, ModalPassengerForm, ModalPriceDetail, ModalSearchHarbor, ModalSearchTicket, ModalSelectDate, ModalService, ModalTotalPassengers, ModalTypeOfService, SortMenu, Stepper, getBadgeConfig, getModalPreset, getSortLabel };
|
|
10781
11414
|
//# sourceMappingURL=index.mjs.map
|
|
10782
11415
|
//# sourceMappingURL=index.mjs.map
|