@widergy/utilitygo-smart-bill-web 3.6.1 → 3.7.0

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.7.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.6.2...v3.7.0) (2025-05-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * [CX-746] smartbill ai question list new services ([#52](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/52)) ([ba403da](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/ba403da3cef06f935d585e282355d641ae4b79e9))
7
+
8
+ ## [3.6.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.6.1...v3.6.2) (2025-05-26)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [CX-689] smartbill visual fixes ([#51](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/51)) ([1f9a1b9](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/1f9a1b9cce714a9ada91faee97c47b33b0b787df))
14
+
1
15
  ## [3.6.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.6.0...v3.6.1) (2025-05-16)
2
16
 
3
17
 
@@ -7,7 +7,6 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _energyUi = require("@widergy/energy-ui");
9
9
  var _propTypes = require("prop-types");
10
- var _i18next = _interopRequireDefault(require("i18next"));
11
10
  var _reactLoadingSkeleton = _interopRequireDefault(require("react-loading-skeleton"));
12
11
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -15,15 +14,22 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
15
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
15
  const AIPanel = _ref => {
17
16
  let {
18
- aiQuestionsList,
17
+ aiQuestionsList = [],
18
+ aiQuestionsListError,
19
+ aiQuestionsListLoading,
19
20
  answer,
20
21
  error,
21
22
  getAnswer,
22
23
  isOpen,
23
24
  loading,
24
25
  notEnoughBillsErrorType,
25
- onClose
26
+ onClose,
27
+ translations
26
28
  } = _ref;
29
+ const {
30
+ generatedByLabel,
31
+ title: panelTitle
32
+ } = translations?.AIPanel || {};
27
33
  const [openCards, setOpenCards] = (0, _react.useState)([]);
28
34
  const toggleCard = id => {
29
35
  if (!answer?.[id] && !openCards.includes(id)) {
@@ -35,6 +41,9 @@ const AIPanel = _ref => {
35
41
  onClose?.();
36
42
  setOpenCards([]);
37
43
  };
44
+ (0, _react.useEffect)(() => {
45
+ if (aiQuestionsListError && !aiQuestionsListLoading) handleClose();
46
+ }, [isOpen, aiQuestionsListError, aiQuestionsListLoading]);
38
47
  return /*#__PURE__*/_react.default.createElement(_energyUi.UTPanel, {
39
48
  classes: {
40
49
  paper: _stylesModule.default.paper,
@@ -48,12 +57,14 @@ const AIPanel = _ref => {
48
57
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
49
58
  weight: "medium",
50
59
  variant: "title2"
51
- }, _i18next.default.t('IAPanel:title')), /*#__PURE__*/_react.default.createElement("div", {
60
+ }, panelTitle), /*#__PURE__*/_react.default.createElement(_energyUi.UTLoading, {
61
+ loading: aiQuestionsListLoading
62
+ }, /*#__PURE__*/_react.default.createElement("div", {
52
63
  className: _stylesModule.default.questionsContainer
53
64
  }, aiQuestionsList.map(_ref2 => {
54
65
  let {
55
66
  id,
56
- title
67
+ question
57
68
  } = _ref2;
58
69
  const isLoading = loading?.[id];
59
70
  const errorContent = error?.[id];
@@ -67,14 +78,14 @@ const AIPanel = _ref => {
67
78
  expandableContent: _stylesModule.default.expandableContent,
68
79
  expandableContentActive: _stylesModule.default.activeCard
69
80
  },
70
- header: title,
81
+ header: question,
71
82
  isCollapsible: true,
72
83
  isOpen: openCards.includes(id),
73
84
  key: id,
74
85
  onClick: () => toggleCard(id)
75
86
  }, renderAnswer ? /*#__PURE__*/_react.default.createElement("div", {
76
87
  className: `${_stylesModule.default.answer} ${errorContent && !isLoading ? notEnoughBills ? _stylesModule.default.notEnoughBillsContainer : _stylesModule.default.errorAnswer : ''}`
77
- }, isLoading ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
88
+ }, isLoading ? /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement(_reactLoadingSkeleton.default, {
78
89
  containerClassName: _stylesModule.default.skeletonContainer,
79
90
  count: 3,
80
91
  height: 22
@@ -83,41 +94,45 @@ const AIPanel = _ref => {
83
94
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
84
95
  colorTheme: "gray",
85
96
  variant: "small"
86
- }, "Generado con AI"), /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
97
+ }, generatedByLabel), /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
87
98
  colorTheme: "neutral",
88
99
  name: "IconSparkles",
89
100
  size: 18
90
- }))) : errorContent ? /*#__PURE__*/_react.default.createElement("div", {
101
+ }))) : errorContent ? /*#__PURE__*/_react.default.createElement("section", {
91
102
  className: _stylesModule.default.errorCard
92
103
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
93
104
  colorTheme: notEnoughBills ? 'gray' : 'error',
94
105
  name: notEnoughBills ? 'IconFileX' : 'IconCircleX',
95
106
  shade: "04"
96
- }), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, null, notEnoughBills ? notEnoughBillsContent : errorContent)) : answerContent ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
107
+ }), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, null, notEnoughBills ? notEnoughBillsContent : errorContent)) : answerContent ? /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
108
+ className: _stylesModule.default.answerContent,
97
109
  withMarkdown: true
