@widergy/utilitygo-smart-bill-web 3.14.1 → 3.14.2
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 +7 -0
- package/dist/components/SmartBillSummary/index.js +6 -3
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/Billing/constants.js +4 -2
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/Billing/index.js +6 -4
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/Billing/utils.js +11 -1
- package/dist/components/SmartBillSummary/tabs/Consumptions/index.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.14.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.14.1...v3.14.2) (2025-10-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* [EVEP-179] monthly comsumption ([#67](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/67)) ([5e1ea8a](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/5e1ea8ac9dca1fd52d2fe0a02b4d4962bffd0481))
|
|
7
|
+
|
|
1
8
|
## [3.14.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.14.0...v3.14.1) (2025-10-14)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -36,7 +36,8 @@ const SmartBillSummary = _ref => {
|
|
|
36
36
|
smartBill,
|
|
37
37
|
tabOptions,
|
|
38
38
|
translations,
|
|
39
|
-
utils
|
|
39
|
+
utils,
|
|
40
|
+
periodSpan
|
|
40
41
|
} = _ref;
|
|
41
42
|
const {
|
|
42
43
|
aiQuestionsList,
|
|
@@ -169,7 +170,8 @@ const SmartBillSummary = _ref => {
|
|
|
169
170
|
reverseRow,
|
|
170
171
|
smartBill,
|
|
171
172
|
translations,
|
|
172
|
-
utils
|
|
173
|
+
utils,
|
|
174
|
+
periodSpan
|
|
173
175
|
})), aiQuestionsPanelEnabled && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_energyUi.UTTooltip, {
|
|
174
176
|
arrow: false,
|
|
175
177
|
content: isDesktopSize ? widyTooltipContent : '',
|
|
@@ -235,6 +237,7 @@ SmartBillSummary.propTypes = {
|
|
|
235
237
|
value: _propTypes.string
|
|
236
238
|
})),
|
|
237
239
|
translations: _propTypes.object,
|
|
238
|
-
utils: _propTypes.object
|
|
240
|
+
utils: _propTypes.object,
|
|
241
|
+
periodSpan: _propTypes.string
|
|
239
242
|
};
|
|
240
243
|
var _default = exports.default = SmartBillSummary;
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TAG_ICON_SIZE = exports.RIGHT_UNIT_ALIGNMENT = exports.DEFAULT_TAG_ICON = exports.DEFAULT_TAG_COLOR_THEME = void 0;
|
|
6
|
+
exports.TAG_ICON_SIZE = exports.RIGHT_UNIT_ALIGNMENT = exports.MONTHLY_SPAN = exports.DEFAULT_TAG_ICON = exports.DEFAULT_TAG_COLOR_THEME = exports.BIMESTRAL_SPAN = void 0;
|
|
7
7
|
const DEFAULT_TAG_ICON = exports.DEFAULT_TAG_ICON = 'IconCalendarEvent';
|
|
8
8
|
const TAG_ICON_SIZE = exports.TAG_ICON_SIZE = 14;
|
|
9
9
|
const DEFAULT_TAG_COLOR_THEME = exports.DEFAULT_TAG_COLOR_THEME = 'gray';
|
|
10
|
-
const RIGHT_UNIT_ALIGNMENT = exports.RIGHT_UNIT_ALIGNMENT = 'right';
|
|
10
|
+
const RIGHT_UNIT_ALIGNMENT = exports.RIGHT_UNIT_ALIGNMENT = 'right';
|
|
11
|
+
const BIMESTRAL_SPAN = exports.BIMESTRAL_SPAN = 'bimestral';
|
|
12
|
+
const MONTHLY_SPAN = exports.MONTHLY_SPAN = 'monthly';
|
|
@@ -18,7 +18,8 @@ const Billing = _ref => {
|
|
|
18
18
|
smartBill,
|
|
19
19
|
texts,
|
|
20
20
|
unitAlignment = _constants.RIGHT_UNIT_ALIGNMENT,
|
|
21
|
-
unit
|
|
21
|
+
unit,
|
|
22
|
+
periodSpan = _constants.BIMESTRAL_SPAN
|
|
22
23
|
} = _ref;
|
|
23
24
|
const {
|
|
24
25
|
title,
|
|
@@ -27,12 +28,12 @@ const Billing = _ref => {
|
|
|
27
28
|
periodDetail
|
|
28
29
|
} = texts?.billing || {};
|
|
29
30
|
const currentPeriod = smartBill?.periods?.find(period => period.current);
|
|
30
|
-
const billingsToShow = (0, _utils.getBillingsToShow)(currentPeriod?.settlements);
|
|
31
|
+
const billingsToShow = (0, _utils.getBillingsToShow)(currentPeriod?.settlements, periodSpan);
|
|
31
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
32
33
|
className: _stylesModule.default.container
|
|
33
34
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
34
35
|
colorTheme: "gray",
|
|
35
|
-
variant: "
|
|
36
|
+
variant: "subtitle1"
|
|
36
37
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
38
|
className: _stylesModule.default.details
|
|
38
39
|
}, billingsToShow.map(_ref2 => {
|
|
@@ -89,6 +90,7 @@ Billing.propTypes = {
|
|
|
89
90
|
smartBill: _billDataTypes.billDataTypes,
|
|
90
91
|
texts: _propTypes.object,
|
|
91
92
|
unitAlignment: _propTypes.string,
|
|
92
|
-
unit: _propTypes.string
|
|
93
|
+
unit: _propTypes.string,
|
|
94
|
+
periodSpan: _propTypes.string
|
|
93
95
|
};
|
|
94
96
|
var _default = exports.default = Billing;
|
|
@@ -6,9 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getMonthName = exports.getConsumptionLabel = exports.getBillingsToShow = void 0;
|
|
7
7
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
8
8
|
require("dayjs/locale/es");
|
|
9
|
+
var _constants = require("./constants");
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
_dayjs.default.locale('es');
|
|
11
|
-
const getBillingsToShow = settlements => {
|
|
12
|
+
const getBillingsToShow = (settlements, periodSpan) => {
|
|
13
|
+
if (periodSpan === _constants.MONTHLY_SPAN) {
|
|
14
|
+
const currentBilling = {
|
|
15
|
+
...settlements?.current,
|
|
16
|
+
colorTheme: 'success',
|
|
17
|
+
current: true,
|
|
18
|
+
icon: 'IconCheck'
|
|
19
|
+
};
|
|
20
|
+
return [currentBilling];
|
|
21
|
+
}
|
|
12
22
|
const currentBilling = {
|
|
13
23
|
...settlements?.current,
|
|
14
24
|
colorTheme: 'success',
|
|
@@ -18,7 +18,8 @@ const Consumptions = _ref => {
|
|
|
18
18
|
assets,
|
|
19
19
|
reverseRow = {},
|
|
20
20
|
smartBill,
|
|
21
|
-
translations
|
|
21
|
+
translations,
|
|
22
|
+
periodSpan
|
|
22
23
|
} = _ref;
|
|
23
24
|
const {
|
|
24
25
|
title,
|
|
@@ -45,11 +46,13 @@ const Consumptions = _ref => {
|
|
|
45
46
|
texts: translations
|
|
46
47
|
}), /*#__PURE__*/_react.default.createElement(_Billing.default, {
|
|
47
48
|
smartBill: smartBill,
|
|
48
|
-
texts: translations
|
|
49
|
+
texts: translations,
|
|
50
|
+
periodSpan: periodSpan
|
|
49
51
|
}))));
|
|
50
52
|
};
|
|
51
53
|
Consumptions.propTypes = {
|
|
52
54
|
assets: _propTypes.object,
|
|
55
|
+
periodSpan: _propTypes.string,
|
|
53
56
|
reverseRow: _propTypes.object,
|
|
54
57
|
smartBill: _billDataTypes.billDataTypes,
|
|
55
58
|
translations: _propTypes.object
|