mg-library 1.0.764 → 1.0.766
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 +5 -5
- package/login.js +8 -5
- package/package.json +1 -1
package/blocks.js
CHANGED
|
@@ -27,13 +27,13 @@ export function MGWelcome(props) {
|
|
|
27
27
|
{!mgFunctionsLib.isEmpty(props.company.address) &&
|
|
28
28
|
<MGText fontSize="$sm" lineHeight={16} style={{ textAlign: 'center' }} category='c1'>{props.company.address}</MGText>
|
|
29
29
|
}
|
|
30
|
-
{!mgFunctionsLib.isEmpty(props.company.city) &&
|
|
30
|
+
{!mgFunctionsLib.isEmpty(props.company.city) &&
|
|
31
31
|
<MGText fontSize="$sm" lineHeight={16} style={{ textAlign: 'center' }} category='c1'>{props.company.city}, {props.company.province}</MGText>
|
|
32
32
|
}
|
|
33
|
-
{!mgFunctionsLib.isEmpty(props.company.phone) &&
|
|
33
|
+
{!mgFunctionsLib.isEmpty(props.company.phone) &&
|
|
34
34
|
<MGText fontSize="$sm" lineHeight={16} style={{ textAlign: 'center' }} category='c1'>{props.company.phone}</MGText>
|
|
35
35
|
}
|
|
36
|
-
{!mgFunctionsLib.isEmpty(props.company.email) &&
|
|
36
|
+
{!mgFunctionsLib.isEmpty(props.company.email) &&
|
|
37
37
|
<MGText fontSize="$sm" lineHeight={16} style={{ textAlign: 'center' }} category='c1'>{props.company.email}</MGText>
|
|
38
38
|
}
|
|
39
39
|
</View>
|
|
@@ -116,7 +116,7 @@ export function MGBenefits(props) {
|
|
|
116
116
|
subTitle = props.subTitle;
|
|
117
117
|
|
|
118
118
|
let listHeaderComponent = (
|
|
119
|
-
<View>
|
|
119
|
+
<View style={{marginBottom: 10}}>
|
|
120
120
|
<MGSessionHeader module={subTitle} person={props.person} colors={props.colors} />
|
|
121
121
|
{props.beforeBenefits != undefined &&
|
|
122
122
|
<>
|
|
@@ -143,7 +143,7 @@ export function MGBenefits(props) {
|
|
|
143
143
|
let listFooterComponent = (<View></View>);
|
|
144
144
|
|
|
145
145
|
return (
|
|
146
|
-
<View style={
|
|
146
|
+
<View style={mgFunctionsLib.getBasicStyleSheet().availableArea}>
|
|
147
147
|
<FlatList
|
|
148
148
|
data={props.benefits}
|
|
149
149
|
keyExtractor={item => item.idNotice.toString()}
|
package/login.js
CHANGED
|
@@ -18,14 +18,14 @@ export function onPressLogin(dispatch, actions, app, apiUrl, language, data) {
|
|
|
18
18
|
dispatch(actions.login(appSession));
|
|
19
19
|
mgFunctionsLib.writeToLocalStorage(mgConstantsLib.ACCESS_TOKEN, appSession.accessToken);
|
|
20
20
|
|
|
21
|
-
console.log(
|
|
21
|
+
console.log(apiUrl);
|
|
22
22
|
|
|
23
23
|
dispatch(actions.apiSuccess());
|
|
24
24
|
})
|
|
25
25
|
.catch(error => {
|
|
26
26
|
dispatch(actions.apiError());
|
|
27
27
|
let msg = '';
|
|
28
|
-
if(error.message!=undefined)
|
|
28
|
+
if (error.message != undefined)
|
|
29
29
|
msg = ' |>| ' + error.message + ' |>| ' + error.response.data;
|
|
30
30
|
mgFunctionsLib.showToastError(mgFunctionsLib.i18nMessage('credentialsInvalid', language) + msg);
|
|
31
31
|
})
|
|
@@ -56,7 +56,7 @@ export function onPressLogout(dispatch, actions, app, apiUrl) {
|
|
|
56
56
|
axios.post(apiUrl + '/Logout', requestData, mgFunctionsLib.getRequestHeader())
|
|
57
57
|
.then(response => {
|
|
58
58
|
mgFunctionsLib.writeToLocalStorage(mgConstantsLib.ACCESS_TOKEN, '');
|
|
59
|
-
dispatch(actions.disconnectFromServer());
|
|
59
|
+
dispatch(actions.disconnectFromServer());
|
|
60
60
|
dispatch(actions.apiSuccess());
|
|
61
61
|
})
|
|
62
62
|
.catch(error => {
|
|
@@ -84,13 +84,16 @@ export function onAutoLogin(dispatch, actions, app, apiUrl, language, setAppStat
|
|
|
84
84
|
axios.post(apiUrl + '/Login', requestData, mgFunctionsLib.getRequestHeader())
|
|
85
85
|
.then(response => {
|
|
86
86
|
let appSession = response.data;
|
|
87
|
+
|
|
88
|
+
console.log(apiUrl);
|
|
89
|
+
|
|
87
90
|
if (!mgFunctionsLib.isEmpty(appSession))
|
|
88
91
|
dispatch(actions.login(appSession));
|
|
89
92
|
setNavigator(undefined);
|
|
90
93
|
dispatch(actions.apiSuccess());
|
|
91
94
|
setAppState({ isLoading: false });
|
|
92
95
|
})
|
|
93
|
-
.catch(error => {
|
|
96
|
+
.catch(error => {
|
|
94
97
|
dispatch(actions.apiError());
|
|
95
98
|
setAppState({ isLoading: false });
|
|
96
99
|
});
|
|
@@ -98,5 +101,5 @@ export function onAutoLogin(dispatch, actions, app, apiUrl, language, setAppStat
|
|
|
98
101
|
dispatch(actions.apiError());
|
|
99
102
|
setAppState({ isLoading: false });
|
|
100
103
|
}
|
|
101
|
-
});
|
|
104
|
+
});
|
|
102
105
|
}
|