@widergy/utilitygo-smart-bill-web 3.20.0 → 3.20.1
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/tabs/Consumptions/components/Billing/index.js +17 -1
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/Billing/styles.module.scss +4 -0
- package/dist/components/SmartBillSummary/tabs/Consumptions/components/Billing/utils.js +10 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.20.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.20.0...v3.20.1) (2026-01-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* [EVEP-292] billing date range ([#77](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/77)) ([683c944](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/683c9449c63c7e2520e385a58bda25730f2096fe))
|
|
7
|
+
|
|
1
8
|
# [3.20.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.19.0...v3.20.0) (2025-12-23)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -22,6 +22,7 @@ const Billing = _ref => {
|
|
|
22
22
|
periodSpan = _constants.BIMESTRAL_SPAN
|
|
23
23
|
} = _ref;
|
|
24
24
|
const {
|
|
25
|
+
dateRange,
|
|
25
26
|
title,
|
|
26
27
|
tagLabel,
|
|
27
28
|
clarification,
|
|
@@ -29,12 +30,27 @@ const Billing = _ref => {
|
|
|
29
30
|
} = texts?.billing || {};
|
|
30
31
|
const currentPeriod = smartBill?.periods?.find(period => period.current);
|
|
31
32
|
const billingsToShow = (0, _utils.getBillingsToShow)(currentPeriod?.settlements, periodSpan);
|
|
33
|
+
const {
|
|
34
|
+
start_date: startDate,
|
|
35
|
+
end_date: endDate
|
|
36
|
+
} = currentPeriod?.settlements || {};
|
|
37
|
+
const {
|
|
38
|
+
start,
|
|
39
|
+
end
|
|
40
|
+
} = (0, _utils.getDateRange)(startDate, endDate);
|
|
32
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
42
|
className: _stylesModule.default.container
|
|
34
43
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
35
44
|
colorTheme: "gray",
|
|
36
45
|
variant: "subtitle1"
|
|
37
|
-
}, title), /*#__PURE__*/_react.default.createElement(
|
|
46
|
+
}, title), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
47
|
+
className: _stylesModule.default.dateRange,
|
|
48
|
+
colorTheme: "gray",
|
|
49
|
+
variant: "body"
|
|
50
|
+
}, dateRange?.({
|
|
51
|
+
start,
|
|
52
|
+
end
|
|
53
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
54
|
className: _stylesModule.default.details
|
|
39
55
|
}, billingsToShow.map(_ref2 => {
|
|
40
56
|
let {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getMonthName = exports.getConsumptionLabel = exports.getBillingsToShow = void 0;
|
|
6
|
+
exports.getMonthName = exports.getDateRange = exports.getConsumptionLabel = exports.getBillingsToShow = void 0;
|
|
7
7
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
8
8
|
require("dayjs/locale/es");
|
|
9
9
|
var _constants = require("./constants");
|
|
@@ -31,6 +31,15 @@ const getBillingsToShow = (settlements, periodSpan) => {
|
|
|
31
31
|
exports.getBillingsToShow = getBillingsToShow;
|
|
32
32
|
const getMonthName = date => (0, _dayjs.default)(date).format('MMMM');
|
|
33
33
|
exports.getMonthName = getMonthName;
|
|
34
|
+
const getDateRange = (startDate, endDate) => {
|
|
35
|
+
const start = startDate ? (0, _dayjs.default)(startDate).format('DD/MM/YYYY') : '';
|
|
36
|
+
const end = endDate ? (0, _dayjs.default)(endDate).format('DD/MM/YYYY') : '';
|
|
37
|
+
return {
|
|
38
|
+
start,
|
|
39
|
+
end
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
exports.getDateRange = getDateRange;
|
|
34
43
|
const getConsumptionLabel = consumptions => {
|
|
35
44
|
const consumption = consumptions?.[0];
|
|
36
45
|
const {
|