kupos-ui-components-lib 10.4.35 → 10.4.37
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import greenArt from "../../assets/images/discount/
|
|
1
|
+
import greenArt from "../../assets/images/discount/instant.png";
|
|
2
2
|
import yellowArt from "../../assets/images/discount/yellow.png";
|
|
3
3
|
import blueArt from "../../assets/images/discount/blue.png";
|
|
4
4
|
import lastMinuteArt from "../../assets/images/discount/last.png";
|
|
@@ -7,7 +7,6 @@ import cashbackArt from "../../assets/images/discount/cash.png";
|
|
|
7
7
|
import roundTripArt from "../../assets/images/discount/round.png";
|
|
8
8
|
import promoCodeArt from "../../assets/images/discount/promo.png";
|
|
9
9
|
import seatLevelArt from "../../assets/images/discount/seat.png";
|
|
10
|
-
import instantArt from "../../assets/images/discount/instant.png";
|
|
11
10
|
export function toImageUrl(art) {
|
|
12
11
|
if (typeof art === "string")
|
|
13
12
|
return art;
|
|
@@ -34,5 +33,5 @@ export const CAMPAIGN_ART = {
|
|
|
34
33
|
round_trip: { image: toImageUrl(roundTripArt), accent: "#5C8A00" },
|
|
35
34
|
instant_discount: { image: toImageUrl(promoCodeArt), accent: "#E08A00" },
|
|
36
35
|
seat_level: { image: toImageUrl(seatLevelArt), accent: "#B87500" },
|
|
37
|
-
promo_code: { image: toImageUrl(
|
|
36
|
+
promo_code: { image: toImageUrl(seatLevelArt), accent: "#B87500" },
|
|
38
37
|
};
|
|
@@ -48,7 +48,8 @@ function getServiceDiscount(service) {
|
|
|
48
48
|
service.discount_value > 0) {
|
|
49
49
|
return { type: "percentage", amount: Number(service.discount_value) };
|
|
50
50
|
}
|
|
51
|
-
if ((service === null || service === void 0 ? void 0 : service.discount_type) === "fixed"
|
|
51
|
+
if (((service === null || service === void 0 ? void 0 : service.discount_type) === "fixed" ||
|
|
52
|
+
(service === null || service === void 0 ? void 0 : service.discount_type) === "fixed_price") &&
|
|
52
53
|
(service === null || service === void 0 ? void 0 : service.discount_value) != null &&
|
|
53
54
|
service.discount_value > 0) {
|
|
54
55
|
const rawDiscount = Number(service.discount_value);
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import greenArt from "../../assets/images/discount/
|
|
1
|
+
import greenArt from "../../assets/images/discount/instant.png";
|
|
2
2
|
import yellowArt from "../../assets/images/discount/yellow.png";
|
|
3
3
|
import blueArt from "../../assets/images/discount/blue.png";
|
|
4
4
|
import lastMinuteArt from "../../assets/images/discount/last.png";
|
|
@@ -38,5 +38,5 @@ export const CAMPAIGN_ART: Record<string, { image: string; accent: string }> = {
|
|
|
38
38
|
round_trip: { image: toImageUrl(roundTripArt), accent: "#5C8A00" },
|
|
39
39
|
instant_discount: { image: toImageUrl(promoCodeArt), accent: "#E08A00" },
|
|
40
40
|
seat_level: { image: toImageUrl(seatLevelArt), accent: "#B87500" },
|
|
41
|
-
promo_code: { image: toImageUrl(
|
|
41
|
+
promo_code: { image: toImageUrl(seatLevelArt), accent: "#B87500" },
|
|
42
42
|
};
|