98
110
  }, answerContent), /*#__PURE__*/_react.default.createElement("div", {
99
111
  className: _stylesModule.default.generatedByLabel
100
112
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
101
113
  colorTheme: "gray",
102
114
  variant: "small"
103
- }, "Generado con AI"), /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
115
+ }, generatedByLabel), /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
104
116
  colorTheme: "neutral",
105
117
  name: "IconSparkles",
106
118
  size: 18
107
119
  }))) : null) : null);
108
- }))));
120
+ })))));
109
121
  };
110
122
  AIPanel.propTypes = {
111
123
  aiQuestionsList: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
112
- id: _propTypes.string,
113
- title: _propTypes.string
124
+ id: _propTypes.number,
125
+ question: _propTypes.string
114
126
  })),
127
+ aiQuestionsListLoading: _propTypes.bool,
128
+ aiQuestionsListError: _propTypes.bool,
115
129
  answer: _propTypes.object,
116
130
  error: _propTypes.object,
117
131
  getAnswer: _propTypes.func,
118
132
  isOpen: _propTypes.bool,
119
133
  loading: _propTypes.object,
120
134
  notEnoughBillsErrorType: _propTypes.string,
121
- onClose: _propTypes.func
135
+ onClose: _propTypes.func,
136
+ translations: _propTypes.object
122
137
  };
123
138
  var _default = exports.default = AIPanel;
@@ -24,6 +24,10 @@ $ia-panel-width: 600px;
24
24
  display: flex;
25
25
  flex-direction: column;
26
26
  grid-gap: 12px;
27
+
28
+ &:last-child {
29
+ padding-bottom: 24px;
30
+ }
27
31
  }
28
32
 
29
33
  .card {
@@ -80,3 +84,7 @@ $ia-panel-width: 600px;
80
84
  display: flex;
81
85
  grid-gap: 8px;
82
86
  }
87
+
88
+ .answerContent {
89
+ padding-bottom: 12px;
90
+ }
@@ -7,6 +7,7 @@ exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _energyUi = require("@widergy/energy-ui");
9
9
  var _propTypes = require("prop-types");
10
+ var _isEmpty = _interopRequireDefault(require("lodash/isEmpty"));
10
11
  var _billDataTypes = require("../../shared/types/billDataTypes");
11
12
  var _constants = require("./constants");
12
13
  var _utils = require("./utils");
