mg-library 1.0.234 → 1.0.237

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/welcome.js +18 -60
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.234",
3
+ "version": "1.0.237",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/welcome.js CHANGED
@@ -11,57 +11,11 @@ export function MGWelcome(props) {
11
11
 
12
12
  const language = props.session.language;
13
13
 
14
- /* return (
14
+ return (
15
15
  <View>
16
- <View>
17
- <Card style={styles.cardCompany}>
18
- <CardItem style={styles.cardItemCompanyLogo}>
19
- <Image source={{uri: props.session.company.logoUrl}} style={{width: 100, height: 100}} />
20
- </CardItem>
21
- <CardItem style={styles.cardItemCompanyInfo}>
22
- <Text style={styles.textCompanyLegalName}>{props.session.company.legalName}</Text>
23
- <Text style={styles.textCompanyInfo}>{props.session.company.address}</Text>
24
- <Text style={styles.textCompanyInfo}>{props.session.company.city}, {props.session.company.province}</Text>
25
- <Text style={styles.textCompanyInfo}>{props.session.company.phone}</Text>
26
- <Text style={styles.textCompanyInfo}>{props.session.company.email}</Text>
27
- </CardItem>
28
- </Card>
29
- </View>
30
- {mgFunctions.hasNotices(props.session) &&
31
- <>
32
- <MGSubtitle text={mgFunctions.i18nString('notices', language)} />
33
- <FlatList
34
- data={props.session.notices}
35
- keyExtractor={item => item.idNotice.toString()}
36
- renderItem={({ item }) => (
37
- <Card>
38
- <CardItem header bordered style={styles.cardItemNoticeTitle}>
39
- <Text style={styles.textNoticeDescription}>{item.description}</Text>
40
- <Text style={styles.textNoticeDate}>{mgFunctions.getDateForExposition(item.noticeDate, language)}, {item.noticeTime._asTime()}</Text>
41
- </CardItem>
42
- {item.imageUrl!=undefined &&
43
- <CardItem bordered style={styles.cardItemNoticeImage}>
44
- <Image source={{uri: item.imageUrl}} style={{width: 150, height: 150}} />
45
- </CardItem>
46
- }
47
- <CardItem bordered>
48
- <Text>{item.content}</Text>
49
- </CardItem>
50
- </Card>
51
- )}
52
- />
53
- </>
54
- }
55
- {!mgFunctions.hasNotices(props.session) &&
56
- <Card style={{flex: 1, flexDirection: 'column', alignItems:'center'}}>
57
- <CardItem>
58
- <Image style={{width: 300, height: 150, marginTop: 30, marginBottom: 30}} source={require('./assets/welcome.png')} />
59
- </CardItem>
60
- </Card>
61
- }
16
+ HOLA
62
17
  </View>
63
18
  )
64
- */
65
19
 
66
20
  let companyInfoComponent = (
67
21
  <Card style={styles.cardCompany}>
@@ -85,25 +39,29 @@ export function MGWelcome(props) {
85
39
  </View>
86
40
  ) */
87
41
 
88
- let listHeaderComponent = (
89
- <>
90
- {mgFunctions.i18nString('spanish', language)}
91
- </>
92
- )
42
+ const ListHeaderComponent = () => {
43
+ return (
44
+ <>
45
+ {mgFunctions.i18nString('spanish', language)}
46
+ </>
47
+ )
48
+ }
93
49
 
94
- let listFooterComponent = (
95
- <>
96
- {mgFunctions.i18nString('english', language)}
97
- </>
98
- )
50
+ const ListFooterComponent = () => {
51
+ return (
52
+ <>
53
+ {mgFunctions.i18nString('english', language)}
54
+ </>
55
+ )
56
+ }
99
57
 
100
58
  if(mgFunctions.hasNotices(props.session)) {
101
59
  return (
102
60
  <FlatList
103
61
  data={props.session.notices}
104
62
  keyExtractor={item => item.idNotice.toString()}
105
- ListHeaderComponent={listHeaderComponent}
106
- ListFooterComponent={listFooterComponent}
63
+ ListHeaderComponent={ListHeaderComponent}
64
+ ListFooterComponent={ListFooterComponent}
107
65
  renderItem={({ item }) => (
108
66
  <Card>
109
67
  <CardItem header bordered style={styles.cardItemNoticeTitle}>