@widergy/utilitygo-smart-bill-mobile 1.1.2 → 1.1.4
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/package.json +2 -2
- package/src/lib/components/ConsumptionComparison/components/ComparisonTable/index.js +0 -1
- package/src/lib/components/ConsumptionComparison/components/ComparisonTable/utils.js +1 -1
- package/src/lib/components/MainBillData/components/AmountData/index.js +0 -9
- package/src/lib/components/MainBillData/components/ConsumptionData/utils.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widergy/utilitygo-smart-bill-mobile",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "UtilityGO SmartBill Mobile",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/lib/index.js",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"numeral": "^2.0.6",
|
|
61
61
|
"react-native-collapsible": "^1.5.3",
|
|
62
62
|
"react-native-document-picker": "^4.0.0",
|
|
63
|
-
"react-native-image-picker": "^
|
|
63
|
+
"react-native-image-picker": "^4.0.6",
|
|
64
64
|
"react-native-image-resizer": "^1.3.0",
|
|
65
65
|
"react-native-svg": "^12.1.0",
|
|
66
66
|
"react-native-svg-transformer": "^0.14.3",
|
|
@@ -201,7 +201,7 @@ const defineRowVisibility = (
|
|
|
201
201
|
|
|
202
202
|
case COMPARISON_ROWS_IDS.power_consumption:
|
|
203
203
|
return (
|
|
204
|
-
!!getTotalConsumption(currentPeriod, POWER_TYPES.REGISTERED).value
|
|
204
|
+
!!getTotalConsumption(currentPeriod, POWER_TYPES.REGISTERED).value ||
|
|
205
205
|
!!getTotalConsumption(lastYearPeriod, POWER_TYPES.REGISTERED).value
|
|
206
206
|
);
|
|
207
207
|
default:
|
|
@@ -21,7 +21,6 @@ const AmountData = ({ bill, context }) => {
|
|
|
21
21
|
} = context;
|
|
22
22
|
|
|
23
23
|
const firstExpiration = expirations.find(expiration => expiration.number === 1);
|
|
24
|
-
const secondExpiration = expirations.find(expiration => expiration.number === 2);
|
|
25
24
|
|
|
26
25
|
return (
|
|
27
26
|
<View style={styles.root}>
|
|
@@ -44,14 +43,6 @@ const AmountData = ({ bill, context }) => {
|
|
|
44
43
|
</Label>
|
|
45
44
|
<Label small> {moment(firstExpiration.date, 'YYYY-MM-DD').format('DD/MM/YYYY')}</Label>
|
|
46
45
|
</View>
|
|
47
|
-
{!!secondExpiration.date && (
|
|
48
|
-
<View style={styles.expirationContainer}>
|
|
49
|
-
<Label midGray small>
|
|
50
|
-
{secondExpirationDate}
|
|
51
|
-
</Label>
|
|
52
|
-
<Label small> {moment(secondExpiration.date, 'YYYY-MM-DD').format('DD/MM/YYYY')}</Label>
|
|
53
|
-
</View>
|
|
54
|
-
)}
|
|
55
46
|
</View>
|
|
56
47
|
</View>
|
|
57
48
|
);
|
|
@@ -20,7 +20,9 @@ const settlementRemainingMapper = (period, texts) => ({
|
|
|
20
20
|
unit: getRemainingConsumption(period, ENERGY_TYPES.ACTIVE).unit,
|
|
21
21
|
order: period?.settlements?.remaining?.[0]?.number,
|
|
22
22
|
settlementDuration: getTotalDaysDescriptionSettlement(period, texts),
|
|
23
|
-
settlementDescription
|
|
23
|
+
get settlementDescription() {
|
|
24
|
+
return this.order === 2 ? texts.remainingConsumptionInSettlement : texts.pastConsumptionInSettlement;
|
|
25
|
+
},
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
export const dataMappers = [settlementCurrentMapper, settlementRemainingMapper];
|