kupos-ui-components-lib 10.4.11 → 10.4.13

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.
Files changed (93) hide show
  1. package/dist/assets/images/filter/bus.svg +19 -0
  2. package/dist/assets/images/filter/clock.svg +4 -0
  3. package/dist/assets/images/filter/filter.svg +3 -0
  4. package/dist/assets/images/filter/money.svg +12 -0
  5. package/dist/assets/images/filter/night.svg +5 -0
  6. package/dist/assets/images/filter/rise.svg +20 -0
  7. package/dist/assets/images/filter/search.svg +4 -0
  8. package/dist/assets/images/filter/seat.svg +4 -0
  9. package/dist/assets/images/filter/star.svg +10 -0
  10. package/dist/assets/images/filter/sun.svg +20 -0
  11. package/dist/assets/images/filter/sunset.svg +15 -0
  12. package/dist/assets/images/filter/track.svg +4 -0
  13. package/dist/components/FilterSortBar/FilterChip.d.ts +21 -0
  14. package/dist/components/FilterSortBar/FilterChip.js +42 -0
  15. package/dist/components/FilterSortBar/FilterSortBarMobile.d.ts +10 -0
  16. package/dist/components/FilterSortBar/FilterSortBarMobile.js +121 -0
  17. package/dist/components/FilterSortBar/FiltersMasterSheet.d.ts +16 -0
  18. package/dist/components/FilterSortBar/FiltersMasterSheet.js +111 -0
  19. package/dist/components/FilterSortBar/OptionCheckboxList.d.ts +13 -0
  20. package/dist/components/FilterSortBar/OptionCheckboxList.js +30 -0
  21. package/dist/components/FilterSortBar/PriceRangeSlider.d.ts +12 -0
  22. package/dist/components/FilterSortBar/PriceRangeSlider.js +113 -0
  23. package/dist/components/FilterSortBar/SheetFooter.d.ts +9 -0
  24. package/dist/components/FilterSortBar/SheetFooter.js +36 -0
  25. package/dist/components/FilterSortBar/SingleFilterSheet.d.ts +15 -0
  26. package/dist/components/FilterSortBar/SingleFilterSheet.js +21 -0
  27. package/dist/components/FilterSortBar/defaultIcons.d.ts +2 -0
  28. package/dist/components/FilterSortBar/defaultIcons.js +18 -0
  29. package/dist/components/FilterSortBar/icons.d.ts +50 -0
  30. package/dist/components/FilterSortBar/icons.js +67 -0
  31. package/dist/components/FilterSortBar/index.d.ts +4 -0
  32. package/dist/components/FilterSortBar/index.js +3 -0
  33. package/dist/components/FilterSortBar/types.d.ts +57 -0
  34. package/dist/components/FilterSortBar/types.js +8 -0
  35. package/dist/components/PaymentSideBar/PaymentSideBarMobile.js +15 -8
  36. package/dist/components/PaymentSideBar/types.d.ts +3 -0
  37. package/dist/index.d.ts +4 -1
  38. package/dist/index.js +5 -0
  39. package/dist/styles.css +64 -0
  40. package/dist/ui/BottomSheet/BottomSheet.d.ts +2 -1
  41. package/dist/ui/BottomSheet/BottomSheet.js +2 -1
  42. package/package.json +1 -1
  43. package/patch.py +35 -0
  44. package/src/assets/images/filter/bus.svg +19 -0
  45. package/src/assets/images/filter/clock.svg +4 -0
  46. package/src/assets/images/filter/filter.svg +3 -0
  47. package/src/assets/images/filter/money.svg +12 -0
  48. package/src/assets/images/filter/night.svg +5 -0
  49. package/src/assets/images/filter/rise.svg +20 -0
  50. package/src/assets/images/filter/search.svg +4 -0
  51. package/src/assets/images/filter/seat.svg +4 -0
  52. package/src/assets/images/filter/star.svg +10 -0
  53. package/src/assets/images/filter/sun.svg +20 -0
  54. package/src/assets/images/filter/sunset.svg +15 -0
  55. package/src/assets/images/filter/track.svg +4 -0
  56. package/src/components/FilterSortBar/FilterChip.tsx +113 -0
  57. package/src/components/FilterSortBar/FilterSortBarMobile.tsx +236 -0
  58. package/src/components/FilterSortBar/FiltersMasterSheet.tsx +208 -0
  59. package/src/components/FilterSortBar/OptionCheckboxList.tsx +86 -0
  60. package/src/components/FilterSortBar/PriceRangeSlider.tsx +184 -0
  61. package/src/components/FilterSortBar/SheetFooter.tsx +61 -0
  62. package/src/components/FilterSortBar/SingleFilterSheet.tsx +82 -0
  63. package/src/components/FilterSortBar/defaultIcons.ts +29 -0
  64. package/src/components/FilterSortBar/icons.tsx +237 -0
  65. package/src/components/FilterSortBar/index.ts +15 -0
  66. package/src/components/FilterSortBar/types.ts +79 -0
  67. package/src/components/PaymentSideBar/PaymentSideBarMobile.tsx +553 -526
  68. package/src/components/PaymentSideBar/types.ts +3 -0
  69. package/src/index.ts +18 -0
  70. package/src/ui/BottomSheet/BottomSheet.tsx +4 -1
  71. package/src/ui/PaymentCardMobile/PaymentCardMobile.tsx +982 -0
  72. package/src/ui/PaymentCardMobile/index.ts +1 -0
  73. package/src/ui/SlidingModal/SlidingModal.tsx +145 -0
  74. package/src/ui/SlidingModal/index.ts +2 -0
  75. package/dist/assets/images/anims/service_list/60_percent_anim.json +0 -1
  76. package/dist/components/PaymentOptions/PaymentOptionsDesktop.d.ts +0 -4
  77. package/dist/components/PaymentOptions/PaymentOptionsDesktop.js +0 -5
  78. package/dist/components/PaymentOptions/PaymentOptionsMobile.d.ts +0 -4
  79. package/dist/components/PaymentOptions/PaymentOptionsMobile.js +0 -5
  80. package/dist/components/PaymentOptions/ResponsivePaymentOptions.d.ts +0 -3
  81. package/dist/components/PaymentOptions/ResponsivePaymentOptions.js +0 -10
  82. package/dist/components/PaymentOptions/index.d.ts +0 -5
  83. package/dist/components/PaymentOptions/index.js +0 -4
  84. package/dist/components/PaymentOptions/mobileTypes.d.ts +0 -0
  85. package/dist/components/PaymentOptions/mobileTypes.js +0 -0
  86. package/dist/components/PaymentOptions/type.d.ts +0 -4
  87. package/dist/components/PaymentOptions/type.js +0 -1
  88. package/dist/components/ServiceItem/ExpandedDropdown.d.ts +0 -19
  89. package/dist/components/ServiceItem/ExpandedDropdown.js +0 -28
  90. package/dist/components/ServiceItem/ServiceItemDesktopPeru.d.ts +0 -6
  91. package/dist/components/ServiceItem/ServiceItemDesktopPeru.js +0 -612
  92. package/dist/ui/TopAmenities/PromoCountdown.d.ts +0 -18
  93. package/dist/ui/TopAmenities/PromoCountdown.js +0 -55
