Correction de bugs

This commit is contained in:
Brice 2020-11-20 18:06:19 +01:00
parent 0a1c1f896a
commit 4a574e9a6f
24 changed files with 4256 additions and 4079 deletions

45
App.js
View File

@ -6,12 +6,17 @@
* @flow * @flow
*/ */
import React, { Component } from 'react'; import React from 'react';
import { ActionSheetProvider, connectActionSheet } from '@expo/react-native-action-sheet' import {ActionSheetProvider} from '@expo/react-native-action-sheet'
import { Platform, StyleSheet, Text, View, YellowBox, AsyncStorage } from 'react-native'; import {AsyncStorage, Platform, StyleSheet} from 'react-native';
import { createAppContainer, HeaderBackButton, createSwitchNavigator, createStackNavigator, createBottomTabNavigator, createDrawerNavigator } from 'react-navigation'; import {
createAppContainer,
createBottomTabNavigator,
createDrawerNavigator,
createStackNavigator,
createSwitchNavigator
} from 'react-navigation';
import OneSignal from 'react-native-onesignal'; import OneSignal from 'react-native-onesignal';
import _ from 'lodash';
import Connect from "./screens/login/Connect"; import Connect from "./screens/login/Connect";
import SplashScreen from "./screens/splashscreen/SplashScreen"; import SplashScreen from "./screens/splashscreen/SplashScreen";
import HelpMenu from "./screens/help/HelpMenu"; import HelpMenu from "./screens/help/HelpMenu";
@ -26,8 +31,6 @@ import ActivateAccount from "./screens/login/ActivateAccount";
import Notifications from "./screens/notifications/Notifications"; import Notifications from "./screens/notifications/Notifications";
import About from "./screens/configurations/About"; import About from "./screens/configurations/About";
import Configurations from "./screens/configurations/Configurations"; import Configurations from "./screens/configurations/Configurations";
import History from './screens/history-request/History'
import OptionsMenu from "./screens/optionMenu/OptionsMenu"; import OptionsMenu from "./screens/optionMenu/OptionsMenu";
import Home from "./screens/home/Home"; import Home from "./screens/home/Home";
import HistoryItemDetails from "./screens/history-request/HistoryItemDetails"; import HistoryItemDetails from "./screens/history-request/HistoryItemDetails";
@ -36,18 +39,13 @@ import HistoryRequester from "./screens/history-request/HistoryRequester";
import AddNetwork from "./screens/account/AddNetwork"; import AddNetwork from "./screens/account/AddNetwork";
import MyHistory from "./screens/history-request/MyHistory"; import MyHistory from "./screens/history-request/MyHistory";
import Icon from "react-native-vector-icons/FontAwesome5"; import Icon from "react-native-vector-icons/FontAwesome5";
import { Appbar } from 'react-native-paper';
import IconWithBadge from "./screens/IconWithBadge"
import I18n from "react-native-i18n"; import I18n from "react-native-i18n";
import Filter from './screens/home/Filter';
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';
import WalletDetail from './screens/wallet/WalletDetail'; import WalletDetail from './screens/wallet/WalletDetail';
import WalletSelect from './screens/wallet/WalletSelect'; import WalletSelect from './screens/wallet/WalletSelect';
import {PersistGate} from 'redux-persist/integration/react'; import {PersistGate} from 'redux-persist/integration/react';
import { store, persistor } from './redux/store'; import {persistor, store} from './redux/store';
import { Provider, connect } from 'react-redux'; import {Provider} from 'react-redux';
import WalletDepot from './screens/wallet/WalletDepot'; import WalletDepot from './screens/wallet/WalletDepot';
import WalletRetrait from './screens/wallet/WalletRetrait'; import WalletRetrait from './screens/wallet/WalletRetrait';
import CreateIdentification from './screens/identification/createIdentification'; import CreateIdentification from './screens/identification/createIdentification';
@ -73,10 +71,8 @@ import EnvoieCashVersCarteAgent from './screens/wallet/agent/EnvoieCashVersCarte
import EnvoiCashVersCashAgent from './screens/wallet/agent/EnvoiCashVersCashAgent'; import EnvoiCashVersCashAgent from './screens/wallet/agent/EnvoiCashVersCashAgent';
import ModifyIdentificationUser from './screens/identification/ModifyIdentificationUser'; import ModifyIdentificationUser from './screens/identification/ModifyIdentificationUser';
import CreateGroupNanoCredit from './screens/nano-credit/CreateGroupNanoCredit'; import CreateGroupNanoCredit from './screens/nano-credit/CreateGroupNanoCredit';
import { bindActionCreators } from 'redux';
import DemandValidationGroup from './screens/nano-credit/DemandGroupNanoCredit'; import DemandValidationGroup from './screens/nano-credit/DemandGroupNanoCredit';
import DemandGroupNanoCreditDetail from './screens/nano-credit/DemandGroupNanoCreditDetail'; import DemandGroupNanoCreditDetail from './screens/nano-credit/DemandGroupNanoCreditDetail';
import NavigationService from './utils/NavigationService';
import AdhererGroupNanoCredit from './screens/nano-credit/AdhererGroupNanoCredit'; import AdhererGroupNanoCredit from './screens/nano-credit/AdhererGroupNanoCredit';
import MyNanoCreditGroup from './screens/nano-credit/MyNanoCreditGroup'; import MyNanoCreditGroup from './screens/nano-credit/MyNanoCreditGroup';
import AskNanoCredit from './screens/nano-credit/AskNanoCredit'; import AskNanoCredit from './screens/nano-credit/AskNanoCredit';
@ -85,8 +81,6 @@ import CautionNanoCreditAgent from './screens/nano-credit/CautionNanoCreditAgent
import EpargnerArgentUser from './screens/nano-credit/EpargnerArgentUser'; import EpargnerArgentUser from './screens/nano-credit/EpargnerArgentUser';
import CasserEpargneUser from './screens/nano-credit/CasserEpargneUser'; import CasserEpargneUser from './screens/nano-credit/CasserEpargneUser';
import {IlinkEmitter} from './utils/events'; import {IlinkEmitter} from './utils/events';
import { fromBottom, fromLeft, zoomIn } from 'react-navigation-transitions';
import { readUser } from './webservice/AuthApi';
import EnvoieWalletToBankAgent from "./screens/wallet/agent/EnvoieWalletToBankAgent"; import EnvoieWalletToBankAgent from "./screens/wallet/agent/EnvoieWalletToBankAgent";
@ -119,8 +113,7 @@ const AppStack = createDrawerNavigator({
network:Networks,*/ network:Networks,*/
useraccount: { useraccount: {
screen: UserAccount, screen: UserAccount,
navigationOptions: { navigationOptions: {},
},
}, },
walletSelect: WalletSelect, walletSelect: WalletSelect,
createIdentificationUser: CreateIdentificationUser, createIdentificationUser: CreateIdentificationUser,
@ -403,9 +396,13 @@ class App extends React.Component {
global.appHasLoaded = false; global.appHasLoaded = false;
//Remove this method to stop OneSignal Debugging //Remove this method to stop OneSignal Debugging
OneSignal.setLogLevel(6, 0); OneSignal.setLogLevel(6, 0);
IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
// Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID. // Replace 'YOUR_ONESIGNAL_APP_ID' with your OneSignal App ID.
OneSignal.init("e8e7251f-713d-4658-9510-86d877fa6a7c", { kOSSettingsKeyAutoPrompt: false, kOSSettingsKeyInAppLaunchURL: false, kOSSettingsKeyInFocusDisplayOption: 2 }); OneSignal.init("e8e7251f-713d-4658-9510-86d877fa6a7c", {
kOSSettingsKeyAutoPrompt: false,
kOSSettingsKeyInAppLaunchURL: false,
kOSSettingsKeyInFocusDisplayOption: 2
});
OneSignal.inFocusDisplaying(2); // Controls what should happen if a notification is received while the app is open. 2 means that the notification will go directly to the device's notification center. OneSignal.inFocusDisplaying(2); // Controls what should happen if a notification is received while the app is open. 2 means that the notification will go directly to the device's notification center.
// The promptForPushNotifications function code will show the iOS push notification prompt. We recommend removing the following code and instead using an In-App Message to prompt for notification permission (See step below) // The promptForPushNotifications function code will show the iOS push notification prompt. We recommend removing the following code and instead using an In-App Message to prompt for notification permission (See step below)
@ -416,6 +413,10 @@ class App extends React.Component {
OneSignal.addEventListener('ids', this.onIds); OneSignal.addEventListener('ids', this.onIds);
} }
updateLangue() {
this.forceUpdate()
}
_getOneSignalIds = () => { _getOneSignalIds = () => {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {

File diff suppressed because one or more lines are too long

View File

@ -159,7 +159,9 @@
"DEPOSIT_TO_BANK": "Your Wallet to bank", "DEPOSIT_TO_BANK": "Your Wallet to bank",
"NANO_CREDIT": "Nano credit", "NANO_CREDIT": "Nano credit",
"NANO_CREDIT_LIST": "Nano credit list", "NANO_CREDIT_LIST": "Nano credit list",
"SAVINGS_LIST": "Savings list",
"NO_NANO_CREDIT": "No nano credit demand", "NO_NANO_CREDIT": "No nano credit demand",
"NO_SAVINGS": "No savings",
"NANO_CREDIT_DESCRIPTION": "Nano credit description", "NANO_CREDIT_DESCRIPTION": "Nano credit description",
"NANO_SANTE": "Nano health", "NANO_SANTE": "Nano health",
"NANO_SANTE_DESCRIPTION": "Nano health description", "NANO_SANTE_DESCRIPTION": "Nano health description",
@ -172,6 +174,8 @@
"CAUTION_CREDIT": "Caution credit demand", "CAUTION_CREDIT": "Caution credit demand",
"CAUTIONNEMENT_DONE": "Caution done", "CAUTIONNEMENT_DONE": "Caution done",
"ID_DEMAND": "Demand ID", "ID_DEMAND": "Demand ID",
"ID_SAVINGS": "Saving ID",
"NON_APPLICABLE": "Not applicable",
"DATE": "Date", "DATE": "Date",
"PAIEMENT_EAU_ELECTRICITY": "Water bill", "PAIEMENT_EAU_ELECTRICITY": "Water bill",
"PAIEMENT_ELECTRICITY": "Electricity bill", "PAIEMENT_ELECTRICITY": "Electricity bill",
@ -182,6 +186,7 @@
"DATE_REMBOURSEMENT_PREVU": "Expected refund date", "DATE_REMBOURSEMENT_PREVU": "Expected refund date",
"DATE_REMBOURSEMENT": "Refund date", "DATE_REMBOURSEMENT": "Refund date",
"AMOUNT_REFUND": "Amount reimbursed", "AMOUNT_REFUND": "Amount reimbursed",
"AMOUNT_WITHDRAWAL": "Amount withdrawal",
"AMOUNT_PARTIALLY_REFUND": "Amount partially refunded", "AMOUNT_PARTIALLY_REFUND": "Amount partially refunded",
"FINAL_DATE": "End date", "FINAL_DATE": "End date",
"CASSATION_DATE": "Cassation date", "CASSATION_DATE": "Cassation date",

View File

@ -166,7 +166,9 @@
"DEPOSIT_TO_BANK": "Votre Wallet vers banque", "DEPOSIT_TO_BANK": "Votre Wallet vers banque",
"NANO_CREDIT": "Nano crédit", "NANO_CREDIT": "Nano crédit",
"NANO_CREDIT_LIST": "Liste des nano crédit", "NANO_CREDIT_LIST": "Liste des nano crédit",
"SAVINGS_LIST": "Liste des épargnes",
"NO_NANO_CREDIT": "Aucune demande de nano crédit", "NO_NANO_CREDIT": "Aucune demande de nano crédit",
"NO_SAVINGS": "Aucune épargne",
"NANO_CREDIT_DESCRIPTION": "Nano crédit iLink", "NANO_CREDIT_DESCRIPTION": "Nano crédit iLink",
"NANO_SANTE": "Nano santé", "NANO_SANTE": "Nano santé",
"NANO_SANTE_DESCRIPTION": "Nano santé iLink", "NANO_SANTE_DESCRIPTION": "Nano santé iLink",
@ -179,16 +181,19 @@
"CAUTION_CREDIT": "Cautionner une demande de crédit", "CAUTION_CREDIT": "Cautionner une demande de crédit",
"CAUTIONNEMENT_DONE": "Cautionnement effectué", "CAUTIONNEMENT_DONE": "Cautionnement effectué",
"ID_DEMAND": "Identifiant de la demande", "ID_DEMAND": "Identifiant de la demande",
"ID_SAVINGS": "Identifiant de l'épargne",
"PAIEMENT_EAU": "Paiement eau", "PAIEMENT_EAU": "Paiement eau",
"PAIEMENT_ELECTRICITY": "Paiement électricité", "PAIEMENT_ELECTRICITY": "Paiement électricité",
"PAIEMENT_ECOLE": "Paiement école", "PAIEMENT_ECOLE": "Paiement école",
"PAIEMENT_CREDIT_TELEPHONIQUE": "Paiement crédit téléphonique", "PAIEMENT_CREDIT_TELEPHONIQUE": "Paiement crédit téléphonique",
"PAIEMENT_ABONNEMENT_TV": "Paiement abonnement TV", "PAIEMENT_ABONNEMENT_TV": "Paiement abonnement TV",
"NON_APPLICABLE": "Non applicable",
"DATE": "Date", "DATE": "Date",
"DEMAND_DATE": "Date de la demande", "DEMAND_DATE": "Date de la demande",
"DATE_REMBOURSEMENT_PREVU": "Date de remboursement prévu", "DATE_REMBOURSEMENT_PREVU": "Date de remboursement prévu",
"DATE_REMBOURSEMENT": "Date de remboursement", "DATE_REMBOURSEMENT": "Date de remboursement",
"AMOUNT_REFUND": "Montant remboursé", "AMOUNT_REFUND": "Montant remboursé",
"AMOUNT_WITHDRAWAL": "Montant retiré",
"AMOUNT_PARTIALLY_REFUND": "Montant partiellement remboursé", "AMOUNT_PARTIALLY_REFUND": "Montant partiellement remboursé",
"FINAL_DATE": "Date de fin", "FINAL_DATE": "Date de fin",
"CASSATION_DATE": "Date de cassation", "CASSATION_DATE": "Date de cassation",
@ -216,8 +221,8 @@
"DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de", "DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de",
"NO_WALLET_HISTORY": "Aucune transaction à ce jour", "NO_WALLET_HISTORY": "Aucune transaction à ce jour",
"DEMAND_SEND": "Demande envoyé", "DEMAND_SEND": "Demande envoyé",
"EPARGNE_DEPOSE": "Epargne déposé", "EPARGNE_DEPOSE": "Epargne déposée",
"BREAK_EPARGNE_DONE": "Epargne cassé avec succès", "BREAK_EPARGNE_DONE": "Epargne cassée avec succès",
"BREAK_EPARGNE": "Casser mon épargne", "BREAK_EPARGNE": "Casser mon épargne",
"ID_EPARGNE": "Identifiant de l'épargne", "ID_EPARGNE": "Identifiant de l'épargne",
"NO_DEMAND_CREATION_GROUP": "Aucune demande de création de groupe", "NO_DEMAND_CREATION_GROUP": "Aucune demande de création de groupe",

View File

@ -1,20 +1,19 @@
import React, { Component } from 'react' import React from 'react'
import { StyleSheet, Text, View, Alert, Platform, StatusBar } from 'react-native' import {Platform, StatusBar, StyleSheet, Text, View} from 'react-native'
import BaseScreen from "../BaseScreen"; import BaseScreen from "../BaseScreen";
import { responsiveWidth, responsiveHeight } from 'react-native-responsive-dimensions' import {responsiveWidth} from 'react-native-responsive-dimensions'
import {Dropdown} from 'react-native-material-dropdown' import {Dropdown} from 'react-native-material-dropdown'
import { disconnect } from './../../webservice/AuthApi' import I18n from 'react-native-i18n'
const theme = require('./../../utils/theme.json');
const route = require('./../../route.json')
import I18n, { getLanguages } from 'react-native-i18n'
import Configuration from "../../webservice/persistences/Configuration"; import Configuration from "../../webservice/persistences/Configuration";
import Button from "apsl-react-native-button"
require("./../../utils/Translations")
import {IlinkEmitter} from "./../../utils/events" import {IlinkEmitter} from "./../../utils/events"
import { Header } from "react-native-elements";
import Icon from 'react-native-vector-icons/MaterialIcons'; import Icon from 'react-native-vector-icons/MaterialIcons';
import {SafeAreaView} from 'react-navigation'; import {SafeAreaView} from 'react-navigation';
const theme = require('./../../utils/theme.json');
const route = require('./../../route.json')
require("./../../utils/Translations")
export default class Configurations extends BaseScreen { export default class Configurations extends BaseScreen {
static navigationOptions = { static navigationOptions = {
@ -26,6 +25,7 @@ export default class Configurations extends BaseScreen {
/> />
) )
}; };
constructor(props) { constructor(props) {
super(props, true) super(props, true)
this.state = this.initState() this.state = this.initState()
@ -45,6 +45,7 @@ export default class Configurations extends BaseScreen {
} }
} }
render() { render() {
console.log(this.state) console.log(this.state)
return (<View style={styles.container}> return (<View style={styles.container}>

View File

@ -123,7 +123,7 @@ export default class SuperViseurGroupeHome extends BaseScreen {
} }
}) })
IlinkEmitter.on("langueChange", this.updateLangue.bind(this)) IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
} }

View File

@ -4,20 +4,17 @@ import {responsiveFontSize, responsiveWidth} from 'react-native-responsive-dimen
import Icon from 'react-native-vector-icons/FontAwesome5'; import Icon from 'react-native-vector-icons/FontAwesome5';
import I18n from "react-native-i18n" import I18n from "react-native-i18n"
import 'moment/locale/fr' import 'moment/locale/fr';
import 'moment/locale/es-us' import 'moment/locale/es-us';
import 'moment/locale/en-au' import 'moment/locale/en-au';
import 'moment/locale/en-ca' import 'moment/locale/en-ca';
import 'moment/locale/en-ie' import 'moment/locale/en-ie';
import 'moment/locale/en-il' import 'moment/locale/en-il';
import 'moment/locale/en-nz' import 'moment/locale/en-nz';
import 'moment/locale/en-gb'
import DeviceInfo from 'react-native-device-info'
import {Color} from '../../config/Color'; import {Color} from '../../config/Color';
var moment = require('moment-timezone') let moment = require('moment-timezone');
const momentJS = require('moment') const momentJS = require('moment');
let route = require('./../../route.json'); let route = require('./../../route.json');
var theme = require('./../../utils/theme.json'); var theme = require('./../../utils/theme.json');
@ -26,6 +23,9 @@ export class HistoryItem extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-us";
console.log("Current Locale item", this.currentLocale);
moment.locale(this.currentLocale);
this.state = this.initState(); this.state = this.initState();
} }
@ -75,8 +75,6 @@ export class HistoryItem extends React.Component {
var today = new Date(); var today = new Date();
var l = this.props.selfData.date_creation; var l = this.props.selfData.date_creation;
let t = this.props.selfData.status; let t = this.props.selfData.status;
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale);
var re = moment.tz(this.props.selfData.date_creation, moment.tz.guess()).format(); var re = moment.tz(this.props.selfData.date_creation, moment.tz.guess()).format();
re = moment(re) re = moment(re)
return { return {
@ -134,6 +132,8 @@ export class HistoryItemSectionned extends PureComponent {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = this.initState(); this.state = this.initState();
this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-us";
moment.locale(this.currentLocale);
} }
render() { render() {
@ -246,6 +246,8 @@ export class HistoryListItem extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = this.initState(); this.state = this.initState();
this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-us";
moment.locale(this.currentLocale);
} }
initState() { initState() {

View File

@ -6,7 +6,6 @@ import {responsiveWidth} from 'react-native-responsive-dimensions'
import Icons from 'react-native-vector-icons/Ionicons' import Icons from 'react-native-vector-icons/Ionicons'
import {readUser} from "../../webservice/AuthApi"; import {readUser} from "../../webservice/AuthApi";
import isNil from 'lodash/isNil'; import isNil from 'lodash/isNil';
import I18n from "react-native-i18n";
import {creditDemandResetReducer, treatCreditDemand} from '../../webservice/CreditTreatDemandApi'; import {creditDemandResetReducer, treatCreditDemand} from '../../webservice/CreditTreatDemandApi';
import {creditCancelResetReducer, treatCancelDemand} from '../../webservice/CreditCancelDemandeApi'; import {creditCancelResetReducer, treatCancelDemand} from '../../webservice/CreditCancelDemandeApi';
import {getAgentNetworksList} from "../../webservice/NetworkApi"; import {getAgentNetworksList} from "../../webservice/NetworkApi";
@ -16,11 +15,21 @@ import Toast from 'react-native-root-toast';
import {Color} from '../../config/Color' import {Color} from '../../config/Color'
import Dialog from "react-native-dialog"; import Dialog from "react-native-dialog";
import {FontWeight} from '../../config/typography' import {FontWeight} from '../../config/typography'
import DeviceInfo from 'react-native-device-info' import I18n from "react-native-i18n";
import 'moment/locale/fr';
import 'moment/locale/es-us';
import 'moment/locale/en-au';
import 'moment/locale/en-ca';
import 'moment/locale/en-ie';
import 'moment/locale/en-il';
import 'moment/locale/en-nz';
let moment = require('moment-timezone');
const momentJS = require('moment');
let typesta = 0; let typesta = 0;
let moment = require('moment-timezone')
var colorback = 'white' var colorback = 'white'
let theme = require('./../../utils/theme.json'); let theme = require('./../../utils/theme.json');
@ -52,7 +61,10 @@ class HistoryItemDetails extends Component {
} else { } else {
this.item = this.props.navigation.getParam("item", null).item; this.item = this.props.navigation.getParam("item", null).item;
} }
console.log('HISTORY ITEM PROPS', this.props);
this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-us";
moment.locale(this.currentLocale);
let sta = '' let sta = ''
if (this.item.status === '1') { if (this.item.status === '1') {
typesta = 1 typesta = 1
@ -87,9 +99,6 @@ class HistoryItemDetails extends Component {
this.setState({user: user, networks: networks.networks}) this.setState({user: user, networks: networks.networks})
}); });
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale);
} }
isNormalInteger = (str) => { isNormalInteger = (str) => {

View File

@ -1,52 +1,39 @@
import React from 'react';
import React, { Component } from 'react'; import {Animated, AppState, ProgressBarAndroid, StatusBar, StyleSheet, Text, View} from 'react-native';
import {
Platform,
StyleSheet,
AppState,
FlatList,
ProgressBarAndroid,
TouchableOpacity,
Text,
View,
Animated,
StatusBar
} from 'react-native';
import ActionButton from 'react-native-action-button'; import ActionButton from 'react-native-action-button';
import Icon from 'react-native-vector-icons/MaterialIcons'; import Icon from 'react-native-vector-icons/MaterialIcons';
import { responsiveFontSize, responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'; import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
import { HistoryListItem, HistoryItemSectionned } from './HistoryItem'; import {HistoryItemSectionned, HistoryListItem} from './HistoryItem';
import { credrequester } from './../../route.json';
import {loadDemandeCredit, loadMyDemandeCredit} from './../../webservice/HistoryRequestApi'; import {loadDemandeCredit, loadMyDemandeCredit} from './../../webservice/HistoryRequestApi';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
import BaseScreen from './../../screens/BaseScreen'
import Button from 'apsl-react-native-button' import Button from 'apsl-react-native-button'
import {readUser} from "../../webservice/AuthApi"; import {readUser} from "../../webservice/AuthApi";
import Calendar from 'react-native-calendario'; import Calendar from 'react-native-calendario';
let route = require('./../../route.json') import I18n from "react-native-i18n";
import 'moment';
import 'moment/locale/fr' import 'moment/locale/fr';
import 'moment/locale/es-us' import 'moment/locale/es-us';
import 'moment/locale/en-au' import 'moment/locale/en-au';
import 'moment/locale/en-ca' import 'moment/locale/en-ca';
import 'moment/locale/en-ie' import 'moment/locale/en-ie';
import 'moment/locale/en-il' import 'moment/locale/en-il';
import 'moment/locale/en-nz' import 'moment/locale/en-nz';
import 'moment/locale/en-gb' import {accent, primary, primaryDark, purpleLight} from './../../utils/theme.json';
import moment from 'moment-timezone'; import {PagerTabIndicator} from 'react-native-best-viewpager'
let theme = require('./../../utils/theme.json') import IconWithBadge from "../IconWithBadge";
import { primary, primaryDark, accent, purpleLight, primaryLight } from './../../utils/theme.json'; import {Appbar, Divider, Menu, Provider} from 'react-native-paper';
import { PagerTabIndicator, PagerTitleIndicator, PagerDotIndicator } from 'react-native-best-viewpager' import DeviceInfo from 'react-native-device-info';
var moment = require('moment-timezone');
const momentJS = require('moment');
let route = require('./../../route.json');
let theme = require('./../../utils/theme.json');
var sortIcons; var sortIcons;
var sectionIcons; var sectionIcons;
import I18n from 'react-native-i18n'
require('./../../utils/Translations') require('./../../utils/Translations')
import { SinglePickerMaterialDialog } from 'react-native-material-dialog';
import { Header } from "react-native-elements";
import { withNavigationFocus } from "react-navigation";
import IconWithBadge from "../IconWithBadge";
import { Appbar, Paragraph, Menu, Divider, Provider } from 'react-native-paper';
import DeviceInfo from 'react-native-device-info'
class MyHistory extends React.Component { class MyHistory extends React.Component {
static navigatorStyle = { static navigatorStyle = {
@ -85,14 +72,16 @@ class MyHistory extends React.Component {
constructor(props) { constructor(props) {
super(props, true); super(props, true);
this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-us";
moment.locale(this.currentLocale);
this.state = this.initState(); this.state = this.initState();
readUser().then((user) => { this.setState({ user: user }) }) readUser().then((user) => {
this.setState({user: user})
})
this._populateIcons().then(() => { this._populateIcons().then(() => {
}); });
this.navigation = this.props.navigation this.navigation = this.props.navigation
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
//moment.locale(this.currentLocale);
}; };
@ -285,6 +274,7 @@ class MyHistory extends React.Component {
this.setState({listdata: rev, conserve: rev, isLoaded: true}); this.setState({listdata: rev, conserve: rev, isLoaded: true});
} }
} }
updateMyList(data) { updateMyList(data) {
if (!this.state.filter) { if (!this.state.filter) {
let rev = data.reverse() let rev = data.reverse()
@ -347,6 +337,7 @@ class MyHistory extends React.Component {
</View> </View>
) )
} }
animateSlidingUp(state = false) { animateSlidingUp(state = false) {
const height = responsiveHeight(100) const height = responsiveHeight(100)
let initialValue = !state ? 0 : height, let initialValue = !state ? 0 : height,
@ -365,6 +356,7 @@ class MyHistory extends React.Component {
} }
).start() ).start()
} }
_openMenu = () => this.setState({visibleMenu: true}); _openMenu = () => this.setState({visibleMenu: true});
_closeMenu = () => this.setState({visibleMenu: false}); _closeMenu = () => this.setState({visibleMenu: false});
@ -384,14 +376,21 @@ class MyHistory extends React.Component {
<Appbar.Header dark={true} style={{backgroundColor: theme.primary}}> <Appbar.Header dark={true} style={{backgroundColor: theme.primary}}>
<Appbar.BackAction <Appbar.BackAction
onPress={() => { this.props.navigation.pop() }} onPress={() => {
this.props.navigation.pop()
}}
/> />
<Appbar.Content <Appbar.Content
title={I18n.t('CREDIT_MANAGE')} title={I18n.t('CREDIT_MANAGE')}
subtitle={this.state.position === 0 ? I18n.t('MY_DEMAND') : I18n.t('DEMAND_RECEIVE')} subtitle={this.state.position === 0 ? I18n.t('MY_DEMAND') : I18n.t('DEMAND_RECEIVE')}
/> />
<Appbar.Action icon="refresh" onPress={() => { this.refreshData() }} /> <Appbar.Action icon="refresh" onPress={() => {
<Appbar.Action icon="more-vert" onPress={() => { this._openMenu(); this.renderSliding(); }} /> this.refreshData()
}}/>
<Appbar.Action icon="more-vert" onPress={() => {
this._openMenu();
this.renderSliding();
}}/>
</Appbar.Header> </Appbar.Header>
{this.renderOptionsMenu()} {this.renderOptionsMenu()}
@ -401,6 +400,7 @@ class MyHistory extends React.Component {
); );
} }
renderSliding() { renderSliding() {
return ( return (
<Animated.View style={[styles.slidingup, {translateY: this.state.translateAnim}]}> <Animated.View style={[styles.slidingup, {translateY: this.state.translateAnim}]}>
@ -460,6 +460,7 @@ class MyHistory extends React.Component {
</View> </View>
</Animated.View>) </Animated.View>)
} }
renderSectionnedList(list) { renderSectionnedList(list) {
if (this.state.isLoaded) { if (this.state.isLoaded) {
@ -505,7 +506,9 @@ class MyHistory extends React.Component {
return (<HistoryListItem return (<HistoryListItem
user={this.state.user} user={this.state.user}
list={list} list={list}
refreshing={() => { this.refreshData() }} refreshing={() => {
this.refreshData()
}}
refresh={() => this.refreshData()} refresh={() => this.refreshData()}
isRefreshing={this.state.isRefreshing} isRefreshing={this.state.isRefreshing}
navigator={this.props.navigation} navigator={this.props.navigation}
@ -557,6 +560,7 @@ class MyHistory extends React.Component {
renderLoading() { renderLoading() {
return (<View><ProgressBarAndroid/><Text>{I18n.t('LOADING_DOTS')}</Text></View>) return (<View><ProgressBarAndroid/><Text>{I18n.t('LOADING_DOTS')}</Text></View>)
} }
showSlidingUpPanel() { showSlidingUpPanel() {
/* return (<SlidingUpPanel /* return (<SlidingUpPanel
style={styles.slidingup} style={styles.slidingup}
@ -633,6 +637,7 @@ class MyHistory extends React.Component {
_showDateEndPicker = () => this.setState({isDateEndTimePickerVisible: true}); _showDateEndPicker = () => this.setState({isDateEndTimePickerVisible: true});
_hideDateTimePicker = () => this.setState({isDateTimePickerVisible: false, isDateEndTimePickerVisible: false}); _hideDateTimePicker = () => this.setState({isDateTimePickerVisible: false, isDateEndTimePickerVisible: false});
/* /*
_handleDatePicked = (fromdate, enddate) => { _handleDatePicked = (fromdate, enddate) => {
console.log([fromdate, enddate]); console.log([fromdate, enddate]);
@ -786,6 +791,7 @@ class MyHistory extends React.Component {
}); });
} }
} }
export default MyHistory; export default MyHistory;
const datefilter = StyleSheet.create({ const datefilter = StyleSheet.create({
titleHeader: { titleHeader: {
@ -853,8 +859,7 @@ const styles = StyleSheet.create({
backgroundd_drawer: { backgroundd_drawer: {
backgroundColor: '#000', backgroundColor: '#000',
}, },
listbackground: { listbackground: {},
},
actionButtonIcon: { actionButtonIcon: {
fontSize: 20, fontSize: 20,
height: 22, height: 22,

View File

@ -23,7 +23,7 @@ import {IlinkEmitter} from '../../utils/events';
import {readUser} from '../../webservice/AuthApi'; import {readUser} from '../../webservice/AuthApi';
import {getEpargneInProgressAction, getEpargneInProgressReset} from '../../webservice/NanoCreditApi'; import {getEpargneInProgressAction, getEpargneInProgressReset} from '../../webservice/NanoCreditApi';
import {casserEpargneUserAction, casserEpargneUserReset} from '../../webservice/user/NanoCreditApi'; import {casserEpargneUserAction, casserEpargneUserReset} from '../../webservice/user/NanoCreditApi';
import {cutStringWithoutDot, displayTransactionType, nanoCreditHistoryLabel} from "../../utils/UtilsFunction"; import {cutStringWithoutDot, nanoCreditHistoryLabel} from "../../utils/UtilsFunction";
import * as Utils from "../../utils/DeviceUtils"; import * as Utils from "../../utils/DeviceUtils";
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import thousands from "thousands"; import thousands from "thousands";
@ -195,16 +195,7 @@ class CasserEpargneUser extends Component {
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}> <View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>Type</Text> <Text style={[styles.body2]}>{I18n.t('ID_SAVINGS')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
@ -289,7 +280,7 @@ class CasserEpargneUser extends Component {
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_fin}</Text> style={[Typography.caption1, Color.grayColor]}>{ isEqual(this.state.historyItemDetail.type, 'SIMPLE') ? I18n.t('NON_APPLICABLE') : this.state.historyItemDetail.date_fin}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -378,7 +369,7 @@ class CasserEpargneUser extends Component {
this.setState({displayModalHistory: true, historyItemDetail: item}) this.setState({displayModalHistory: true, historyItemDetail: item})
}} style={[styles.contentService, {borderBottomColor: Color.primaryColor}]}> }} style={[styles.contentService, {borderBottomColor: Color.primaryColor}]}>
{ {
Object.keys(omit(item, ['id', 'id_epargne', 'date_demande', 'date_fin', 'date_remboursement_prevu', 'date_validation', 'date_cassation', 'date_remboursement', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => ( Object.keys(omit(item, ['id', 'id_epargne', 'montant_retire', 'date_demande', 'date_fin', 'date_remboursement_prevu', 'date_validation', 'date_cassation', 'date_remboursement', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => (
<View style={{alignItems: 'center'}} key={i}> <View style={{alignItems: 'center'}} key={i}>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}> <Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
@ -443,7 +434,7 @@ class CasserEpargneUser extends Component {
) : ) :
( (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'flex-start'}}> <View style={{flex: 1, justifyContent: 'center', alignItems: 'flex-start'}}>
<Text style={Typography.body1}>{I18n.t('NO_NANO_CREDIT')}</Text> <Text style={Typography.body1}>{I18n.t('NO_SAVINGS')}</Text>
</View> </View>
) )
) )

View File

@ -1,30 +1,19 @@
import React from 'react';
import React, { Component } from 'react';
import { import {
Alert,
Platform,
StyleSheet,
AppState,
FlatList,
ProgressBarAndroid,
TouchableOpacity,
Text,
View,
Animated, Animated,
StatusBar AppState,
Platform,
ProgressBarAndroid,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native'; } from 'react-native';
import ActionButton from 'react-native-action-button'; import ActionButton from 'react-native-action-button';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {responsiveFontSize, responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions'; import {responsiveFontSize, responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
import { HistoryListItem, HistoryItemSectionned } from '../history-request/HistoryItem';
import { credrequester } from './../../route.json';
import { loadDemandeCredit, loadMyDemandeCredit } from './../../webservice/HistoryRequestApi';
import FontAwesome5 from 'react-native-vector-icons/FontAwesome5';
import BaseScreen from './../../screens/BaseScreen'
import Button from 'apsl-react-native-button'
import {readUser} from "../../webservice/AuthApi"; import {readUser} from "../../webservice/AuthApi";
import Calendar from 'react-native-calendario';
let route = require('./../../route.json')
import 'moment'; import 'moment';
import 'moment/locale/fr' import 'moment/locale/fr'
import 'moment/locale/es-us' import 'moment/locale/es-us'
@ -35,19 +24,9 @@ import 'moment/locale/en-il'
import 'moment/locale/en-nz' import 'moment/locale/en-nz'
import 'moment/locale/en-gb' import 'moment/locale/en-gb'
import moment from 'moment-timezone'; import moment from 'moment-timezone';
let theme = require('./../../utils/theme.json') import {accent, primary, primaryDark, purpleLight} from './../../utils/theme.json';
import { primary, primaryDark, accent, purpleLight, primaryLight } from './../../utils/theme.json';
import { PagerTabIndicator, PagerTitleIndicator, PagerDotIndicator } from 'react-native-best-viewpager'
var sortIcons;
var sectionIcons;
import I18n from 'react-native-i18n' import I18n from 'react-native-i18n'
require('./../../utils/Translations') import {Appbar, Provider} from 'react-native-paper';
import { SinglePickerMaterialDialog } from 'react-native-material-dialog';
import { Header } from "react-native-elements";
import { withNavigationFocus } from "react-navigation";
import IconWithBadge from "../IconWithBadge";
import { Appbar, Paragraph, Menu, Divider, Provider } from 'react-native-paper';
import DeviceInfo from 'react-native-device-info'
import {bindActionCreators} from 'redux'; import {bindActionCreators} from 'redux';
import {connect} from 'react-redux'; import {connect} from 'react-redux';
import {getNanoCreditDemandsAction, getNanoCreditDemandsReset} from '../../webservice/user/NanoCreditApi'; import {getNanoCreditDemandsAction, getNanoCreditDemandsReset} from '../../webservice/user/NanoCreditApi';
@ -55,7 +34,15 @@ import { IlinkEmitter } from '../../utils/events';
import {Typography} from '../../config/typography'; import {Typography} from '../../config/typography';
import {ScrollView} from 'react-native-gesture-handler'; import {ScrollView} from 'react-native-gesture-handler';
import {Color} from '../../config/Color'; import {Color} from '../../config/Color';
import { color } from 'react-native-reanimated';
let route = require('./../../route.json')
let theme = require('./../../utils/theme.json')
var sortIcons;
var sectionIcons;
require('./../../utils/Translations')
class DemandValidationGroup extends React.Component { class DemandValidationGroup extends React.Component {
@ -93,8 +80,8 @@ class DemandValidationGroup extends React.Component {
this.props.getNanoCreditDemandsReset(); this.props.getNanoCreditDemandsReset();
this.navigation = this.props.navigation this.navigation = this.props.navigation
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
//moment.locale(this.currentLocale); moment.locale(this.currentLocale);
//IlinkEmitter.on('treatNanoGroupDemand', this.refreshData); //IlinkEmitter.on('treatNanoGroupDemand', this.refreshData);
}; };
@ -154,20 +141,29 @@ class DemandValidationGroup extends React.Component {
getDemandTypeIcon = (type) => { getDemandTypeIcon = (type) => {
switch (type) { switch (type) {
case 'creation': return 'account-multiple-plus'; case 'creation':
case 'suppression': return 'account-multiple-minus'; return 'account-multiple-plus';
case 'adhesion': return 'account-multiple-check' case 'suppression':
case 'nano_credit': return 'cash' return 'account-multiple-minus';
default: return 'account-multiple' case 'adhesion':
return 'account-multiple-check'
case 'nano_credit':
return 'cash'
default:
return 'account-multiple'
} }
} }
getDemandTypeColor = (type) => { getDemandTypeColor = (type) => {
switch (type) { switch (type) {
case 'creation': return 'green'; case 'creation':
case 'suppression': return 'red'; return 'green';
case 'adhesion': return Color.primaryColor case 'suppression':
case 'nano_credit': return Color.primaryColor return 'red';
case 'adhesion':
return Color.primaryColor
case 'nano_credit':
return Color.primaryColor
default: default:
return Color.primaryColor return Color.primaryColor
} }
@ -188,7 +184,8 @@ class DemandValidationGroup extends React.Component {
<View style={{flexDirection: 'row', alignItems: 'center',}}> <View style={{flexDirection: 'row', alignItems: 'center',}}>
<View style={styles.iconContent}> <View style={styles.iconContent}>
<Icon name={this.getDemandTypeIcon(item.type)} color={this.getDemandTypeColor(item.type)} size={35} /> <Icon name={this.getDemandTypeIcon(item.type)} color={this.getDemandTypeColor(item.type)}
size={35}/>
</View> </View>
</View> </View>
<View style={styles.content}> <View style={styles.content}>
@ -217,10 +214,12 @@ class DemandValidationGroup extends React.Component {
</View> </View>
<View style={{alignContent: 'flex-end', flex: 1, flexDirection: 'row'}}> <View style={{alignContent: 'flex-end', flex: 1, flexDirection: 'row'}}>
<Icon name="map-marker" style={[styles.descriptionIcon], { color: Color.accentColor, marginTop: 5 }} /> <Icon name="map-marker"
style={[styles.descriptionIcon], {color: Color.accentColor, marginTop: 5}}/>
<Text style={styles.time}>{item.country}</Text> <Text style={styles.time}>{item.country}</Text>
<Icon name="clock" style={[styles.descriptionIcon], { color: Color.accentColor, marginTop: 5 }} /> <Icon name="clock"
style={[styles.descriptionIcon], {color: Color.accentColor, marginTop: 5}}/>
<Text style={styles.time}> {dateFormat}</Text> <Text style={styles.time}> {dateFormat}</Text>
</View> </View>
@ -242,8 +241,7 @@ class DemandValidationGroup extends React.Component {
<Text style={Typography.body1}>{errorGetDemandsGroup.data.error}</Text> <Text style={Typography.body1}>{errorGetDemandsGroup.data.error}</Text>
</View> </View>
) )
} } else {
else {
return ( return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{errorGetDemandsGroup}</Text> <Text style={Typography.body1}>{errorGetDemandsGroup}</Text>
@ -332,13 +330,17 @@ class DemandValidationGroup extends React.Component {
<Appbar.Header dark={true} style={{backgroundColor: theme.primary}}> <Appbar.Header dark={true} style={{backgroundColor: theme.primary}}>
<Appbar.BackAction <Appbar.BackAction
onPress={() => { this.props.navigation.pop() }} onPress={() => {
this.props.navigation.pop()
}}
/> />
<Appbar.Content <Appbar.Content
title={I18n.t('MANAGE_GROUP')} title={I18n.t('MANAGE_GROUP')}
subtitle={this.state.position === 0 ? I18n.t('VALIDATION_DEMAND') : I18n.t('DELETE_DEMAND')} subtitle={this.state.position === 0 ? I18n.t('VALIDATION_DEMAND') : I18n.t('DELETE_DEMAND')}
/> />
<Appbar.Action icon="refresh" onPress={() => { this.refreshData() }} /> <Appbar.Action icon="refresh" onPress={() => {
this.refreshData()
}}/>
{/* <Appbar.Action icon="more-vert" onPress={() => { this._openMenu(); this.renderSliding(); }} /> */} {/* <Appbar.Action icon="more-vert" onPress={() => { this._openMenu(); this.renderSliding(); }} /> */}
</Appbar.Header> </Appbar.Header>
@ -394,8 +396,7 @@ const styles = StyleSheet.create({
backgroundd_drawer: { backgroundd_drawer: {
backgroundColor: '#000', backgroundColor: '#000',
}, },
listbackground: { listbackground: {},
},
actionButtonIcon: { actionButtonIcon: {
fontSize: 20, fontSize: 20,
height: 22, height: 22,

View File

@ -75,7 +75,7 @@ class DemandGroupNanoCreditDetail extends Component {
isBtnModifyAmountEnabled: false, isBtnModifyAmountEnabled: false,
id: this.props.navigation.getParam("id", null) id: this.props.navigation.getParam("id", null)
} }
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
this.props.getNanoCreditUniqueDemandsReset(); this.props.getNanoCreditUniqueDemandsReset();

View File

@ -82,7 +82,7 @@ class MyNanoCreditGroup extends Component {
isBtnModifyAmountEnabled: false, isBtnModifyAmountEnabled: false,
id: this.props.navigation.getParam("id", null) id: this.props.navigation.getParam("id", null)
} }
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
this.props.createGroupReset(); this.props.createGroupReset();

View File

@ -52,7 +52,7 @@ class Notifications extends BaseScreen {
constructor(props) { constructor(props) {
super(props); super(props);
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
} }

View File

@ -93,11 +93,11 @@ class OperateurOptionSelect extends Component {
redirectToRoute = (item) => { redirectToRoute = (item) => {
console.log("Redirection"); console.log("Item selected", item);
if (this.state.options.length > 0) { if (this.state.options.length > 0) {
this.props.navigation.push(this.state.options[0].screen, { this.props.navigation.push(this.state.options[0].screen, {
title: this.state.options[0].title, title: item.operator_name,
type: this.state.options[0].type type: this.state.options[0].type
}); });
} else { } else {

View File

@ -53,7 +53,7 @@ export default class PaiementFacture extends Component {
return I18n.t('IDENTIFIANT_ETUDIANT') return I18n.t('IDENTIFIANT_ETUDIANT')
case 'PAIEMENT_EAU': case 'PAIEMENT_EAU':
return I18n.t('NUMERO_ABONNE') return I18n.t('NUMERO_ABONNE')
case 'PAIEMENT_ELECTRICITE': case 'PAIEMENT_EAU_ELECTRICITE':
return I18n.t('NUMERO_ABONNE') return I18n.t('NUMERO_ABONNE')
case 'PAIEMENT_CREDIT_TELEPHONE': case 'PAIEMENT_CREDIT_TELEPHONE':
return I18n.t('PHONE_NUMBER') return I18n.t('PHONE_NUMBER')

View File

@ -9,8 +9,19 @@ import 'moment/locale/en-nz';
import 'moment/locale/es-us'; import 'moment/locale/es-us';
import 'moment/locale/fr'; import 'moment/locale/fr';
import React, {Component} from 'react'; import React, {Component} from 'react';
import { ActivityIndicator, Alert, Animated, Platform, ProgressBarAndroid, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import {
import DeviceInfo from 'react-native-device-info'; ActivityIndicator,
Alert,
Animated,
Platform,
ProgressBarAndroid,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import I18n from 'react-native-i18n'; import I18n from 'react-native-i18n';
import {responsiveWidth} from 'react-native-responsive-dimensions'; import {responsiveWidth} from 'react-native-responsive-dimensions';
import {TabBar} from 'react-native-tab-view'; import {TabBar} from 'react-native-tab-view';
@ -24,13 +35,31 @@ import Dialog from "react-native-dialog";
import {Typography} from '../../config/typography'; import {Typography} from '../../config/typography';
import * as Utils from '../../utils/DeviceUtils'; import * as Utils from '../../utils/DeviceUtils';
import {IlinkEmitter} from "../../utils/events"; import {IlinkEmitter} from "../../utils/events";
import { cutString, cutStringWithoutDot, isEmptyObject, transactionHistoryIlinkLabel, isIlinkWorldWallet, optionDepotScreen, optionIdentificationScreen, optionPaiementFacture, optionRetraitScreen, transactionHistoryLabel, optionNanoCreditScreen, optionNanoCreditAgentScreen, displayTransactionType } from '../../utils/UtilsFunction'; import {
cutString,
cutStringWithoutDot,
displayTransactionType,
isEmptyObject,
isIlinkWorldWallet,
optionDepotScreen,
optionIdentificationScreen,
optionNanoCreditAgentScreen,
optionPaiementFacture,
optionRetraitScreen,
transactionHistoryIlinkLabel
} from '../../utils/UtilsFunction';
import {depositActionReset} from '../../webservice/DepositApi'; import {depositActionReset} from '../../webservice/DepositApi';
import {baseUrl} from '../../webservice/IlinkConstants'; import {baseUrl} from '../../webservice/IlinkConstants';
import {getWalletDetailActivated, resetWalletListDetailReducer} from '../../webservice/WalletApi'; import {getWalletDetailActivated, resetWalletListDetailReducer} from '../../webservice/WalletApi';
import { getWalletTransactionHistory, getWalletTransactionHistoryReset,getHyperSuperTransactionHistoryAction, getHyperSuperTransactionHistoryReset } from '../../webservice/WalletTransactionHistoryApi'; import {
getHyperSuperTransactionHistoryAction,
getHyperSuperTransactionHistoryReset,
getWalletTransactionHistory,
getWalletTransactionHistoryReset
} from '../../webservice/WalletTransactionHistoryApi';
import {resetCommissionReducer, transferCommissionAction} from '../../webservice/WalletTransferCommission'; import {resetCommissionReducer, transferCommissionAction} from '../../webservice/WalletTransferCommission';
import {readUser} from '../../webservice/AuthApi'; import {readUser} from '../../webservice/AuthApi';
let moment = require('moment-timezone'); let moment = require('moment-timezone');
const thousands = require('thousands'); const thousands = require('thousands');
@ -78,15 +107,13 @@ class WalletDetail extends Component {
this.props.depositActionReset(); this.props.depositActionReset();
this.props.resetWalletListDetailReducer(); this.props.resetWalletListDetailReducer();
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
if (this.isHomeRootView) { if (this.isHomeRootView) {
let agentId = this.props.navigation.state.params.agentId; let agentId = this.props.navigation.state.params.agentId;
this.props.getWalletDetailActivated(agentId, true); this.props.getWalletDetailActivated(agentId, true);
this.props.getHyperSuperTransactionHistoryReset(); this.props.getHyperSuperTransactionHistoryReset();
} else {
}
else {
this.props.getWalletDetailActivated(this.props.navigation.state.params.wallet.id, false); this.props.getWalletDetailActivated(this.props.navigation.state.params.wallet.id, false);
if (isIlinkWorldWallet(this.props.navigation.state.params.wallet.type)) if (isIlinkWorldWallet(this.props.navigation.state.params.wallet.type))
this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id, true); this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id, true);
@ -94,6 +121,22 @@ class WalletDetail extends Component {
this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id, false); this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id, false);
} }
readUser().then((user) => {
if (user !== null && user !== undefined) {
if (user.category !== undefined) {
switch (user.category) {
case "super":
this.props.getHyperSuperTransactionHistoryAction(user.code_membre, false);
break;
case "hyper":
this.props.getHyperSuperTransactionHistoryAction(user.network_id, true);
break;
}
this.setState({});
}
}
});
this.willFocus = this.props.navigation.addListener( this.willFocus = this.props.navigation.addListener(
'willFocus', 'willFocus',
payload => { payload => {
@ -107,7 +150,7 @@ class WalletDetail extends Component {
if (user.category !== undefined) { if (user.category !== undefined) {
switch (user.category) { switch (user.category) {
case "super": case "super":
this.props.getHyperSuperTransactionHistoryAction(result.response.id, false); this.props.getHyperSuperTransactionHistoryAction(user.code_membre, false);
break; break;
case "hyper": case "hyper":
this.props.getHyperSuperTransactionHistoryAction(user.network_id, true); this.props.getHyperSuperTransactionHistoryAction(user.network_id, true);
@ -126,6 +169,7 @@ class WalletDetail extends Component {
}); });
} }
/* /*
static options(passProps) { static options(passProps) {
return { return {
@ -182,12 +226,12 @@ class WalletDetail extends Component {
}; };
componentDidMount() { componentDidMount() {
console.log('RESULT REQUEST', result);
const {result} = this.props; const {result} = this.props;
if (result !== null) { if (result !== null) {
if (typeof result.response !== 'undefined') { if (typeof result.response !== 'undefined') {
const wallet = result.response[0]; const wallet = result.response[0];
readUser().then((user) => { /* readUser().then((user) => {
if (user !== null && user !== undefined) { if (user !== null && user !== undefined) {
if (user.category !== undefined) { if (user.category !== undefined) {
switch (user.category) { switch (user.category) {
@ -201,7 +245,7 @@ class WalletDetail extends Component {
this.setState({}); this.setState({});
} }
} }
}); });*/
this.setState({ this.setState({
wallet: wallet, wallet: wallet,
isTriggerRefresh: false isTriggerRefresh: false
@ -305,9 +349,7 @@ class WalletDetail extends Component {
/* if (typeof this.props.navigation.state.params.onRefreshDetail !== 'undefined') /* if (typeof this.props.navigation.state.params.onRefreshDetail !== 'undefined')
this.props.navigation.state.params.onRefreshDetail(); */ this.props.navigation.state.params.onRefreshDetail(); */
} } else {
else {
let agentId = this.props.navigation.state.params.agentId; let agentId = this.props.navigation.state.params.agentId;
this.props.getWalletDetailActivated(agentId, true); this.props.getWalletDetailActivated(agentId, true);
} }
@ -394,8 +436,16 @@ class WalletDetail extends Component {
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'row'}}>
<Tag primary <Tag primary
icon={<Icon name='swap-horizontal' size={20} color={Color.whiteColor} style={{ marginLeft: 15 }} />} icon={<Icon name='swap-horizontal' size={20} color={Color.whiteColor}
style={{ paddingRight: 10, width: 120, borderTopRightRadius: 0, borderBottomRightRadius: 0, borderRightWidth: 1, borderRightColor: Color.whiteColor }} style={{marginLeft: 15}}/>}
style={{
paddingRight: 10,
width: 120,
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
borderRightWidth: 1,
borderRightColor: Color.whiteColor
}}
onPress={() => { onPress={() => {
const {result} = this.props; const {result} = this.props;
@ -415,8 +465,7 @@ class WalletDetail extends Component {
], ],
{cancelable: false} {cancelable: false}
) )
} } else
else
this.renderDialogConfirmTransferCommission() this.renderDialogConfirmTransferCommission()
} }
@ -456,8 +505,10 @@ class WalletDetail extends Component {
</View> </View>
</View> </View>
<View style={styles.contentLeftItem}> <View style={styles.contentLeftItem}>
<Text numberOfLines={1} style={[Typography.caption2, Typography.semibold]} >{I18n.t('CREATION_DATE')}</Text> <Text numberOfLines={1}
<Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{moment(wallet.created_date).format('DD/MM/YYYY')}</Text> style={[Typography.caption2, Typography.semibold]}>{I18n.t('CREATION_DATE')}</Text>
<Text numberOfLines={1} adjustsFontSizeToFit={true}
style={Typography.caption1}>{moment(wallet.created_date).format('DD/MM/YYYY')}</Text>
</View> </View>
</View> </View>
); );
@ -505,7 +556,8 @@ class WalletDetail extends Component {
<Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}> <Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}>
{I18n.t('PRINCIPAL_ACCOUNT_TITLE')} {I18n.t('PRINCIPAL_ACCOUNT_TITLE')}
</Text> </Text>
<Text style={[Typography.body2]}>{`${thousands(wallet.balance_princ, ' ')} ${wallet.currency_code}`}</Text> <Text
style={[Typography.body2]}>{`${thousands(wallet.balance_princ, ' ')} ${wallet.currency_code}`}</Text>
</View> </View>
</View> </View>
@ -528,7 +580,8 @@ class WalletDetail extends Component {
<Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}> <Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}>
{I18n.t('COMMISSION_ACCOUNT_TITLE')} {I18n.t('COMMISSION_ACCOUNT_TITLE')}
</Text> </Text>
<Text style={Typography.body2}>{`${thousands(wallet.balance_com, ' ')} ${wallet.currency_code}`}</Text> <Text
style={Typography.body2}>{`${thousands(wallet.balance_com, ' ')} ${wallet.currency_code}`}</Text>
</View> </View>
</View> </View>
@ -551,7 +604,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('OPERATION')}</Text> <Text style={[styles.body2]}>{I18n.t('OPERATION')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -559,7 +613,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('TRANSACTION_ID')}</Text> <Text style={[styles.body2]}>{I18n.t('TRANSACTION_ID')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -567,7 +622,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Date</Text> <Text style={[styles.body2]}>Date</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -575,7 +631,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('INIT_COUNTRY')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('INIT_COUNTRY')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -583,7 +640,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -591,7 +649,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -599,7 +658,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -607,7 +667,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('EMETTEUR')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('EMETTEUR')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -615,7 +676,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('DESTINATAIRE')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('DESTINATAIRE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -623,7 +685,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('FINAL_COUNTRY')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('FINAL_COUNTRY')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -631,7 +694,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -639,7 +703,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('ACTIVE_WALLET')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('ACTIVE_WALLET')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text>
</View> </View>
</View> </View>
</View> </View>
@ -661,9 +726,11 @@ class WalletDetail extends Component {
renderSuperHyperHistoryTransactionItem = (item, index) => { renderSuperHyperHistoryTransactionItem = (item, index) => {
return ( return (
<TouchableOpacity onPress={() => { this.setState({ displaySuperHyperModalHistory: true, historyItemDetail: item }) }} style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}> <TouchableOpacity onPress={() => {
this.setState({displaySuperHyperModalHistory: true, historyItemDetail: item})
}} style={[styles.contentService, {borderBottomColor: Color.primaryColor}]}>
{ {
Object.keys(omit(item, ['id', 'id_transaction', 'montant2', 'date_cassation', 'etat', 'type', 'date_fin', 'duree_mois', 'id_epargne', 'type_historique', 'frais', 'init_country', 'final_country', 'source', 'emetteur', 'montant_net_final', 'montant_net_init', 'reseau_payeur', 'operation', 'retrait_cash', 'type_historique', 'type_caution', 'id_demande', 'montant_rembourse', 'partiellement_rembourse', 'duree_mois', 'etat', 'interet', 'taxe', 'date_validation', 'date_remboursement_prevu', 'date_remboursement', 'id_user', 'id_wallet_agent', 'id_network', 'user', 'user_phone', 'agent', 'codeParrain'])).map((element, i) => ( Object.keys(omit(item, ['id', 'id_transaction', 'montant_retire', 'montant2', 'date_cassation', 'etat', 'type', 'date_fin', 'duree_mois', 'id_epargne', 'type_historique', 'frais', 'init_country', 'final_country', 'source', 'emetteur', 'montant_net_final', 'montant_net_init', 'reseau_payeur', 'operation', 'retrait_cash', 'type_historique', 'type_caution', 'id_demande', 'montant_rembourse', 'partiellement_rembourse', 'duree_mois', 'etat', 'interet', 'taxe', 'date_validation', 'date_remboursement_prevu', 'date_remboursement', 'id_user', 'id_wallet_agent', 'id_network', 'user', 'user_phone', 'agent', 'codeParrain'])).map((element, i) => (
<View style={{alignItems: 'center'}} key={i}> <View style={{alignItems: 'center'}} key={i}>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}> <Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
{ {
@ -701,7 +768,17 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Type</Text> <Text style={[styles.body2]}>Type</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('CAUTION_TYPE')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.type_caution}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -709,7 +786,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text> <Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_demande}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_demande}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -717,7 +795,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('STATUS')}</Text> <Text style={[styles.body2]}>{I18n.t('STATUS')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.etat}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.etat}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -725,7 +804,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('DEMAND_DURATION_IN_MONTH')}</Text> <Text style={[styles.body2]}>{I18n.t('DEMAND_DURATION_IN_MONTH')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.duree_mois}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.duree_mois}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -733,7 +813,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -741,7 +822,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT_REFUND')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT_REFUND')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_rembourse + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_rembourse + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -749,7 +831,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT_PARTIALLY_REFUND')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT_PARTIALLY_REFUND')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.partiellement_rembourse + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.partiellement_rembourse + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -757,7 +840,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.taxe + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.taxe + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -765,7 +849,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('INTERET')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('INTERET')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.interet + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.interet + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -773,7 +858,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('WITHDRAWAL_IN_CASH')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('WITHDRAWAL_IN_CASH')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.retrait_cash + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.retrait_cash + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -781,7 +867,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('CREATION_DATE')}</Text> <Text style={[styles.body2]}>{I18n.t('CREATION_DATE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -789,7 +876,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('DEMAND_DATE')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('DEMAND_DATE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_demande}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_demande}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -797,7 +885,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('DATE_REMBOURSEMENT_PREVU')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('DATE_REMBOURSEMENT_PREVU')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_remboursement_prevu}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_remboursement_prevu}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -805,7 +894,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('DATE_REMBOURSEMENT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('DATE_REMBOURSEMENT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_remboursement}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_remboursement}</Text>
</View> </View>
</View> </View>
</View> </View>
@ -820,7 +910,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Type</Text> <Text style={[styles.body2]}>Type</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{displayTransactionType(this.state.historyItemDetail.type_historique)}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{displayTransactionType(this.state.historyItemDetail.type_historique)}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -828,7 +919,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text> <Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_demande}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_demande}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -836,7 +928,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('STATUS')}</Text> <Text style={[styles.body2]}>{I18n.t('STATUS')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.etat}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.etat}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -844,7 +937,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('DEMAND_DURATION_IN_MONTH')}</Text> <Text style={[styles.body2]}>{I18n.t('DEMAND_DURATION_IN_MONTH')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.duree_mois}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.duree_mois}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -852,7 +946,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Type</Text> <Text style={[styles.body2]}>Type</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.type}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.type}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -860,7 +955,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -868,7 +964,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.taxe + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.taxe + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -876,7 +973,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('INTERET')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('INTERET')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.interet + ' ' + wallet.currency_code}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.interet + ' ' + wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -884,7 +982,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('CREATION_DATE')}</Text> <Text style={[styles.body2]}>{I18n.t('CREATION_DATE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -892,7 +991,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('FINAL_DATE')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('FINAL_DATE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_fin}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{isEqual(this.state.historyItemDetail.type, 'SIMPLE') ? I18n.t('NON_APPLICABLE') : this.state.historyItemDetail.date_fin}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -900,7 +1000,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('CASSATION_DATE')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('CASSATION_DATE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_cassation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_cassation}</Text>
</View> </View>
</View> </View>
</View> </View>
@ -915,7 +1016,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('OPERATION')}</Text> <Text style={[styles.body2]}>{I18n.t('OPERATION')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -923,7 +1025,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>{I18n.t('TRANSACTION_ID')}</Text> <Text style={[styles.body2]}>{I18n.t('TRANSACTION_ID')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -931,7 +1034,8 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Date</Text> <Text style={[styles.body2]}>Date</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_creation}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -939,7 +1043,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('INIT_COUNTRY')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('INIT_COUNTRY')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -947,7 +1052,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant2}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant2}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -955,7 +1061,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -963,7 +1070,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -971,7 +1079,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('EMETTEUR')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('EMETTEUR')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -979,7 +1088,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('DESTINATAIRE')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('DESTINATAIRE')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -987,7 +1097,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('FINAL_COUNTRY')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('FINAL_COUNTRY')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -995,7 +1106,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -1003,7 +1115,8 @@ class WalletDetail extends Component {
<Text tyle={[Typography.body2]}>{I18n.t('ACTIVE_WALLET')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('ACTIVE_WALLET')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text> <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text>
</View> </View>
</View> </View>
</View> </View>
@ -1032,8 +1145,7 @@ class WalletDetail extends Component {
<Text style={Typography.body1}>{errorHistoryHyperSuper.data.error}</Text> <Text style={Typography.body1}>{errorHistoryHyperSuper.data.error}</Text>
</View> </View>
) )
} } else {
else {
return ( return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{errorHistoryHyperSuper}</Text> <Text style={Typography.body1}>{errorHistoryHyperSuper}</Text>
@ -1155,7 +1267,11 @@ class WalletDetail extends Component {
}, },
}, },
], ],
{ listener: (event) => { this.setState({ scrollHeaderY: event.nativeEvent.contentOffset.y }); } })}> {
listener: (event) => {
this.setState({scrollHeaderY: event.nativeEvent.contentOffset.y});
}
})}>
<View style={{marginTop: 80,}}> <View style={{marginTop: 80,}}>
{this.renderHeader(wallet)} {this.renderHeader(wallet)}
@ -1208,13 +1324,16 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('DEPOSIT')} {I18n.t('DEPOSIT')}
</Text> </Text>
</View> </View>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}> <Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
{I18n.t('DEPOSIT_DESCRIPTION')} {I18n.t('DEPOSIT_DESCRIPTION')}
</Text> </Text>
</View> </View>
@ -1253,13 +1372,16 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('WITHDRAWAL')} {I18n.t('WITHDRAWAL')}
</Text> </Text>
</View> </View>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}> <Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
{I18n.t('WITHDRAWAL_DESCRIPTION')} {I18n.t('WITHDRAWAL_DESCRIPTION')}
</Text> </Text>
</View> </View>
@ -1298,7 +1420,8 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={{paddingTop: 20,}}> <View style={{paddingTop: 20,}}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_CREDIT')} {I18n.t('NANO_CREDIT')}
</Text> </Text>
</View> </View>
@ -1309,7 +1432,8 @@ class WalletDetail extends Component {
<View style={[styles.containerTouch]}> <View style={[styles.containerTouch]}>
<TouchableOpacity style={styles.contain} <TouchableOpacity style={styles.contain}
onPress={() => { }} onPress={() => {
}}
activeOpacity={0.9}> activeOpacity={0.9}>
<Icon name='heart-multiple' <Icon name='heart-multiple'
color={Color.primaryColor} color={Color.primaryColor}
@ -1319,7 +1443,8 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={{paddingTop: 20,}}> <View style={{paddingTop: 20,}}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_SANTE')} {I18n.t('NANO_SANTE')}
</Text> </Text>
</View> </View>
@ -1354,13 +1479,16 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('PAIEMENT_FACTURE')} {I18n.t('PAIEMENT_FACTURE')}
</Text> </Text>
</View> </View>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}> <Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
</Text> </Text>
</View> </View>
@ -1390,13 +1518,16 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}> <Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('CREATION_IDENTIFICATION_DESCRIPTION')} {I18n.t('CREATION_IDENTIFICATION_DESCRIPTION')}
</Text> </Text>
</View> </View>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}> <Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
</Text> </Text>
</View> </View>
@ -1434,7 +1565,9 @@ class WalletDetail extends Component {
renderHistoryTransactionItem = (item, index, wallet) => { renderHistoryTransactionItem = (item, index, wallet) => {
return ( return (
<TouchableOpacity onPress={() => { this.setState({ displayModalHistory: true, historyItemDetail: item }) }} style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}> <TouchableOpacity onPress={() => {
this.setState({displayModalHistory: true, historyItemDetail: item})
}} style={[styles.contentService, {borderBottomColor: Color.primaryColor}]}>
{ {
isIlinkWorldWallet(wallet.type) ? isIlinkWorldWallet(wallet.type) ?
Object.keys(omit(item, ['id', 'id_transaction', 'type', 'frais', 'init_country', 'final_country', 'source', 'emetteur', 'montant_net_final', 'montant_net_init', 'reseau_payeur', 'operation'])).map((element, i) => ( Object.keys(omit(item, ['id', 'id_transaction', 'type', 'frais', 'init_country', 'final_country', 'source', 'emetteur', 'montant_net_final', 'montant_net_init', 'reseau_payeur', 'operation'])).map((element, i) => (
@ -1499,8 +1632,7 @@ class WalletDetail extends Component {
<Text style={Typography.body1}>{errorTransaction.data.error}</Text> <Text style={Typography.body1}>{errorTransaction.data.error}</Text>
</View> </View>
) )
} } else {
else {
return ( return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}> <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{errorTransaction}</Text> <Text style={Typography.body1}>{errorTransaction}</Text>

View File

@ -94,7 +94,7 @@ class WalletDetailUser extends Component {
this.heightImageBanner = Utils.scaleWithPixel(250, 1); this.heightImageBanner = Utils.scaleWithPixel(250, 1);
this.marginTopBanner = this.heightImageBanner - this.state.heightHeader - 40; this.marginTopBanner = this.heightImageBanner - this.state.heightHeader - 40;
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb"; this.currentLocale = I18n.locale.includes("fr") ? "fr" : "en-gb";
moment.locale(this.currentLocale); moment.locale(this.currentLocale);
IlinkEmitter.on("langueChange", this.updateLangue.bind(this)); IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
IlinkEmitter.on("refreshWallet", this.refresh); IlinkEmitter.on("refreshWallet", this.refresh);

View File

@ -448,7 +448,7 @@ class WalletOptionSelect extends Component {
{ {
!isNil(this.state.user.category) ? !isNil(this.state.user.category) ?
Object.keys(omit(item, ['id', 'retrait_cash', 'type_historique', 'type_caution', 'id_demande', 'montant_rembourse', 'partiellement_rembourse', 'duree_mois', 'etat', 'interet', 'taxe', 'date_validation', 'date_remboursement_prevu', 'date_remboursement', 'id_user', 'id_wallet_agent', 'id_network', 'user', 'user_phone', 'agent', 'codeParrain'])).map((element, i) => ( Object.keys(omit(item, ['id', 'retrait_cash', 'montant_retire', 'type_historique', 'type_caution', 'id_demande', 'montant_rembourse', 'partiellement_rembourse', 'duree_mois', 'etat', 'interet', 'taxe', 'date_validation', 'date_remboursement_prevu', 'date_remboursement', 'id_user', 'id_wallet_agent', 'id_network', 'user', 'user_phone', 'agent', 'codeParrain'])).map((element, i) => (
<View style={{alignItems: 'center'}} key={i}> <View style={{alignItems: 'center'}} key={i}>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}> <Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
@ -463,7 +463,7 @@ class WalletOptionSelect extends Component {
</View> </View>
)) ))
: :
Object.keys(omit(item, ['id', 'type', 'id_epargne', 'type_historique', 'date_demande', 'date_fin', 'date_remboursement_prevu', 'date_validation', 'date_cassation', 'date_remboursement', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'etat', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'type_caution', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => ( Object.keys(omit(item, ['id', 'type', 'montant_retire', 'id_epargne', 'type_historique', 'date_demande', 'date_fin', 'date_remboursement_prevu', 'date_validation', 'date_cassation', 'date_remboursement', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'etat', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'type_caution', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => (
<View style={{alignItems: 'center'}} key={i}> <View style={{alignItems: 'center'}} key={i}>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}> <Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
@ -504,6 +504,15 @@ class WalletOptionSelect extends Component {
style={[Typography.caption1, Color.grayColor]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text> style={[Typography.caption1, Color.grayColor]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('CAUTION_TYPE')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.type_caution}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text> <Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text>
@ -636,11 +645,11 @@ class WalletOptionSelect extends Component {
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('ID_DEMAND')}</Text> <Text style={[styles.body2]}>{I18n.t('ID_SAVINGS')}</Text>
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_demande}</Text> style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_epargne}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
@ -679,6 +688,15 @@ class WalletOptionSelect extends Component {
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + this.state.wallet.currency_code}</Text> style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant + ' ' + this.state.wallet.currency_code}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT_WITHDRAWAL')}</Text>
</View>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_retire + ' ' + this.state.wallet.currency_code}</Text>
</View>
</View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}> <View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text> <Text tyle={[Typography.body2]}>{I18n.t('TAXES')}</Text>
@ -712,7 +730,7 @@ class WalletOptionSelect extends Component {
</View> </View>
<View style={{flex: 1, alignItems: 'flex-end'}}> <View style={{flex: 1, alignItems: 'flex-end'}}>
<Text <Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date_fin}</Text> style={[Typography.caption1, Color.grayColor]}>{isEqual(this.state.historyItemDetail.type, 'SIMPLE') ? I18n.t('NON_APPLICABLE') : this.state.historyItemDetail.date_fin}</Text>
</View> </View>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 10}}> <View style={{flexDirection: 'row', marginTop: 10}}>

View File

@ -373,11 +373,7 @@ export const optionRetraitUserScreen = {
screen: '', screen: '',
icon: 'credit-card', icon: 'credit-card',
title: 'WITHDRAWAL_BANK_TO_WALLET', title: 'WITHDRAWAL_BANK_TO_WALLET',
}, { }
screen: '',
icon: 'credit-card',
title: 'WITHDRAWAL_BANK_TO_CASH',
},
] ]
} }

View File

@ -161,6 +161,7 @@
"NANO_CREDIT_LIST": "Nano credit list", "NANO_CREDIT_LIST": "Nano credit list",
"SAVINGS_LIST": "Savings list", "SAVINGS_LIST": "Savings list",
"NO_NANO_CREDIT": "No nano credit demand", "NO_NANO_CREDIT": "No nano credit demand",
"NO_SAVINGS": "No savings",
"NANO_CREDIT_DESCRIPTION": "Nano credit description", "NANO_CREDIT_DESCRIPTION": "Nano credit description",
"NANO_SANTE": "Nano health", "NANO_SANTE": "Nano health",
"NANO_SANTE_DESCRIPTION": "Nano health description", "NANO_SANTE_DESCRIPTION": "Nano health description",
@ -173,8 +174,10 @@
"CAUTION_CREDIT": "Caution credit demand", "CAUTION_CREDIT": "Caution credit demand",
"CAUTIONNEMENT_DONE": "Caution done", "CAUTIONNEMENT_DONE": "Caution done",
"ID_DEMAND": "Demand ID", "ID_DEMAND": "Demand ID",
"ID_SAVINGS": "Saving ID",
"NON_APPLICABLE": "Not applicable",
"DATE": "Date", "DATE": "Date",
"PAIEMENT_EAU_ELECTRICITY": "Water bill", "PAIEMENT_EAU": "Water bill",
"PAIEMENT_ELECTRICITY": "Electricity bill", "PAIEMENT_ELECTRICITY": "Electricity bill",
"PAIEMENT_ECOLE": "School fees", "PAIEMENT_ECOLE": "School fees",
"PAIEMENT_CREDIT_TELEPHONIQUE": "Phone credit bills", "PAIEMENT_CREDIT_TELEPHONIQUE": "Phone credit bills",

View File

@ -168,6 +168,7 @@
"NANO_CREDIT_LIST": "Liste des nano crédit", "NANO_CREDIT_LIST": "Liste des nano crédit",
"SAVINGS_LIST": "Liste des épargnes", "SAVINGS_LIST": "Liste des épargnes",
"NO_NANO_CREDIT": "Aucune demande de nano crédit", "NO_NANO_CREDIT": "Aucune demande de nano crédit",
"NO_SAVINGS": "Aucune épargne",
"NANO_CREDIT_DESCRIPTION": "Nano crédit iLink", "NANO_CREDIT_DESCRIPTION": "Nano crédit iLink",
"NANO_SANTE": "Nano santé", "NANO_SANTE": "Nano santé",
"NANO_SANTE_DESCRIPTION": "Nano santé iLink", "NANO_SANTE_DESCRIPTION": "Nano santé iLink",
@ -180,11 +181,13 @@
"CAUTION_CREDIT": "Cautionner une demande de crédit", "CAUTION_CREDIT": "Cautionner une demande de crédit",
"CAUTIONNEMENT_DONE": "Cautionnement effectué", "CAUTIONNEMENT_DONE": "Cautionnement effectué",
"ID_DEMAND": "Identifiant de la demande", "ID_DEMAND": "Identifiant de la demande",
"ID_SAVINGS": "Identifiant de l'épargne",
"PAIEMENT_EAU": "Paiement eau", "PAIEMENT_EAU": "Paiement eau",
"PAIEMENT_ELECTRICITY": "Paiement électricité", "PAIEMENT_ELECTRICITY": "Paiement électricité",
"PAIEMENT_ECOLE": "Paiement école", "PAIEMENT_ECOLE": "Paiement école",
"PAIEMENT_CREDIT_TELEPHONIQUE": "Paiement crédit téléphonique", "PAIEMENT_CREDIT_TELEPHONIQUE": "Paiement crédit téléphonique",
"PAIEMENT_ABONNEMENT_TV": "Paiement abonnement TV", "PAIEMENT_ABONNEMENT_TV": "Paiement abonnement TV",
"NON_APPLICABLE": "Non applicable",
"DATE": "Date", "DATE": "Date",
"DEMAND_DATE": "Date de la demande", "DEMAND_DATE": "Date de la demande",
"DATE_REMBOURSEMENT_PREVU": "Date de remboursement prévu", "DATE_REMBOURSEMENT_PREVU": "Date de remboursement prévu",
@ -218,8 +221,8 @@
"DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de", "DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de",
"NO_WALLET_HISTORY": "Aucune transaction à ce jour", "NO_WALLET_HISTORY": "Aucune transaction à ce jour",
"DEMAND_SEND": "Demande envoyé", "DEMAND_SEND": "Demande envoyé",
"EPARGNE_DEPOSE": "Epargne déposé", "EPARGNE_DEPOSE": "Epargne déposée",
"BREAK_EPARGNE_DONE": "Epargne cassé avec succès", "BREAK_EPARGNE_DONE": "Epargne cassée avec succès",
"BREAK_EPARGNE": "Casser mon épargne", "BREAK_EPARGNE": "Casser mon épargne",
"ID_EPARGNE": "Identifiant de l'épargne", "ID_EPARGNE": "Identifiant de l'épargne",
"NO_DEMAND_CREATION_GROUP": "Aucune demande de création de groupe", "NO_DEMAND_CREATION_GROUP": "Aucune demande de création de groupe",

View File

@ -69,6 +69,7 @@ export const getNanoCreditAccount = testBaseUrl + '/walletService/groups/nanoCre
export const getNanoCreditUserHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/all_demands'; export const getNanoCreditUserHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/all_demands';
export const getNanoCreditAgentHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/guarantee_demands'; export const getNanoCreditAgentHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/guarantee_demands';
export const getHyperviseurHistoriqueUrl = testBaseUrl + '/walletService/wallets/all_hyper_history'; export const getHyperviseurHistoriqueUrl = testBaseUrl + '/walletService/wallets/all_hyper_history';
export const getSuperviseurHistoriqueUrl = testBaseUrl + '/walletService/wallets/all_super_history';
export const getBankUrl = testBaseUrl + '/walletService/wallets/users/operators/bank'; export const getBankUrl = testBaseUrl + '/walletService/wallets/users/operators/bank';
export const getHistoryNanoPendingCreditUrl = testBaseUrl + '/walletService/groups/nanoCredit/demands_in_progress'; export const getHistoryNanoPendingCreditUrl = testBaseUrl + '/walletService/groups/nanoCredit/demands_in_progress';
export const getHistoryEpargnePendingUrl = testBaseUrl + '/walletService/groups/nanoCredit/savings/demands_in_progress'; export const getHistoryEpargnePendingUrl = testBaseUrl + '/walletService/groups/nanoCredit/savings/demands_in_progress';

View File

@ -6,6 +6,7 @@ export default class Configuration {
constructor() { constructor() {
} }
async getCurrentLangue() { async getCurrentLangue() {
const da = await _getData() const da = await _getData()
if (da) resolve(da) if (da) resolve(da)
@ -26,6 +27,7 @@ export default class Configuration {
return pasObject.valeur_bool; return pasObject.valeur_bool;
} else return pasObject; } else return pasObject;
} }
async setPubActive(data) { async setPubActive(data) {
try { try {
if (data.pub) { if (data.pub) {
@ -39,6 +41,7 @@ export default class Configuration {
} }
} }
_getPubData() { _getPubData() {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
@ -52,12 +55,14 @@ export default class Configuration {
}) })
} }
setCurrentLangue(lang) { setCurrentLangue(lang) {
this._storeData(lang) this._storeData(lang)
db.update({"configuration.lang": {$exists: true}}, {configuration: {lang: lang}}, {upsert: true}, (err, num, upsert) => { db.update({"configuration.lang": {$exists: true}}, {configuration: {lang: lang}}, {upsert: true}, (err, num, upsert) => {
console.log([err, num, upsert]) console.log([err, num, upsert])
}) })
} }
setCurrentPas = async (pas) => { setCurrentPas = async (pas) => {
try { try {
await AsyncStorage.setItem('@config:pasObject', JSON.stringify(pas.pas)); await AsyncStorage.setItem('@config:pasObject', JSON.stringify(pas.pas));