kupos-ui-components-lib 3.0.4 → 3.0.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.
@@ -339,13 +339,15 @@ function ServiceItemPB({ serviceItem, onBookButtonPress, colors, metaData, child
339
339
  React.createElement("div", { className: `relative flex gap-[10px] text-[13.33px] justify-between min-h-[2.5rem] ${getNumberOfSeats() < 3 ? "" : ""}`, style: getNumberOfSeats() < 2 ? { alignItems: "center" } : {} },
340
340
  React.createElement("div", { className: "flex flex-col justify-between" }, getSeatNames()),
341
341
  React.createElement("div", { className: "flex flex-col justify-between absolute inset-y-0 right-0 left-1/2 h-full", style: {
342
- color: isSoldOut ? "#c0c0c0" : colors.seatPriceColor,
342
+ color: isSoldOut ? "#c0c0c0" : colors.priceColor,
343
343
  top: 0,
344
344
  bottom: 0,
345
345
  left: "70%",
346
346
  right: 0,
347
347
  justifyContent: getNumberOfSeats() < 2 ? "center" : "",
348
- } }, getSeatPrice()))),
348
+ } }, (serviceItem === null || serviceItem === void 0 ? void 0 : serviceItem.available_seats) <= 0
349
+ ? `${currencySign}0`
350
+ : getSeatPrice()))),
349
351
  React.createElement("div", null,
350
352
  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: {
351
353
  backgroundColor: serviceDetailsLoading || isSoldOut
@@ -47,7 +47,9 @@ 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 } }, commonService.currency(type.fare, currencySign))));
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`
52
+ : commonService.currency(type.fare, currencySign))));
51
53
  });
52
54
  return seatTypes;
53
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -627,7 +627,7 @@ function ServiceItemPB({
627
627
  <div
628
628
  className="flex flex-col justify-between absolute inset-y-0 right-0 left-1/2 h-full"
629
629
  style={{
630
- color: isSoldOut ? "#c0c0c0" : colors.seatPriceColor,
630
+ color: isSoldOut ? "#c0c0c0" : colors.priceColor,
631
631
  top: 0,
632
632
  bottom: 0,
633
633
  left: "70%",
@@ -635,7 +635,13 @@ function ServiceItemPB({
635
635
  justifyContent: getNumberOfSeats() < 2 ? "center" : "",
636
636
  }}
637
637
  >
638
- {getSeatPrice()}
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()}
639
645
  </div>
640
646
  </div>
641
647
  </div>
@@ -87,7 +87,14 @@ function ServiceItemMobile({
87
87
  className={"min-[420]:text-[13px] text-[11px] bold-text"}
88
88
  style={{ color: isSoldOut ? "#bbb" : colors.seatPriceColor }}
89
89
  >
90
- {commonService.currency(type.fare, currencySign)}
90
+ {/* {serviceItem?.operator_service_name === "Pullman San Andrés" &&
91
+ serviceItem?.available_seats <= 0
92
+ ? null
93
+ : commonService.currency(type.fare, currencySign)} */}
94
+
95
+ {serviceItem?.available_seats <= 0
96
+ ? `${currencySign}0`
97
+ : commonService.currency(type.fare, currencySign)}
91
98
  </span>
92
99
  </div>
93
100
  )