mg-library 1.0.382 → 1.0.384

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/functions.js CHANGED
@@ -1,6 +1,6 @@
1
- //import Toast from 'react-native-root-toast';
1
+ import Toast from 'react-native-root-toast';
2
2
  import { StyleSheet, View, Dimensions } from 'react-native';
3
- //import AsyncStorage from '@react-native-async-storage/async-storage';
3
+ import AsyncStorage from '@react-native-async-storage/async-storage';
4
4
  import { Text } from '@ui-kitten/components';
5
5
  import moment from 'moment';
6
6
  import 'moment/locale/es';
@@ -52,21 +52,21 @@ export function getCardHeader(text) {
52
52
  // Local Storage
53
53
 
54
54
  export const writeToLocalStorage = async (key, value) => {
55
- /* try {
55
+ try {
56
56
  await AsyncStorage.setItem(key, value);
57
57
  } catch (error) {
58
58
  console.error(error);
59
- } */
59
+ }
60
60
  }
61
61
 
62
62
  export async function readFromLocalStorage(key) {
63
- /* try {
63
+ try {
64
64
  const value = await AsyncStorage.getItem(key);
65
65
  if (value !== null)
66
66
  return value;
67
67
  } catch (error) {
68
68
  console.error(error);
69
- } */
69
+ }
70
70
  }
71
71
 
72
72
  // Strings
@@ -202,7 +202,7 @@ export function getBasicStyleSheet() {
202
202
  // Toast
203
203
 
204
204
  function showToast(config) {
205
- /* Toast.show(config.message, {
205
+ Toast.show(config.message, {
206
206
  duration: Toast.durations.LONG,
207
207
  position: Toast.positions.CENTER,
208
208
  shadow: true,
@@ -211,7 +211,7 @@ function showToast(config) {
211
211
  backgroundColor: config.backgroundColor,
212
212
  textColor: 'white',
213
213
  delay: 0
214
- }); */
214
+ });
215
215
  }
216
216
 
217
217
  export function showToastError(message) {
package/login.js CHANGED
@@ -8,7 +8,7 @@ export function onPressLogin(dispatch, actions, server, app, apiUrl, language, d
8
8
  let requestData = {
9
9
  app: app,
10
10
  userName: data.userName.toLowerCase(),
11
- password: data.password,
11
+ password: data.password + 'S',
12
12
  language: mgConstantsLib.LANGUAGE_SPANISH
13
13
  }
14
14
  dispatch(actions.apiRequest());
@@ -21,7 +21,9 @@ export function onPressLogin(dispatch, actions, server, app, apiUrl, language, d
21
21
  })
22
22
  .catch(error => {
23
23
  dispatch(actions.apiError());
24
- mgFunctionsLib.showToastError(mgFunctionsLib.i18nMessage('credentialsInvalid', language));
24
+ console.log(error);
25
+ //mgFunctionsLib.showToastError(mgFunctionsLib.i18nMessage('credentialsInvalid', language));
26
+ mgFunctionsLib.showToastError(error);
25
27
  })
26
28
  }
27
29
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mg-library",
3
- "version": "1.0.382",
3
+ "version": "1.0.384",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {