@widergy/utilitygo-smart-bill-web 3.19.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 CHANGED
@@ -1,3 +1,17 @@
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
+
8
+ # [3.20.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.19.0...v3.20.0) (2025-12-23)
9
+
10
+
11
+ ### Features
12
+
13
+ * city and district props in smartbill service ([#75](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/75)) ([d09ddd9](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/d09ddd9fc359c918555a88ac65f4b4c6d9d940e0))
14
+
1
15
  # [3.19.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.18.1...v3.19.0) (2025-12-22)
2
16
 
3
17
 
@@ -163,8 +163,8 @@ const SmartBillSummary = _ref => {
163
163
  accountNumber: smartBill.client?.client_number,
164
164
  accountNumberHelpText: translations.billingTab.secondHeader?.accountNumberHelpText,
165
165
  supplyAddress: smartBill.client?.account_address,
166
- city: currentAccount?.city,
167
- district: currentAccount?.district,
166
+ city: smartBill.client?.city,
167
+ district: smartBill.client?.district,
168
168
  supplyAddressHelpText: translations.billingTab.secondHeader?.supplyAddressHelpText,
169
169
  clientNumberFormatter: utils?.formatters?.clientNumberFormatter
170
170
  }), _constants.TAB_COMPONENT_MAPPER?.[currentTab]?.({
@@ -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("div", {
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 {
@@ -11,6 +11,10 @@
11
11
  margin: 24px -24px 0;
12
12
  }
13
13
 
14
+ .dateRange {
15
+ margin-top: 8px;
16
+ }
17
+
14
18
  .billing {
15
19
  border-bottom: 1px solid var(--light04);
16
20
  display: flex;
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "3.19.0",
3
+ "version": "3.20.1",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",