@@ -19,14 +20,8 @@ const SmartBillSummary = _ref => {
19
20
  let {
20
21
  assets,
21
22
  constants,
22
- consumptionLevels,
23
23
  components,
24
- currentAccount,
25
- getGlossaryData,
26
- glossaryData,
27
- glossaryLoading,
28
24
  handlers,
29
- isDesktopSize,
30
25
  loading,
31
26
  smartBill,
32
27
  tabOptions,
@@ -35,22 +30,35 @@ const SmartBillSummary = _ref => {
35
30
  } = _ref;
36
31
  const {
37
32
  aiQuestionsList,
33
+ aiQuestionsListError,
34
+ aiQuestionsListLoading,
38
35
  aiQuestionsPanelEnabled,
36
+ consumptionLevels,
37
+ currentAccount,
38
+ glossaryData,
39
+ glossaryError,
40
+ glossaryLoading,
41
+ isDesktopSize,
39
42
  notEnoughBillsErrorType,
40
43
  smartBillAIAnswer = {},
41
44
  smartBillAIAnswerError,
42
45
  smartBillAIAnswerLoading
43
46
  } = constants;
44
47
  const {
48
+ getGlossaryData,
45
49
  getSmartBillAIAnswer,
50
+ getSmartBillAIQuestions,
46
51
  resetSmartBillAIAnswers
47
52
  } = handlers;
48
- const filteredTabOptions = loading ? [] : (0, _utils.getTabOptions)(tabOptions, smartBill);
53
+ const filteredTabOptions = loading ? [] : (0, _utils.getTabOptions)(isDesktopSize, tabOptions, smartBill);
49
54
  const defaultCurrentTab = (0, _utils.getDefaultCurrentTab)(filteredTabOptions);
50
55
  const [currentTab, setCurrentTab] = (0, _react.useState)(defaultCurrentTab);
51
56
  const [aiPanelIsOpen, setAiPanelIsOpen] = (0, _react.useState)(false);
52
57
  const changeCurrentTab = newTab => setCurrentTab(newTab);
53
- const openAIPanel = () => setAiPanelIsOpen(true);
58
+ const openAIPanel = () => {
59
+ if ((0, _isEmpty.default)(aiQuestionsList)) getSmartBillAIQuestions();
60
+ setAiPanelIsOpen(true);
61
+ };
54
62
  const closeAIPanel = () => {
55
63
  setAiPanelIsOpen(false);
56
64
  resetSmartBillAIAnswers();
@@ -58,6 +66,11 @@ const SmartBillSummary = _ref => {
58
66
  (0, _react.useEffect)(() => {
59
67
  if (defaultCurrentTab) changeCurrentTab(defaultCurrentTab);
60
68
  }, [defaultCurrentTab]);
69
+ (0, _react.useEffect)(() => {
70
+ if (glossaryError && !glossaryLoading && defaultCurrentTab) {
71
+ changeCurrentTab(defaultCurrentTab);
72
+ }
73
+ }, [defaultCurrentTab, glossaryError, glossaryLoading]);
61
74
  return /*#__PURE__*/_react.default.createElement(_energyUi.UTLoading, {
62
75
  className: _stylesModule.default.loadingContainer,
63
76
  loading: loading
@@ -100,30 +113,27 @@ const SmartBillSummary = _ref => {
100
113
  name: "EnergyIconChatSparkFilled"
101
114
  })), /*#__PURE__*/_react.default.createElement(_AIPanel.default, {
102
115
  aiQuestionsList: aiQuestionsList,
116
+ aiQuestionsListError: aiQuestionsListError,
117
+ aiQuestionsListLoading: aiQuestionsListLoading,
103
118
  answer: smartBillAIAnswer,
104
119
  error: smartBillAIAnswerError,
105
120
  getAnswer: getSmartBillAIAnswer,
106
121
  isOpen: aiPanelIsOpen,
107
122
  loading: smartBillAIAnswerLoading,
108
123
  notEnoughBillsErrorType: notEnoughBillsErrorType,
109
- onClose: closeAIPanel
124
+ onClose: closeAIPanel,
125
+ translations: translations
110
126
  })));
111
127
  };
112
128
  SmartBillSummary.propTypes = {
113
129
  assets: _propTypes.object,
114
130
  constants: _propTypes.object,
115
- consumptionLevels: _propTypes.array,
116
131
  components: (0, _propTypes.shape)({
117
132
  [_propTypes.string]: _propTypes.elementType
118
133
  }),
119
- currentAccount: _propTypes.array,
120
- getGlossaryData: undefined || _propTypes.object,
121
- glossaryData: undefined || _propTypes.object,
122
- glossaryLoading: _propTypes.bool,
123
134
  handlers: (0, _propTypes.shape)({
124
135
  [_propTypes.string]: _propTypes.func
125
136
  }),
126
- isDesktopSize: _propTypes.bool,
127
137
  loading: _propTypes.bool,
128
138
  smartBill: _billDataTypes.billDataTypes,
129
139
  tabOptions: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
@@ -46,7 +46,7 @@ const ProgressBar = _ref => {
46
46
  value
47
47
  }) || {};
48
48
  const consumptionPercentage = (0, _utils.getConsumptionPercentage)(value, limitValue, isOverLimit) || _constants.MAX_VALUE_PROGRESS;
49
- const shouldRenderDynamicLabel = value > 0 && limitValue > 0;
49
+ const shouldRenderDynamicLabel = value > 0 && limitValue > 0 && limitValue !== 'Infinity';
50
50
  const [limitLabelWidth, setLimitLabelWidth] = (0, _react.useState)(0);
51
51
  const limitLabelRef = (0, _react.useRef)(null);
52
52
  (0, _react.useEffect)(() => {
@@ -94,7 +94,7 @@ const ProgressBar = _ref => {
94
94
  className: _stylesModule.default.consumptionComparison
95
95
  }, value >= 0 && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
96
96
  variant: "subtitle1"
97
- }, currentValueLabel), value >= 0 && limitValue > 0 && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
97
+ }, currentValueLabel), value >= 0 && limitValue > 0 && limitValue !== 'Infinity' && /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
98
98
  colorTheme: "gray",
