@widergy/utilitygo-smart-bill-mobile 3.5.0 → 3.6.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.6.0](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v3.5.1...v3.6.0) (2025-12-19)
2
+
3
+
4
+ ### Features
5
+
6
+ * [EVEP-272] alternative header ([#55](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/issues/55)) ([9118a5b](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/9118a5bbc4f19ce0d3792917b3a29c9c25508e00))
7
+
8
+ ## [3.5.1](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v3.5.0...v3.5.1) (2025-12-10)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * updates npm token ([4286fa0](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/4286fa0d1ca078db19eea0589e7be615d01e79d6))
14
+
1
15
  # [3.5.0](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v3.4.0...v3.5.0) (2025-12-03)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-mobile",
3
- "version": "3.5.0",
3
+ "version": "3.6.0",
4
4
  "description": "UtilityGO SmartBill Mobile",
5
5
  "license": "MIT",
6
6
  "main": "src/lib/index.js",
@@ -12,6 +12,7 @@ import { getDefaultCurrentTab, getTabOptions } from './utils';
12
12
  import getStyles from './styles';
13
13
  import AIDrawer from './components/AIDrawer';
14
14
  import BillHeader from './tabs/Billing/components/BillHeader';
15
+ import AlternativeHeader from './tabs/Billing/components/AlternativeHeader';
15
16
 
16
17
  const SmartBillSummary = ({
17
18
  assets,
@@ -227,6 +228,17 @@ const SmartBillSummary = ({
227
228
  smartBill={smartBill}
228
229
  />
229
230
  )}
231
+ {filteredTabOptions.find(tab => tab.value === currentTab)?.alternativeHeader && (
232
+ <AlternativeHeader
233
+ accountNumber={smartBill.client?.client_number}
234
+ accountNumberText={translations.billingTab.secondHeader?.accountNumber}
235
+ supplyAddress={smartBill.client?.account_address}
236
+ city={smartBill.client?.city}
237
+ district={smartBill.client?.district}
238
+ supplyAddressText={translations.billingTab.secondHeader?.supplyAddress}
239
+ clientNumberFormatter={utils?.formatters?.clientNumberFormatter}
240
+ />
241
+ )}
230
242
  {TAB_COMPONENT_MAPPER?.[currentTab]?.({
231
243
  assets,
232
244
  billingLayout,
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { Surface, UTLabel } from '@widergy/mobile-ui';
3
+ import { View } from 'react-native';
4
+ import { string, func } from 'prop-types';
5
+
6
+ import styles from './styles';
7
+
8
+ const AlternativeHeader = ({
9
+ accountNumberText,
10
+ accountNumber,
11
+ city,
12
+ clientNumberFormatter,
13
+ district,
14
+ supplyAddressText,
15
+ supplyAddress
16
+ }) => (
17
+ <Surface elevation={1} style={styles.container}>
18
+ <View>
19
+ <UTLabel variant="small" weight="bold">
20
+ {(accountNumber && clientNumberFormatter?.(accountNumber)) || accountNumber}
21
+ </UTLabel>
22
+
23
+ <UTLabel colorTheme="gray" variant="small">
24
+ {accountNumberText}
25
+ </UTLabel>
26
+ </View>
27
+
28
+ <View>
29
+ <UTLabel variant="small" weight="bold">
30
+ {supplyAddress}
31
+ </UTLabel>
32
+ <UTLabel variant="small">{`${city} - ${district}`}</UTLabel>
33
+ <UTLabel colorTheme="gray" variant="small">
34
+ {supplyAddressText}
35
+ </UTLabel>
36
+ </View>
37
+ </Surface>
38
+ );
39
+
40
+ AlternativeHeader.propTypes = {
41
+ accountNumberText: string,
42
+ accountNumber: string,
43
+ city: string,
44
+ clientNumberFormatter: func,
45
+ district: string,
46
+ supplyAddressText: string,
47
+ supplyAddress: string
48
+ };
49
+
50
+ export default AlternativeHeader;
@@ -0,0 +1,11 @@
1
+ import { StyleSheet } from 'react-native';
2
+
3
+ export default StyleSheet.create({
4
+ container: {
5
+ borderRadius: 8,
6
+ gap: 16,
7
+ padding: 16,
8
+ marginHorizontal: 16,
9
+ marginTop: 16
10
+ }
11
+ });