@asdp/ferryui 0.1.22-dev.8576 → 0.1.22-dev.8583
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 +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +106 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +106 -80
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -1039,11 +1039,28 @@ interface ServiceClass {
|
|
|
1039
1039
|
*/
|
|
1040
1040
|
declare const DEFAULT_SERVICE_CLASSES: ServiceClass[];
|
|
1041
1041
|
|
|
1042
|
+
type PassengerTypeCode = "ADULT" | "CHILD" | "INFANT" | "ELDERLY";
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Passenger object structure
|
|
1044
1045
|
*/
|
|
1045
1046
|
interface Passenger {
|
|
1046
|
-
|
|
1047
|
+
isOrderer?: boolean;
|
|
1048
|
+
isCompleted?: boolean;
|
|
1049
|
+
id?: number;
|
|
1050
|
+
title?: string;
|
|
1051
|
+
name: string;
|
|
1052
|
+
idType?: string;
|
|
1053
|
+
idNumber?: string;
|
|
1054
|
+
age?: number;
|
|
1055
|
+
date?: string;
|
|
1056
|
+
category?: PassengerTypeCode;
|
|
1057
|
+
ticketClass: PassengerServiceCode;
|
|
1058
|
+
cityId?: string;
|
|
1059
|
+
phoneNumber?: {
|
|
1060
|
+
countryCode: string;
|
|
1061
|
+
phoneNumber: string;
|
|
1062
|
+
};
|
|
1063
|
+
email?: string;
|
|
1047
1064
|
}
|
|
1048
1065
|
/**
|
|
1049
1066
|
* Service with passenger count
|
|
@@ -2550,4 +2567,4 @@ interface CardProfileMenuProps {
|
|
|
2550
2567
|
|
|
2551
2568
|
declare const CardProfileMenu: React$1.FC<CardProfileMenuProps>;
|
|
2552
2569
|
|
|
2553
|
-
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type RadioOption, type ReservationStep, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, getBadgeConfig, getModalPreset, getSortLabel };
|
|
2570
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type RadioOption, type ReservationStep, type ReviewPassengerItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, getBadgeConfig, getModalPreset, getSortLabel };
|
package/dist/index.d.ts
CHANGED
|
@@ -1039,11 +1039,28 @@ interface ServiceClass {
|
|
|
1039
1039
|
*/
|
|
1040
1040
|
declare const DEFAULT_SERVICE_CLASSES: ServiceClass[];
|
|
1041
1041
|
|
|
1042
|
+
type PassengerTypeCode = "ADULT" | "CHILD" | "INFANT" | "ELDERLY";
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Passenger object structure
|
|
1044
1045
|
*/
|
|
1045
1046
|
interface Passenger {
|
|
1046
|
-
|
|
1047
|
+
isOrderer?: boolean;
|
|
1048
|
+
isCompleted?: boolean;
|
|
1049
|
+
id?: number;
|
|
1050
|
+
title?: string;
|
|
1051
|
+
name: string;
|
|
1052
|
+
idType?: string;
|
|
1053
|
+
idNumber?: string;
|
|
1054
|
+
age?: number;
|
|
1055
|
+
date?: string;
|
|
1056
|
+
category?: PassengerTypeCode;
|
|
1057
|
+
ticketClass: PassengerServiceCode;
|
|
1058
|
+
cityId?: string;
|
|
1059
|
+
phoneNumber?: {
|
|
1060
|
+
countryCode: string;
|
|
1061
|
+
phoneNumber: string;
|
|
1062
|
+
};
|
|
1063
|
+
email?: string;
|
|
1047
1064
|
}
|
|
1048
1065
|
/**
|
|
1049
1066
|
* Service with passenger count
|
|
@@ -2550,4 +2567,4 @@ interface CardProfileMenuProps {
|
|
|
2550
2567
|
|
|
2551
2568
|
declare const CardProfileMenu: React$1.FC<CardProfileMenuProps>;
|
|
2552
2569
|
|
|
2553
|
-
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type RadioOption, type ReservationStep, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, getBadgeConfig, getModalPreset, getSortLabel };
|
|
2570
|
+
export { BackgroundTicketCard, BackgroundTicketCardVertical, type BadgeConfig, CardAddon, type CardAddonProps, CardBanner, type CardBannerProps, CardBookingTicket, type CardBookingTicketProps, CardFAQ, type CardFAQProps, CardMealCatalog, type CardMealCatalogProps, CardOrdererInfo, type CardOrdererInfoProps, CardPassengerList, type CardPassengerListProps, CardPaymentGuide, type CardPaymentGuideProps, CardPaymentInfo, type CardPaymentInfoProps, CardPaymentMethodList, type CardPaymentMethodListProps, CardPriceDetails, type CardPriceDetailsProps, CardProfileMenu, type CardProfileMenuProps, CardPromo, type CardPromoProps, CardReview, CardReviewPassenger, type CardReviewPassengerProps, type CardReviewProps, CardServiceMenu, type CardServiceMenuProps, CardStatusOrder, type CardStatusOrderProps, CardTicket, type CardTicketProps, CardTicketSearch, DEFAULT_LABELS$3 as CardTicketSearchDefaultLabels, type CardTicketSearchFormData, type CardTicketSearchLabels, type CardTicketSearchProps, type ServiceMenuItem as CardTicketSearchServiceMenuItem, CardTicketSearchSummary, DEFAULT_LABELS$2 as CardTicketSearchSummaryDefaultLabels, type CardTicketSearchSummaryProps, CardVehicleDetail, type CardVehicleDetailProps, CardVehicleOwnerForm, type CardVehicleOwnerFormProps, type CargoItem, CarouselWithCustomNav, type CarouselWithCustomNavProps, type CountryCode, 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_LABELS as DateFilterDefaultLabels, type DateFilterLabels, type DateFilterProps, type DateItem, type FilterCount, type HarborItem, InputDynamic, type InputDynamicProps, type InputType, MODAL_PRESETS, type MealCategory, type MealItem, ModalFilterTicket, DEFAULT_LABELS$1 as ModalFilterTicketDefaultLabels, type ModalFilterTicketLabels, type ModalFilterTicketProps, ModalIllustration, type ModalIllustrationButton, type ModalIllustrationProps, ModalListPassenger, type PassengerItem as ModalListPassengerItem, type ModalListPassengerProps, ModalPassengerForm, type ModalPassengerFormProps, type ModalPresetKey, ModalPriceDetail, type ModalPriceDetailProps, ModalSearchHarbor, type ModalSearchHarborProps, ModalSearchTicket, type ModalSearchTicketProps, ModalSelectDate, type ModalSelectDateProps, ModalService, type ModalServiceProps, ModalTotalPassengers, type ModalTotalPassengersProps, ModalTypeOfService, type ModalTypeOfServiceProps, type OrdererInfo, type Passenger, type PassengerFormData, type PassengerListItem, type PassengerService, type PassengerServiceCode, type PassengerType, type PaymentGuideStep, type PaymentMethodCategory, type PaymentStep, type PriceDetailItem, type ProfileMenuSection, type ProfileMenuTab, type RadioOption, type ReservationStep, type ReviewPassengerItem, type SearchSummaryField, type SearchTicketFormData, type SelectOption, type SelectedPassengerItem, type ServiceClass, type ServiceId, type ServiceItem, SortMenu, type SortMenuProps, type SortOption, type StepStatus, Stepper, type StepperProps, type StepperStep, type TabType, type TypeOfService, type VehicleOwner, getBadgeConfig, getModalPreset, getSortLabel };
|
package/dist/index.js
CHANGED
|
@@ -4716,17 +4716,19 @@ var ModalTotalPassengers = ({
|
|
|
4716
4716
|
const defaultInfoMessage = `Anda dapat menambahkan hingga ${maxPassengers} penumpang pada golongan kendaraan ini.`;
|
|
4717
4717
|
React5.useEffect(() => {
|
|
4718
4718
|
if (passengerTypes.length === 0) return;
|
|
4719
|
-
const defaultPassengers = passengerTypes.map(
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4719
|
+
const defaultPassengers = passengerTypes.map(
|
|
4720
|
+
(passengerType) => ({
|
|
4721
|
+
passengerTypeId: passengerType.id,
|
|
4722
|
+
passengerTypeCode: passengerType.passengerTypeCode,
|
|
4723
|
+
passengerTypeName: passengerType.passengerTypeName,
|
|
4724
|
+
services: serviceClasses.map((sc) => ({
|
|
4725
|
+
serviceId: sc.id,
|
|
4726
|
+
serviceName: sc.serviceName,
|
|
4727
|
+
count: 0,
|
|
4728
|
+
passengers: []
|
|
4729
|
+
}))
|
|
4730
|
+
})
|
|
4731
|
+
);
|
|
4730
4732
|
if (selectedPassengers && selectedPassengers.length > 0) {
|
|
4731
4733
|
const mergedPassengers = defaultPassengers.map((defaultP) => {
|
|
4732
4734
|
const selectedP = selectedPassengers.find(
|
|
@@ -4734,8 +4736,14 @@ var ModalTotalPassengers = ({
|
|
|
4734
4736
|
);
|
|
4735
4737
|
if (selectedP) {
|
|
4736
4738
|
const mergedServices = defaultP.services.map((defaultS) => {
|
|
4737
|
-
const selectedS = selectedP.services.find(
|
|
4738
|
-
|
|
4739
|
+
const selectedS = selectedP.services.find(
|
|
4740
|
+
(s) => s.serviceName === defaultS.serviceName
|
|
4741
|
+
);
|
|
4742
|
+
return selectedS ? {
|
|
4743
|
+
...defaultS,
|
|
4744
|
+
count: selectedS.count,
|
|
4745
|
+
passengers: selectedS.passengers || []
|
|
4746
|
+
} : defaultS;
|
|
4739
4747
|
});
|
|
4740
4748
|
return { ...defaultP, services: mergedServices };
|
|
4741
4749
|
}
|
|
@@ -4755,18 +4763,26 @@ var ModalTotalPassengers = ({
|
|
|
4755
4763
|
}
|
|
4756
4764
|
}, [open, passengerTypes, serviceClasses, selectedPassengers]);
|
|
4757
4765
|
const getServiceCount = (passengerTypeCode, serviceName) => {
|
|
4758
|
-
const passenger = passengers.find(
|
|
4766
|
+
const passenger = passengers.find(
|
|
4767
|
+
(p) => p.passengerTypeCode === passengerTypeCode
|
|
4768
|
+
);
|
|
4759
4769
|
if (!passenger) return 0;
|
|
4760
|
-
const service = passenger.services.find(
|
|
4770
|
+
const service = passenger.services.find(
|
|
4771
|
+
(s) => s.serviceName === serviceName
|
|
4772
|
+
);
|
|
4761
4773
|
return service?.count || 0;
|
|
4762
4774
|
};
|
|
4763
4775
|
const getTotalForType = (passengerTypeCode) => {
|
|
4764
|
-
const passenger = passengers.find(
|
|
4776
|
+
const passenger = passengers.find(
|
|
4777
|
+
(p) => p.passengerTypeCode === passengerTypeCode
|
|
4778
|
+
);
|
|
4765
4779
|
if (!passenger) return "0";
|
|
4766
4780
|
const parts = [];
|
|
4767
4781
|
passenger.services.forEach((service) => {
|
|
4768
4782
|
if (service.count > 0) {
|
|
4769
|
-
const serviceClass = serviceClasses.find(
|
|
4783
|
+
const serviceClass = serviceClasses.find(
|
|
4784
|
+
(sc) => sc.serviceName === service.serviceName
|
|
4785
|
+
);
|
|
4770
4786
|
const serviceName = serviceClass?.name || service.serviceName;
|
|
4771
4787
|
parts.push(`${service.count} ${serviceName}`);
|
|
4772
4788
|
}
|
|
@@ -4809,7 +4825,10 @@ var ModalTotalPassengers = ({
|
|
|
4809
4825
|
services: passenger.services.map((service) => {
|
|
4810
4826
|
if (service.serviceName === serviceName && service.count > 0) {
|
|
4811
4827
|
const newCount = service.count - 1;
|
|
4812
|
-
const newPassengers = (service.passengers || []).slice(
|
|
4828
|
+
const newPassengers = (service.passengers || []).slice(
|
|
4829
|
+
0,
|
|
4830
|
+
newCount
|
|
4831
|
+
);
|
|
4813
4832
|
return {
|
|
4814
4833
|
...service,
|
|
4815
4834
|
count: newCount,
|
|
@@ -4831,52 +4850,58 @@ var ModalTotalPassengers = ({
|
|
|
4831
4850
|
})).filter((passenger) => passenger.services.length > 0);
|
|
4832
4851
|
onSave(filteredPassengers);
|
|
4833
4852
|
};
|
|
4834
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4841
|
-
reactComponents.DialogTitle,
|
|
4853
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Dialog, { open, onOpenChange: (_, data) => !data.open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.DialogSurface, { children: /* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogBody, { children: [
|
|
4854
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4855
|
+
reactComponents.DialogTitle,
|
|
4856
|
+
{
|
|
4857
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4858
|
+
reactComponents.Button,
|
|
4842
4859
|
{
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
"aria-label": "close",
|
|
4848
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:dismiss-12-regular" }),
|
|
4849
|
-
onClick: onClose
|
|
4850
|
-
}
|
|
4851
|
-
),
|
|
4852
|
-
children: title
|
|
4860
|
+
appearance: "subtle",
|
|
4861
|
+
"aria-label": "close",
|
|
4862
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { icon: "fluent:dismiss-12-regular" }),
|
|
4863
|
+
onClick: onClose
|
|
4853
4864
|
}
|
|
4854
4865
|
),
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4866
|
+
children: title
|
|
4867
|
+
}
|
|
4868
|
+
),
|
|
4869
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactComponents.DialogContent, { children: [
|
|
4870
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.MessageBar, { shape: "rounded", children: /* @__PURE__ */ jsxRuntime.jsx(reactComponents.MessageBarBody, { children: infoMessage || defaultInfoMessage }) }),
|
|
4871
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: "Loading..." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4872
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4873
|
+
reactComponents.Accordion,
|
|
4874
|
+
{
|
|
4875
|
+
collapsible: true,
|
|
4876
|
+
multiple: true,
|
|
4877
|
+
openItems,
|
|
4878
|
+
onToggle: (_, data) => setOpenItems(data.openItems),
|
|
4879
|
+
className: styles.passengerSection,
|
|
4880
|
+
children: passengerTypes.map((passengerType) => {
|
|
4881
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4882
|
+
reactComponents.AccordionItem,
|
|
4883
|
+
{
|
|
4884
|
+
value: String(passengerType.id),
|
|
4885
|
+
className: styles.accordionItem,
|
|
4886
|
+
children: [
|
|
4887
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4888
|
+
reactComponents.AccordionHeader,
|
|
4889
|
+
{
|
|
4890
|
+
className: styles.accordionHeader,
|
|
4891
|
+
expandIconPosition: "end",
|
|
4892
|
+
children: [
|
|
4874
4893
|
passengerType.passengerTypeName,
|
|
4875
4894
|
" (",
|
|
4876
4895
|
getTotalForType(passengerType.passengerTypeCode),
|
|
4877
4896
|
")"
|
|
4878
|
-
]
|
|
4879
|
-
|
|
4897
|
+
]
|
|
4898
|
+
}
|
|
4899
|
+
),
|
|
4900
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.AccordionPanel, { className: styles.accordionPanel, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.nestedSection, children: serviceClasses.map((service) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4901
|
+
"div",
|
|
4902
|
+
{
|
|
4903
|
+
className: styles.nestedRow,
|
|
4904
|
+
children: [
|
|
4880
4905
|
/* @__PURE__ */ jsxRuntime.jsx(reactComponents.Body1, { children: service.name }),
|
|
4881
4906
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles.passengerCount, children: [
|
|
4882
4907
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4920,29 +4945,30 @@ var ModalTotalPassengers = ({
|
|
|
4920
4945
|
}
|
|
4921
4946
|
)
|
|
4922
4947
|
] })
|
|
4923
|
-
]
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
}
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4948
|
+
]
|
|
4949
|
+
},
|
|
4950
|
+
service.key
|
|
4951
|
+
)) }) })
|
|
4952
|
+
]
|
|
4953
|
+
},
|
|
4954
|
+
passengerType.id
|
|
4955
|
+
);
|
|
4956
|
+
})
|
|
4957
|
+
}
|
|
4958
|
+
),
|
|
4959
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4960
|
+
reactComponents.Button,
|
|
4961
|
+
{
|
|
4962
|
+
appearance: "primary",
|
|
4963
|
+
size: "medium",
|
|
4964
|
+
className: styles.submitButton,
|
|
4965
|
+
onClick: handleSave,
|
|
4966
|
+
children: "Simpan"
|
|
4967
|
+
}
|
|
4968
|
+
)
|
|
4969
|
+
] })
|
|
4970
|
+
] })
|
|
4971
|
+
] }) }) });
|
|
4946
4972
|
};
|
|
4947
4973
|
var useStyles13 = reactComponents.makeStyles({
|
|
4948
4974
|
dialogSurface: {
|