99
99
  variant: "small"
100
100
  }, contrastValueLabel)), tooltipContent && /*#__PURE__*/_react.default.createElement(_energyUi.UTTooltip, {
@@ -34,7 +34,7 @@ const formatLabels = _ref => {
34
34
  return {
35
35
  initialLabel: _constants.MIN_VALUE_PROGRESS,
36
36
  dynamicLabel: isOverLimit ? contrastValueFormatted : currentValueFormatted,
37
- finalLabel: isOverLimit || !limitValue ? currentValueFormatted : contrastValueFormatted,
37
+ finalLabel: isOverLimit || !limitValue || limitValue === 'Infinity' ? currentValueFormatted : contrastValueFormatted,
38
38
  currentValueLabel: currentValueWithUnitLabel?.({
39
39
  value: currentValueFormatted,
40
40
  day: formatMaxPowerRegisteredDate(maxConsumptionDay)
@@ -38,13 +38,13 @@ const RateCard = _ref => {
38
38
  } = rateCardTranslations;
39
39
  const {
40
40
  client,
41
- detail,
42
41
  periods
43
42
  } = smartBill;
44
43
  const purchasedRate = client?.rate?.purchased || '';
45
44
  const periodsToCompare = (0, _utils.getConsumptionPeriodsToCompare)(periods);
46
45
  const {
47
- totalConsumption
46
+ totalConsumption,
47
+ totalConsumptionFormatted
48
48
  } = (0, _utils.getConsumptionLabels)(periodsToCompare) || {};
49
49
  const {
50
50
  levels = []
@@ -71,17 +71,7 @@ const RateCard = _ref => {
71
71
  const currentRate = rates[currentIndex] ?? {};
72
72
  const startRateValue = Array.isArray(currentRate?.range) && currentRate.range[0];
73
73
  const limitRateValue = Array.isArray(currentRate?.range) && currentRate.range.length > 0 && currentRate.range[currentRate.range.length - 1];
74
- const concepts = detail?.concepts?.[0]?.lines;
75
- const fixedCharges = concepts?.[0];
76
- const variableCharges = concepts?.[1];
77
- const {
78
- title: fixedChargeTitle,
79
- amount: fixedChargeValue
80
- } = fixedCharges || {};
81
- const {
82
- title: variableChargeTitle,
83
- amount: variableChargeValue
84
- } = variableCharges || {};
74
+ const charges = client?.rate?.charges || [];
85
75
  const isT1 = purchasedRate.includes('T1');
86
76
  return /*#__PURE__*/_react.default.createElement("div", {
87
77
  className: _stylesModule.default.container
@@ -117,26 +107,26 @@ const RateCard = _ref => {
117
107
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
118
108
  variant: "title3",
119
109
  weight: "medium"
120
- }, totalConsumption, " ", unit), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
110
+ }, totalConsumptionFormatted, " ", unit), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
121
111
  colorTheme: "gray",
122
112
  variant: "small"
123
113
  }, yourConsumption))), /*#__PURE__*/_react.default.createElement("div", {
124
114
  className: _stylesModule.default.footer
125
- }, /*#__PURE__*/_react.default.createElement("div", {
126
- className: _stylesModule.default.detail
127
- }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
128
- weight: "medium"
129
- }, fixedChargeTitle), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
130
- variant: "subtitle1",
131
- weight: "medium"
132
- }, formatAmount?.(fixedChargeValue))), /*#__PURE__*/_react.default.createElement("div", {
133
- className: _stylesModule.default.detail
134
- }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
135
- weight: "medium"
136
- }, variableChargeTitle), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
137
- variant: "subtitle1",
138
- weight: "medium"
139
- }, formatAmount?.(variableChargeValue))), /*#__PURE__*/_react.default.createElement("a", {
115
+ }, charges.map(_ref5 => {
116
+ let {
117
+ concept,
118
+ amount
119
+ } = _ref5;
120
+ return /*#__PURE__*/_react.default.createElement("div", {
121
+ className: _stylesModule.default.detail,
122
+ key: concept
123
+ }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
124
+ weight: "medium"
125
+ }, concept), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
126
+ variant: "subtitle1",
127
+ weight: "medium"
128
+ }, formatAmount?.(amount)));
129
+ }), /*#__PURE__*/_react.default.createElement("a", {
140
130
  className: _stylesModule.default.footerAction,
141
131
  href: ratesTableLink,
142
132
  rel: "noopener noreferrer",
@@ -128,10 +128,6 @@ const Billing = _ref => {
128
128
  title: automaticDebitTitle
129
129
  }, {
130
130
  leftIcon: 'IconReceipt2',
131
- leftIconProps: {
132
- area: true,
133
- size: 28
134
- },
135
131
  onClick: handleDownloadBill,
136
132
  rightIcon: 'IconDownload',
137
133
  title: downloadBillTitle
@@ -7,6 +7,7 @@
7
7
  padding: 24px 32px;
8
8
 
9
9
  @media #{$mobile} {
10
+ grid-gap: 24px;
10
11
  padding: 24px 16px;
11
12
  }
12
13
  }
@@ -14,8 +15,10 @@
14
15
  .billHeader {
15
16
  align-items: center;
16
17
  background-color: var(--light01);
18
+ border-radius: 8px;
17
19
  box-shadow: var(--shadowGrayBottom1);
18
20
  display: flex;
21
+ flex-wrap: wrap;
19
22
  grid-gap: 16px;
20
23
  justify-content: space-between;
21
24
  padding: 12px 16px;
@@ -30,9 +33,15 @@
30
33
  .billHeaderLabels {
31
34
  align-items: center;
32
35
  display: flex;
36
+ flex-wrap: wrap;
33
37
  grid-gap: 32px;
34
38
  justify-content: space-between;
35
39
  padding: 16px 0;
40
+
41
+ @media #{$mobile} {
42
+ grid-gap: 16px;
43
+ padding: 0;
44
+ }
36
45
  }
37
46
 
38
47
  .valueAndHelpText {
@@ -46,6 +55,10 @@
46
55
  flex: 1;
47
56
  flex-wrap: wrap;
48
57
  grid-gap: 32px;
58
+
59
+ @media #{$mobile} {
60
+ grid-gap: 24px;
61
+ }
49
62
  }
