kupos-ui-components-lib 9.5.4 → 9.5.6
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/components/PaymentSideBar/PaymentSideBarDesktop.js +19 -8
- package/dist/components/PaymentSideBar/PaymentSideBarMobile.js +18 -8
- package/dist/components/PaymentSideBar/types.d.ts +1 -0
- package/dist/components/ServiceItem/ServiceItemDesktop.js +4 -4
- package/dist/ui/OfferBanner.js +1 -1
- package/package.json +1 -1
- package/src/components/PaymentSideBar/PaymentSideBarDesktop.tsx +25 -7
- package/src/components/PaymentSideBar/PaymentSideBarMobile.tsx +24 -7
- package/src/components/PaymentSideBar/types.ts +2 -0
- package/src/components/ServiceItem/ServiceItemDesktop.tsx +5 -4
- package/src/ui/OfferBanner.tsx +1 -1
|
@@ -177,7 +177,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
|
|
|
177
177
|
duration,
|
|
178
178
|
" horas")))))));
|
|
179
179
|
};
|
|
180
|
-
const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, insuranceData, }) => {
|
|
180
|
+
const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, walletLabel, creditosLabel, currency, customSideBarwidth, isLinatal, insuranceData, isPeru, }) => {
|
|
181
181
|
var _a, _b, _c, _d, _e;
|
|
182
182
|
// REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
|
|
183
183
|
const depTime = droppingTimeOnward || "";
|
|
@@ -351,6 +351,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
351
351
|
React.createElement("div", { className: "mt-3 text-[13.33px]", style: { margin: checkWhatsappEligibility ? "0" : "6px 0" } },
|
|
352
352
|
selectSeatOnward && selectedOnward && selectedOnward[0]
|
|
353
353
|
? selectedOnward[0].map((val, key) => {
|
|
354
|
+
console.log("🚀 ~ PaymentSideBarDesktop ~ val:", val);
|
|
354
355
|
return (React.createElement("div", { key: key, className: "flex justify-between items-center w-[100%]" },
|
|
355
356
|
React.createElement("div", null,
|
|
356
357
|
React.createElement("span", null,
|
|
@@ -368,7 +369,9 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
368
369
|
} },
|
|
369
370
|
currency ? currency : "",
|
|
370
371
|
" ",
|
|
371
|
-
CommonService.currency(
|
|
372
|
+
CommonService.currency(isPeru
|
|
373
|
+
? Math.round(val.fare * selectedOnward[1][key] * 100) / 100
|
|
374
|
+
: val.fare * selectedOnward[1][key], currencySign))));
|
|
372
375
|
})
|
|
373
376
|
: null,
|
|
374
377
|
selectSeatReturn && selectedReturn && selectedReturn[0]
|
|
@@ -390,7 +393,9 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
390
393
|
} },
|
|
391
394
|
currency ? currency : "",
|
|
392
395
|
" ",
|
|
393
|
-
CommonService.currency(
|
|
396
|
+
CommonService.currency(isPeru
|
|
397
|
+
? Math.round(val.fare * selectedReturn[1][key] * 100) / 100
|
|
398
|
+
: val.fare * selectedReturn[1][key], currencySign))));
|
|
394
399
|
})
|
|
395
400
|
: null),
|
|
396
401
|
(insuranceData === null || insuranceData === void 0 ? void 0 : insuranceData.insurance_enabled) ? (React.createElement("div", { className: "flex justify-between items-center w-[100%] text-[13.33px]", style: { margin: checkWhatsappEligibility ? "0" : "6px 0" } },
|
|
@@ -437,10 +442,16 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
437
442
|
} },
|
|
438
443
|
currency ? currency : "",
|
|
439
444
|
" ",
|
|
440
|
-
CommonService.currency(
|
|
441
|
-
?
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
+
CommonService.currency(isPeru
|
|
446
|
+
? Math.round((removeDiscountAtomValue
|
|
447
|
+
? 0
|
|
448
|
+
: isAgency
|
|
449
|
+
? netFare + agencyFee
|
|
450
|
+
: netFare) * 100) / 100
|
|
451
|
+
: removeDiscountAtomValue
|
|
452
|
+
? 0
|
|
453
|
+
: isAgency
|
|
454
|
+
? netFare + agencyFee
|
|
455
|
+
: netFare, currencySign)))))));
|
|
445
456
|
};
|
|
446
457
|
export default PaymentSideBarDesktop;
|
|
@@ -73,7 +73,7 @@ const renderSummaryDetailsCard = ({ serviceName, date, source, dest, boardingSta
|
|
|
73
73
|
? `${getRoundedHour(duration)}hrs aprox`
|
|
74
74
|
: `${duration} horas`)))))));
|
|
75
75
|
};
|
|
76
|
-
const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, }) => {
|
|
76
|
+
const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData, currencySign, dateOnward, dateReturn, sourceOnward, sourceReturn, destinationOnward, destinationReturn, boardingStageOnward, boardingStageReturn, droppingStageOnward, droppingStageReturn, boardingTimeOnward, boardingTimeReturn, droppingTimeOnward, droppingTimeReturn, durationOnward, durationReturn, selectSeatOnward, selectSeatReturn, journeyTypeActive, setJourneyTypeActive, translation, trainTypeOnward, trainTypeReturn, colors, trainType, icons, selectedOnward, selectedReturn, conexionChecked, conexionPassengers, returnConexionFare, conexionFare, loginData, checkWhatsappEligibility, removeDiscountAtomValue, netFare, promoCode, onPromoRemove, isAgency, agencyFee, walletMoney, virtualMoney, virtualLimit, showUsd, netFareInUsd, renderDiscount, discountAmount, currency, showWhatsappChargesInfo, setShowWhatsappChargesInfo, t, countdown, walletLabel, creditosLabel, isTacna, isLinatal, insuranceData, isPeru, }) => {
|
|
77
77
|
var _a, _b, _c, _d, _e;
|
|
78
78
|
return (React.createElement("div", { className: "pb-[10px]" },
|
|
79
79
|
React.createElement("div", { className: "border border-[#ccc] m-[20px] rounded-[20px] relative" },
|
|
@@ -159,7 +159,9 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
159
159
|
// )
|
|
160
160
|
,
|
|
161
161
|
":"),
|
|
162
|
-
React.createElement("div", { className: "bold-text" }, CommonService.currency(
|
|
162
|
+
React.createElement("div", { className: "bold-text" }, CommonService.currency(isPeru
|
|
163
|
+
? Math.round(val.fare * selectedOnward[1][key] * 100) / 100
|
|
164
|
+
: val.fare * selectedOnward[1][key], currencySign))));
|
|
163
165
|
})
|
|
164
166
|
: null,
|
|
165
167
|
selectSeatReturn && selectedReturn && selectedReturn[0]
|
|
@@ -176,7 +178,9 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
176
178
|
// )
|
|
177
179
|
,
|
|
178
180
|
":"),
|
|
179
|
-
React.createElement("div", { className: "bold-text" }, CommonService.currency(
|
|
181
|
+
React.createElement("div", { className: "bold-text" }, CommonService.currency(isPeru
|
|
182
|
+
? Math.round(val.fare * selectedReturn[1][key] * 100) / 100
|
|
183
|
+
: val.fare * selectedReturn[1][key], currencySign))));
|
|
180
184
|
})
|
|
181
185
|
: null),
|
|
182
186
|
(insuranceData === null || insuranceData === void 0 ? void 0 : insuranceData.insurance_enabled) ? (React.createElement("div", { className: "flex justify-between items-center w-[100%] text-[13.33px]", style: { margin: checkWhatsappEligibility ? "0" : "6px 0" } },
|
|
@@ -225,10 +229,16 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
|
|
|
225
229
|
} },
|
|
226
230
|
currency ? currency : "",
|
|
227
231
|
" ",
|
|
228
|
-
CommonService.currency(
|
|
229
|
-
?
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
CommonService.currency(isPeru
|
|
233
|
+
? Math.round((removeDiscountAtomValue
|
|
234
|
+
? 0
|
|
235
|
+
: isAgency
|
|
236
|
+
? netFare + agencyFee
|
|
237
|
+
: netFare) * 100) / 100
|
|
238
|
+
: removeDiscountAtomValue
|
|
239
|
+
? 0
|
|
240
|
+
: isAgency
|
|
241
|
+
? netFare + agencyFee
|
|
242
|
+
: netFare, currencySign)))))));
|
|
233
243
|
};
|
|
234
244
|
export default PaymentSideBarMobile;
|
|
@@ -246,9 +246,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
246
246
|
? "z-[3] rounded-[18px]"
|
|
247
247
|
: "rounded-[10px] border border-[#ccc]"}`, style: serviceCardStyle },
|
|
248
248
|
React.createElement("div", { className: " pt-[20px]", style: {
|
|
249
|
-
padding: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ||
|
|
250
|
-
(serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text) ||
|
|
251
|
-
hasDiscount
|
|
249
|
+
padding: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text)
|
|
252
250
|
? "20px 15px 10px 15px"
|
|
253
251
|
: coachKey
|
|
254
252
|
? "20px 15px 20px 15px"
|
|
@@ -284,7 +282,9 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
|
|
|
284
282
|
position: "relative",
|
|
285
283
|
zIndex: hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? 0 : -1,
|
|
286
284
|
} },
|
|
287
|
-
React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0
|
|
285
|
+
React.createElement("div", { style: Object.assign({ overflow: "hidden", minHeight: 0, marginTop: (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.offer_text)
|
|
286
|
+
? ""
|
|
287
|
+
: "-10px" }, (hasOfferText || (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled)
|
|
288
288
|
? {
|
|
289
289
|
borderLeft: `3px solid ${isSoldOut ? "rgba(255, 89, 100, 0.5)" : "#ff5964"}`,
|
|
290
290
|
borderRight: `3px solid ${isSoldOut ? "rgba(255, 136, 66, 0.5)" : "#ff8842"}`,
|
package/dist/ui/OfferBanner.js
CHANGED
|
@@ -5,7 +5,7 @@ const OfferBanner = ({ offerGradient, isSoldOut, serviceItem, renderIcon, isLogg
|
|
|
5
5
|
return (React.createElement("div", { className: "text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[36px] pt-[50px] rounded-b-[14px] text-[14px]", style: {
|
|
6
6
|
background: offerGradient,
|
|
7
7
|
opacity: isSoldOut ? 0.5 : 1,
|
|
8
|
-
zIndex: 0,
|
|
8
|
+
// zIndex: 0,
|
|
9
9
|
} },
|
|
10
10
|
React.createElement("div", { className: "flex justify-between items-center w-full" },
|
|
11
11
|
React.createElement("div", { className: "flex items-center " }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.is_dp_enabled) ? (React.createElement("div", { className: "flex items-center gap-[5px]" },
|
package/package.json
CHANGED
|
@@ -333,6 +333,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
333
333
|
customSideBarwidth,
|
|
334
334
|
isLinatal,
|
|
335
335
|
insuranceData,
|
|
336
|
+
isPeru,
|
|
336
337
|
}) => {
|
|
337
338
|
// REMOVED AM/PM DUPLICATION AND ADDED 24 HOUR TIME FORMAT IN BOARDING STAGE
|
|
338
339
|
const depTime = droppingTimeOnward || "";
|
|
@@ -568,6 +569,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
568
569
|
>
|
|
569
570
|
{selectSeatOnward && selectedOnward && selectedOnward[0]
|
|
570
571
|
? selectedOnward[0].map((val, key) => {
|
|
572
|
+
console.log("🚀 ~ PaymentSideBarDesktop ~ val:", val);
|
|
571
573
|
return (
|
|
572
574
|
<div
|
|
573
575
|
key={key}
|
|
@@ -592,7 +594,11 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
592
594
|
>
|
|
593
595
|
{currency ? currency : ""}{" "}
|
|
594
596
|
{CommonService.currency(
|
|
595
|
-
|
|
597
|
+
isPeru
|
|
598
|
+
? Math.round(
|
|
599
|
+
val.fare * selectedOnward[1][key] * 100,
|
|
600
|
+
) / 100
|
|
601
|
+
: val.fare * selectedOnward[1][key],
|
|
596
602
|
currencySign,
|
|
597
603
|
)}
|
|
598
604
|
</div>
|
|
@@ -626,7 +632,11 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
626
632
|
>
|
|
627
633
|
{currency ? currency : ""}{" "}
|
|
628
634
|
{CommonService.currency(
|
|
629
|
-
|
|
635
|
+
isPeru
|
|
636
|
+
? Math.round(
|
|
637
|
+
val.fare * selectedReturn[1][key] * 100,
|
|
638
|
+
) / 100
|
|
639
|
+
: val.fare * selectedReturn[1][key],
|
|
630
640
|
currencySign,
|
|
631
641
|
)}
|
|
632
642
|
</div>
|
|
@@ -811,11 +821,19 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
|
|
|
811
821
|
>
|
|
812
822
|
{currency ? currency : ""}{" "}
|
|
813
823
|
{CommonService.currency(
|
|
814
|
-
|
|
815
|
-
?
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
824
|
+
isPeru
|
|
825
|
+
? Math.round(
|
|
826
|
+
(removeDiscountAtomValue
|
|
827
|
+
? 0
|
|
828
|
+
: isAgency
|
|
829
|
+
? netFare + agencyFee
|
|
830
|
+
: netFare) * 100,
|
|
831
|
+
) / 100
|
|
832
|
+
: removeDiscountAtomValue
|
|
833
|
+
? 0
|
|
834
|
+
: isAgency
|
|
835
|
+
? netFare + agencyFee
|
|
836
|
+
: netFare,
|
|
819
837
|
currencySign,
|
|
820
838
|
)}
|
|
821
839
|
</div>
|
|
@@ -239,6 +239,7 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
239
239
|
isTacna,
|
|
240
240
|
isLinatal,
|
|
241
241
|
insuranceData,
|
|
242
|
+
isPeru,
|
|
242
243
|
}) => {
|
|
243
244
|
return (
|
|
244
245
|
<div className="pb-[10px]">
|
|
@@ -374,7 +375,11 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
374
375
|
</div>
|
|
375
376
|
<div className="bold-text">
|
|
376
377
|
{CommonService.currency(
|
|
377
|
-
|
|
378
|
+
isPeru
|
|
379
|
+
? Math.round(
|
|
380
|
+
val.fare * selectedOnward[1][key] * 100,
|
|
381
|
+
) / 100
|
|
382
|
+
: val.fare * selectedOnward[1][key],
|
|
378
383
|
currencySign,
|
|
379
384
|
)}
|
|
380
385
|
</div>
|
|
@@ -402,7 +407,11 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
402
407
|
</div>
|
|
403
408
|
<div className="bold-text">
|
|
404
409
|
{CommonService.currency(
|
|
405
|
-
|
|
410
|
+
isPeru
|
|
411
|
+
? Math.round(
|
|
412
|
+
val.fare * selectedReturn[1][key] * 100,
|
|
413
|
+
) / 100
|
|
414
|
+
: val.fare * selectedReturn[1][key],
|
|
406
415
|
currencySign,
|
|
407
416
|
)}
|
|
408
417
|
</div>
|
|
@@ -610,11 +619,19 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
|
|
|
610
619
|
>
|
|
611
620
|
{currency ? currency : ""}{" "}
|
|
612
621
|
{CommonService.currency(
|
|
613
|
-
|
|
614
|
-
?
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
622
|
+
isPeru
|
|
623
|
+
? Math.round(
|
|
624
|
+
(removeDiscountAtomValue
|
|
625
|
+
? 0
|
|
626
|
+
: isAgency
|
|
627
|
+
? netFare + agencyFee
|
|
628
|
+
: netFare) * 100,
|
|
629
|
+
) / 100
|
|
630
|
+
: removeDiscountAtomValue
|
|
631
|
+
? 0
|
|
632
|
+
: isAgency
|
|
633
|
+
? netFare + agencyFee
|
|
634
|
+
: netFare,
|
|
618
635
|
currencySign,
|
|
619
636
|
)}
|
|
620
637
|
</div>
|
|
@@ -439,9 +439,7 @@ function ServiceItemPB({
|
|
|
439
439
|
className=" pt-[20px]"
|
|
440
440
|
style={{
|
|
441
441
|
padding:
|
|
442
|
-
serviceItem?.is_dp_enabled ||
|
|
443
|
-
serviceItem?.offer_text ||
|
|
444
|
-
hasDiscount
|
|
442
|
+
serviceItem?.is_dp_enabled || serviceItem?.offer_text
|
|
445
443
|
? "20px 15px 10px 15px"
|
|
446
444
|
: coachKey
|
|
447
445
|
? "20px 15px 20px 15px"
|
|
@@ -578,7 +576,10 @@ function ServiceItemPB({
|
|
|
578
576
|
style={{
|
|
579
577
|
overflow: "hidden",
|
|
580
578
|
minHeight: 0,
|
|
581
|
-
|
|
579
|
+
marginTop:
|
|
580
|
+
serviceItem?.is_dp_enabled || serviceItem?.offer_text
|
|
581
|
+
? ""
|
|
582
|
+
: "-10px",
|
|
582
583
|
...(hasOfferText || serviceItem?.is_dp_enabled
|
|
583
584
|
? {
|
|
584
585
|
borderLeft: `3px solid ${isSoldOut ? "rgba(255, 89, 100, 0.5)" : "#ff5964"}`,
|
package/src/ui/OfferBanner.tsx
CHANGED