mg-library 1.0.554 → 1.0.556
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 +21 -21
- package/functions.js +1 -1
- package/package.json +1 -1
package/blocks.js
CHANGED
@@ -11,7 +11,7 @@ import { uploadFile } from '@uploadcare/upload-client';
|
|
11
11
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
12
12
|
|
13
13
|
import './prototypes.js';
|
14
|
-
import MGText from './components.js';
|
14
|
+
import { MGText } from './components.js';
|
15
15
|
import * as mgFunctionsLib from './functions.js';
|
16
16
|
import * as mgConstantsLib from './constants.js';
|
17
17
|
import * as mgLoginLib from './login.js';
|
@@ -24,11 +24,11 @@ export function MGWelcome(props) {
|
|
24
24
|
<Image source={{ uri: props.company.logoUrl }} style={{ width: 100, height: 100 }} />
|
25
25
|
</View>
|
26
26
|
<View style={{ flex: 1, flexDirection: 'column', alignSelf: 'center' }}>
|
27
|
-
<
|
28
|
-
<
|
29
|
-
<
|
30
|
-
<
|
31
|
-
<
|
27
|
+
<MGText style={{ textAlign: 'center' }} category='h6'>{props.company.legalName}</MGText>
|
28
|
+
<MGText style={{ textAlign: 'center' }} category='c1'>{props.company.address}</MGText>
|
29
|
+
<MGText style={{ textAlign: 'center' }} category='c1'>{props.company.city}, {props.company.province}</MGText>
|
30
|
+
<MGText style={{ textAlign: 'center' }} category='c1'>{props.company.phone}</MGText>
|
31
|
+
<MGText style={{ textAlign: 'center' }} category='c1'>{props.company.email}</MGText>
|
32
32
|
</View>
|
33
33
|
</View>
|
34
34
|
)
|
@@ -59,8 +59,8 @@ export function MGWelcome(props) {
|
|
59
59
|
{item.isImportant &&
|
60
60
|
<MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.theme['color-primary-500']} size={30} />
|
61
61
|
}
|
62
|
-
<
|
63
|
-
<
|
62
|
+
<MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
|
63
|
+
<MGText style={{ flex: 1, marginBottom: 10 }} category='c1'>{mgFunctionsLib.getDateForExposition(item.noticeDate, props.language)}, {item.noticeTime._asTime()}</MGText>
|
64
64
|
</View>
|
65
65
|
</>
|
66
66
|
);
|
@@ -88,7 +88,7 @@ export function MGWelcome(props) {
|
|
88
88
|
<Image source={{ uri: item.imageUrl }} style={{ width: '70%', resizeMode: 'contain', height: undefined, aspectRatio: 1 }} />
|
89
89
|
</View>
|
90
90
|
}
|
91
|
-
<
|
91
|
+
<MGText style={{ marginBottom: 10 }}>{item.content}</MGText>
|
92
92
|
</Card>
|
93
93
|
)}
|
94
94
|
ListHeaderComponent={listHeaderComponent}
|
@@ -125,7 +125,7 @@ export function MGBenefits(props) {
|
|
125
125
|
{item.isImportant &&
|
126
126
|
<MaterialCommunityIcons style={{ flex: 1 }} name='alert-circle-outline' color={props.theme['color-primary-500']} size={30} />
|
127
127
|
}
|
128
|
-
<
|
128
|
+
<MGText style={{ flex: 1 }} category='h6'>{item.description}</MGText>
|
129
129
|
</View>
|
130
130
|
</>
|
131
131
|
);
|
@@ -146,7 +146,7 @@ export function MGBenefits(props) {
|
|
146
146
|
</View>
|
147
147
|
}
|
148
148
|
<View style={{ flexGrow: 1, alignItems: 'center', marginBottom: 10 }}>
|
149
|
-
<
|
149
|
+
<MGText style={{ flexGrow: 1, textAlign: 'center' }}>{item.content}</MGText>
|
150
150
|
</View>
|
151
151
|
</Card>
|
152
152
|
)}
|
@@ -179,7 +179,7 @@ export function MGLogin(props) {
|
|
179
179
|
|
180
180
|
let cardHeader = (
|
181
181
|
<View style={{ flex: 1, flexGrow: 1, flexDirection: 'row' }}>
|
182
|
-
<
|
182
|
+
<MGText category='h6' style={{ alignSelf: 'center', color: props.theme['color-primary-500'] }}>{mgFunctionsLib.i18nString('credentials', props.language)}</MGText>
|
183
183
|
</View>
|
184
184
|
);
|
185
185
|
|
@@ -226,8 +226,8 @@ export function MGLogin(props) {
|
|
226
226
|
source={require('./assets/clubonline.png')}
|
227
227
|
style={{ width: 300, height: 150 }} />
|
228
228
|
<View style={{ marginHorizontal: 10, flexDirection: 'column', alignItems: 'center' }}>
|
229
|
-
<
|
230
|
-
<
|
229
|
+
<MGText style={{ alignSelf: 'center', textAlign: 'center' }} category='h6'>{props.appDescription}</MGText>
|
230
|
+
<MGText style={{ alignSelf: 'center' }} category='p2'>{props.appVersion}</MGText>
|
231
231
|
</View>
|
232
232
|
</>
|
233
233
|
</View>
|
@@ -299,8 +299,8 @@ export function MGCurrentAccount(props) {
|
|
299
299
|
<MaterialCommunityIcons name='file-account-outline' color={props.theme['color-primary-500']} size={30} style={{ flex: 1 }} />
|
300
300
|
</View>
|
301
301
|
<View style={{ flexGrow: 0.95 }}>
|
302
|
-
<
|
303
|
-
<
|
302
|
+
<MGText category='h6'>{item.document} {mgFunctionsLib.i18nString('number', props.language)} {item.number}</MGText>
|
303
|
+
<MGText category='p1'>{item.creditDate}</MGText>
|
304
304
|
</View>
|
305
305
|
</View>
|
306
306
|
</>
|
@@ -310,7 +310,7 @@ export function MGCurrentAccount(props) {
|
|
310
310
|
return (
|
311
311
|
<>
|
312
312
|
<View style={{ flexDirection: 'column', alignItems: 'flex-end', marginTop: 10, marginBottom: 10, marginLeft: 10, marginRight: 20 }}>
|
313
|
-
<
|
313
|
+
<MGText category='h6'>{item.balance._asCurrency(company.currencySymbol)}</MGText>
|
314
314
|
</View>
|
315
315
|
</>
|
316
316
|
);
|
@@ -323,8 +323,8 @@ export function MGCurrentAccount(props) {
|
|
323
323
|
}
|
324
324
|
<Card style={{ marginHorizontal: 30, marginBottom: 10 }}>
|
325
325
|
<View style={{ alignItems: 'center' }}>
|
326
|
-
<
|
327
|
-
<
|
326
|
+
<MGText category='p1'>{mgFunctionsLib.i18nString('balance', props.language)}</MGText>
|
327
|
+
<MGText category='h3'>{props.balanceComposition.total._asCurrency(props.company.currencySymbol)}</MGText>
|
328
328
|
</View>
|
329
329
|
</Card>
|
330
330
|
</View>
|
@@ -337,8 +337,8 @@ export function MGCurrentAccount(props) {
|
|
337
337
|
<Card header={cardHeader(item)} footer={cardFooter(props.company, item)} style={{ marginBottom: 10, marginHorizontal: 10 }}>
|
338
338
|
<View style={{ flexDirection: 'column' }}>
|
339
339
|
<View>
|
340
|
-
<
|
341
|
-
<
|
340
|
+
<MGText category='p1'>{item.description}</MGText>
|
341
|
+
<MGText category='p2'>{props.subDescription(item)}</MGText>
|
342
342
|
</View>
|
343
343
|
</View>
|
344
344
|
</Card>
|
package/functions.js
CHANGED
@@ -1,7 +1,7 @@
|
|
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 {
|
4
|
+
import { Button } from '@ui-kitten/components';
|
5
5
|
import { Box } from 'native-base';
|
6
6
|
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
|
7
7
|
import moment from 'moment';
|