50
63
 
51
64
  .column {
@@ -117,7 +130,7 @@
117
130
 
118
131
  .totalCard {
119
132
  background-color: var(--light01);
120
- border-radius: 4px;
133
+ border-radius: 8px;
121
134
  box-shadow: var(--shadowGrayBottom1);
122
135
  display: flex;
123
136
  flex-direction: column;
@@ -1,3 +1,5 @@
1
+ @import '../../../../../../scss/variables/mediaQueries.module.scss';
2
+
1
3
  $bimestral-consumption-card-min-width: 328px;
2
4
 
3
5
  .bimestralConsumption {
@@ -18,6 +20,10 @@ $bimestral-consumption-card-min-width: 328px;
18
20
  flex-wrap: wrap;
19
21
  grid-gap: 32px;
20
22
  justify-content: space-between;
23
+
24
+ @media #{$mobile} {
25
+ grid-gap: 24px;
26
+ }
21
27
  }
22
28
 
23
29
  .bimestralConsumptionCardHeader {
@@ -24,7 +24,7 @@ const CurrentConsumption = _ref => {
24
24
  } = smartBill || {};
25
25
  const periodsToCompare = (0, _utils.getConsumptionPeriodsToCompare)(periods);
26
26
  const {
27
- totalConsumption,
27
+ totalConsumptionFormatted,
28
28
  unit,
29
29
  description
30
30
  } = (0, _utils.getConsumptionLabels)(periodsToCompare, texts) || {};
@@ -41,7 +41,7 @@ const CurrentConsumption = _ref => {
41
41
  }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
42
42
  variant: "title1",
43
43
  weight: "medium"
44
- }, totalConsumption), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
44
+ }, totalConsumptionFormatted), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
45
45
  variant: "subtitle1",