@@ -177,571 +177,598 @@ const renderSummaryDetailsCard = ({
177
177
  );
178
178
  };
179
179
 
180
- const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
181
- serviceNameOnward,
182
- serviceNameReturn,
183
- metaData,
184
- currencySign,
185
- dateOnward,
186
- dateReturn,
187
- sourceOnward,
188
- sourceReturn,
189
- destinationOnward,
190
- destinationReturn,
191
- boardingStageOnward,
192
- boardingStageReturn,
193
- droppingStageOnward,
194
- droppingStageReturn,
195
- boardingTimeOnward,
196
- boardingTimeReturn,
197
- droppingTimeOnward,
198
- droppingTimeReturn,
199
- durationOnward,
200
- durationReturn,
201
- selectSeatOnward,
202
- selectSeatReturn,
203
- journeyTypeActive,
204
- setJourneyTypeActive,
205
- translation,
206
- trainTypeOnward,
207
- trainTypeReturn,
208
- colors,
209
- trainType,
210
- icons,
211
- selectedOnward,
212
- selectedReturn,
213
- conexionChecked,
214
- conexionPassengers,
215
- returnConexionFare,
216
- conexionFare,
217
- loginData,
218
- checkWhatsappEligibility,
219
- removeDiscountAtomValue,
220
- netFare,
221
- promoCode,
222
- onPromoRemove,
223
- isAgency,
224
- agencyFee,
225
- walletMoney,
226
- virtualMoney,
227
- virtualLimit,
228
- showUsd,
229
- netFareInUsd,
230
- renderDiscount,
231
- discountAmount,
232
- currency,
233
- showWhatsappChargesInfo,
234
- setShowWhatsappChargesInfo,
235
- t,
236
- countdown,
237
- walletLabel,
238
- creditosLabel,
239
- isTacna,
240
- isLinatal,
241
- insuranceData,
242
- isPeru,
243
- setShowServicefeeModal,
244
- serviceFeeDataStateValue,
245
- isOpsite,
246
- }) => {
247
- return (
248
- <div className="pb-[15px]">
249
- <div
250
- className="border border-[#ccc] rounded-[20px] relative"
251
- style={{ margin: "0px 20px 20px" }}
252
- >
253
- <div
254
- style={{
255
- position: "absolute",
256
- zIndex: 200,
257
- right: "20px",
258
- top: "20px",
259
- }}
260
- >
261
- {/* <CountDownTimer icons={icons} colors={colors} countdown={countdown} /> */}
262
- </div>
263
- <div className="p-[15px] z-100 relative bg-white rounded-[20px] bg-[#fff]">
264
- <div>
265
- {dateReturn ? (
266
- <div className="mt-[2px] flex justify-center mt-[15px] mb-[15px]">
267
- <div
268
- className={`flex rounded-[20px] overflow-hidden text-xs ${
269
- dateReturn ? "w-[60%]" : "w-auto"
270
- }`}
271
- style={{
272
- backgroundColor: colors?.idVueltaBgColor,
273
- }}
274
- >
275
- <span
276
- onClick={() =>
277
- setJourneyTypeActive && setJourneyTypeActive(1)
278
- }
279
- className="px-[10px] py-[6px] cursor-pointer text-sm font-medium transition-colors text-[14px] flex items-center justify-center w-[100%]"
280
- style={{
281
- backgroundColor:
282
- journeyTypeActive === 1
283
- ? colors?.idaBgColor
284
- : "transparent",
285
- color:
286
- journeyTypeActive === 1
287
- ? colors?.idaSelectedTextColor
288
- : colors?.idaUnSelectedTextColor,
289
- borderRadius: journeyTypeActive === 2 ? "0px" : "20px",
290
- }}
291
- >
292
- {translation?.going || "Ida"}
293
- </span>
180
+ import { PaymentCardMobile } from "../../ui/PaymentCardMobile";
294
181
 
295
- {dateReturn && (
296
- <span
297
- onClick={() =>
298
- setJourneyTypeActive && setJourneyTypeActive(2)
299
- }
300
- className="px-[10px] py-[6px] cursor-pointer text-sm font-medium transition-colors text-[14px] flex items-center justify-center w-[100%]"
182
+ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = (props) => {
183
+ const {
184
+ serviceNameOnward,
185
+ serviceNameReturn,
186
+ metaData,
187
+ currencySign,
188
+ dateOnward,
189
+ dateReturn,
190
+ sourceOnward,
191
+ sourceReturn,
192
+ destinationOnward,
193
+ destinationReturn,
194
+ boardingStageOnward,
195
+ boardingStageReturn,
196
+ droppingStageOnward,
197
+ droppingStageReturn,
198
+ boardingTimeOnward,
199
+ boardingTimeReturn,
200
+ droppingTimeOnward,
201
+ droppingTimeReturn,
202
+ durationOnward,
203
+ durationReturn,
204
+ selectSeatOnward,
205
+ selectSeatReturn,
206
+ journeyTypeActive,
207
+ setJourneyTypeActive,
208
+ translation,
209
+ trainTypeOnward,
210
+ trainTypeReturn,
211
+ colors,
212
+ trainType,
213
+ icons,
214
+ selectedOnward,
215
+ selectedReturn,
216
+ conexionChecked,
217
+ conexionPassengers,
218
+ returnConexionFare,
219
+ conexionFare,
220
+ loginData,
221
+ checkWhatsappEligibility,
222
+ removeDiscountAtomValue,
223
+ netFare,
224
+ promoCode,
225
+ onPromoRemove,
226
+ isAgency,
227
+ agencyFee,
228
+ walletMoney,
229
+ virtualMoney,
230
+ virtualLimit,
231
+ showUsd,
232
+ netFareInUsd,
233
+ renderDiscount,
234
+ discountAmount,
235
+ currency,
236
+ showWhatsappChargesInfo,
237
+ setShowWhatsappChargesInfo,
238
+ t,
239
+ countdown,
240
+ walletLabel,
241
+ creditosLabel,
242
+ isTacna,
243
+ isLinatal,
244
+ insuranceData,
245
+ isPeru,
246
+ setShowServicefeeModal,
247
+ serviceFeeDataStateValue,
248
+ isOpsite,
249
+ isNewUi = false,
250
+ showDetails = false,
251
+ setShowDetails,
252
+ } = props;
253
+ return (
254
+ <>
255
+ {isNewUi ? (
256
+ <PaymentCardMobile {...props} />
257
+ ) : (
258
+ <div className="pb-[15px]">
259
+ <div
260
+ className="border border-[#ccc] rounded-[20px] relative"
261
+ style={{ margin: "0px 20px 20px" }}
262
+ >
263
+ <div
264
+ style={{
265
+ position: "absolute",
266
+ zIndex: 200,
267
+ right: "20px",
268
+ top: "20px",
269
+ }}
270
+ >
271
+ {/* <CountDownTimer icons={icons} colors={colors} countdown={countdown} /> */}
272
+ </div>
273
+ <div className="p-[15px] z-100 relative bg-white rounded-[20px] bg-[#fff]">
274
+ <div>
275
+ {dateReturn ? (
276
+ <div className="mt-[2px] flex justify-center mt-[15px] mb-[15px]">
277
+ <div
278
+ className={`flex rounded-[20px] overflow-hidden text-xs ${
279
+ dateReturn ? "w-[60%]" : "w-auto"
280
+ }`}
301
281
  style={{
302
- backgroundColor:
303
- journeyTypeActive === 2
304
- ? colors?.vueltaBgColor
305
- : "transparent",
306
- color:
307
- journeyTypeActive === 2
308
- ? colors?.vueltaSelectedTextColor
309
- : colors?.vueltaUnSelectedTextColor,
310
- borderRadius: journeyTypeActive === 2 ? "20px" : "0",
282
+ backgroundColor: colors?.idVueltaBgColor,
311
283
  }}
312
284
  >
313
- {translation?.return || "Vuelta"}
314
- </span>
315
- )}
316
- </div>
317
- </div>
318
- ) : null}
319
-
320
- {journeyTypeActive == 1
321
- ? renderSummaryDetailsCard({
322
- serviceName: serviceNameOnward,
323
- date: dateOnward,
324
- source: sourceOnward,
325
- dest: destinationOnward,
326
- boardingStage: boardingStageOnward,
327
- boardingTime: boardingTimeOnward,
328
- droppingStage: droppingStageOnward,
329
- droppingTime: droppingTimeOnward,
330
- duration: durationOnward,
331
- trainType: trainTypeOnward,
332
- isTrain: trainType,
333
- icons: icons,
334
- isTacna: isTacna,
335
- isLinatal: isLinatal,
336
- })
337
- : renderSummaryDetailsCard({
338
- serviceName: serviceNameReturn,
339
- date: dateReturn,
340
- source: sourceReturn,
341
- dest: destinationReturn,
342
- boardingStage: boardingStageReturn,
343
- boardingTime: boardingTimeReturn,
344
- droppingStage: droppingStageReturn,
345
- droppingTime: droppingTimeReturn,
346
- duration: durationReturn,
347
- trainType: trainTypeReturn,
348
- isTrain: trainType,
349
- icons: icons,
350
- isTacna: isTacna,
351
- isLinatal: isLinatal,
352
- })}
353
- </div>
354
-
355
- <div className="mt-[15px] ">
356
- <div
357
- className=" text-[14px]"
358
- style={{ margin: checkWhatsappEligibility ? "0" : "6px 0" }}
359
- >
360
- <div className="text-[14px] bold-text">Detalles del pago</div>
285
+ <span
286
+ onClick={() =>
287
+ setJourneyTypeActive && setJourneyTypeActive(1)
288
+ }
289
+ className="px-[10px] py-[6px] cursor-pointer text-sm font-medium transition-colors text-[14px] flex items-center justify-center w-[100%]"
290
+ style={{
291
+ backgroundColor:
292
+ journeyTypeActive === 1
293
+ ? colors?.idaBgColor
294
+ : "transparent",
295
+ color:
296
+ journeyTypeActive === 1
297
+ ? colors?.idaSelectedTextColor
298
+ : colors?.idaUnSelectedTextColor,
299
+ borderRadius:
300
+ journeyTypeActive === 2 ? "0px" : "20px",
301
+ }}
302
+ >
303
+ {translation?.going || "Ida"}
304
+ </span>
361
305
 
362
- <div className="mt-[10px] mb-[10px]">
363
- <div className="">N° Asientos:</div>
364
- {selectSeatOnward && selectedOnward && selectedOnward[0]
365
- ? selectedOnward[0].map((val, key) => {
366
- return (
367
- <div
368
- key={key}
369
- className="flex justify-between items-center w-[100%]"
370
- >
371
- <div>
372
- <span>{selectedOnward[1][key]} </span>
373
- {" x "}
374
- {
375
- val.is_pet_seat ? "Asiento Mascota" : val.type
376
- // CommonService.capitalize(
377
- // CommonService.getSeatName(val.type),
378
- // )
379
- }
380
- :
381
- </div>
382
- <div className="bold-text">
383
- {CommonService.currency(
384
- isPeru
385
- ? Math.round(
386
- val.fare * selectedOnward[1][key] * 100,
387
- ) / 100
388
- : val.fare * selectedOnward[1][key],
389
- currencySign,
390
- )}
391
- </div>
392
- </div>
393
- );
394
- })
395
- : null}
396
- {selectSeatReturn && selectedReturn && selectedReturn[0]
397
- ? selectedReturn[0].map((val, key) => {
398
- return (
399
- <div
400
- key={key}
401
- className="flex justify-between items-center w-[100%] mt-[5px]"
306
+ {dateReturn && (
307
+ <span
308
+ onClick={() =>
309
+ setJourneyTypeActive && setJourneyTypeActive(2)
310
+ }
311
+ className="px-[10px] py-[6px] cursor-pointer text-sm font-medium transition-colors text-[14px] flex items-center justify-center w-[100%]"
312
+ style={{
313
+ backgroundColor:
314
+ journeyTypeActive === 2
315
+ ? colors?.vueltaBgColor
316
+ : "transparent",
317
+ color:
318
+ journeyTypeActive === 2
319
+ ? colors?.vueltaSelectedTextColor
320
+ : colors?.vueltaUnSelectedTextColor,
321
+ borderRadius:
322
+ journeyTypeActive === 2 ? "20px" : "0",
323
+ }}
402
324
  >
403
- <div>
404
- <span>{selectedReturn[1][key]} </span>
405
- {" x "}
406
- {
407
- val.is_pet_seat ? "Asiento Mascota" : val.type
408
- // CommonService.capitalize(
409
- // CommonService.getSeatName(val.type)
410
- // )
411
- }
412
- :
413
- </div>
414
- <div className="bold-text">
415
- {CommonService.currency(
416
- isPeru
417
- ? Math.round(
418
- val.fare * selectedReturn[1][key] * 100,
419
- ) / 100
420
- : val.fare * selectedReturn[1][key],
421
- currencySign,
422
- )}
423
- </div>
424
- </div>
425
- );
325
+ {translation?.return || "Vuelta"}
326
+ </span>
327
+ )}
328
+ </div>
329
+ </div>
330
+ ) : null}
331
+
332
+ {journeyTypeActive == 1
333
+ ? renderSummaryDetailsCard({
334
+ serviceName: serviceNameOnward,
335
+ date: dateOnward,
336
+ source: sourceOnward,
337
+ dest: destinationOnward,
338
+ boardingStage: boardingStageOnward,
339
+ boardingTime: boardingTimeOnward,
340
+ droppingStage: droppingStageOnward,
341
+ droppingTime: droppingTimeOnward,
342
+ duration: durationOnward,
343
+ trainType: trainTypeOnward,
344
+ isTrain: trainType,
345
+ icons: icons,
346
+ isTacna: isTacna,
347
+ isLinatal: isLinatal,
426
348
  })
427
- : null}
349
+ : renderSummaryDetailsCard({
350
+ serviceName: serviceNameReturn,
351
+ date: dateReturn,
352
+ source: sourceReturn,
353
+ dest: destinationReturn,
354
+ boardingStage: boardingStageReturn,
355
+ boardingTime: boardingTimeReturn,
356
+ droppingStage: droppingStageReturn,
357
+ droppingTime: droppingTimeReturn,
358
+ duration: durationReturn,
359
+ trainType: trainTypeReturn,
360
+ isTrain: trainType,
361
+ icons: icons,
362
+ isTacna: isTacna,
363
+ isLinatal: isLinatal,
364
+ })}
428
365
  </div>
429
366
 
430
- {/* insurance data */}
431
- {insuranceData?.insurance_enabled ? (
367
+ <div className="mt-[15px] ">
432
368
  <div
433
- className="flex justify-between items-center w-[100%] text-[13.33px]"
369
+ className=" text-[14px]"
434
370
  style={{ margin: checkWhatsappEligibility ? "0" : "6px 0" }}
435
371
  >
436
- <div>
437
- <span>
438
- {(selectedOnward?.[1]?.reduce(
439
- (acc, qty) => acc + qty,
440
- 0,
441
- ) ?? 0) +
442
- (selectedReturn?.[1]?.reduce(
443
- (acc, qty) => acc + qty,
444
- 0,
445
- ) ?? 0)}
446
- </span>
447
- {" x "}
448
- Viajero Seguro:
449
- </div>
450
- <div
451
- className="bold-text"
452
- style={{ color: colors?.seatPriceColor }}
453
- >
454
- {CommonService.currency(
455
- insuranceData?.insurance_total ?? 0,
456
- currencySign,
457
- )}
372
+ <div className="text-[14px] bold-text">Detalles del pago</div>
373
+
374
+ <div className="mt-[10px] mb-[10px]">
375
+ <div className="">N° Asientos:</div>
376
+ {selectSeatOnward && selectedOnward && selectedOnward[0]
377
+ ? selectedOnward[0].map((val, key) => {
378
+ return (
379
+ <div
380
+ key={key}
381
+ className="flex justify-between items-center w-[100%]"
382
+ >
383
+ <div>
384
+ <span>{selectedOnward[1][key]} </span>
385
+ {" x "}
386
+ {
387
+ val.is_pet_seat ? "Asiento Mascota" : val.type
388
+ // CommonService.capitalize(
389
+ // CommonService.getSeatName(val.type),
390
+ // )
391
+ }
392
+ :
393
+ </div>
394
+ <div className="bold-text">
395
+ {CommonService.currency(
396
+ isPeru
397
+ ? Math.round(
398
+ val.fare * selectedOnward[1][key] * 100,
399
+ ) / 100
400
+ : val.fare * selectedOnward[1][key],
401
+ currencySign,
402
+ )}
403
+ </div>
404
+ </div>
405
+ );
406
+ })
407
+ : null}
408
+ {selectSeatReturn && selectedReturn && selectedReturn[0]
409
+ ? selectedReturn[0].map((val, key) => {
410
+ return (
411
+ <div
412
+ key={key}
413
+ className="flex justify-between items-center w-[100%] mt-[5px]"
414
+ >
415
+ <div>
416
+ <span>{selectedReturn[1][key]} </span>
417
+ {" x "}
418
+ {
419
+ val.is_pet_seat ? "Asiento Mascota" : val.type
420
+ // CommonService.capitalize(
421
+ // CommonService.getSeatName(val.type)
422
+ // )
423
+ }
424
+ :
425
+ </div>
426
+ <div className="bold-text">
427
+ {CommonService.currency(
428
+ isPeru
429
+ ? Math.round(
430
+ val.fare * selectedReturn[1][key] * 100,
431
+ ) / 100
432
+ : val.fare * selectedReturn[1][key],
433
+ currencySign,
434
+ )}
435
+ </div>
436
+ </div>
437
+ );
438
+ })
439
+ : null}
458
440
  </div>
441
+
442
+ {/* insurance data */}
443
+ {insuranceData?.insurance_enabled ? (
444
+ <div
445
+ className="flex justify-between items-center w-[100%] text-[13.33px]"
446
+ style={{
447
+ margin: checkWhatsappEligibility ? "0" : "6px 0",
448
+ }}
449
+ >
450
+ <div>
451
+ <span>
452
+ {(selectedOnward?.[1]?.reduce(
453
+ (acc, qty) => acc + qty,
454
+ 0,
455
+ ) ?? 0) +
456
+ (selectedReturn?.[1]?.reduce(
457
+ (acc, qty) => acc + qty,
458
+ 0,
459
+ ) ?? 0)}
460
+ </span>
461
+ {" x "}
462
+ Viajero Seguro:
463
+ </div>
464
+ <div
465
+ className="bold-text"
466
+ style={{ color: colors?.seatPriceColor }}
467
+ >
468
+ {CommonService.currency(
469
+ insuranceData?.insurance_total ?? 0,
470
+ currencySign,
471
+ )}
472
+ </div>
473
+ </div>
474
+ ) : null}
459
475
  </div>
460
- ) : null}
461
- </div>
462
476
 
463
- <div style={{ margin: "6px 0" }}>
464
- {renderDiscount(discountAmount)}
465
- </div>
477
+ <div style={{ margin: "6px 0" }}>
478
+ {renderDiscount(discountAmount)}
479
+ </div>
466
480
 
467
- {metaData &&
468
- !isOpsite &&
469
- metaData.whatsapp_delivery_charges &&
470
- !loginData &&
471
- !checkWhatsappEligibility ? (
472
- <PaymentItem
473
- label={
474
- <div style={{ display: "flex" }}>
475
- <div className="font-[14px]">
476
- {translation?.whatsappDeliveryCharges}
477
- </div>
478
- <div className="img-hover">
479
- <img
480
- src={icons?.whatsappInfoIcon}
481
- alt=""
482
- style={{
483
- marginLeft: "5px",
484
- width: "15px",
485
- }}
486
- onClick={() =>
487
- setShowWhatsappChargesInfo(!showWhatsappChargesInfo)
488
- }
489
- />
490
- {showWhatsappChargesInfo && (
491
- <div
492
- className=" absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]"
493
- style={{
494
- lineHeight: "1.3",
495
- backgroundColor:
496
- colors?.whatsappDeliveryChargesBgColor,
497
- color: colors?.whatsappDeliveryChargesTextColor,
498
- }}
499
- >
500
- {translation?.whatsappInfoIcon}
481
+ {metaData &&
482
+ !isOpsite &&
483
+ metaData.whatsapp_delivery_charges &&
484
+ !loginData &&
485
+ !checkWhatsappEligibility ? (
486
+ <PaymentItem
487
+ label={
488
+ <div style={{ display: "flex" }}>
489
+ <div className="font-[14px]">
490
+ {translation?.whatsappDeliveryCharges}
501
491
  </div>
502
- )}
503
- </div>
504
- </div>
505
- }
506
- amount={metaData.whatsapp_delivery_charges}
507
- className="text-[14px]"
508
- customStyle={{ color: colors?.whatsappDeliveryChargesColor }}
509
- currency={currency}
510
- />
511
- ) : null}
512
-
513
- {metaData &&
514
- isOpsite &&
515
- metaData.opsite_whatsapp_delivery_charges &&
516
- !loginData &&
517
- !checkWhatsappEligibility ? (
518
- <PaymentItem
519
- label={
520
- <div style={{ display: "flex" }}>
521
- <div className="font-[14px]">
522
- {translation?.whatsappDeliveryCharges}
523
- </div>
524
- <div className="img-hover">
525
- <img
526
- src={icons?.whatsappInfoIcon}
527
- alt=""
528
- style={{
529
- marginLeft: "5px",
530
- width: "15px",
531
- }}
532
- onClick={() =>
533
- setShowWhatsappChargesInfo(!showWhatsappChargesInfo)
534
- }
535
- />
536
- {showWhatsappChargesInfo && (
537
- <div
538
- className=" absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]"
539
- style={{
540
- lineHeight: "1.3",
541
- backgroundColor:
542
- colors?.whatsappDeliveryChargesBgColor,
543
- color: colors?.whatsappDeliveryChargesTextColor,
544
- }}
545
- >
546
- {translation?.whatsappInfoIcon}
492
+ <div className="img-hover">
493
+ <img
494
+ src={icons?.whatsappInfoIcon}
495
+ alt=""
496
+ style={{
497
+ marginLeft: "5px",
498
+ width: "15px",
499
+ }}
500
+ onClick={() =>
501
+ setShowWhatsappChargesInfo(
502
+ !showWhatsappChargesInfo,
503
+ )
504
+ }
505
+ />
506
+ {showWhatsappChargesInfo && (
507
+ <div
508
+ className=" absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]"
509
+ style={{
510
+ lineHeight: "1.3",
511
+ backgroundColor:
512
+ colors?.whatsappDeliveryChargesBgColor,
513
+ color: colors?.whatsappDeliveryChargesTextColor,
514
+ }}
515
+ >
516
+ {translation?.whatsappInfoIcon}
517
+ </div>
518
+ )}
547
519
  </div>
548
- )}
549
- </div>
550
- </div>
551
- }
552
- amount={metaData.opsite_whatsapp_delivery_charges}
553
- className="text-[14px]"
554
- customStyle={{ color: colors?.whatsappDeliveryChargesColor }}
555
- isBoldText={true}
556
- currency={currency}
557
- />
558
- ) : null}
520
+ </div>
521
+ }
522
+ amount={metaData.whatsapp_delivery_charges}
523
+ className="text-[14px]"
524
+ customStyle={{
525
+ color: colors?.whatsappDeliveryChargesColor,
526
+ }}
527
+ currency={currency}
528
+ />
529
+ ) : null}
559
530
 
560
- {promoCode?.promoCodeApplied && (
561
- <>
562
- <PaymentItem
563
- label={`${translation?.promotionalCode}:`}
564
- amount={CommonService.currency(
565
- promoCode?.promoCouponAmount
566
- ? promoCode?.promoCouponAmount
567
- : 0,
568
- currencySign,
569
- )}
570
- className="text-[14px]"
571
- showCurrency={false}
572
- customStyle={{ color: colors?.promoCodePriceColor }}
573
- currency=""
574
- isBoldText={true}
575
- />
576
- {promoCode?.promoCouponAmount ? (
577
- <div className="promocode font14 flex items-center gap-[5px]">
578
- <div>{promoCode?.promoCode}</div>
579
- <span className="promo-remove" onClick={onPromoRemove}>
580
- <img
581
- src={icons?.closeIcon}
582
- alt="close"
583
- className="w-[16px] h-[16px]"
584
- />
585
- </span>
586
- </div>
531
+ {metaData &&
532
+ isOpsite &&
533
+ metaData.opsite_whatsapp_delivery_charges &&
534
+ !loginData &&
535
+ !checkWhatsappEligibility ? (
536
+ <PaymentItem
537
+ label={
538
+ <div style={{ display: "flex" }}>
539
+ <div className="font-[14px]">
540
+ {translation?.whatsappDeliveryCharges}
541
+ </div>
542
+ <div className="img-hover">
543
+ <img
544
+ src={icons?.whatsappInfoIcon}
545
+ alt=""
546
+ style={{
547
+ marginLeft: "5px",
548
+ width: "15px",
549
+ }}
550
+ onClick={() =>
551
+ setShowWhatsappChargesInfo(
552
+ !showWhatsappChargesInfo,
553
+ )
554
+ }
555
+ />
556
+ {showWhatsappChargesInfo && (
557
+ <div
558
+ className=" absolute shadow-xl z-[1] w-[250px] p-[6px_20px] text-[11px] top-[88%] left-[11%] rounded-[10px]"
559
+ style={{
560
+ lineHeight: "1.3",
561
+ backgroundColor:
562
+ colors?.whatsappDeliveryChargesBgColor,
563
+ color: colors?.whatsappDeliveryChargesTextColor,
564
+ }}
565
+ >
566
+ {translation?.whatsappInfoIcon}
567
+ </div>
568
+ )}
569
+ </div>
570
+ </div>
571
+ }
572
+ amount={metaData.opsite_whatsapp_delivery_charges}
573
+ className="text-[14px]"
574
+ customStyle={{
575
+ color: colors?.whatsappDeliveryChargesColor,
576
+ }}
577
+ isBoldText={true}
578
+ currency={currency}
579
+ />
587
580
  ) : null}
588
- </>
589
- )}
590
581
 
591
- {!!serviceFeeDataStateValue?.total_convenience_fee_amount && (
592
- <PaymentItem
593
- label={
594
- <div style={{ display: "flex", alignItems: "center" }}>
595
- <div className=" font14 flex items-center gap-[5px]">
596
- {translation?.serviceFeeLabel}
597
- </div>
598
- <div
599
- className="img-hover"
600
- onClick={() => setShowServicefeeModal(true)}
601
- >
602
- <img
603
- src={icons?.whatsappInfoIcon}
604
- alt=""
605
- style={{
606
- marginLeft: "5px",
607
- width: "15px",
608
- }}
609
- />
610
- {/* <div
582
+ {promoCode?.promoCodeApplied && (
583
+ <>
584
+ <PaymentItem
585
+ label={`${translation?.promotionalCode}:`}
586
+ amount={CommonService.currency(
587
+ promoCode?.promoCouponAmount
588
+ ? promoCode?.promoCouponAmount
589
+ : 0,
590
+ currencySign,
591
+ )}
592
+ className="text-[14px]"
593
+ showCurrency={false}
594
+ customStyle={{ color: colors?.promoCodePriceColor }}
595
+ currency=""
596
+ isBoldText={true}
597
+ />
598
+ {promoCode?.promoCouponAmount ? (
599
+ <div className="promocode font14 flex items-center gap-[5px]">
600
+ <div>{promoCode?.promoCode}</div>
601
+ <span className="promo-remove" onClick={onPromoRemove}>
602
+ <img
603
+ src={icons?.closeIcon}
604
+ alt="close"
605
+ className="w-[16px] h-[16px]"
606
+ />
607
+ </span>
608
+ </div>
609
+ ) : null}
610
+ </>
611
+ )}
612
+
613
+ {!!serviceFeeDataStateValue?.total_convenience_fee_amount && (
614
+ <PaymentItem
615
+ label={
616
+ <div style={{ display: "flex", alignItems: "center" }}>
617
+ <div className=" font14 flex items-center gap-[5px]">
618
+ {translation?.serviceFeeLabel}
619
+ </div>
620
+ <div
621
+ className="img-hover"
622
+ onClick={() => setShowServicefeeModal(true)}
623
+ >
624
+ <img
625
+ src={icons?.whatsappInfoIcon}
626
+ alt=""
627
+ style={{
628
+ marginLeft: "5px",
629
+ width: "15px",
630
+ }}
631
+ />
632
+ {/* <div
611
633
  className="duration-mouseover font9"
612
634
  style={{ lineHeight: "1.3" }}
613
635
  >
614
636
  <span>{translation?.serviceFeeHoverLabel}</span>
615
637
  </div> */}
616
- </div>
617
- </div>
618
- }
619
- amount={CommonService.currency(
620
- serviceFeeDataStateValue?.total_convenience_fee_amount,
621
- currencySign,
638
+ </div>
639
+ </div>
640
+ }
641
+ amount={CommonService.currency(
642
+ serviceFeeDataStateValue?.total_convenience_fee_amount,
643
+ currencySign,
644
+ )}
645
+ className="font14"
646
+ currency={currency}
647
+ customStyle={{ color: colors?.serviceFeePriceColor }}
648
+ />
622
649
  )}
623
- className="font14"
624
- currency={currency}
625
- customStyle={{ color: colors?.serviceFeePriceColor }}
626
- />
627
- )}
628
650
 
629
- {conexionChecked && conexionFare && returnConexionFare ? (
630
- <PaymentItem
631
- label="Conexión Aeropuerto:"
632
- amount={CommonService.currency(
633
- dateReturn
634
- ? returnConexionFare * conexionPassengers
635
- : conexionFare,
636
- currencySign,
637
- )}
638
- className="subtotal-row text-[14px]"
639
- customStyle={{ color: colors?.seatPriceColor }}
640
- isBoldText={true}
641
- />
642
- ) : null}
651
+ {conexionChecked && conexionFare && returnConexionFare ? (
652
+ <PaymentItem
653
+ label="Conexión Aeropuerto:"
654
+ amount={CommonService.currency(
655
+ dateReturn
656
+ ? returnConexionFare * conexionPassengers
657
+ : conexionFare,
658
+ currencySign,
659
+ )}
660
+ className="subtotal-row text-[14px]"
661
+ customStyle={{ color: colors?.seatPriceColor }}
662
+ isBoldText={true}
663
+ />
664
+ ) : null}
643
665
 
644
- {removeDiscountAtomValue && (
645
- <PaymentItem
646
- label="Cupón"
647
- amount={CommonService.currency(netFare, currencySign)}
648
- isNegative={true}
649
- customStyle={{ color: "var(--secondary-color)" }}
650
- className="text-[14px]"
651
- isBoldText={true}
652
- />
653
- )}
666
+ {removeDiscountAtomValue && (
667
+ <PaymentItem
668
+ label="Cupón"
669
+ amount={CommonService.currency(netFare, currencySign)}
670
+ isNegative={true}
671
+ customStyle={{ color: "var(--secondary-color)" }}
672
+ className="text-[14px]"
673
+ isBoldText={true}
674
+ />
675
+ )}
654
676
 
655
- {isAgency && (
656
- <PaymentItem
657
- label={translation?.agencyFee}
658
- amount={CommonService.currency(
659
- agencyFee ? agencyFee : 0,
660
- currencySign,
677
+ {isAgency && (
678
+ <PaymentItem
679
+ label={translation?.agencyFee}
680
+ amount={CommonService.currency(
681
+ agencyFee ? agencyFee : 0,
682
+ currencySign,
683
+ )}
684
+ className="text-[14px"
685
+ customStyle={{ color: colors?.agencyFeePriceColor }}
686
+ isBoldText={true}
687
+ />
661
688
  )}
662
- className="text-[14px"
663
- customStyle={{ color: colors?.agencyFeePriceColor }}
664
- isBoldText={true}
665
- />
666
- )}
667
689
 
668
- {walletMoney ? (
669
- <PaymentItem
670
- label={walletLabel}
671
- amount={
672
- isPeru
673
- ? CommonService.currencyFixed(walletMoney, currencySign)
674
- : CommonService.currency(walletMoney, currencySign)
675
- }
676
- className="text-[14px]"
677
- customStyle={{ color: "var(--secondary-color)" }}
678
- currency=""
679
- isBoldText={true}
680
- />
681
- ) : null}
690
+ {walletMoney ? (
691
+ <PaymentItem
692
+ label={walletLabel}
693
+ amount={
694
+ isPeru
695
+ ? CommonService.currencyFixed(walletMoney, currencySign)
696
+ : CommonService.currency(walletMoney, currencySign)
697
+ }
698
+ className="text-[14px]"
699
+ customStyle={{ color: "var(--secondary-color)" }}
700
+ currency=""
701
+ isBoldText={true}
702
+ />
703
+ ) : null}
682
704
 
683
- {virtualMoney ? (
684
- <PaymentItem
685
- label={
686
- <span
687
- className="secondary-text"
688
- style={{ color: "var(--secondary-color)" }}
689
- >{`${creditosLabel}(${virtualLimit}%)`}</span>
690
- }
691
- amount={CommonService.currency(virtualMoney, currencySign)}
692
- customStyle={{ color: "var(--secondary-color)" }}
693
- className="text-[14px]"
694
- currency=""
695
- isBoldText={true}
696
- />
697
- ) : null}
705
+ {virtualMoney ? (
706
+ <PaymentItem
707
+ label={
708
+ <span
709
+ className="secondary-text"
710
+ style={{ color: "var(--secondary-color)" }}
711
+ >{`${creditosLabel}(${virtualLimit}%)`}</span>
712
+ }
713
+ amount={CommonService.currency(virtualMoney, currencySign)}
714
+ customStyle={{ color: "var(--secondary-color)" }}
715
+ className="text-[14px]"
716
+ currency=""
717
+ isBoldText={true}
718
+ />
719
+ ) : null}
698
720
 
699
- {showUsd ? (
700
- <PaymentItem
701
- label={
702
- <span className="primary-text">{translation?.showUsd}</span>
703
- }
704
- amount={CommonService.currency(
705
- isAgency ? netFareInUsd + agencyFee : netFareInUsd,
706
- currencySign,
707
- )}
708
- currency="USD"
709
- customStyle={{ color: "var(--primary-color)" }}
710
- className="text-[14px]"
711
- isBoldText={true}
712
- />
713
- ) : null}
714
- </div>
715
- </div>
716
- <div
717
- className={` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[35px] pt-[50px] rounded-b-[14px] text-[14px]`}
718
- style={{ backgroundColor: colors?.bottomStripColor }}
719
- >
720
- <div className="flex justify-between items-center w-full text-[#fff]">
721
- <div className="bold-text">Total</div>
721
+ {showUsd ? (
722
+ <PaymentItem
723
+ label={
724
+ <span className="primary-text">
725
+ {translation?.showUsd}
726
+ </span>
727
+ }
728
+ amount={CommonService.currency(
729
+ isAgency ? netFareInUsd + agencyFee : netFareInUsd,
730
+ currencySign,
731
+ )}
732
+ currency="USD"
733
+ customStyle={{ color: "var(--primary-color)" }}
734
+ className="text-[14px]"
735
+ isBoldText={true}
736
+ />
737
+ ) : null}
738
+ </div>
739
+ </div>
722
740
  <div
723
- className="bold-text text-[14px] text-[#fff]"
724
- style={{
725
- minWidth: 80,
726
- display: "flex",
727
- justifyContent: "flex-end",
728
- }}
741
+ className={` text-[#fff] p-[10px_15px] text-left w-full flex items-center absolute -bottom-[35px] pt-[50px] rounded-b-[14px] text-[14px]`}
742
+ style={{ backgroundColor: colors?.bottomStripColor }}
729
743
  >
730
- {currency ? currency : ""}{" "}
731
- {CommonService.currency(
732
- isPeru
733
- ? Math.round((removeDiscountAtomValue ? 0 : netFare) * 100) /
734
- 100
735
- : removeDiscountAtomValue
736
- ? 0
737
- : netFare,
738
- currencySign,
739
- )}
744
+ <div className="flex justify-between items-center w-full text-[#fff]">
745
+ <div className="bold-text">Total</div>
746
+ <div
747
+ className="bold-text text-[14px] text-[#fff]"
748
+ style={{
749
+ minWidth: 80,
750
+ display: "flex",
751
+ justifyContent: "flex-end",
752
+ }}
753
+ >
754
+ {currency ? currency : ""}{" "}
755
+ {CommonService.currency(
756
+ isPeru
757
+ ? Math.round(
758
+ (removeDiscountAtomValue ? 0 : netFare) * 100,
759
+ ) / 100
760
+ : removeDiscountAtomValue
761
+ ? 0
762
+ : netFare,
763
+ currencySign,
764
+ )}
765
+ </div>
766
+ </div>
740
767
  </div>
741
768
  </div>
742
769
  </div>
743
- </div>
744
- </div>
770
+ )}
771
+ </>
745
772
  );
746
773
  };
747
774