@widergy/utilitygo-smart-bill-web 3.5.1 → 3.5.3
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 +15 -0
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +1 -1
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +3 -3
- package/dist/components/MainBillData/components/BillHeader/index.js +1 -1
- package/dist/components/MainBillData/components/BillHeader/styles.module.scss +0 -3
- package/dist/components/Period/index.js +3 -2
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/CurrentConsumption/components/ConsumptionComparison/index.js +3 -2
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/CurrentConsumption/components/ConsumptionComparison/styles.module.scss +4 -0
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/CurrentConsumption/components/ConsumptionEvolution/index.js +5 -3
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/CurrentConsumption/components/ConsumptionEvolution/utils.js +2 -1
- package/dist/constants/testsIds.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [3.5.3](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.5.2...v3.5.3) (2025-05-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* smartbill consumption comparison ([#48](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/48)) ([395d61d](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/395d61d3d6094ffc78b91f3283ffa448067f3532))
|
|
7
|
+
|
|
8
|
+
## [3.5.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.5.1...v3.5.2) (2025-04-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [AUT-657] key fixes ([1bfa01e](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/1bfa01e2d1cc495d63d7f62a1ebf27c6d848f697))
|
|
14
|
+
* [AUT-657] test ids fixes ([afc08f6](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/afc08f61d10843974d70d044c8993dcdcd9254a6))
|
|
15
|
+
|
|
1
16
|
## [3.5.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.5.0...v3.5.1) (2025-04-30)
|
|
2
17
|
|
|
3
18
|
|
|
@@ -39,7 +39,7 @@ const ClientData = _ref => {
|
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
40
40
|
alias: _aliases.TITLE,
|
|
41
41
|
className: _stylesModule.default.title,
|
|
42
|
-
dataTestId: _testsIds.smartBill
|
|
42
|
+
dataTestId: _testsIds.smartBill.clientData.clientDataTitle
|
|
43
43
|
}, texts.mainBillData.clientDataTitle), /*#__PURE__*/_react.default.createElement(_IconAndDetails.default, {
|
|
44
44
|
classes: {
|
|
45
45
|
container: _stylesModule.default.iconAndDetailsContainer
|
|
@@ -61,7 +61,7 @@ const ReadingDetails = _ref => {
|
|
|
61
61
|
classes: {
|
|
62
62
|
container: _stylesModule.default.iconDetail
|
|
63
63
|
},
|
|
64
|
-
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.
|
|
64
|
+
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.readingType,
|
|
65
65
|
descriptionText: texts.mainBillData.readingType,
|
|
66
66
|
Icon: assets.ReadingTypeGenericIcon,
|
|
67
67
|
mainAlias: _aliases.MAIN_LIGHT,
|
|
@@ -74,7 +74,7 @@ const ReadingDetails = _ref => {
|
|
|
74
74
|
classes: {
|
|
75
75
|
container: _stylesModule.default.leftItems
|
|
76
76
|
},
|
|
77
|
-
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.
|
|
77
|
+
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.transformationCenter,
|
|
78
78
|
descriptionText: texts.mainBillData.transformationCenter,
|
|
79
79
|
Icon: assets.TransformationAndFeederCenterIcon,
|
|
80
80
|
mainAlias: _aliases.MAIN_LIGHT,
|
|
@@ -85,7 +85,7 @@ const ReadingDetails = _ref => {
|
|
|
85
85
|
classes: {
|
|
86
86
|
container: _stylesModule.default.iconDetail
|
|
87
87
|
},
|
|
88
|
-
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.
|
|
88
|
+
dataTestId: _testsIds.smartBill.mainBillData.billBody.readingDetails.iconAndDetails.feederLine,
|
|
89
89
|
descriptionText: texts.mainBillData.feederCenter,
|
|
90
90
|
Icon: assets.TransformationAndFeederCenterIcon,
|
|
91
91
|
mainAlias: _aliases.MAIN_LIGHT,
|
|
@@ -79,7 +79,7 @@ const BillHeader = _ref => {
|
|
|
79
79
|
text: texts.Base.issuedOnDate
|
|
80
80
|
})), isDesktopSize && debtStatusValidation && /*#__PURE__*/_react.default.createElement(DebtStatusLabel, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
81
81
|
className: _stylesModule.default.debtStatusLabelMobile
|
|
82
|
-
}, isMobileOrTablet && debtStatusValidation && /*#__PURE__*/_react.default.createElement(DebtStatusLabel, null))), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
+
}, isMobileOrTablet && debtStatusValidation && /*#__PURE__*/_react.default.createElement(DebtStatusLabel, null))), !isDesktopSize && /*#__PURE__*/_react.default.createElement("div", {
|
|
83
83
|
className: _stylesModule.default.periodContainer
|
|
84
84
|
}, /*#__PURE__*/_react.default.createElement(_Period.default, {
|
|
85
85
|
currentPeriod: currentPeriod,
|
|
@@ -95,7 +95,7 @@ const Period = _ref => {
|
|
|
95
95
|
content: texts.mainBillData.periodTooltip,
|
|
96
96
|
dataTestId: _testsIds.smartBill.period.periodTooltip
|
|
97
97
|
}, /*#__PURE__*/_react.default.createElement(assets.QuestionsIcon, {
|
|
98
|
-
|
|
98
|
+
"data-testid": _testsIds.smartBill.period.tooltipIcon,
|
|
99
99
|
style: {
|
|
100
100
|
fill: colors.tooltipIcon
|
|
101
101
|
}
|
|
@@ -130,6 +130,7 @@ const Period = _ref => {
|
|
|
130
130
|
}, `${(0, _utils.stringOrDash)(year)} - ${period} ${(0, _utils.numberOrDash)(currentSettlement)}`), issuedOnDateLabel)), debtStatusValidation && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
131
|
className: _stylesModule.default.debtState
|
|
132
132
|
}, /*#__PURE__*/_react.default.createElement(_DebtState.default, {
|
|
133
|
+
dataTestId: _testsIds.smartBill.period.debtState,
|
|
133
134
|
debtStatusLabel: debtStatusLabel,
|
|
134
135
|
isWarning: billData?.warning
|
|
135
136
|
}))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -152,7 +153,7 @@ const Period = _ref => {
|
|
|
152
153
|
content: texts.mainBillData.periodTooltip,
|
|
153
154
|
dataTestId: _testsIds.smartBill.period.periodTooltip
|
|
154
155
|
}, /*#__PURE__*/_react.default.createElement(assets.QuestionsIcon, {
|
|
155
|
-
|
|
156
|
+
"data-testid": _testsIds.smartBill.period.tooltipIcon,
|
|
156
157
|
style: {
|
|
157
158
|
fill: colors.tooltipIcon
|
|
158
159
|
}
|
|
@@ -20,11 +20,12 @@ const ConsumptionComparison = _ref => {
|
|
|
20
20
|
} = _ref;
|
|
21
21
|
const maxValue = (0, _utils.getMaxValue)(periodsToCompare);
|
|
22
22
|
const title = texts?.consumptions?.comparisonTitle;
|
|
23
|
+
const showComparison = periodsToCompare?.length > 1;
|
|
23
24
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
24
|
-
className: _stylesModule.default.consumptionComparisonLabel,
|
|
25
25
|
colorTheme: "gray",
|
|
26
|
+
className: showComparison ? _stylesModule.default.consumptionComparisonLabel : _stylesModule.default.consumptionComparisonLabelNoData,
|
|
26
27
|
variant: "small"
|
|
27
|
-
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
}, title), showComparison && /*#__PURE__*/_react.default.createElement("div", {
|
|
28
29
|
className: _stylesModule.default.container
|
|
29
30
|
}, periodsToCompare.map(_ref2 => {
|
|
30
31
|
let {
|
|
@@ -32,7 +32,9 @@ const ConsumptionEvolution = _ref => {
|
|
|
32
32
|
icon,
|
|
33
33
|
Image,
|
|
34
34
|
percentage,
|
|
35
|
-
period
|
|
35
|
+
period,
|
|
36
|
+
shade = '04',
|
|
37
|
+
size = 24
|
|
36
38
|
} = (0, _utils.getConsumptionComparison)(backgroundImages, consumptionEvolutionLabels, periods);
|
|
37
39
|
return /*#__PURE__*/_react.default.createElement(_energyUi.UTActionCard, {
|
|
38
40
|
BackgroundImage: Image,
|
|
@@ -54,8 +56,8 @@ const ConsumptionEvolution = _ref => {
|
|
|
54
56
|
area: true,
|
|
55
57
|
colorTheme: colorTheme,
|
|
56
58
|
name: icon,
|
|
57
|
-
shade:
|
|
58
|
-
size:
|
|
59
|
+
shade: shade,
|
|
60
|
+
size: size
|
|
59
61
|
}), percentage && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
60
62
|
colorTheme: colorTheme,
|
|
61
63
|
variant: "title2",
|
|
@@ -42,7 +42,8 @@ const getConsumptionComparison = (backgroundImages, labels, periods) => {
|
|
|
42
42
|
icon: 'IconEyeOff',
|
|
43
43
|
Image: LightEvolutionImage,
|
|
44
44
|
percentage: null,
|
|
45
|
-
period: noData
|
|
45
|
+
period: noData,
|
|
46
|
+
shade: '05'
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
const percentageChange = previousConsumption === 0 && currentConsumption === 0 ? 0 : previousConsumption !== 0 ? (currentConsumption - previousConsumption) / previousConsumption * 100 : 100;
|
|
@@ -124,6 +124,7 @@ const smartBill = exports.smartBill = {
|
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
period: {
|
|
127
|
+
debtState: `${ID_CONSTANTS.SMART_BILL}.${ID_CONSTANTS.PERIOD}.debtState`,
|
|
127
128
|
periodLabel: `${ID_CONSTANTS.SMART_BILL}.${ID_CONSTANTS.PERIOD}.periodLabel`,
|
|
128
129
|
periodTooltip: `${ID_CONSTANTS.SMART_BILL}.${ID_CONSTANTS.PERIOD}.periodTooltip`,
|
|
129
130
|
tooltipIcon: `${ID_CONSTANTS.SMART_BILL}.${ID_CONSTANTS.PERIOD}.tooltipIcon`
|