kupos-ui-components-lib 10.3.8 → 10.3.9

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.
@@ -472,15 +472,10 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
472
472
  currency ? currency : "",
473
473
  " ",
474
474
  CommonService.currency(isPeru
475
- ? Math.round((removeDiscountAtomValue
476
- ? 0
477
- : isAgency
478
- ? netFare + agencyFee
479
- : netFare) * 100) / 100
475
+ ? Math.round((removeDiscountAtomValue ? 0 : netFare) * 100) /
476
+ 100
480
477
  : removeDiscountAtomValue
481
478
  ? 0
482
- : isAgency
483
- ? netFare + agencyFee
484
- : netFare, currencySign)))))));
479
+ : netFare, currencySign)))))));
485
480
  };
486
481
  export default PaymentSideBarDesktop;
@@ -259,15 +259,10 @@ const PaymentSideBarMobile = ({ serviceNameOnward, serviceNameReturn, metaData,
259
259
  currency ? currency : "",
260
260
  " ",
261
261
  CommonService.currency(isPeru
262
- ? Math.round((removeDiscountAtomValue
263
- ? 0
264
- : isAgency
265
- ? netFare + agencyFee
266
- : netFare) * 100) / 100
262
+ ? Math.round((removeDiscountAtomValue ? 0 : netFare) * 100) /
263
+ 100
267
264
  : removeDiscountAtomValue
268
265
  ? 0
269
- : isAgency
270
- ? netFare + agencyFee
271
- : netFare, currencySign)))))));
266
+ : netFare, currencySign)))))));
272
267
  };
273
268
  export default PaymentSideBarMobile;
@@ -82,7 +82,6 @@ function getSeatTypeIcon(label, serviceItem) {
82
82
  }
83
83
  function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currencySign, removeDuplicateSeats, selectedSeatKey, onSeatSelect, isPeru, serviceItem, renderIcon, dpSeatColor, discountSeatPriceColor, isSeatIcon, isTrain, topLabelColor, tooltipColor, }) {
84
84
  var _a;
85
- console.log("🚀 ~ SeatSection ~ serviceItem:", serviceItem);
86
85
  const uniqueSeats = getUniqueSeats(seatTypes, isTrain);
87
86
  const sortedSeatTypes = getSortedSeatTypes(seatTypes, isTrain);
88
87
  const numberOfSeats = getNumberOfSeats(seatTypes);
@@ -92,6 +91,7 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
92
91
  : CommonService.currency(price, currencySign);
93
92
  const renderSeatNames = () => {
94
93
  const seats = removeDuplicateSeats ? uniqueSeats : sortedSeatTypes;
94
+ console.log("🚀 ~ renderSeatNames ~ removeDuplicateSeats:", seats);
95
95
  return seats.map((val, key) => {
96
96
  return SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("div", { className: "flex items-center", style: isTrain ? { cursor: "pointer" } : undefined, onClick: isTrain && !isSoldOut
97
97
  ? () => val.label === selectedSeatKey
@@ -236,7 +236,7 @@ function SeatSection({ seatTypes, availableSeats, isSoldOut, priceColor, currenc
236
236
  height: "20px",
237
237
  marginRight: "5px",
238
238
  } })),
239
- CommonService.capitalize(seatLabel))) : (React.createElement("span", { className: "text-[13.33px]" }, "Desde")))));
239
+ CommonService.truncateSeatLabel(CommonService.capitalize(seatLabel), 15))) : (React.createElement("span", { className: "text-[13.33px]" }, "Desde")))));
240
240
  }
241
241
  return renderSeatNames();
242
242
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "10.3.8",
3
+ "version": "10.3.9",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -917,18 +917,11 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
917
917
  {currency ? currency : ""}{" "}
918
918
  {CommonService.currency(
919
919
  isPeru
920
- ? Math.round(
921
- (removeDiscountAtomValue
922
- ? 0
923
- : isAgency
924
- ? netFare + agencyFee
925
- : netFare) * 100,
926
- ) / 100
920
+ ? Math.round((removeDiscountAtomValue ? 0 : netFare) * 100) /
921
+ 100
927
922
  : removeDiscountAtomValue
928
923
  ? 0
929
- : isAgency
930
- ? netFare + agencyFee
931
- : netFare,
924
+ : netFare,
932
925
  currencySign,
933
926
  )}
934
927
  </div>
@@ -730,18 +730,11 @@ const PaymentSideBarMobile: React.FC<PaymentSideBarProps> = ({
730
730
  {currency ? currency : ""}{" "}
731
731
  {CommonService.currency(
732
732
  isPeru
733
- ? Math.round(
734
- (removeDiscountAtomValue
735
- ? 0
736
- : isAgency
737
- ? netFare + agencyFee
738
- : netFare) * 100,
739
- ) / 100
733
+ ? Math.round((removeDiscountAtomValue ? 0 : netFare) * 100) /
734
+ 100
740
735
  : removeDiscountAtomValue
741
736
  ? 0
742
- : isAgency
743
- ? netFare + agencyFee
744
- : netFare,
737
+ : netFare,
745
738
  currencySign,
746
739
  )}
747
740
  </div>
@@ -147,7 +147,6 @@ function SeatSection({
147
147
  topLabelColor,
148
148
  tooltipColor,
149
149
  }: SeatSectionProps): React.ReactElement {
150
- console.log("🚀 ~ SeatSection ~ serviceItem:", serviceItem);
151
150
  const uniqueSeats = getUniqueSeats(seatTypes, isTrain);
152
151
  const sortedSeatTypes = getSortedSeatTypes(seatTypes, isTrain);
153
152
  const numberOfSeats = getNumberOfSeats(seatTypes);
@@ -160,6 +159,7 @@ function SeatSection({
160
159
 
161
160
  const renderSeatNames = () => {
162
161
  const seats = removeDuplicateSeats ? uniqueSeats : sortedSeatTypes;
162
+ console.log("🚀 ~ renderSeatNames ~ removeDuplicateSeats:", seats);
163
163
 
164
164
  return seats.map((val, key: number) => {
165
165
  return SEAT_EXCEPTIONS.includes(val.label) ? null : (
@@ -444,7 +444,10 @@ function SeatSection({
444
444
  }}
445
445
  />
446
446
  )}
447
- {CommonService.capitalize(seatLabel)}
447
+ {CommonService.truncateSeatLabel(
448
+ CommonService.capitalize(seatLabel),
449
+ 15,
450
+ )}
448
451
  </span>
449
452
  ) : (
450
453
  <span className="text-[13.33px]">Desde</span>