@widergy/utilitygo-smart-bill-web 3.24.3 → 3.25.0
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.
- package/CHANGELOG.md +14 -0
- package/dist/components/SmartBillSummary/index.js +5 -1
- package/dist/components/SmartBillSummary/tabs/components/RateCard/components/ProgressBar/index.js +3 -2
- package/dist/components/SmartBillSummary/tabs/components/RateCard/index.js +1 -1
- package/dist/components/SmartBillSummary/tabs/components/SecondHeader/index.js +27 -3
- package/dist/components/SmartBillSummary/tabs/components/SecondHeader/styles.module.scss +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [3.25.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.4...v3.25.0) (2026-04-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add more data in second header ([#91](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/91)) ([114f053](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/114f053f7e9a8f57754484de2c36f6ced1ecca5f))
|
|
7
|
+
|
|
8
|
+
## [3.24.4](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.3...v3.24.4) (2026-04-22)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* crash ([#90](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/90)) ([19b16e0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/19b16e081535e1082e307f91edadaf889d756556))
|
|
14
|
+
|
|
1
15
|
## [3.24.3](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.24.2...v3.24.3) (2026-04-14)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -170,7 +170,11 @@ const SmartBillSummary = _ref => {
|
|
|
170
170
|
city: smartBill.client?.city,
|
|
171
171
|
district: smartBill.client?.district,
|
|
172
172
|
supplyAddressHelpText: translations.billingTab.secondHeader?.supplyAddressHelpText,
|
|
173
|
-
clientNumberFormatter: utils?.formatters?.clientNumberFormatter
|
|
173
|
+
clientNumberFormatter: utils?.formatters?.clientNumberFormatter,
|
|
174
|
+
rate: smartBill.client?.rate?.description,
|
|
175
|
+
rateHelpText: translations.billingTab.secondHeader?.rateHelpText,
|
|
176
|
+
ivaCondition: smartBill.client?.iva_condition,
|
|
177
|
+
ivaConditionHelpText: translations.billingTab.secondHeader?.ivaConditionHelpText
|
|
174
178
|
}), _constants.TAB_COMPONENT_MAPPER?.[currentTab]?.({
|
|
175
179
|
assets,
|
|
176
180
|
billingLayout,
|
package/dist/components/SmartBillSummary/tabs/components/RateCard/components/ProgressBar/index.js
CHANGED
|
@@ -28,8 +28,8 @@ const ProgressBar = _ref => {
|
|
|
28
28
|
const {
|
|
29
29
|
LinearProgress
|
|
30
30
|
} = components;
|
|
31
|
-
const lastRange = data[data.length - 1]?.range[1];
|
|
32
|
-
const totalRange = lastRange === 'Infinity' ? data[data.length - 2]?.range[1] * 1.5 : lastRange;
|
|
31
|
+
const lastRange = data[data.length - 1]?.range?.[1];
|
|
32
|
+
const totalRange = lastRange === 'Infinity' ? (data[data.length - 2]?.range?.[1] ?? 0) * 1.5 : lastRange;
|
|
33
33
|
const progressOverlayValue = (0, _utils.getProgressOverlayValue)(specificRate, totalRange, value);
|
|
34
34
|
const isOverLimit = value > limitValue;
|
|
35
35
|
const {
|
|
@@ -63,6 +63,7 @@ const ProgressBar = _ref => {
|
|
|
63
63
|
range,
|
|
64
64
|
name
|
|
65
65
|
} = _ref2;
|
|
66
|
+
if (!Array.isArray(range)) return null;
|
|
66
67
|
const isLast = range[1] === 'Infinity';
|
|
67
68
|
const width = isLast ? '20%' : `${range[1] / totalRange * 100}%`;
|
|
68
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -87,7 +87,7 @@ const RateCard = _ref => {
|
|
|
87
87
|
let {
|
|
88
88
|
range
|
|
89
89
|
} = _ref4;
|
|
90
|
-
return range[1] >= totalConsumption;
|
|
90
|
+
return Array.isArray(range) && range[1] >= totalConsumption;
|
|
91
91
|
});
|
|
92
92
|
const currentRate = rates[currentIndex] ?? {};
|
|
93
93
|
const startRateValue = Array.isArray(currentRate?.range) && currentRate.range[0];
|
|
@@ -17,7 +17,11 @@ const SecondHeader = _ref => {
|
|
|
17
17
|
city,
|
|
18
18
|
district,
|
|
19
19
|
supplyAddressHelpText,
|
|
20
|
-
clientNumberFormatter
|
|
20
|
+
clientNumberFormatter,
|
|
21
|
+
rate,
|
|
22
|
+
rateHelpText,
|
|
23
|
+
ivaCondition,
|
|
24
|
+
ivaConditionHelpText
|
|
21
25
|
} = _ref;
|
|
22
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
27
|
className: _stylesModule.default.secondHeader
|
|
@@ -39,7 +43,23 @@ const SecondHeader = _ref => {
|
|
|
39
43
|
}, `${city} - ${district}`), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
40
44
|
colorTheme: "gray",
|
|
41
45
|
variant: "small"
|
|
42
|
-
}, supplyAddressHelpText))
|
|
46
|
+
}, supplyAddressHelpText)), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: _stylesModule.default.rateIva
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
49
|
+
variant: "small",
|
|
50
|
+
weight: "bold"
|
|
51
|
+
}, rate), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
52
|
+
colorTheme: "gray",
|
|
53
|
+
variant: "small"
|
|
54
|
+
}, rateHelpText)), /*#__PURE__*/_react.default.createElement("div", {
|
|
55
|
+
className: _stylesModule.default.rateIva
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
57
|
+
variant: "small",
|
|
58
|
+
weight: "bold"
|
|
59
|
+
}, ivaCondition), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
60
|
+
colorTheme: "gray",
|
|
61
|
+
variant: "small"
|
|
62
|
+
}, ivaConditionHelpText)));
|
|
43
63
|
};
|
|
44
64
|
SecondHeader.propTypes = {
|
|
45
65
|
accountNumber: _propTypes.string,
|
|
@@ -48,6 +68,10 @@ SecondHeader.propTypes = {
|
|
|
48
68
|
city: _propTypes.string,
|
|
49
69
|
district: _propTypes.string,
|
|
50
70
|
supplyAddressHelpText: _propTypes.string,
|
|
51
|
-
clientNumberFormatter: _propTypes.func
|
|
71
|
+
clientNumberFormatter: _propTypes.func,
|
|
72
|
+
rate: _propTypes.string,
|
|
73
|
+
rateHelpText: _propTypes.string,
|
|
74
|
+
ivaCondition: _propTypes.string,
|
|
75
|
+
ivaConditionHelpText: _propTypes.string
|
|
52
76
|
};
|
|
53
77
|
var _default = exports.default = SecondHeader;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
box-shadow: var(--shadowGrayBottom1);
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-wrap: wrap;
|
|
10
|
-
|
|
11
|
-
justify-content:
|
|
10
|
+
gap: 16px;
|
|
11
|
+
justify-content: space-between;
|
|
12
12
|
padding: 24px 48px;
|
|
13
13
|
margin: 16px 32px 0 32px;
|
|
14
14
|
|
|
@@ -38,3 +38,10 @@
|
|
|
38
38
|
text-align: left;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
.rateIva {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
align-items: flex-start;
|
|
46
|
+
grid-gap: 4px;
|
|
47
|
+
}
|