46
46
  weight: "medium"
47
47
  }, unit)), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
@@ -49,7 +49,8 @@ const getConsumptionLabels = function () {
49
49
  });
50
50
  return {
51
51
  description,
52
- totalConsumption: (0, _numeral.default)(totalConsumptionValue).format('0,0.[00]'),
52
+ totalConsumption: Number(totalConsumptionValue),
53
+ totalConsumptionFormatted: (0, _numeral.default)(totalConsumptionValue).format('0,0.[00]'),
53
54
  unit: totalConsumptionUnit
54
55
  };
55
56
  };
@@ -7,6 +7,7 @@
7
7
  padding: 24px 32px;
8
8
 
9
9
  @media #{$mobile} {
10
+ grid-gap: 24px;
10
11
  padding: 24px 16px;
11
12
  }
12
13
  }
@@ -22,6 +23,10 @@
22
23
  flex: 1;
23
24
  flex-wrap: wrap;
24
25
  grid-gap: 32px;
26
+
27
+ @media #{$mobile} {
28
+ grid-gap: 24px;
29
+ }
25
30
  }
26
31
 
27
32
  .consumptionDetail {
@@ -10,13 +10,13 @@ var _lodash = require("lodash");
10
10
  var _tabs = require("../../shared/constants/tabs");
11
11
  var _constants = require("./constants");
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- const getTabOptions = (tabOptions, smartBill) => {
13
+ const getTabOptions = (isDesktopSize, tabOptions, smartBill) => {
14
14
  const hasBimestralPeriodicity = smartBill?.periods?.some(period => period.settlements?.periodicity === _constants.BIMESTRAL_PERIODICITY);
15
15
  return tabOptions.map(tab => ({
16
16
  ...tab,
17
- icon: /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
17
+ icon: isDesktopSize ? /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
18
18
  name: tab.icon
19
- })
19
+ }) : null
20
20
  })).filter(_ref => {
21
21
  let {
22
22
  enabled,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "3.6.1",
3
+ "version": "3.7.0",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",