mg-library 1.0.483 → 1.0.485
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/blocks.js +3 -3
- package/functions.js +26 -1
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -235,7 +235,7 @@ export function MGCurrentAccount(props) {
|
|
235
235
|
return (
|
236
236
|
<>
|
237
237
|
<View style={{ flexDirection: 'column', alignItems: 'flex-end', marginTop: 10, marginBottom: 10, marginLeft: 10, marginRight: 20 }}>
|
238
|
-
<Text category='
|
238
|
+
<Text category='h6'>{item.balance._asCurrency(company.currencySymbol)}</Text>
|
239
239
|
</View>
|
240
240
|
</>
|
241
241
|
);
|
@@ -246,10 +246,10 @@ export function MGCurrentAccount(props) {
|
|
246
246
|
{props.goBack != undefined &&
|
247
247
|
props.goBack
|
248
248
|
}
|
249
|
-
<Card style={{
|
249
|
+
<Card style={{ marginHorizontal: 30, marginBottom: 10 }}>
|
250
250
|
<View style={{ alignItems: 'center' }}>
|
251
251
|
<Text category='p1'>{mgFunctionsLib.i18nString('balance', props.language)}</Text>
|
252
|
-
<Text category='
|
252
|
+
<Text category='h3'>{props.balanceComposition.total._asCurrency(props.company.currencySymbol)}</Text>
|
253
253
|
</View>
|
254
254
|
</Card>
|
255
255
|
</View>
|
package/functions.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import Toast from 'react-native-root-toast';
|
2
2
|
import { StyleSheet, View, Dimensions } from 'react-native';
|
3
3
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
4
|
-
import { Text } from '@ui-kitten/components';
|
4
|
+
import { Text, Button } from '@ui-kitten/components';
|
5
|
+
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
5
6
|
import moment from 'moment';
|
6
7
|
import 'moment/locale/es';
|
7
8
|
import 'moment/locale/en-gb';
|
@@ -9,6 +10,30 @@ import { Camera } from 'expo-camera';
|
|
9
10
|
|
10
11
|
import * as mgConstants from './constants.js';
|
11
12
|
|
13
|
+
// Navigator
|
14
|
+
|
15
|
+
const logoutIcon = () => (
|
16
|
+
<MaterialCommunityIcons name='logout' color='white' size={20} style={{ flex: 1 }} />
|
17
|
+
);
|
18
|
+
|
19
|
+
export function navigatorHeader(insets, theme, onPressLogout, company) {
|
20
|
+
let companyDescription = company.description;
|
21
|
+
if (companyDescription.length > 25)
|
22
|
+
companyDescription = companyDescription.substring(0, 25) + '...';
|
23
|
+
return (
|
24
|
+
<Layout style={[safeAreaViewForNavigatorHeaderStyleSheet(insets).safeAreaView, { backgroundColor: theme['color-primary-500'], flexDirection:'column', justifyContent: 'flex-end' }]}>
|
25
|
+
<View style={{ flexDirection: 'row', flexGrow: 1 }}>
|
26
|
+
<View style={{ flexGrow: 0.9, marginLeft: 10, alignSelf: 'center' }}>
|
27
|
+
<Text category='h5' style={{ color: 'white' }}>{companyDescription}</Text>
|
28
|
+
</View>
|
29
|
+
<View style={{ flexGrow: 0.1, flexDirection: 'column' }}>
|
30
|
+
<Button style={{ alignSelf: 'center' }} accessoryLeft={logoutIcon} onPress={() => { onPressLogout() }} />
|
31
|
+
</View>
|
32
|
+
</View>
|
33
|
+
</Layout>
|
34
|
+
);
|
35
|
+
}
|
36
|
+
|
12
37
|
// Camera
|
13
38
|
|
14
39
|
export async function isCameraAvailable() {
|