@widergy/utilitygo-smart-bill-web 3.14.0 → 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 +14 -0
- package/dist/components/SmartBillSummary/index.js +13 -6
- package/dist/components/SmartBillSummary/styles.module.scss +14 -0
- 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,17 @@
|
|
|
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
|
+
|
|
8
|
+
## [3.14.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.14.0...v3.14.1) (2025-10-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [CX-1278] smartbill fab widy fixes ([#66](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/66)) ([a6e8af0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/a6e8af091d91e0328a409044c049cc2f27e62c61))
|
|
14
|
+
|
|
1
15
|
# [3.14.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.13.1...v3.14.0) (2025-10-07)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -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,
|
|
@@ -52,7 +53,8 @@ const SmartBillSummary = _ref => {
|
|
|
52
53
|
notEnoughBillsErrorType,
|
|
53
54
|
smartBillAIAnswer = {},
|
|
54
55
|
smartBillAIAnswerError,
|
|
55
|
-
smartBillAIAnswerLoading
|
|
56
|
+
smartBillAIAnswerLoading,
|
|
57
|
+
widyEnabled
|
|
56
58
|
} = constants;
|
|
57
59
|
const {
|
|
58
60
|
getGlossaryData,
|
|
@@ -168,7 +170,8 @@ const SmartBillSummary = _ref => {
|
|
|
168
170
|
reverseRow,
|
|
169
171
|
smartBill,
|
|
170
172
|
translations,
|
|
171
|
-
utils
|
|
173
|
+
utils,
|
|
174
|
+
periodSpan
|
|
172
175
|
})), aiQuestionsPanelEnabled && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_energyUi.UTTooltip, {
|
|
173
176
|
arrow: false,
|
|
174
177
|
content: isDesktopSize ? widyTooltipContent : '',
|
|
@@ -176,12 +179,15 @@ const SmartBillSummary = _ref => {
|
|
|
176
179
|
placement: 'left'
|
|
177
180
|
}
|
|
178
181
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
179
|
-
className: `${_stylesModule.default.AIFloatButton} smartbill-ai-float-button`
|
|
182
|
+
className: `${widyEnabled ? _stylesModule.default.AIFloatButtonWidy : _stylesModule.default.AIFloatButton} smartbill-ai-float-button`
|
|
180
183
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTTouchableWithoutFeedback, {
|
|
181
184
|
onClick: openAIPanel
|
|
182
|
-
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
185
|
+
}, widyEnabled ? /*#__PURE__*/_react.default.createElement("img", {
|
|
183
186
|
alt: "widy",
|
|
184
187
|
src: widyFab
|
|
188
|
+
}) : /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
|
|
189
|
+
colorTheme: "negative",
|
|
190
|
+
name: "EnergyIconChatSparkFilled"
|
|
185
191
|
})))), /*#__PURE__*/_react.default.createElement(_AIPanel.default, {
|
|
186
192
|
aiQuestionsList: aiQuestionsList,
|
|
187
193
|
aiQuestionsListError: aiQuestionsListError,
|
|
@@ -231,6 +237,7 @@ SmartBillSummary.propTypes = {
|
|
|
231
237
|
value: _propTypes.string
|
|
232
238
|
})),
|
|
233
239
|
translations: _propTypes.object,
|
|
234
|
-
utils: _propTypes.object
|
|
240
|
+
utils: _propTypes.object,
|
|
241
|
+
periodSpan: _propTypes.string
|
|
235
242
|
};
|
|
236
243
|
var _default = exports.default = SmartBillSummary;
|
|
@@ -53,6 +53,20 @@ $tab-height: 48px;
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.AIFloatButton {
|
|
56
|
+
div {
|
|
57
|
+
align-items: center;
|
|
58
|
+
background-color: var(--actionAccent04);
|
|
59
|
+
border-radius: 100px;
|
|
60
|
+
bottom: 32px;
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
padding: 16px;
|
|
64
|
+
position: fixed;
|
|
65
|
+
right: 32px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.AIFloatButtonWidy {
|
|
56
70
|
align-items: center;
|
|
57
71
|
bottom: 20px;
|
|
58
72
|
display: flex;
|
|
@@ -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
|