kupos-ui-components-lib 3.0.5 → 3.0.7

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.
@@ -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,10 +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
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.operator_service_name) === "Pullman San Andrés"
350
- ? null
351
- : getSeatPrice()))),
354
+ } }, getSeatPrice()))),
352
355
  React.createElement("div", null,
353
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: {
354
357
  backgroundColor: serviceDetailsLoading || isSoldOut
@@ -47,9 +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.operator_service_name) === "Pullman San Andrés" &&
51
- (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
52
- ? null
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)
53
52
  : commonService.currency(type.fare, currencySign))));
54
53
  });
55
54
  return seatTypes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -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,10 +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
+ {getSeatPrice()}
642
643
  </div>
643
644
  </div>
644
645
  </div>
@@ -87,9 +87,13 @@ function ServiceItemMobile({
87
87
  className={"min-[420]:text-[13px] text-[11px] bold-text"}
88
88
  style={{ color: isSoldOut ? "#bbb" : colors.seatPriceColor }}
89
89
  >
90
- {serviceItem?.operator_service_name === "Pullman San Andrés" &&
90
+ {/* {serviceItem?.operator_service_name === "Pullman San Andrés" &&
91
91
  serviceItem?.available_seats <= 0
92
92
  ? null
93
+ : commonService.currency(type.fare, currencySign)} */}
94
+
95
+ {serviceItem?.available_seats <= 0 && !isPeru
96
+ ? commonService.currency(0, currencySign)
93
97
  : commonService.currency(type.fare, currencySign)}
94
98
  </span>
95
99
  </div>