kupos-ui-components-lib 3.0.6 → 3.0.8

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.
@@ -166,7 +166,7 @@ const PaymentSideBarDesktop = ({ serviceNameOnward, serviceNameReturn, metaData,
166
166
  React.createElement("span", { className: "promo-remove", onClick: onPromoRemove },
167
167
  React.createElement("img", { src: icons === null || icons === void 0 ? void 0 : icons.closeIcon, alt: "close", className: "w-[16px] h-[16px]" })))) : null,
168
168
  isAgency && (React.createElement(PaymentItem, { label: translation === null || translation === void 0 ? void 0 : translation.agencyFee, amount: CommonService.currency(agencyFee ? agencyFee : 0, currencySign), currency: "", customStyle: { color: colors === null || colors === void 0 ? void 0 : colors.agencyFeePriceColor } })),
169
- walletMoney ? (React.createElement(PaymentItem, { label: walletLabel, amount: CommonService.currency(walletMoney, currencySign) })) : null,
169
+ walletMoney ? (React.createElement(PaymentItem, { label: walletLabel, amount: CommonService.currency(walletMoney, currencySign), currency: "" })) : null,
170
170
  virtualMoney ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "secondary-text " }, `${creditosLabel}(${virtualLimit}%)`), amount: CommonService.currency(virtualMoney, currencySign), customStyle: { color: "var(--secondary-color)" }, currency: "" })) : null,
171
171
  showUsd ? (React.createElement(PaymentItem, { label: React.createElement("span", { className: "secondary-text" }, translation === null || translation === void 0 ? void 0 : translation.showUsd), className: "text-[13.33px]", amount: CommonService.currency(isAgency ? netFareInUsd + agencyFee : netFareInUsd, currencySign), currency: "USD", customStyle: { color: "var(--secondary-color)" } })) : null),
172
172
  React.createElement("div", { className: ` text-white p-[10px_15px] text-left w-full flex items-center absolute -bottom-[9%] pt-[50px] -z-10 rounded-b-[14px] text-[14px]`, style: { backgroundColor: colors === null || colors === void 0 ? void 0 : colors.bottomStripColor } },
@@ -194,11 +194,17 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
194
194
  };
195
195
  const getSeatPrice = () => {
196
196
  const sortedSeatTypes = getSortedSeatTypes();
197
- return sortedSeatTypes.map((val, key) => SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: "flex items-center text-[13.33px] bold-text" }, typeof val.price === "string"
198
- ? CommonService.currency(val.price, currencySign)
199
- : typeof val.price === "number"
200
- ? CommonService.currency(val.price, currencySign)
201
- : null)));
197
+ return sortedSeatTypes.map((val, key) => {
198
+ return SEAT_EXCEPTIONS.includes(val.label) ? null : (React.createElement("span", { key: key, className: "flex items-center text-[13.33px] bold-text" }, typeof val.price === "string"
199
+ ? (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
200
+ ? CommonService.currency(0, currencySign)
201
+ : CommonService.currency(val.price, currencySign)
202
+ : typeof val.price === "number"
203
+ ? (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
204
+ ? CommonService.currency(0, currencySign)
205
+ : CommonService.currency(val.price, currencySign)
206
+ : null));
207
+ });
202
208
  };
203
209
  const getFilteredSeats = (item) => {
204
210
  return item;
@@ -345,9 +351,7 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
345
351
  left: "70%",
346
352
  right: 0,
347
353
  justifyContent: getNumberOfSeats() < 2 ? "center" : "",
348
- } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
349
- ? `${currencySign}0`
350
- : getSeatPrice()))),
354
+ } }, getSeatPrice()))),
351
355
  React.createElement("div", null,
352
356
  React.createElement("button", { onClick: () => (!isSoldOut ? checkMidnight() : null), disabled: serviceDetailsLoading, className: `w-full ${serviceDetailsLoading || isSoldOut ? "py-[12px]" : "py-[12px]"} text-[13.33px] font-bold text-white rounded-[10px] border-none px-[20px] flex items-center justify-center`, style: {
353
357
  backgroundColor: serviceDetailsLoading || isSoldOut
@@ -47,8 +47,8 @@ function ServiceItemMobile({ serviceItem, onBookButtonPress, colors, busStage, o
47
47
  // marginLeft: "10px",
48
48
  color: isSoldOut ? "#bbb" : "#464647",
49
49
  } }, type.label),
50
- React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] bold-text", style: { color: isSoldOut ? "#bbb" : colors.seatPriceColor } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
51
- ? `${currencySign}0`
50
+ React.createElement("span", { className: "min-[420]:text-[13px] text-[11px] bold-text", style: { color: isSoldOut ? "#bbb" : colors.seatPriceColor } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0 && !isPeru
51
+ ? commonService.currency(0, currencySign)
52
52
  : commonService.currency(type.fare, currencySign))));
53
53
  });
54
54
  return seatTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -429,6 +429,7 @@ const PaymentSideBarDesktop: React.FC<PaymentSideBarProps> = ({
429
429
  <PaymentItem
430
430
  label={walletLabel}
431
431
  amount={CommonService.currency(walletMoney, currencySign)}
432
+ currency=""
432
433
  />
433
434
  ) : null}
434
435
 
@@ -294,17 +294,21 @@ function ServiceItemPB({
294
294
 
295
295
  const getSeatPrice = () => {
296
296
  const sortedSeatTypes = getSortedSeatTypes();
297
- return sortedSeatTypes.map((val, key: number) =>
298
- SEAT_EXCEPTIONS.includes(val.label) ? null : (
297
+ return sortedSeatTypes.map((val, key: number) => {
298
+ return SEAT_EXCEPTIONS.includes(val.label) ? null : (
299
299
  <span key={key} className="flex items-center text-[13.33px] bold-text">
300
300
  {typeof val.price === "string"
301
- ? CommonService.currency(val.price, currencySign)
301
+ ? serviceItem?.available_seats <= 0
302
+ ? CommonService.currency(0, currencySign)
303
+ : CommonService.currency(val.price, currencySign)
302
304
  : typeof val.price === "number"
303
- ? CommonService.currency(val.price, currencySign)
305
+ ? serviceItem?.available_seats <= 0
306
+ ? CommonService.currency(0, currencySign)
307
+ : CommonService.currency(val.price, currencySign)
304
308
  : null}
305
309
  </span>
306
- )
307
- );
310
+ );
311
+ });
308
312
  };
309
313
 
310
314
  const getFilteredSeats = (item) => {
@@ -635,13 +639,7 @@ function ServiceItemPB({
635
639
  justifyContent: getNumberOfSeats() < 2 ? "center" : "",
636
640
  }}
637
641
  >
638
- {/* {serviceItem?.available_seats <= 0 &&
639
- serviceItem?.operator_service_name === "Pullman San Andrés"
640
- ? null
641
- : getSeatPrice()} */}
642
- {serviceItem?.available_seats <= 0
643
- ? `${currencySign}0`
644
- : getSeatPrice()}
642
+ {getSeatPrice()}
645
643
  </div>
646
644
  </div>
647
645
  </div>
@@ -92,8 +92,8 @@ function ServiceItemMobile({
92
92
  ? null
93
93
  : commonService.currency(type.fare, currencySign)} */}
94
94
 
95
- {serviceItem?.available_seats <= 0
96
- ? `${currencySign}0`
95
+ {serviceItem?.available_seats <= 0 && !isPeru
96
+ ? commonService.currency(0, currencySign)
97
97
  : commonService.currency(type.fare, currencySign)}
98
98
  </span>
99
99
  </div>