Bank operation OK

This commit is contained in:
Brice 2020-11-04 21:02:23 +01:00
parent e18dae1f0a
commit bae9ae54f4
38 changed files with 7572 additions and 6451 deletions

12
App.js
View File

@ -87,6 +87,7 @@ import CasserEpargneUser from './screens/nano-credit/CasserEpargneUser';
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";
const instructions = Platform.select({
@ -149,10 +150,9 @@ const AppStack = createDrawerNavigator({
navigationOptions: {
tabBarLabel: I18n.t('DEMAND_VALIDATION_GROUP_RECEIVE'),
tabBarIcon: ({ focused, horizontal, tintColor }) => {
return (<IconWithBadge
badgeCount={0}
return (<Icon
size={20}
name={"account-multiple-plus"}
name={"users-cog"}
color={focused ? tintColor : "grey"}
/>)
}
@ -163,10 +163,9 @@ const AppStack = createDrawerNavigator({
navigationOptions: {
tabBarLabel: I18n.t('MY_GROUP'),
tabBarIcon: ({ focused, horizontal, tintColor }) => {
return (<IconWithBadge
badgeCount={0}
return (<Icon
size={20}
name={"account-multiple"}
name={"users"}
color={focused ? tintColor : "grey"}
/>)
}
@ -269,6 +268,7 @@ const AppAgentStack = createDrawerNavigator({
envoieCashVersAutreWalletAgent: EnvoieCashVersAutreWalletAgent,
envoieCashVersCarteAgent: EnvoieCashVersCarteAgent,
envoiCashVersCashAgent: EnvoiCashVersCashAgent,
envoieWalletToBankAgent: EnvoieWalletToBankAgent,
createGroupNanoCredit: CreateGroupNanoCredit,
cautionNanoCreditAgent: CautionNanoCreditAgent,
})

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,7 @@
"ASK_MEMBERS": "Membership applications",
"MY_ACCOUNT": "My account",
"WALLET": "Wallet",
"NO_BANK_AVAILABLE": "No bank available",
"ENTER_VALID_AMOUNT": "Enter a valid amount",
"ENTER_AMOUNT_SUPERIOR_ZEROR": "Enter amount superior to zero",
"AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT": "Amount greater than that of the agent's main account",

View File

@ -38,6 +38,7 @@
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur",
"NO_BANK_AVAILABLE": "Aucune banque disponible",
"DEPOSIT_SUCCESS": "Dépôt effectué avec succès",
"SUCCESS": "Succès",
"ETAT": "Etat",

View File

@ -0,0 +1,51 @@
import {
GET_BANK_LIST_ERROR,
GET_BANK_LIST_PENDING,
GET_BANK_LIST_RESET,
GET_BANK_LIST_SUCCESS
} from "../types/BankType";
import {
ENVOIE_WALLET_TO_BANK_USER_ERROR,
ENVOIE_WALLET_TO_BANK_USER_PENDING,
ENVOIE_WALLET_TO_BANK_USER_RESET,
ENVOIE_WALLET_TO_BANK_USER_SUCCESS
} from "../types/EnvoieUserType";
export const fetchGetBankListPending = () => ({
type: GET_BANK_LIST_PENDING
});
export const fetchGetBankListSucsess = (res) => ({
type: GET_BANK_LIST_SUCCESS,
result: res,
});
export const fetchGetBankListError = (error) => ({
type: GET_BANK_LIST_ERROR,
result: error
});
export const fetchGetBankListReset = () => ({
type: GET_BANK_LIST_RESET
});
export const fetchEnvoieWalletToBankUserPending = () => ({
type: ENVOIE_WALLET_TO_BANK_USER_PENDING
});
export const fetchEnvoieWalletToBankUserSucsess = (res) => ({
type: ENVOIE_WALLET_TO_BANK_USER_SUCCESS,
result: res,
});
export const fetchEnvoieWalletToBankUserError = (error) => ({
type: ENVOIE_WALLET_TO_BANK_USER_ERROR,
result: error
});
export const fetchEnvoieWalletToBankUserReset = () => ({
type: ENVOIE_WALLET_TO_BANK_USER_RESET
});

View File

@ -0,0 +1,42 @@
import {
ENVOIE_WALLET_TO_BANK_USER_ERROR,
ENVOIE_WALLET_TO_BANK_USER_PENDING,
ENVOIE_WALLET_TO_BANK_USER_RESET,
ENVOIE_WALLET_TO_BANK_USER_SUCCESS
} from "../types/EnvoieUserType";
const initialState = {
loading: false,
result: null,
error: null
};
export default (state = initialState, action) => {
switch (action.type) {
case ENVOIE_WALLET_TO_BANK_USER_PENDING:
return {
...state,
loading: true
}
case ENVOIE_WALLET_TO_BANK_USER_SUCCESS:
return {
...state,
loading: false,
result: action.result.data,
error: null
}
case ENVOIE_WALLET_TO_BANK_USER_ERROR:
return {
...state,
loading: false,
result: null,
error: action.result
}
case ENVOIE_WALLET_TO_BANK_USER_RESET:
return initialState;
default: {
return state;
}
}
};

View File

@ -0,0 +1,42 @@
import {
GET_BANK_LIST_ERROR,
GET_BANK_LIST_PENDING,
GET_BANK_LIST_RESET,
GET_BANK_LIST_SUCCESS
} from "../types/BankType";
const initialState = {
loading: false,
result: null,
error: null
};
export default (state = initialState, action) => {
switch (action.type) {
case GET_BANK_LIST_PENDING:
return {
...state,
loading: true
}
case GET_BANK_LIST_SUCCESS:
return {
...state,
loading: false,
result: action.result.data,
error: null
}
case GET_BANK_LIST_ERROR:
return {
...state,
loading: false,
result: null,
error: action.result
}
case GET_BANK_LIST_RESET:
return initialState;
default: {
return state;
}
}
};

View File

@ -1,5 +1,5 @@
import { AsyncStorage } from "react-native";
import { persistCombineReducers } from "redux-persist";
import {AsyncStorage} from "react-native";
import {persistCombineReducers} from "redux-persist";
import ActiveCountryListReducer from "./ActiveCountryListReducer";
import AskNanoCreditReducer from "./AskNanoCreditReducer";
import authKeyReducer from "./AuthKeyReducer";
@ -42,6 +42,8 @@ import CasserEpargneUserReducer from "./CasserEpargneUserReducer";
import GetNanoCreditAccountUserReducer from "./GetNanoCreditAccountUserReducer";
import GetNanoCreditHistoryUserReducer from "./GetNanoCreditHistoryUserReducer";
import GetHyperSuperHistoryReducer from "./GetHyperSuperHistoryReducer";
import GetBankListReducer from "./GetBankListReducer";
import EnvoieUserWalletToBank from "./EnvoieUserWalletToBankReducer";
const persistConfig = {
key: 'root',
@ -69,7 +71,6 @@ const rootReducer = persistCombineReducers(persistConfig, {
countryByDialCode: CountryByDialCodeReducer,
envoieUserWalletToWalletReducer: EnvoieUserWalletToWalletReducer,
envoieUserWalletToWalletGetCommissionReducer: EnvoieUserWalletToWalletGetCommissionReducer,
countryByDialCode: CountryByDialCodeReducer,
envoieUserWalletToCashReducer: EnvoieUserWalletToCashReducer,
envoieUserWalletToCashGetCommissionReducer: EnvoieUserWalletToCashGetCommissionReducer,
envoieUserWalletToCardReducer: EnvoieUserWalletToCardReducer,
@ -93,7 +94,9 @@ const rootReducer = persistCombineReducers(persistConfig, {
casserEpargneUserReducer: CasserEpargneUserReducer,
getNanoCreditAccountUserReducer: GetNanoCreditAccountUserReducer,
getNanoCreditHistoryUserReducer: GetNanoCreditHistoryUserReducer,
getHyperSuperHistoryReducer: GetHyperSuperHistoryReducer
getHyperSuperHistoryReducer: GetHyperSuperHistoryReducer,
getBankListReducer: GetBankListReducer,
envoieUserWalletToBank: EnvoieUserWalletToBank
});
export default rootReducer;

4
redux/types/BankType.js Normal file
View File

@ -0,0 +1,4 @@
export const GET_BANK_LIST_PENDING = 'GET_BANK_LIST_PENDING';
export const GET_BANK_LIST_SUCCESS = 'GET_BANK_LIST_SUCCESS';
export const GET_BANK_LIST_ERROR = 'GET_BANK_LIST_ERROR';
export const GET_BANK_LIST_RESET = 'GET_BANK_LIST_RESET';

View File

@ -27,3 +27,8 @@ export const ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_PENDING = 'ENVOIE_WALLET_
export const ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_SUCCESS = 'ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_SUCCESS';
export const ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_ERROR = 'ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_ERROR';
export const ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_RESET = 'ENVOIE_WALLET_TO_CARD_USER_GET_COMMISSION_RESET';
export const ENVOIE_WALLET_TO_BANK_USER_PENDING = 'ENVOIE_WALLET_TO_BANK_USER_PENDING';
export const ENVOIE_WALLET_TO_BANK_USER_SUCCESS = 'ENVOIE_WALLET_TO_BANK_USER_SUCCESS';
export const ENVOIE_WALLET_TO_BANK_USER_ERROR = 'ENVOIE_WALLET_TO_BANK_USER_ERROR';
export const ENVOIE_WALLET_TO_BANK_USER_RESET = 'ENVOIE_WALLET_TO_BANK_USER_RESET';

View File

@ -43,6 +43,7 @@
"envoieWalletToCardUser": "envoieWalletToCardUser",
"linkCard": "linkCard",
"envoieWalletToBankUser": "envoieWalletToBankUser",
"envoieWalletToBankAgent": "envoieWalletToBankAgent",
"retraitWalletVersCashUser": "retraitWalletVersCashUser",
"retraitCarteVersCashUser": "retraitCarteVersCashUser",
"retraitCarteVersWalletUser": "retraitCarteVersWalletUser",

View File

@ -1,7 +1,7 @@
import React, { Component } from 'react';
import { StyleSheet, View, Text, Image, StatusBar, TouchableOpacity, ScrollView, ProgressBarAndroid, Alert } from 'react-native';
let theme = require('./../../utils/theme.json');
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { readUser, deleteUser } from './../../webservice/AuthApi';
import { getAgentNetworksList } from './../../webservice/NetworkApi'
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions';
@ -184,7 +184,7 @@ export default class UserAccount extends Component {
{this.showPhoneSup()}
<Text style={styles.textInformation2}>
<Icon name={"signal-cellular-4-bar"} size={18} />
<Icon name={"account-balance-wallet"} size={18} />
{" " + this.state.user.network}</Text>
</ScrollView>
</CardView>

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,7 @@ class CreateIdentificationUser extends Component {
townName: null,
country: null,
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
identityPiecesName: I18n.t((identityPieces()[0]).name),
snackVisible: false,
snackText: '',
disableNetwork: false,
@ -531,8 +531,8 @@ class CreateIdentificationUser extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>

View File

@ -70,7 +70,7 @@ class ModifyIdentificationUser extends Component {
townName: null,
country: null,
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
identityPiecesName: I18n.t((identityPieces()[0]).name),
snackVisible: false,
snackText: '',
disableNetwork: false,
@ -533,8 +533,8 @@ class ModifyIdentificationUser extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>

View File

@ -73,7 +73,7 @@ class CreateIdentification extends Component {
townName: null,
country: null,
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
identityPiecesName: I18n.t((identityPieces()[0]).name),
snackVisible: false,
snackText: '',
disableNetwork: false,
@ -640,8 +640,8 @@ class CreateIdentification extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteAnim = comp }}>

View File

@ -69,7 +69,7 @@ class AskNanoCredit extends Component {
isDataSubmit: false,
isModalConfirmVisible: false,
typeCaution: typeCaution(),
typeCautionName: (typeCaution()[0]).name,
typeCautionName: I18n.t((typeCaution()[0]).name),
typeCautionToSend: 'groupe',
wallet: store.getState().walletDetailReducer.result.response
};
@ -273,6 +273,7 @@ class AskNanoCredit extends Component {
}
render() {
console.log(this.state);
return (
<>
{(this.props.loading || this.props.loadingGetNanoCredit || this.state.modalVisible) && this.renderLoader()}
@ -332,10 +333,10 @@ class AskNanoCredit extends Component {
this.setState({
typeCautionToSend: 'groupe',
typeCautionName: I18n.t('GROUP')
})
});
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>

View File

@ -89,6 +89,8 @@ class DemandValidationGroup extends React.Component {
this.props.getNanoCreditDemandsAction(user.id);
});
IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
this.props.getNanoCreditDemandsReset();
this.navigation = this.props.navigation
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
@ -107,6 +109,11 @@ class DemandValidationGroup extends React.Component {
};
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.forceUpdate()
}
componentDidMount() {
const { routeName } = this.navigation.state
this.setState({

View File

@ -70,7 +70,7 @@ class EpargnerArgentUser extends Component {
isDataSubmit: false,
isModalConfirmVisible: false,
typeEpargne: typeEpargne(),
typeEpargneName: (typeEpargne()[0]).name,
typeEpargneName: I18n.t((typeEpargne()[0]).name),
typeEpargneToSend: 'simple',
wallet: store.getState().walletDetailReducer.result.response
};
@ -314,8 +314,8 @@ class EpargnerArgentUser extends Component {
displayDuration: true
})
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>
@ -340,8 +340,8 @@ class EpargnerArgentUser extends Component {
onChangeText={(value, index, data) => {
this.setState({ durationSelect: value });
}}
valueExtractor={(value) => { return value.value }}
labelExtractor={(value) => { return value.value }}
valueExtractor={(value) => { return I18n.t(value.value) }}
labelExtractor={(value) => { return I18n.t(value.value) }}
/>
</Animatable.View>
}

View File

@ -544,7 +544,7 @@ export default class OptionsMenu extends Component {
text: I18n.t('YES'), onPress: () => {
disconnect().then(() => {
IlinkEmitter.emit("userdisconnect");
AsyncStorage.clear();
//AsyncStorage.clear();
this.props.navigation.navigate("Auth");
})
}

View File

@ -1,17 +1,33 @@
import React, { Component } from 'react';
import { FlatList, Image, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
import React, {Component} from 'react';
import {
ActivityIndicator,
Image,
Platform,
ProgressBarAndroid,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import I18n from 'react-native-i18n';
import { Appbar, Provider } from 'react-native-paper';
import {Appbar, Provider} from 'react-native-paper';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { Color } from '../../config/Color';
import { Typography } from '../../config/typography';
import {Color} from '../../config/Color';
import {Typography} from '../../config/typography';
import * as Utils from '../../utils/DeviceUtils';
import { IlinkEmitter } from "../../utils/events";
import {IlinkEmitter} from "../../utils/events";
import {connect} from "react-redux";
import {bindActionCreators} from "redux";
import {getBankListAction, getBankListReset} from "../../webservice/BankApi";
import {store} from "../../redux/store";
import {readUser} from "../../webservice/AuthApi";
const route = require('../../route.json');
let slugify = require('slugify');
export default class OperateurOptionSelect extends Component {
class OperateurOptionSelect extends Component {
constructor(props) {
super(props);
@ -21,24 +37,40 @@ export default class OperateurOptionSelect extends Component {
options: this.props.navigation.state.params.optionSelect.options,
title: this.props.navigation.state.params.optionSelect.title,
subTitle: this.props.navigation.state.params.optionSelect.subTitle,
wallet: store.getState().walletDetailReducer.result.response
}
this.props.getBankListReset();
readUser().then((user) => {
if (user) {
if (user !== undefined) {
if (user.category === undefined) {
this.props.getBankListAction(this.state.wallet.id_wallet_network);
} else {
if (user.category === 'geolocated')
this.props.getBankListAction(this.state.wallet.id_network);
}
this.setState({user});
}
}
});
}
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.props.navigation.setParams({name: I18n.t('WALLET')})
this.forceUpdate();
}
static navigationOptions = ({ navigation }) => ({
static navigationOptions = ({navigation}) => ({
header: null,
headerMode: 'none',
headerTitle: null,
activeColor: '#f0edf6',
inactiveColor: '#3e2465',
barStyle: { backgroundColor: '#694fad' },
barStyle: {backgroundColor: '#694fad'},
drawerLabel: I18n.t('CREDIT_MANAGE'),
drawerIcon: ({ tintColor }) => (
drawerIcon: ({tintColor}) => (
<Icon
name={'credit-card'}
size={24}
@ -53,19 +85,104 @@ export default class OperateurOptionSelect extends Component {
}
renderLoader = () => {
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
{Platform.OS === 'android'
?
(
<>
<ProgressBarAndroid/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
) :
<>
<ActivityIndicator size="large" color={'#ccc'}/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
}
</View>
)
}
renderItem = (item, index) => {
return (
<TouchableOpacity
key={index}
style={[styles.paymentItem, {borderBottomColor: Color.borderColor}]}
onPress={() => {
if (this.state.user.category === 'geolocated')
this.props.navigation.navigate(route.envoieWalletToBankAgent, {bank: item});
else
this.props.navigation.navigate(route.envoieWalletToBankUser, {bank: item});
}}>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View>
<Text style={Typography.body1}>{item.bank_name}</Text>
<Text style={[Typography.footnote, Color.grayColor]} style={{marginTop: 5}}>
{I18n.t('COUNTRY')}: {item.country}
</Text>
</View>
</View>
</TouchableOpacity>
)
}
renderBankList = () => {
const {result, error} = this.props;
if (error !== null) {
if (typeof error.data !== 'undefined') {
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{error.data.error}</Text>
</View>
)
} else {
return (
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{error}</Text>
</View>
)
}
}
if (result !== null) {
if (result.response !== null) {
return (
Array.isArray(result.response) && (result.response.length) > 0 ?
(<ScrollView style={{flex: 1, padding: 20}}>
{
result.response.map((item, index) => (
this.renderItem(item, index)
))
}
</ScrollView>) :
(
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{I18n.t('NO_BANK_AVAILABLE')}</Text>
</View>
)
)
}
}
}
renderItemElement = (item, index) => {
return (
<TouchableOpacity
key={index}
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}
style={[styles.paymentItem, {borderBottomColor: Color.borderColor}]}
onPress={() => {
}}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View style={styles.iconContent}>
<Image style={{ width: 48, height: 48 }} source={{ uri: item.icon }} />
<Image style={{width: 48, height: 48}} source={{uri: item.icon}}/>
</View>
<View>
<Text style={Typography.body1}>{item.title}</Text>
@ -79,23 +196,25 @@ export default class OperateurOptionSelect extends Component {
renderList = () => {
const { options } = this.state;
const {options} = this.state;
return (
<ScrollView style={{ flex: 1, padding: 20 }}>
<ScrollView style={{flex: 1, padding: 20}}>
{
options.map((item, index) => (
this.renderItem(item, index)
this.renderItemElement(item, index)
))
}
</ScrollView>
);
}
render() {
console.log("OPERATEUR OPTION STATE", this.state.options.length);
return (
<Provider>
<View style={{ flex: 1 }}>
<View style={{flex: 1}}>
<StatusBar
backgroundColor={Color.primaryDarkColor}
@ -103,45 +222,30 @@ export default class OperateurOptionSelect extends Component {
translucent={false}
/>
<Appbar.Header dark={true} style={{ backgroundColor: Color.primaryColor }}>
<Appbar.Header dark={true} style={{backgroundColor: Color.primaryColor}}>
<Appbar.BackAction
onPress={() => { this.props.navigation.pop() }}
onPress={() => {
this.props.navigation.pop()
}}
/>
<Appbar.Content
title={this.state.title}
subtitle={this.state.subTitle}
title={I18n.t(this.state.title)}
subtitle={I18n.t(this.state.subTitle)}
/>
</Appbar.Header>
<View style={styles.container}>
<FlatList
contentContainerStyle={{
paddingHorizontal: 20,
paddingBottom: 10,
}}
data={this.state.options}
keyExtractor={(item, index) => index.toString()}
renderItem={({ item, index }) => (
<TouchableOpacity
style={[styles.item, { borderBottomColor: Color.borderColor }]}
onPress={() => {
this.redirectToRoute(item);
}}>
<View style={{ flexDirection: 'row' }}>
<Image style={{ width: 30, height: 30 }} source={{ uri: item.icon }} />
<Text style={[Typography.body1]}>{item.title}</Text>
</View>
<Icon
name="chevron-right"
size={20}
color={Color.primaryColor}
enableRTL={true}
/>
</TouchableOpacity>
)}
/>
{
this.state.options.length > 0 ?
this.renderList()
:
this.props.loading ?
this.renderLoader() :
this.props.result != null ?
this.renderBankList() :
null
}
</View>
@ -151,6 +255,18 @@ export default class OperateurOptionSelect extends Component {
}
}
const mapStateToProps = state => ({
loading: state.getBankListReducer.loading,
result: state.getBankListReducer.result,
error: state.getBankListReducer.error,
});
const mapDispatchToProps = dispatch => bindActionCreators({
getBankListAction,
getBankListReset
}, dispatch);
export default connect(mapStateToProps, mapDispatchToProps)(OperateurOptionSelect);
const styles = StyleSheet.create({
container: {
@ -207,7 +323,7 @@ const styles = StyleSheet.create({
shadowColor: Color.borderColor,
borderColor: Color.borderColor,
borderWidth: 0.5,
shadowOffset: { width: 1.5, height: 1.5 },
shadowOffset: {width: 1.5, height: 1.5},
shadowOpacity: 1.0,
elevation: 5,
borderRadius: 10,

View File

@ -442,7 +442,7 @@ class WalletDepot extends Component {
})
}}
valueExtractor={(value) => value.value}
labelExtractor={(value) => value.name}
labelExtractor={(value) => I18n.t(value.name)}
/>
</View>

View File

@ -510,7 +510,7 @@ class WalletDetail extends Component {
<Dialog.Container useNativeDriver={true} visible={this.state.displayModalHistory}>
<Dialog.Title>Détail de l'historique</Dialog.Title>
<Dialog.Title>{I18n.t('HISTORY_DETAIL')}</Dialog.Title>
<View>
<View style={[styles.blockView, { borderBottomColor: Color.borderColor }]}>
@ -659,7 +659,7 @@ class WalletDetail extends Component {
<Dialog.Container useNativeDriver={true} visible={this.state.displaySuperHyperModalHistory}>
<Dialog.Title>Détail de l'historique</Dialog.Title>
<Dialog.Title>{I18n.t('HISTORY_DETAIL')}</Dialog.Title>
{isEqual(historyItemDetail.type_historique, 'N') &&
<ScrollView persistentScrollbar={true}>
@ -669,7 +669,7 @@ class WalletDetail extends Component {
<Text style={[styles.body2]}>Type</Text>
</View>
<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]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
@ -1022,7 +1022,7 @@ class WalletDetail extends Component {
<View style={{ alignItems: 'center' }} key={index}>
<Icon name={item.icon} size={24} color={Color.primaryColor} />
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
{item.label}
{I18n.t(item.label)}
</Text>
</View>
))
@ -1489,7 +1489,7 @@ class WalletDetail extends Component {
<View style={{ alignItems: 'center' }} key={index}>
<Icon name={item.icon} size={24} color={Color.primaryColor} />
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
{item.label}
{I18n.t(item.label)}
</Text>
</View>
))

View File

@ -1,29 +1,37 @@
import React, { Component } from 'react';
import { Animated, Alert, Platform, StyleSheet, View, Image, StatusBar, ScrollView, Text, ProgressBarAndroid, ActivityIndicator, TouchableOpacity } from 'react-native';
import React, {Component} from 'react';
import {
ActivityIndicator,
Animated,
Platform,
ProgressBarAndroid,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import I18n from 'react-native-i18n'
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
import * as Utils from '../../utils/DeviceUtils';
import Icons from 'react-native-vector-icons/Ionicons'
import { Images } from '../../config/Images';
import CustomButton from '../../components/CustomButton';
import { Color } from '../../config/Color';
import {Color} from '../../config/Color';
import omit from 'lodash/omit';
import Tag from '../../components/Tag';
import { IlinkEmitter } from "../../utils/events";
import { CreditCardInput } from "react-native-credit-card-input";
import { Typography, FontWeight } from '../../config/typography';
import { responsiveHeight, responsiveWidth, } from 'react-native-responsive-dimensions';
import { getWalletDetailActivated, resetWalletListDetailReducer } from '../../webservice/WalletApi';
import { depositActionReset } from '../../webservice/DepositApi';
import { getWalletTransactionHistoryUser, getWalletTransactionHistoryReset } from '../../webservice/WalletTransactionHistoryApi';
import { getUserIdentificationAction, getUserIdentificationResetAction } from '../../webservice/IdentificationApi';
import { transferCommissionAction } from '../../webservice/WalletTransferCommission';
import { resetCommissionReducer } from '../../webservice/WalletTransferCommission';
import {IlinkEmitter} from "../../utils/events";
import {Typography} from '../../config/typography';
import {responsiveWidth,} from 'react-native-responsive-dimensions';
import {getWalletDetailActivated, resetWalletListDetailReducer} from '../../webservice/WalletApi';
import {depositActionReset} from '../../webservice/DepositApi';
import {
getWalletTransactionHistoryReset,
getWalletTransactionHistoryUser
} from '../../webservice/WalletTransactionHistoryApi';
import {getUserIdentificationAction, getUserIdentificationResetAction} from '../../webservice/IdentificationApi';
import {resetCommissionReducer, transferCommissionAction} from '../../webservice/WalletTransferCommission';
import Dialog from "react-native-dialog";
import isEqual from 'lodash/isEqual';
import { baseUrl } from '../../webservice/IlinkConstants';
let moment = require('moment-timezone');
import {baseUrl} from '../../webservice/IlinkConstants';
import 'moment/locale/fr'
import 'moment/locale/es-us'
import 'moment/locale/en-au'
@ -32,11 +40,24 @@ import 'moment/locale/en-ie'
import 'moment/locale/en-il'
import 'moment/locale/en-nz'
import 'moment/locale/en-gb'
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel, optionPaiementFacture, displayToast, transactionHistoryIlinkLabel, isIlinkWorldWallet, cutStringWithoutDot, cutString, optionIdentificationUserScreen, optionNanoCreditScreen } from '../../utils/UtilsFunction';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {
cutString,
cutStringWithoutDot,
isEmptyObject,
optionDepotUserScreen,
optionIdentificationUserScreen,
optionNanoCreditScreen,
optionPaiementFacture,
optionRetraitUserScreen,
transactionHistoryIlinkLabel
} from '../../utils/UtilsFunction';
import DeviceInfo from 'react-native-device-info';
import { readUser } from '../../webservice/AuthApi';
import {readUser} from '../../webservice/AuthApi';
let moment = require('moment-timezone');
const thousands = require('thousands');
let route = require('./../../route.json');
@ -64,7 +85,7 @@ class WalletDetailUser extends Component {
};
slugify.extend({ '+': 'plus' });
slugify.extend({'+': 'plus'});
this.scrollY = new Animated.Value(0);
this.scrollHeaderY = new Animated.Value(0);
@ -88,7 +109,7 @@ class WalletDetailUser extends Component {
readUser().then((user) => {
if (user) {
if (user !== undefined) {
this.setState({ user });
this.setState({user});
this.props.getUserIdentificationAction(user.phone);
this.props.getWalletTransactionHistoryUser(user.id);
}
@ -124,7 +145,7 @@ class WalletDetailUser extends Component {
};
componentDidMount() {
const { result, resultUserIdentification, errorUserIdentification } = this.props;
const {result, resultUserIdentification, errorUserIdentification} = this.props;
if (result !== null) {
if (typeof result.response !== 'undefined') {
@ -160,7 +181,7 @@ class WalletDetailUser extends Component {
}
getWalletIcon = (wallet) => {
return `${baseUrl}/datas/img/network/${slugify(wallet.network, { lower: true })}-logo.png`;
return `${baseUrl}/datas/img/network/${slugify(wallet.network, {lower: true})}-logo.png`;
}
@ -170,11 +191,11 @@ class WalletDetailUser extends Component {
}
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.props.navigation.setParams({name: I18n.t('WALLET')})
this.forceUpdate()
}
handleIndexChange = index => this.setState({ index });
handleIndexChange = index => this.setState({index});
imageScale = () => {
return this.scrollY.interpolate({
@ -227,7 +248,7 @@ class WalletDetailUser extends Component {
justifyContent: 'flex-end',
}}>
<Animated.Image
source={{ uri: this.getWalletIcon(wallet) }}
source={{uri: this.getWalletIcon(wallet)}}
style={{
width: 120,
height: 120,
@ -242,7 +263,7 @@ class WalletDetailUser extends Component {
{
translateY: this.imageTranslateY()
}]
}} />
}}/>
<View style={{
marginTop: 1, flex: 1,
@ -250,17 +271,24 @@ class WalletDetailUser extends Component {
justifyContent: 'flex-end'
}}>
<Text style={[Typography.headline, Typography.semibold]} numberOfLines={1}>{wallet.network}</Text>
<View style={{ flexDirection: 'row' }}>
<Tag icon={<Icon name='link' size={20} color={Color.whiteColor} style={{ marginLeft: -15 }} />}
style={{ paddingRight: 10, width: 120, borderTopRightRadius: 0, borderBottomRightRadius: 0, borderRightWidth: 1, borderRightColor: Color.whiteColor }}
<View style={{flexDirection: 'row'}}>
<Tag icon={<Icon name='link' size={20} color={Color.whiteColor} style={{marginLeft: -15}}/>}
style={{
paddingRight: 10,
width: 120,
borderTopRightRadius: 0,
borderBottomRightRadius: 0,
borderRightWidth: 1,
borderRightColor: Color.whiteColor
}}
primary
onPress={() => {
this.props.navigation.push(route.linkCard);
}}>
&nbsp;{I18n.t('LINK_CARD')}
</Tag>
<Tag icon={<Icon name='update' size={20} color={Color.whiteColor} />} primary
style={{ width: 110, borderTopLeftRadius: 0, borderBottomLeftRadius: 0, }}>
<Tag icon={<Icon name='update' size={20} color={Color.whiteColor}/>} primary
style={{width: 110, borderTopLeftRadius: 0, borderBottomLeftRadius: 0,}}>
&nbsp;&nbsp;{I18n.t('HISTORY')}
</Tag>
@ -268,25 +296,27 @@ class WalletDetailUser extends Component {
</View>
</View>
<View style={styles.contentLeftItem}>
<Text numberOfLines={1} 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>
<Text numberOfLines={1}
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>
);
renderLoader = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
{Platform.OS === 'android'
?
(
<>
<ProgressBarAndroid />
<ProgressBarAndroid/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
) :
<>
<ActivityIndicator size="large" color={'#ccc'} />
<ActivityIndicator size="large" color={'#ccc'}/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
}
@ -295,7 +325,7 @@ class WalletDetailUser extends Component {
}
renderAccountDetail = (wallet) => (
<View style={{ flexDirection: 'row', flex: 1, justifyContent: 'space-between' }}>
<View style={{flexDirection: 'row', flex: 1, justifyContent: 'space-between'}}>
<View
style={{
@ -305,7 +335,7 @@ class WalletDetailUser extends Component {
<View
style={[
styles.circlePoint,
{ backgroundColor: Color.primaryColor },
{backgroundColor: Color.primaryColor},
]}>
<Icons name='md-wallet'
size={28}
@ -313,10 +343,11 @@ class WalletDetailUser extends Component {
/>
</View>
<View>
<Text style={[Typography.title3, Color.primaryColor], { marginBottom: 3 }}>
<Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}>
{I18n.t('PRINCIPAL_ACCOUNT_TITLE')}
</Text>
<Text style={[Typography.body2]}>{`${thousands(wallet.balance, ' ')} ${wallet.currency_code}`}</Text>
<Text
style={[Typography.body2]}>{`${thousands(wallet.balance, ' ')} ${wallet.currency_code}`}</Text>
</View>
</View>
@ -328,7 +359,7 @@ class WalletDetailUser extends Component {
<View
style={[
styles.circlePoint,
{ backgroundColor: Color.primaryColor },
{backgroundColor: Color.primaryColor},
]}>
<Icons name='md-key'
size={28}
@ -336,7 +367,7 @@ class WalletDetailUser extends Component {
/>
</View>
<View>
<Text style={[Typography.title3, Color.primaryColor], { marginBottom: 3 }}>
<Text style={[Typography.title3, Color.primaryColor], {marginBottom: 3}}>
{I18n.t('NUMERO_COMPTE')}
</Text>
<Text style={[Typography.body2]}>{wallet.user_code}</Text>
@ -361,7 +392,7 @@ class WalletDetailUser extends Component {
zIndex: 1,
backgroundColor: Color.primaryColor,
height: 140 - this.state.scrollHeaderY,
}} />
}}/>
<ScrollView ref={component => this._scrollView = component}
style={{
@ -374,22 +405,26 @@ class WalletDetailUser extends Component {
onScroll={Animated.event([
{
nativeEvent: {
contentOffset: { y: this.scrollY },
contentOffset: {y: this.scrollY},
},
},
],
{ listener: (event) => { this.setState({ scrollHeaderY: event.nativeEvent.contentOffset.y }); } })}>
<View style={{ marginTop: 80, }}>
{
listener: (event) => {
this.setState({scrollHeaderY: event.nativeEvent.contentOffset.y});
}
})}>
<View style={{marginTop: 80,}}>
{this.renderHeader(wallet)}
<View
style={[styles.blockView, { borderBottomColor: Color.borderColor }]}>
style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
{this.renderAccountDetail(wallet)}
<>
<View style={[styles.checkDefault, { borderBottomColor: Color.borderColor }]}>
<View style={[styles.checkDefault, {borderBottomColor: Color.borderColor}]}>
<Text
style={[Typography.title3, Typography.semibold]}>
{I18n.t('TRANSACTIONS')}
@ -414,7 +449,7 @@ class WalletDetailUser extends Component {
<Icon name='arrow-bottom-right'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
@ -452,7 +487,7 @@ class WalletDetailUser extends Component {
<Icon name='arrow-top-left'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
@ -496,15 +531,16 @@ class WalletDetailUser extends Component {
<Icon name='cash-multiple'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
<View style={[styles.content]}>
<View style={{ paddingTop: 20, }}>
<Text style={[Typography.headline, Typography.semibold]}>
<View style={{paddingTop: 20,}}>
<Text
style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_CREDIT')}
</Text>
</View>
@ -522,10 +558,10 @@ class WalletDetailUser extends Component {
<Icon name='heart-multiple'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
<View style={{ paddingTop: 20, }}>
<View style={{paddingTop: 20,}}>
<Text style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_SANTE')}
</Text>
@ -556,7 +592,7 @@ class WalletDetailUser extends Component {
<Icon name='file-document'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
@ -566,8 +602,10 @@ class WalletDetailUser extends Component {
</Text>
</View>
<View style={{ flex: 1 }}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}>
<View style={{flex: 1}}>
<Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
</Text>
</View>
@ -599,18 +637,20 @@ class WalletDetailUser extends Component {
<Icon name='pencil-plus'
color={Color.primaryColor}
size={30}
style={styles.imageBanner} />
style={styles.imageBanner}/>
<View style={[styles.content]}>
<View style={{ paddingTop: 20, }}>
<View style={{paddingTop: 20,}}>
<Text style={[Typography.headline, Typography.semibold]}>
{I18n.t('CREATION_IDENTIFICATION_CLIENT')}
</Text>
</View>
<View style={{ flex: 1 }}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}>
<View style={{flex: 1}}>
<Text
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
numberOfLines={5}>
</Text>
</View>
@ -629,7 +669,7 @@ class WalletDetailUser extends Component {
</>)
:
(
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{I18n.t('NO_WALLET_ACTIVED')}</Text>
</View>
)
@ -638,110 +678,122 @@ class WalletDetailUser extends Component {
}
renderModalHistoryDetail = () => {
const { historyItemDetail } = this.state;
const {historyItemDetail} = this.state;
return (
<Dialog.Container useNativeDriver={true} visible={this.state.displayModalHistory}>
<Dialog.Title>Détail de l'historique</Dialog.Title>
<Dialog.Title>{I18n.t('HISTORY_DETAIL')}</Dialog.Title>
<View>
<View style={[styles.blockView, { borderBottomColor: Color.borderColor }]}>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('OPERATION')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.operation}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('TRANSACTION_ID')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.id_transaction}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>Date</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.date}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('INIT_COUNTRY')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.init_country}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('AMOUNT')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.frais}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_init}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('EMETTEUR')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.emetteur}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('DESTINATAIRE')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.destinataire}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('FINAL_COUNTRY')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.final_country}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('NET_AMOUNT')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.montant_net_final}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('ACTIVE_WALLET')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{this.state.historyItemDetail.reseau_payeur}</Text>
</View>
</View>
</View>
@ -753,7 +805,7 @@ class WalletDetailUser extends Component {
displayModalHistory: !this.state.displayModalHistory,
});
}} />
}}/>
</Dialog.Container>
@ -763,11 +815,13 @@ class WalletDetailUser extends Component {
renderHistoryTransactionItem = (item, index, wallet) => {
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}]}>
{
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) => (
<View style={{ alignItems: 'center' }} key={i}>
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
<View style={{alignItems: 'center'}} key={i}>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
{
isEqual(element, 'montant') ?
`${thousands(item[element], ' ')}`
@ -804,18 +858,17 @@ class WalletDetailUser extends Component {
}
renderHistoryTransactionList = (wallet) => {
const { resultTransaction, errorTransaction } = this.props;
const {resultTransaction, errorTransaction} = this.props;
if (errorTransaction !== null) {
if (typeof errorTransaction.data !== 'undefined') {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{errorTransaction.data.error}</Text>
</View>
)
}
else {
} else {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{errorTransaction}</Text>
</View>
)
@ -828,13 +881,13 @@ class WalletDetailUser extends Component {
Array.isArray(resultTransaction.response) && (resultTransaction.response.length) > 0 ?
(
<>
<View style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}>
<View style={[styles.contentService, {borderBottomColor: Color.primaryColor}]}>
{
transactionHistoryIlinkLabel().map((item, index) => (
<View style={{ alignItems: 'center' }} key={index}>
<Icon name={item.icon} size={24} color={Color.primaryColor} />
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
{item.label}
<View style={{alignItems: 'center'}} key={index}>
<Icon name={item.icon} size={24} color={Color.primaryColor}/>
<Text style={[Typography.overline, Color.grayColor], {marginTop: 4}}>
{I18n.t(item.label)}
</Text>
</View>
))
@ -848,7 +901,7 @@ class WalletDetailUser 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_WALLET_HISTORY')}</Text>
</View>
)
@ -865,25 +918,25 @@ class WalletDetailUser extends Component {
{
this.props.loadingTransaction ?
(
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
{Platform.OS === 'android'
?
(
<>
<ProgressBarAndroid />
<ProgressBarAndroid/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
) :
<>
<ActivityIndicator size="large" color={'#ccc'} />
<ActivityIndicator size="large" color={'#ccc'}/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
}
</View>
) :
<>
<View style={[styles.checkDefault, { borderBottomColor: Color.borderColor }]}>
<View style={[styles.checkDefault, {borderBottomColor: Color.borderColor}]}>
<Text
style={[Typography.title3, Typography.semibold]}>
{I18n.t('TRANSACTION_HISTORY')}
@ -916,7 +969,7 @@ class WalletDetailUser extends Component {
Array.isArray(this.props.result.response) && (this.props.result.response.length) === 0 ?
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{I18n.t('NO_WALLET_ACTIVED')}</Text>
</View>
:
@ -987,15 +1040,11 @@ const styles = StyleSheet.create({
flexWrap: 'wrap',
justifyContent: 'space-between',
},
blockView: {
paddingVertical: 10,
borderBottomWidth: 0.5,
},
containField: {
padding: 10,
marginBottom: 20,
borderWidth: 0.5,
shadowOffset: { width: 1.5, height: 1.5 },
shadowOffset: {width: 1.5, height: 1.5},
shadowOpacity: 1.0,
elevation: 5,
flexDirection: "row",
@ -1023,7 +1072,7 @@ const styles = StyleSheet.create({
paddingRight: 10,
alignItems: "center"
},
tagFollow: { width: 150, margin: 10 },
tagFollow: {width: 150, margin: 10},
profileItem: {
flexDirection: "row",
justifyContent: "space-between",
@ -1067,7 +1116,7 @@ const styles = StyleSheet.create({
shadowColor: Color.borderColor,
borderColor: Color.borderColor,
borderWidth: 0.5,
shadowOffset: { width: 1.5, height: 1.5 },
shadowOffset: {width: 1.5, height: 1.5},
shadowOpacity: 1.0,
elevation: 5,
borderRadius: 10,

View File

@ -124,7 +124,7 @@ class WalletOptionSelect extends Component {
}
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.props.navigation.setParams({ name: I18n.t('WALLET') });
this.forceUpdate()
}
@ -221,7 +221,7 @@ class WalletOptionSelect extends Component {
<View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}>
{options.title}
{I18n.t(options.title)}
</Text>
</View>
@ -267,7 +267,7 @@ class WalletOptionSelect extends Component {
<View style={styles.contentTitle}>
<Text style={[Typography.headline, Typography.semibold]}>
{options.title}
{I18n.t(options.title)}
</Text>
</View>
@ -388,7 +388,7 @@ class WalletOptionSelect extends Component {
<View style={{ alignItems: 'center' }} key={index}>
<Icon name={item.icon} size={24} color={Color.primaryColor} />
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
{item.label}
{I18n.t(item.label)}
</Text>
</View>
))
@ -459,7 +459,7 @@ class WalletOptionSelect extends Component {
<Dialog.Container useNativeDriver={true} visible={this.state.displayModalHistory}>
<Dialog.Title>Détail de l'historique</Dialog.Title>
<Dialog.Title>{I18n.t('HISTORY_DETAIL')}</Dialog.Title>
{
isNil(this.state.user.category) ?
isEqual(historyItemDetail.type_historique, 'N') ?
@ -470,7 +470,7 @@ class WalletOptionSelect extends Component {
<Text style={[styles.body2]}>Type</Text>
</View>
<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]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
@ -586,7 +586,7 @@ class WalletOptionSelect extends Component {
<Text style={[styles.body2]}>Type</Text>
</View>
<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]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
@ -678,7 +678,7 @@ class WalletOptionSelect extends Component {
<Text style={[styles.body2]}>Type</Text>
</View>
<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]}>{I18n.t(displayTransactionType(this.state.historyItemDetail.type_historique))}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
@ -853,8 +853,8 @@ class WalletOptionSelect extends Component {
onPress={() => { this.props.navigation.pop() }}
/>
<Appbar.Content
title={this.state.title}
subtitle={this.state.subTitle}
title={I18n.t(this.state.title)}
subtitle={I18n.t(this.state.subTitle)}
/>
</Appbar.Header>

View File

@ -1,26 +1,36 @@
import React, { Component } from 'react';
import { StyleSheet, View, Image, StatusBar, Alert, ScrollView, TouchableOpacity, ActivityIndicator, Platform, ProgressBarAndroid, Text } from 'react-native';
import React, {Component} from 'react';
import {
ActivityIndicator,
Image,
Platform,
ProgressBarAndroid,
ScrollView,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import I18n from 'react-native-i18n'
import {Color} from '../../config/Color';
import {baseUrl} from '../../webservice/IlinkConstants';
import {IlinkEmitter} from "../../utils/events";
import {Appbar, Provider} from 'react-native-paper';
import {getWalletActivated} from '../../webservice/WalletApi';
import {connect} from 'react-redux';
import {readUser} from '../../webservice/AuthApi';
import {bindActionCreators} from 'redux';
import {Typography} from '../../config/typography';
const route = require('./../../route.json');
let slugify = require('slugify');
import I18n from 'react-native-i18n'
import * as Utils from '../../utils/DeviceUtils';
import { Images } from '../../config/Images';
import { Color } from '../../config/Color';
import { baseUrl } from '../../webservice/IlinkConstants';
import { IlinkEmitter } from "../../utils/events";
import { Provider, Appbar } from 'react-native-paper';
import { getWalletActivated } from '../../webservice/WalletApi';
import { connect } from 'react-redux';
import { readUser } from '../../webservice/AuthApi';
import { bindActionCreators } from 'redux';
import { FontWeight, Typography } from '../../config/typography';
class WalletSelect extends Component {
constructor(props) {
super(props);
slugify.extend({ '+': 'plus' });
slugify.extend({'+': 'plus'});
IlinkEmitter.on("langueChange", this.updateLangue.bind(this));
this.state = {
result: null,
@ -30,15 +40,15 @@ class WalletSelect extends Component {
}
static navigationOptions = ({ navigation }) => ({
static navigationOptions = ({navigation}) => ({
header: null,
headerMode: 'none',
headerTitle: null,
activeColor: '#f0edf6',
inactiveColor: '#3e2465',
barStyle: { backgroundColor: '#694fad' },
barStyle: {backgroundColor: '#694fad'},
drawerLabel: I18n.t('CREDIT_MANAGE'),
drawerIcon: ({ tintColor }) => (
drawerIcon: ({tintColor}) => (
<Icon
name={'credit-card'}
size={24}
@ -52,7 +62,7 @@ class WalletSelect extends Component {
if (user !== undefined) {
if (user.phone !== undefined) {
this.props.getWalletActivated(user.agentId);
this.setState({ agentId: user.agentId });
this.setState({agentId: user.agentId});
}
}
}
@ -74,24 +84,24 @@ class WalletSelect extends Component {
} */
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('WALLET') })
this.props.navigation.setParams({name: I18n.t('WALLET')})
this.forceUpdate()
}
renderLoader = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
{Platform.OS === 'android'
?
(
<>
<ProgressBarAndroid />
<ProgressBarAndroid/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
) :
<>
<ActivityIndicator size="large" color={'#ccc'} />
<ActivityIndicator size="large" color={'#ccc'}/>
<Text>{I18n.t('LOADING_DOTS')}</Text>
</>
}
@ -100,25 +110,25 @@ class WalletSelect extends Component {
}
renderWalletItem = (item) => {
let icon = `${baseUrl}/datas/img/network/${slugify(item.network, { lower: true })}-logo.png`;
let icon = `${baseUrl}/datas/img/network/${slugify(item.network, {lower: true})}-logo.png`;
let itemToSend = item;
itemToSend.agentId = this.state.agentId;
return (
<TouchableOpacity
key={item.id}
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}
style={[styles.paymentItem, {borderBottomColor: Color.borderColor}]}
onPress={() => this.props.navigation.navigate('walletDetail', {
wallet: itemToSend,/*
onRefreshDetail: () => this.refresh() */
})}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View style={styles.iconContent}>
<Image style={{ width: 48, height: 48 }} source={{ uri: icon }} />
<Image style={{width: 48, height: 48}} source={{uri: icon}}/>
</View>
<View>
<Text style={Typography.body1}>{item.network}</Text>
<Text style={[Typography.footnote, Color.grayColor]} style={{ marginTop: 5 }}>
<Text style={[Typography.footnote, Color.grayColor]} style={{marginTop: 5}}>
{I18n.t('COUNTRY')}: {item.country}
</Text>
</View>
@ -129,18 +139,17 @@ class WalletSelect extends Component {
renderWalletList = () => {
const { result, error } = this.props;
const {result, error} = this.props;
if (error !== null) {
if (typeof error.data !== 'undefined') {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{error.data.error}</Text>
</View>
)
}
else {
} else {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{error}</Text>
</View>
)
@ -150,7 +159,7 @@ class WalletSelect extends Component {
if (result.response !== null) {
return (
Array.isArray(result.response) && (result.response.length) > 0 ?
(<ScrollView style={{ flex: 1, padding: 20 }}>
(<ScrollView style={{flex: 1, padding: 20}}>
{
result.response.map((item) => (
this.renderWalletItem(item)
@ -158,7 +167,7 @@ class WalletSelect extends Component {
}
</ScrollView>) :
(
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
<Text style={Typography.body1}>{I18n.t('NO_WALLET_ACTIVED')}</Text>
</View>
)
@ -172,7 +181,7 @@ class WalletSelect extends Component {
console.log("WALLET PROPS", this.props);
return (
<Provider>
<View style={{ flex: 1 }}>
<View style={{flex: 1}}>
<StatusBar
backgroundColor={Color.primaryDarkColor}
@ -180,9 +189,11 @@ class WalletSelect extends Component {
translucent={false}
/>
<Appbar.Header dark={true} style={{ backgroundColor: Color.primaryColor }}>
<Appbar.Header dark={true} style={{backgroundColor: Color.primaryColor}}>
<Appbar.BackAction
onPress={() => { this.props.navigation.pop() }}
onPress={() => {
this.props.navigation.pop()
}}
/>
<Appbar.Content
title={I18n.t('WALLET')}

View File

@ -56,7 +56,7 @@ class EnvoiCashVersCashAgent extends Component {
super(props);
this.state = {
identityPiecesEmetteur: identityPieces(),
identityPiecesNameEmetteur: (identityPieces()[0]).name,
identityPiecesNameEmetteur: I18n.t((identityPieces()[0]).name),
paysDestination: [],
paysDestinationSelect: null,
walletActifs: [],
@ -559,8 +559,8 @@ class EnvoiCashVersCashAgent extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesNameEmetteur: value, isDataSubmit: false });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>

View File

@ -1,27 +1,40 @@
import Button from 'apsl-react-native-button';
import isEqual from 'lodash/isEqual';
import isNil from 'lodash/isNil';
import React, { Component } from 'react';
import { Alert, ScrollView, StyleSheet, Text, View } from 'react-native';
import React, {Component} from 'react';
import {Alert, ScrollView, StyleSheet, Text, View} from 'react-native';
import * as Animatable from 'react-native-animatable';
import I18n from 'react-native-i18n';
import Dialog from "react-native-dialog";
import { Dropdown } from 'react-native-material-dropdown';
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions';
import { ProgressDialog } from 'react-native-simple-dialogs';
import { Fumi } from 'react-native-textinput-effects';
import {Dropdown} from 'react-native-material-dropdown';
import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
import {ProgressDialog} from 'react-native-simple-dialogs';
import {Fumi} from 'react-native-textinput-effects';
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Color } from '../../../config/Color';
import { store } from "../../../redux/store";
import { identityPieces, isIlinkWorldWallet, isNormalInteger, typeIdIDestinataire, thousandsSeparators } from '../../../utils/UtilsFunction';
import { readUser } from '../../../webservice/AuthApi';
import { getActiveCountryAction, getActiveCountryByDialCodeAction, getActiveCountryByDialCodeReset, getActiveCountryReset, getOtherPayCountryNetworkAction, getPayCountryNetworkReset } from '../../../webservice/CountryApi';
import { envoieUserWalletToCashAction, envoieUserWalletToCashReset, getCommissionUserWalletToCashAction, getCommissionUserWalletToCashReset } from '../../../webservice/EnvoieUserApi';
import { Typography, FontWeight } from '../../../config/typography';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Color} from '../../../config/Color';
import {store} from "../../../redux/store";
import {identityPieces, isNormalInteger} from '../../../utils/UtilsFunction';
import {readUser} from '../../../webservice/AuthApi';
import {
getActiveCountryAction,
getActiveCountryByDialCodeAction,
getActiveCountryByDialCodeReset,
getActiveCountryReset,
getOtherPayCountryNetworkAction,
getPayCountryNetworkReset
} from '../../../webservice/CountryApi';
import {
envoieUserWalletToCashAction,
envoieUserWalletToCashReset,
getCommissionUserWalletToCashAction,
getCommissionUserWalletToCashReset
} from '../../../webservice/EnvoieUserApi';
import {FontWeight, Typography} from '../../../config/typography';
import thousands from 'thousands';
import { IlinkEmitter } from '../../../utils/events';
import {IlinkEmitter} from '../../../utils/events';
let theme = require('../../../utils/theme.json');
let route = require('../../../route.json');
@ -56,7 +69,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
super(props);
this.state = {
identityPiecesEmetteur: identityPieces(),
identityPiecesNameEmetteur: (identityPieces()[0]).name,
identityPiecesNameEmetteur: I18n.t((identityPieces()[0]).name),
paysDestination: [],
paysDestinationSelect: null,
walletActifs: [],
@ -73,7 +86,6 @@ class EnvoieCashVersAutreWalletAgent extends Component {
password: null,
loading: false,
user: null,
triggerSubmitClick: false,
triggerNextClick: false,
displayFirstStep: true,
displaySecondStep: false,
@ -99,7 +111,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
readUser().then((user) => {
if (user) {
if (user !== undefined) {
this.setState({ user });
this.setState({user});
}
}
});
@ -122,7 +134,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
renderGetActionCountryList = () => {
const { resultActiveCountryList, errorActiveCountryList } = this.props;
const {resultActiveCountryList, errorActiveCountryList} = this.props;
if (resultActiveCountryList !== null) {
if (typeof resultActiveCountryList.response !== 'undefined') {
@ -132,7 +144,10 @@ class EnvoieCashVersAutreWalletAgent extends Component {
paysDestinationSelect: resultActiveCountryList.response[0].name,
});
if (this.state.hasLoadActivePayCountryNetworkList)
this.props.getOtherPayCountryNetworkAction({ id_wallet_agent: this.state.wallet.id, id_country: resultActiveCountryList.response[0].id });
this.props.getOtherPayCountryNetworkAction({
id_wallet_agent: this.state.wallet.id,
id_country: resultActiveCountryList.response[0].id
});
}
}
@ -149,7 +164,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
],
{ cancelable: false }
{cancelable: false}
)
} else {
Alert.alert(
@ -163,14 +178,14 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
}
renderGetPayCountryNetworkResponse = () => {
const { resultPayCountryNetwork, errorPayCountryNetwork } = this.props;
const {resultPayCountryNetwork, errorPayCountryNetwork} = this.props;
if (resultPayCountryNetwork !== null) {
if (typeof resultPayCountryNetwork.response !== 'undefined') {
if (resultPayCountryNetwork.response.length > 0) {
@ -180,8 +195,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
walletActifSelect: resultPayCountryNetwork.response[0].name,
modalVisible: false
});
}
else if (resultPayCountryNetwork.response.length === 0) {
} else if (resultPayCountryNetwork.response.length === 0) {
this.setState({
walletActifs: [],
walletActifSelect: '',
@ -205,7 +219,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
],
{ cancelable: false }
{cancelable: false}
)
} else {
Alert.alert(
@ -219,7 +233,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
@ -227,7 +241,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
renderEnvoieWalletToWalletResponse = () => {
const { resultEnvoieWalletToCash, errorEnvoieWalletToCash } = this.props;
const {resultEnvoieWalletToCash, errorEnvoieWalletToCash} = this.props;
if (errorEnvoieWalletToCash !== null) {
if (typeof errorEnvoieWalletToCash.data !== 'undefined') {
@ -241,7 +255,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
@ -261,7 +275,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
@ -269,7 +283,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
renderDialogGetCommissionResponse = () => {
const { errorEnvoieWalletToCashGetCommission } = this.props;
const {errorEnvoieWalletToCashGetCommission} = this.props;
if (errorEnvoieWalletToCashGetCommission !== null) {
if (typeof errorEnvoieWalletToCashGetCommission.data !== 'undefined') {
@ -283,7 +297,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
@ -295,7 +309,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
isMontantValid = () => {
const { montant } = this.state;
const {montant} = this.state;
if ((parseInt(isEqual(montant, 0)) || montant < 0))
return {
errorMessage: I18n.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),
@ -336,32 +350,35 @@ class EnvoieCashVersAutreWalletAgent extends Component {
<View>
<View style={[styles.blockView, { borderBottomColor: Color.borderColor }]}>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text style={[styles.body2]}>{I18n.t('AMOUNT')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(this.state.montant, ' ')} ${this.state.wallet.currency_code}`}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{`${thousands(this.state.montant, ' ')} ${this.state.wallet.currency_code}`}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(commission, ' ')} ${this.state.wallet.currency_code}`}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{`${thousands(commission, ' ')} ${this.state.wallet.currency_code}`}</Text>
</View>
</View>
</View>
<View style={{ paddingVertical: 10 }}>
<View style={{ paddingVertical: 10 }}>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<View style={{paddingVertical: 10}}>
<View style={{paddingVertical: 10}}>
<View style={{flexDirection: 'row', marginTop: 10}}>
<View style={{flex: 1}}>
<Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')}`}</Text>
<View style={{flex: 1, alignItems: 'flex-end'}}>
<Text
style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')}`}</Text>
</View>
</View>
</View>
@ -372,7 +389,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
this.setState({
isModalConfirmVisible: false
});
}} />
}}/>
<Dialog.Button bold={true} label={I18n.t('SUBMIT_LABEL')} onPress={() => {
this.setState({
isModalConfirmVisible: false,
@ -397,7 +414,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
password: this.state.password
});
this.props.getCommissionUserWalletToCashReset();
}} />
}}/>
</Dialog.Container>
@ -407,7 +424,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
onSubmitNextStep = () => {
const { nomsEmetteur, prenomsEmetteur, emailEmetteur, numeroIdentiteEmetteur } = this.state;
const {nomsEmetteur, prenomsEmetteur, emailEmetteur, numeroIdentiteEmetteur} = this.state;
if (this.ckeckIfFieldIsOK(nomsEmetteur))
this.nomsEmetteurAnim.shake(800);
@ -434,7 +451,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}
onSubmitCashVersAutreWallet = () => {
const { nomsDestinataire, prenomsDestinataire, montant, password, numeroIdentiteDestinataire } = this.state;
const {nomsDestinataire, prenomsDestinataire, montant, password, numeroIdentiteDestinataire} = this.state;
if (this.ckeckIfFieldIsOK(nomsDestinataire))
this.nomDestinataireAnim.shake(800);
@ -445,8 +462,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
else if (this.ckeckIfFieldIsOK(montant) || !this.isMontantValid().isValid) {
console.log("IS MONTANT VALID", this.isMontantValid())
this.montantAnim.shake(800);
}
else if (this.ckeckIfFieldIsOK(password))
} else if (this.ckeckIfFieldIsOK(password))
this.passwordAnim.shake(800);
else {
@ -477,7 +493,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
render() {
console.log("STATE", this.state);
const { resultEnvoieWalletToCashGetCommission } = this.props;
const {resultEnvoieWalletToCashGetCommission} = this.props;
return (
<>
{(this.state.modalVisible || this.props.loadingEnvoieWalletToCashGetCommission || this.props.loadingEnvoieWalletToCash || this.props.loadingCountryByDialCode || this.props.loadingActiveCountryList || this.props.loadingCountryByDialCode) && this.renderLoader()}
@ -497,35 +513,41 @@ class EnvoieCashVersAutreWalletAgent extends Component {
<Text style={styles.subbigtitle}>{I18n.t('DEPOSIT_CASH_TO_OTHER_WALLET_DESCRIPTION')}</Text>
<Animatable.View ref={(comp) => { this.nomsEmetteurAnim = comp }}>
<Animatable.View ref={(comp) => {
this.nomsEmetteurAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user'}
label={`${I18n.t('NAME_EMETTEUR')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.nomsEmetteur}
onChangeText={(nomsEmetteur) => {
this.setState({ nomsEmetteur })
this.setState({nomsEmetteur})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.prenomsEmetteurAnim = comp }}>
<Animatable.View ref={(comp) => {
this.prenomsEmetteurAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user-circle-o'}
label={`${I18n.t('FIRSTNAME_EMETTEUR')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.prenomsEmetteur}
onChangeText={(prenomsEmetteur) => {
this.setState({ prenomsEmetteur })
this.setState({prenomsEmetteur})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.emailEmetteurAnim = comp }}>
<Animatable.View ref={(comp) => {
this.emailEmetteurAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName='envelope'
label={I18n.t('EMAIL_EMETTEUR')}
iconColor={'#f95a25'}
@ -533,14 +555,16 @@ class EnvoieCashVersAutreWalletAgent extends Component {
iconSize={20}
value={this.state.emailEmetteur}
onChangeText={(emailEmetteur) => {
this.setState({ emailEmetteur })
this.setState({emailEmetteur})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityPiecesEmetteurAnim = comp }}
<Animatable.View ref={(comp) => {
this.identityPiecesEmetteurAnim = comp
}}
style={{
width: responsiveWidth(90),
height: 60,
@ -557,20 +581,26 @@ class EnvoieCashVersAutreWalletAgent extends Component {
useNativeDriver={true}
value={this.state.identityPiecesNameEmetteur}
onChangeText={(value, index, data) => {
this.setState({ identityPiecesNameEmetteur: value, isDataSubmit: false });
this.setState({identityPiecesNameEmetteur: value, isDataSubmit: false});
}}
valueExtractor={(value) => {
return I18n.t(value.name)
}}
labelExtractor={(value) => {
return I18n.t(value.name)
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.numeroIdentiteEmetteurAnim = comp }}>
<Animatable.View ref={(comp) => {
this.numeroIdentiteEmetteurAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'address-card'}
label={`${I18n.t('NUMERO_IDENTITE_EMETTEUR')}`}
iconColor={'#f95a25'}
iconSize={20}
onChangeText={(numeroIdentiteEmetteur) => {
this.setState({ numeroIdentiteEmetteur })
this.setState({numeroIdentiteEmetteur})
}}
style={styles.input}
>
@ -580,56 +610,66 @@ class EnvoieCashVersAutreWalletAgent extends Component {
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitNextStep() }}>
onPress={() => {
this.onSubmitNextStep()
}}>
{I18n.t('NEXT')}</Button>
</>
}
{this.state.displaySecondStep &&
<>
<Animatable.View ref={(comp) => { this.nomDestinataireAnim = comp }}>
<Animatable.View ref={(comp) => {
this.nomDestinataireAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user'}
label={`${I18n.t('NAME_DESTINATAIRE')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.nomsDestinataire}
onChangeText={(nomsDestinataire) => {
this.setState({ nomsDestinataire })
this.setState({nomsDestinataire})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.prenomsDestinataireAnim = comp }}>
<Animatable.View ref={(comp) => {
this.prenomsDestinataireAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user-circle-o'}
label={`${I18n.t('FIRSTNAME_DESTINATAIRE')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.prenomsDestinataire}
onChangeText={(prenomsDestinataire) => {
this.setState({ prenomsDestinataire })
this.setState({prenomsDestinataire})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.identityPiecesDestinataireAnim = comp }}>
<Animatable.View ref={(comp) => {
this.identityPiecesDestinataireAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'user-circle-o'}
label={`${I18n.t('ID_DESTINATAIRE')}`}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.numeroIdentiteDestinataire}
onChangeText={(numeroIdentiteDestinataire) => {
this.setState({ numeroIdentiteDestinataire })
this.setState({numeroIdentiteDestinataire})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.paysDestinationAnim = comp }}
<Animatable.View ref={(comp) => {
this.paysDestinationAnim = comp
}}
style={{
width: responsiveWidth(90),
height: 60,
@ -649,17 +689,30 @@ class EnvoieCashVersAutreWalletAgent extends Component {
this.props.getPayCountryNetworkReset();
let countrySelect = data.filter(element => element.name === value);
this.setState({ paysDestinationSelect: value, hasLoadActivePayCountryNetworkList: true, isDataSubmit: false }, () => {
this.props.getOtherPayCountryNetworkAction({ id_wallet_agent: this.state.wallet.id, id_country: countrySelect[0].id });
this.setState({
paysDestinationSelect: value,
hasLoadActivePayCountryNetworkList: true,
isDataSubmit: false
}, () => {
this.props.getOtherPayCountryNetworkAction({
id_wallet_agent: this.state.wallet.id,
id_country: countrySelect[0].id
});
});
this.props.getCommissionUserWalletToCashReset();
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => {
return value.name
}}
labelExtractor={(value) => {
return value.name
}}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.walletActifAnim = comp }}
<Animatable.View ref={(comp) => {
this.walletActifAnim = comp
}}
style={{
width: responsiveWidth(90),
height: 60,
@ -682,12 +735,18 @@ class EnvoieCashVersAutreWalletAgent extends Component {
});
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => {
return value.name
}}
labelExtractor={(value) => {
return value.name
}}
/>
</Animatable.View>
<Animatable.View ref={(comp) => { this.montantAnim = comp }}>
<Animatable.View ref={(comp) => {
this.montantAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'money'}
label={I18n.t('AMOUNT')}
iconColor={'#f95a25'}
@ -695,7 +754,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
iconSize={20}
value={this.state.montant}
onChangeText={(montant) => {
this.setState({ montant })
this.setState({montant})
}}
style={styles.input}
>
@ -717,11 +776,14 @@ class EnvoieCashVersAutreWalletAgent extends Component {
}}
/>
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text>
<Text
style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text>
</View>
</Animatable.View>
<Animatable.View ref={(comp) => { this.passwordAnim = comp }}>
<Animatable.View ref={(comp) => {
this.passwordAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'lock'}
label={I18n.t('PASSWORD')}
iconColor={'#f95a25'}
@ -729,7 +791,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
secureTextEntry={true}
value={this.state.password}
onChangeText={(password) => {
this.setState({ password })
this.setState({password})
}}
style={styles.input}
>
@ -738,7 +800,9 @@ class EnvoieCashVersAutreWalletAgent extends Component {
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => { this.onSubmitCashVersAutreWallet() }}>
onPress={() => {
this.onSubmitCashVersAutreWallet()
}}>
{I18n.t('SUBMIT_LABEL')}</Button>
</>

View File

@ -0,0 +1,470 @@
import Button from 'apsl-react-native-button';
import isEqual from 'lodash/isEqual';
import isNil from 'lodash/isNil';
import React, {Component} from 'react';
import {Alert, ScrollView, StyleSheet, Text, View} from 'react-native';
import * as Animatable from 'react-native-animatable';
import I18n from 'react-native-i18n';
import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
import {ProgressDialog} from 'react-native-simple-dialogs';
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
import {Fumi} from 'react-native-textinput-effects';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Color} from '../../../config/Color';
import {FontWeight, Typography} from '../../../config/typography';
import {store} from "../../../redux/store";
import {IlinkEmitter} from '../../../utils/events';
import {readUser} from '../../../webservice/AuthApi';
import {envoieUserWalletToBankAction, envoieUserWalletToBankReset} from '../../../webservice/EnvoieUserApi';
import {isNormalInteger} from '../../../utils/UtilsFunction';
let theme = require('../../../utils/theme.json');
let route = require('../../../route.json');
class EnvoieWalletToBankAgent extends Component {
static navigatorStyle = {
navBarBackgroundColor: Color.primaryColor,
statusBarColor: Color.primaryDarkColor,
navBarTextColor: '#FFFFFF',
navBarButtonColor: '#FFFFFF'
};
static navigationOptions = () => {
return {
drawerLabel: () => null,
headerTitle: I18n.t('DEPOSIT_WALLET_TO_BANK'),
headerTintColor: 'white',
headerStyle: {
backgroundColor: Color.primaryColor,
marginTop: 0,
color: 'white'
},
headerTitleStyle: {
color: "white"
},
title: I18n.t('DEPOSIT_WALLET_TO_BANK')
}
};
constructor(props) {
super(props);
this.state = {
montant: null,
password: null,
codeIban: null,
loading: false,
user: null,
triggerSubmitClick: false,
isSubmitClick: false,
isDataSubmit: false,
isModalConfirmVisible: false,
wallet: store.getState().walletDetailReducer.result.response,
bank: this.props.navigation.state.params.bank
};
this.props.envoieUserWalletToBankReset();
}
componentDidMount() {
readUser().then((user) => {
if (user) {
if (user !== undefined) {
this.setState({user});
}
}
});
}
componentWillReceiveProps(nextProps) {
console.log('PROPS', nextProps)
/* if (nextProps.resultEnvoieWalletToCardGetCommission != null) {
if (typeof nextProps.resultEnvoieWalletToCardGetCommission.response !== 'undefined') {
if (!nextProps.loadingEnvoieWalletToCardGetCommission)
this.setState({
isModalConfirmVisible: true
});
}
}*/
}
renderEnvoieWalletToBankResponse = () => {
const {resultEnvoieWalletToBank, errorEnvoieWalletToBank} = this.props;
if (errorEnvoieWalletToBank !== null) {
if (typeof errorEnvoieWalletToBank.data !== 'undefined') {
Alert.alert(
I18n.t("ERROR_TRANSFER"),
errorEnvoieWalletToBank.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.envoieUserWalletToBankReset();
}
}
],
{cancelable: false}
)
}
}
if (resultEnvoieWalletToBank !== null) {
if (resultEnvoieWalletToBank.response !== null) {
Alert.alert(
I18n.t("SUCCESS_TRANSFER"),
resultEnvoieWalletToBank.response,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.envoieUserWalletToBankReset();
IlinkEmitter.emit("refreshWallet");
this.props.navigation.pop();
}
}
],
{cancelable: false}
)
}
}
}
/* renderDialogGetCommissionResponse = () => {
const { errorEnvoieWalletToCardGetCommission } = this.props;
if (errorEnvoieWalletToCardGetCommission !== null) {
if (typeof errorEnvoieWalletToCardGetCommission.data !== 'undefined') {
Alert.alert(
I18n.t("ERROR_LABLE"),
errorEnvoieWalletToCardGetCommission.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.getCommissionUserWalletToCardReset();
}
}
],
{ cancelable: false }
)
}
}
}*/
updateLangue() {
this.props.navigation.setParams({name: I18n.t('DEPOSIT_TO_CARD')})
this.forceUpdate()
}
/*
modalConfirmTransaction = (data) => {
const frais = data.response.frais;
const montant_net = data.response.montant_net;
return (
<Dialog.Container useNativeDriver={true} visible={this.state.isModalConfirmVisible}>
<Dialog.Title>{I18n.t('TRANSACTION_DETAIL')}</Dialog.Title>
<View>
<View style={[styles.blockView, { borderBottomColor: Color.borderColor }]}>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<Text style={[styles.body2]}>{I18n.t('AMOUNT')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(this.state.montant, ' ')} ${this.state.wallet.currency_code}`}</Text>
</View>
</View>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<Text tyle={[Typography.body2]}>{I18n.t('FEES_AND_TAXES')}</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(frais, ' ')} ${this.state.wallet.currency_code}`}</Text>
</View>
</View>
</View>
<View style={{ paddingVertical: 10 }}>
<View style={{ flexDirection: 'row', marginTop: 10 }}>
<View style={{ flex: 1 }}>
<Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text>
</View>
<View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net, ' ')} ${this.state.wallet.currency_code}`}</Text>
</View>
</View>
</View>
</View>
<Dialog.Button bold={true} label={I18n.t('CANCEL_LABEL')} onPress={() => {
this.setState({
isModalConfirmVisible: false
});
}} />
<Dialog.Button bold={true} label={I18n.t('SUBMIT_LABEL')} onPress={() => {
this.setState({
isModalConfirmVisible: false,
isDataSubmit: true
});
this.props.envoieUserWalletToCardAction({
type: 2,
cvv: this.state.codeCVV,
id_wallet_user: this.state.wallet.id,
montant: this.state.montant,
password: this.state.password
});
this.props.getCommissionUserWalletToCardReset();
}} />
</Dialog.Container>
);
}
*/
ckeckIfFieldIsOK(champ) {
return (isNil(champ) || isEqual(champ.length, 0));
}
isMontantValid = () => {
const {montant} = this.state;
if ((parseInt(isEqual(montant, 0)) || montant < 0))
return {
errorMessage: I18n.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),
isValid: false
};
else if (!isNormalInteger(montant))
return {
errorMessage: I18n.t('ENTER_VALID_AMOUNT'),
isValid: false
};
else
return {
errorMessage: '',
isValid: true
};
}
onSubmitSendWalletToBank = () => {
const {montant, password, codeIban} = this.state;
if (this.ckeckIfFieldIsOK(codeIban)) {
if (!(codeIban.length >= 14 && codeIban <= 34))
this.codeIbanAnim.shake(800);
else
this.codeIbanAnim.shake(800);
} else if (this.ckeckIfFieldIsOK(montant) || !this.isMontantValid().isValid) {
this.montantAnim.shake(800);
} else if (this.ckeckIfFieldIsOK(password))
this.passwordAnim.shake(800);
else {
console.log("id wallet network", this.state.bank);
this.props.envoieUserWalletToBankAction({
type: 18,
id_wallet_agent: this.state.wallet.id,
id_wallet_network: this.state.wallet.id_network,
iban: codeIban,
id_bank: this.state.bank.id_bank,
montant: montant,
password: password
});
}
this.setState({
isDataSubmit: true
});
}
renderLoader = () => {
return (
<ProgressDialog
visible={this.props.loadingEnvoieWalletToBank}
title={I18n.t('LOADING')}
message={I18n.t('LOADING_INFO')}
/>
)
}
render() {
return (
<>
{this.props.loadingEnvoieWalletToBank && this.renderLoader()}
{this.state.isDataSubmit && this.renderEnvoieWalletToBankResponse()}
<ScrollView style={styles.container}>
<Text style={styles.subbigtitle}>{I18n.t('ENVOIE_WALLET_TO_BANK')}</Text>
<Animatable.View ref={(comp) => {
this.codeIbanAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'id-card'}
label={I18n.t('CODE_IBAN')}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.codeIban}
onChangeText={(codeIban) => {
this.setState({codeIban})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => {
this.montantAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'money'}
label={I18n.t('AMOUNT')}
iconColor={'#f95a25'}
keyboardType='numeric'
iconSize={20}
value={this.state.montant}
onChangeText={(montant) => {
this.setState({montant})
}}
style={styles.input}
>
</Fumi>
<View style={{
position: 'absolute',
left: responsiveWidth(82),
top: 35,
flexDirection: 'row'
}}>
<View
style={{
width: 1,
borderLeftColor: '#f0f0f0',
height: 40,
left: -8,
top: -10,
borderLeftWidth: 1,
}}
/>
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text>
</View>
</Animatable.View>
<Animatable.View ref={(comp) => {
this.passwordAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'lock'}
label={I18n.t('PASSWORD')}
iconColor={'#f95a25'}
iconSize={20}
secureTextEntry={true}
value={this.state.password}
onChangeText={(password) => {
this.setState({password})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
onPress={() => {
this.onSubmitSendWalletToBank()
}}>
{I18n.t('SUBMIT_LABEL')}</Button>
</ScrollView>
</>
)
}
}
const maptStateToProps = state => ({
loadingEnvoieWalletToBank: state.envoieUserWalletToBank.loading,
resultEnvoieWalletToBank: state.envoieUserWalletToBank.result,
errorEnvoieWalletToBank: state.envoieUserWalletToBank.error,
});
const mapDispatchToProps = dispatch => bindActionCreators({
envoieUserWalletToBankAction,
envoieUserWalletToBankReset,
}, dispatch);
export default connect(maptStateToProps, mapDispatchToProps)(EnvoieWalletToBankAgent);
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: Color.primaryDarkColor,
},
textbtnvalide: {
color: 'white',
fontWeight: 'bold'
},
bigtitle: {
color: 'white',
fontSize: 20,
flex: 1,
fontWeight: 'bold',
textAlign: 'center',
margin: 20,
},
blockView: {
paddingVertical: 10,
borderBottomWidth: 1
},
subbigtitle: {
color: 'white',
fontSize: 17,
textAlign: 'center',
margin: 5,
},
btnvalide: {
marginTop: 20,
marginLeft: 20,
marginRight: 20,
borderColor: 'transparent',
backgroundColor: Color.accentLightColor,
height: 52
},
btnSubmit: {
marginTop: 20,
borderColor: 'transparent',
backgroundColor: Color.accentLightColor,
height: 52,
width: "30%",
marginLeft: 20,
marginRight: 20,
},
input: {
height: 60,
marginTop: responsiveHeight(2),
marginLeft: responsiveWidth(5),
marginRight: responsiveWidth(5),
borderRadius: 5,
}
});

View File

@ -1,25 +1,24 @@
import Button from 'apsl-react-native-button';
import isEqual from 'lodash/isEqual';
import isNil from 'lodash/isNil';
import React, { Component } from 'react';
import { Alert, ScrollView, StyleSheet, Text, View } from 'react-native';
import React, {Component} from 'react';
import {Alert, ScrollView, StyleSheet, Text, View} from 'react-native';
import * as Animatable from 'react-native-animatable';
import Dialog from "react-native-dialog";
import I18n from 'react-native-i18n';
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions';
import { ProgressDialog } from 'react-native-simple-dialogs';
import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
import {ProgressDialog} from 'react-native-simple-dialogs';
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
import { Fumi } from 'react-native-textinput-effects';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import thousands from 'thousands';
import { Color } from '../../../config/Color';
import { FontWeight, Typography } from '../../../config/typography';
import { store } from "../../../redux/store";
import { IlinkEmitter } from '../../../utils/events';
import { readUser } from '../../../webservice/AuthApi';
import { envoieUserWalletToCardAction, envoieUserWalletToCardReset, getCommissionUserWalletToCardAction, getCommissionUserWalletToCardReset } from '../../../webservice/EnvoieUserApi';
import { isNormalInteger } from '../../../utils/UtilsFunction';
import {Fumi} from 'react-native-textinput-effects';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Color} from '../../../config/Color';
import {FontWeight, Typography} from '../../../config/typography';
import {store} from "../../../redux/store";
import {IlinkEmitter} from '../../../utils/events';
import {readUser} from '../../../webservice/AuthApi';
import {envoieUserWalletToBankAction, envoieUserWalletToBankReset} from '../../../webservice/EnvoieUserApi';
import {isNormalInteger} from '../../../utils/UtilsFunction';
let theme = require('../../../utils/theme.json');
let route = require('../../../route.json');
@ -47,7 +46,7 @@ class EnvoieWalletToBankUser extends Component {
headerTitleStyle: {
color: "white"
},
title: I18n.t('ENVOIE_WALLET_TO_BANK')
title: I18n.t('DEPOSIT_WALLET_TO_BANK')
}
};
@ -56,18 +55,18 @@ class EnvoieWalletToBankUser extends Component {
this.state = {
montant: null,
password: null,
codeCVV: null,
codeIban: null,
loading: false,
user: null,
triggerSubmitClick: false,
isSubmitClick: false,
isDataSubmit: false,
isModalConfirmVisible: false,
wallet: store.getState().walletDetailReducer.result.response
wallet: store.getState().walletDetailReducer.result.response,
bank: this.props.navigation.state.params.bank
};
this.props.envoieUserWalletToCardReset();
this.props.getCommissionUserWalletToCardReset();
this.props.envoieUserWalletToBankReset();
}
@ -76,7 +75,7 @@ class EnvoieWalletToBankUser extends Component {
readUser().then((user) => {
if (user) {
if (user !== undefined) {
this.setState({ user });
this.setState({user});
}
}
});
@ -87,7 +86,7 @@ class EnvoieWalletToBankUser extends Component {
console.log('PROPS', nextProps)
if (nextProps.resultEnvoieWalletToCardGetCommission != null) {
/* if (nextProps.resultEnvoieWalletToCardGetCommission != null) {
if (typeof nextProps.resultEnvoieWalletToCardGetCommission.response !== 'undefined') {
@ -96,52 +95,52 @@ class EnvoieWalletToBankUser extends Component {
isModalConfirmVisible: true
});
}
}
}*/
}
renderEnvoieWalletToWalletResponse = () => {
renderEnvoieWalletToBankResponse = () => {
const { resultEnvoieWalletToCard, errorEnvoieWalletToCard } = this.props;
const {resultEnvoieWalletToBank, errorEnvoieWalletToBank} = this.props;
if (errorEnvoieWalletToCard !== null) {
if (typeof errorEnvoieWalletToCard.data !== 'undefined') {
if (errorEnvoieWalletToBank !== null) {
if (typeof errorEnvoieWalletToBank.data !== 'undefined') {
Alert.alert(
I18n.t("ERROR_TRANSFER"),
errorEnvoieWalletToCard.data.error,
errorEnvoieWalletToBank.data.error,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.envoieUserWalletToCardReset();
this.props.envoieUserWalletToBankReset();
}
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
if (resultEnvoieWalletToCard !== null) {
if (resultEnvoieWalletToCard.response !== null) {
if (resultEnvoieWalletToBank !== null) {
if (resultEnvoieWalletToBank.response !== null) {
Alert.alert(
I18n.t("SUCCESS_TRANSFER"),
resultEnvoieWalletToCard.response,
resultEnvoieWalletToBank.response,
[
{
text: I18n.t("OK"), onPress: () => {
this.props.envoieUserWalletToCardReset();
this.props.envoieUserWalletToBankReset();
IlinkEmitter.emit("refreshWallet");
this.props.navigation.pop();
}
}
],
{ cancelable: false }
{cancelable: false}
)
}
}
}
renderDialogGetCommissionResponse = () => {
/* renderDialogGetCommissionResponse = () => {
const { errorEnvoieWalletToCardGetCommission } = this.props;
@ -162,14 +161,15 @@ class EnvoieWalletToBankUser extends Component {
}
}
}
}*/
updateLangue() {
this.props.navigation.setParams({ name: I18n.t('DEPOSIT_TO_CARD') })
this.props.navigation.setParams({name: I18n.t('DEPOSIT_TO_CARD')})
this.forceUpdate()
}
/*
modalConfirmTransaction = (data) => {
const frais = data.response.frais;
@ -238,13 +238,14 @@ class EnvoieWalletToBankUser extends Component {
);
}
*/
ckeckIfFieldIsOK(champ) {
return (isNil(champ) || isEqual(champ.length, 0));
}
isMontantValid = () => {
const { montant } = this.state;
const {montant} = this.state;
if ((parseInt(isEqual(montant, 0)) || montant < 0))
return {
errorMessage: I18n.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),
@ -264,27 +265,34 @@ class EnvoieWalletToBankUser extends Component {
};
}
onSubmitSendWalletToCard = () => {
const { codeCVV, montant, password } = this.state;
onSubmitSendWalletToBank = () => {
const {montant, password, codeIban} = this.state;
if (this.ckeckIfFieldIsOK(codeCVV) && codeCVV === 3)
this.codeCVVAnim.shake(800);
else if (this.ckeckIfFieldIsOK(montant) || !this.isMontantValid().isValid) {
if (this.ckeckIfFieldIsOK(codeIban)) {
if (!(codeIban.length >= 14 && codeIban <= 34))
this.codeIbanAnim.shake(800);
else
this.codeIbanAnim.shake(800);
} else if (this.ckeckIfFieldIsOK(montant) || !this.isMontantValid().isValid) {
this.montantAnim.shake(800);
}
else if (this.ckeckIfFieldIsOK(password))
} else if (this.ckeckIfFieldIsOK(password))
this.passwordAnim.shake(800);
else {
this.props.getCommissionUserWalletToCardAction({
type: 2,
console.log("id wallet network", this.state.bank);
this.props.envoieUserWalletToBankAction({
type: 4,
id_wallet_user: this.state.wallet.id,
montant: this.state.montant,
id_wallet_network: this.state.wallet.id_wallet_network,
iban: codeIban,
id_bank: this.state.bank.id_bank,
montant: montant,
password: password
});
}
this.setState({
triggerSubmitClick: true
isDataSubmit: true
});
}
@ -292,7 +300,7 @@ class EnvoieWalletToBankUser extends Component {
renderLoader = () => {
return (
<ProgressDialog
visible={this.props.loadingEnvoieWalletToCard || this.props.loadingEnvoieWalletToCardGetCommission}
visible={this.props.loadingEnvoieWalletToBank}
title={I18n.t('LOADING')}
message={I18n.t('LOADING_INFO')}
/>
@ -300,37 +308,34 @@ class EnvoieWalletToBankUser extends Component {
}
render() {
const { resultEnvoieWalletToCardGetCommission } = this.props;
return (
<>
{(this.props.loadingEnvoieWalletToCard || this.props.loadingEnvoieWalletToCardGetCommission) && this.renderLoader()}
{this.state.isDataSubmit && this.renderEnvoieWalletToWalletResponse()}
{this.state.triggerSubmitClick && this.renderDialogGetCommissionResponse()}
{
(resultEnvoieWalletToCardGetCommission !== null) &&
(typeof resultEnvoieWalletToCardGetCommission.response !== 'undefined') &&
this.modalConfirmTransaction(resultEnvoieWalletToCardGetCommission)
}
{this.props.loadingEnvoieWalletToBank && this.renderLoader()}
{this.state.isDataSubmit && this.renderEnvoieWalletToBankResponse()}
<ScrollView style={styles.container}>
<Text style={styles.subbigtitle}>{I18n.t('ENVOIE_WALLET_TO_BANK')}</Text>
<Animatable.View ref={(comp) => { this.codeCVVAnim = comp }}>
<Animatable.View ref={(comp) => {
this.codeIbanAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'id-card'}
label={I18n.t('CODE_IBAN')}
iconColor={'#f95a25'}
iconSize={20}
value={this.state.codeCVV}
onChangeText={(codeCVV) => {
value={this.state.codeIban}
onChangeText={(codeIban) => {
this.setState({ codeCVV })
this.setState({codeIban})
}}
style={styles.input}
>
</Fumi>
</Animatable.View>
<Animatable.View ref={(comp) => { this.montantAnim = comp }}>
<Animatable.View ref={(comp) => {
this.montantAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'money'}
label={I18n.t('AMOUNT')}
iconColor={'#f95a25'}
@ -338,7 +343,7 @@ class EnvoieWalletToBankUser extends Component {
iconSize={20}
value={this.state.montant}
onChangeText={(montant) => {
this.setState({ montant })
this.setState({montant})
}}
style={styles.input}
>
@ -364,7 +369,9 @@ class EnvoieWalletToBankUser extends Component {
</View>
</Animatable.View>
<Animatable.View ref={(comp) => { this.passwordAnim = comp }}>
<Animatable.View ref={(comp) => {
this.passwordAnim = comp
}}>
<Fumi iconClass={FontAwesomeIcon} iconName={'lock'}
label={I18n.t('PASSWORD')}
iconColor={'#f95a25'}
@ -372,7 +379,7 @@ class EnvoieWalletToBankUser extends Component {
secureTextEntry={true}
value={this.state.password}
onChangeText={(password) => {
this.setState({ password })
this.setState({password})
}}
style={styles.input}
>
@ -381,7 +388,9 @@ class EnvoieWalletToBankUser extends Component {
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
onPress={() => { /* this.onSubmitSendWalletToCard(); */ }}>
onPress={() => {
this.onSubmitSendWalletToBank()
}}>
{I18n.t('SUBMIT_LABEL')}</Button>
</ScrollView>
</>
@ -391,22 +400,16 @@ class EnvoieWalletToBankUser extends Component {
const maptStateToProps = state => ({
loadingEnvoieWalletToCard: state.envoieUserWalletToCardReducer.loading,
resultEnvoieWalletToCard: state.envoieUserWalletToCardReducer.result,
errorEnvoieWalletToCard: state.envoieUserWalletToCardReducer.error,
loadingEnvoieWalletToBank: state.envoieUserWalletToBank.loading,
resultEnvoieWalletToBank: state.envoieUserWalletToBank.result,
errorEnvoieWalletToBank: state.envoieUserWalletToBank.error,
loadingEnvoieWalletToCardGetCommission: state.envoieUserWalletToCardGetCommissionReducer.loading,
resultEnvoieWalletToCardGetCommission: state.envoieUserWalletToCardGetCommissionReducer.result,
errorEnvoieWalletToCardGetCommission: state.envoieUserWalletToCardGetCommissionReducer.error,
});
const mapDispatchToProps = dispatch => bindActionCreators({
envoieUserWalletToCardAction,
envoieUserWalletToCardReset,
getCommissionUserWalletToCardAction,
getCommissionUserWalletToCardReset
envoieUserWalletToBankAction,
envoieUserWalletToBankReset,
}, dispatch);

View File

@ -56,7 +56,7 @@ class EnvoieWalletToCashUser extends Component {
super(props);
this.state = {
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
identityPiecesName: I18n.t((identityPieces()[0]).name),
paysDestination: [],
paysDestinationSelect: null,
walletActifs: [],
@ -631,8 +631,8 @@ class EnvoieWalletToCashUser extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>

View File

@ -54,7 +54,7 @@ class EnvoieWalletToWalletUser extends Component {
super(props);
this.state = {
identityPieces: identityPieces(),
identityPiecesName: (identityPieces()[0]).name,
identityPiecesName: I18n.t((identityPieces()[0]).name),
paysDestination: [],
paysDestinationSelect: null,
walletActifs: [],
@ -603,8 +603,8 @@ class EnvoieWalletToWalletUser extends Component {
onChangeText={(value, index, data) => {
this.setState({ identityPiecesName: value });
}}
valueExtractor={(value) => { return value.name }}
labelExtractor={(value) => { return value.name }}
valueExtractor={(value) => { return I18n.t(value.name) }}
labelExtractor={(value) => { return I18n.t(value.name) }}
/>
</Animatable.View>

View File

@ -1,7 +1,7 @@
import I18n from 'react-native-i18n';
import isEqual from 'lodash/isEqual';
import Toast from 'react-native-root-toast';
import { Color } from '../config/Color';
import {Color} from '../config/Color';
let slugify = require('slugify');
let route = require('./../route.json');
@ -69,13 +69,13 @@ export const isEmptyObject = (obj) => {
export const identityPieces = () => {
return [
{
name: I18n.t('IDENTITY_CARD')
name: 'IDENTITY_CARD'
},
{
name: I18n.t('PASSEPORT')
name: 'PASSEPORT'
},
{
name: I18n.t('OTHER_IDENTITY_PIECE')
name: 'OTHER_IDENTITY_PIECE'
},
]
}
@ -83,10 +83,10 @@ export const identityPieces = () => {
export const withdrawalMode = () => {
return [
{
name: I18n.t('WITHDRAWAL_IN_CASH')
name: 'WITHDRAWAL_IN_CASH'
},
{
name: I18n.t('TRANSFER_IN_ACCOUNT')
name: 'TRANSFER_IN_ACCOUNT'
}
]
}
@ -94,10 +94,10 @@ export const withdrawalMode = () => {
export const typeCaution = () => {
return [
{
name: I18n.t('GROUP')
name: 'GROUP'
},
{
name: I18n.t('INDIVIDUAL')
name: 'INDIVIDUAL'
}
]
}
@ -105,10 +105,10 @@ export const typeCaution = () => {
export const typeEpargne = () => {
return [
{
name: I18n.t('SIMPLE')
name: 'SIMPLE'
},
{
name: I18n.t('BLOCKED')
name: 'BLOCKED'
}
]
}
@ -116,10 +116,10 @@ export const typeEpargne = () => {
export const typeIdIDestinataire = () => {
return [
{
name: I18n.t('PHONE')
name: 'PHONE'
},
{
name: I18n.t('CODE_WALLET')
name: 'CODE_WALLET'
}
]
}
@ -166,11 +166,11 @@ export const walletActifData = () => {
export const inputCardSource = () => [
{
name: I18n.t('NUMERO_DE_SERIE'),
name: 'NUMERO_DE_SERIE',
value: 'serial-number'
},
{
name: I18n.t('CREDIT_CARD'),
name: 'CREDIT_CARD',
value: 'credit-card'
},
]
@ -187,11 +187,11 @@ export const transactionHistoryLabel = () => {
},
{
icon: 'cash',
label: I18n.t('AMOUNT_LABEL')
label: 'AMOUNT_LABEL'
},
{
icon: 'account-arrow-right',
label: I18n.t('DESTINATAIRE')
label: 'DESTINATAIRE'
},
{
icon: 'calendar-clock',
@ -211,15 +211,15 @@ export const transactionHistoryIlinkLabel = () => {
}, */
{
icon: 'cash',
label: I18n.t('AMOUNT_LABEL')
label: 'AMOUNT_LABEL'
},
{
icon: 'account-arrow-right',
label: I18n.t('DESTINATAIRE')
label: 'DESTINATAIRE'
},
{
icon: 'calendar-clock',
label: 'Date'
label: 'DATE'
},
]
}
@ -239,7 +239,7 @@ export const transactionHistoryNanoCreditLabel = () => {
},
{
icon: 'cash',
label: I18n.t('AMOUNT_LABEL')
label: 'AMOUNT_LABEL'
},
{
icon: 'calendar-clock',
@ -268,81 +268,44 @@ export const transactionHistoryUser = () => {
}
export const displayTransactionType = (transactionType) => {
return isEqual(transactionType, 'E') ? I18n.t('SAVING') : I18n.t('NANO_CREDIT');
return isEqual(transactionType, 'E') ? 'SAVING' : 'NANO_CREDIT';
}
export const optionWalletToBank = {
title: I18n.t('DEPOSIT_TO_BANK'),
subTitle: I18n.t('CHOOSE_OPERATOR'),
options: [
{
type: 'WALLET_TO_BANK_USER',
screen: route.envoieWalletToBankUser,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 1',
},
{
type: 'WALLET_TO_BANK_USER',
screen: route.envoieWalletToBankUser,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 2',
},
{
type: 'WALLET_TO_BANK_USER',
screen: route.envoieWalletToBankUser,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 3',
},
{
type: 'WALLET_TO_BANK_USER',
screen: route.envoieWalletToBankUser,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 4',
},
{
type: 'WALLET_TO_BANK_USER',
screen: route.envoieWalletToBankUser,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 5',
},
{
type: 'WALLET_TO_BANK_USER',
screen: route.paiementFacture,
icon: 'http://test.ilink-app.com:8080/mobilebackend/datas/img/network/ilink-world-logo.png',
title: 'Banque numéro 6',
},
]
title: 'DEPOSIT_TO_BANK',
subTitle: 'CHOOSE_OPERATOR',
options: []
}
export const optionDepotScreen = {
type: 'DEPOT',
title: I18n.t('ENVOIE_ARGENT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'ENVOIE_ARGENT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.envoieCashVersWalletAgent,
icon: 'wallet',
title: I18n.t('DEPOSIT_CASH_TO_WALLET'),
title: 'DEPOSIT_CASH_TO_WALLET',
},
{
screen: route.envoieCashVersAutreWalletAgent,
icon: 'cash-refund',
title: I18n.t('DEPOSIT_CASH_TO_OTHER_WALLET'),
title: 'DEPOSIT_CASH_TO_OTHER_WALLET',
},
{
screen: route.envoieCashVersCarteAgent,
icon: 'credit-card',
title: I18n.t('DEPOSIT_CASH_TO_VISA'),
title: 'DEPOSIT_CASH_TO_VISA',
},
{
screen: route.envoiCashVersCashAgent,
icon: 'cash-multiple',
title: I18n.t('DEPOSIT_CASH_TO_CASH'),
title: 'DEPOSIT_CASH_TO_CASH',
},
{
screen: route.operateurOptionSelect,
icon: 'bank-transfer-in',
title: I18n.t('DEPOSIT_CASH_TO_BANK'),
title: 'DEPOSIT_CASH_TO_BANK',
subScreenOption: optionWalletToBank,
type: 'WALLET_TO_BANK',
},
@ -351,70 +314,70 @@ export const optionDepotScreen = {
export const optionRetraitScreen = {
type: 'RETRAIT',
title: I18n.t('RETRAIT_ARGENT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'RETRAIT_ARGENT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.retraitEnCashAgent,
icon: 'cash',
title: I18n.t('WITHDRAWAL_IN_CASH'),
title: 'WITHDRAWAL_IN_CASH',
},
{
screen: route.retraitCarteVersCashAgent,
icon: 'credit-card',
title: I18n.t('WITHDRAWAL_CARD_TO_CASH_AGENT'),
title: 'WITHDRAWAL_CARD_TO_CASH_AGENT',
},
]
}
export const optionRetraitUserScreen = {
type: 'RETRAIT_USER',
title: I18n.t('RETRAIT_ARGENT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'RETRAIT_ARGENT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.retraitWalletVersCashUser,
icon: 'wallet',
title: I18n.t('WITHDRAWAL_WALLET_TO_CASH'),
title: 'WITHDRAWAL_WALLET_TO_CASH',
},
{
screen: route.retraitCarteVersCashUser,
icon: 'credit-card-refund',
title: I18n.t('WITHDRAWAL_CARD_TO_CASH'),
title: 'WITHDRAWAL_CARD_TO_CASH',
},
{
screen: route.retraitCarteVersWalletUser,
icon: 'credit-card',
title: I18n.t('WITHDRAWAL_CARD_TO_WALLET'),
title: 'WITHDRAWAL_CARD_TO_WALLET',
},
]
}
export const optionDepotUserScreen = {
type: 'DEPOT_USER',
title: I18n.t('ENVOIE_ARGENT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'ENVOIE_ARGENT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.envoieWalletToWalletUser,
icon: 'wallet',
title: I18n.t('DEPOSIT_WALLET_TO_WALLET'),
title: 'DEPOSIT_WALLET_TO_WALLET',
},
{
screen: route.envoieWalletToCashUser,
icon: 'cash-refund',
title: I18n.t('DEPOSIT_TO_CASH'),
title: 'DEPOSIT_TO_CASH',
},
{
screen: route.envoieWalletToCardUser,
icon: 'credit-card',
title: I18n.t('DEPOSIT_TO_CARD'),
title: 'DEPOSIT_TO_CARD',
},
{
type: 'WALLET_TO_BANK',
screen: route.operateurOptionSelect,
icon: 'bank-transfer-in',
title: I18n.t('DEPOSIT_TO_BANK'),
title: 'DEPOSIT_TO_BANK',
subScreenOption: optionWalletToBank
},
]
@ -422,91 +385,90 @@ export const optionDepotUserScreen = {
export const optionIdentificationScreen = {
type: 'IDENTIFICATION',
title: I18n.t('IDENTIFICATION'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'IDENTIFICATION',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.createIdentification,
icon: 'pencil-plus',
title: I18n.t('CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN'),
title: 'CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN',
},
{
screen: route.validateIdentification,
icon: 'check-circle',
title: I18n.t('VALIDATE_IDENTIFICATION_DESCRIPTION'),
title: 'VALIDATE_IDENTIFICATION_DESCRIPTION',
},
]
}
export const optionIdentificationUserScreen = {
type: 'IDENTIFICATION',
title: I18n.t('IDENTIFICATION'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'IDENTIFICATION',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.createIdentificationUser,
icon: 'pencil-plus',
title: I18n.t('CREATE_MY_IDENTIFICATION'),
title: 'CREATE_MY_IDENTIFICATION',
},
{
screen: route.modifyIdentificationUser,
icon: 'pencil',
title: I18n.t('MODIFY_IDENTIFICATION'),
title: 'MODIFY_IDENTIFICATION',
},
]
}
export const optionNanoCreditScreen = {
type: 'NANO_CREDIT',
title: I18n.t('NANO_CREDIT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'NANO_CREDIT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.createGroupNanoCredit,
icon: 'account-multiple',
title: I18n.t('MANAGE_GROUP'),
title: 'MANAGE_GROUP',
screen: route.groupNanoCredit
},
/* {
screen: "",
icon: 'account-multiple-plus',
title: I18n.t('JOIN_GROUP'),
title: 'JOIN_GROUP',
},
{
screen: "",
icon: 'account-card-details',
title: I18n.t('OPEN_ACCOUNT'),
title: 'OPEN_ACCOUNT',
},
*/
/* {
screen: route.askNanoCredit,
icon: 'cash',
title: I18n.t('MANAGE_CREDIT'),
title: 'MANAGE_CREDIT',
}, */
{
title: I18n.t('DEMAND_NANO_CREDIT'),
title: 'DEMAND_NANO_CREDIT',
screen: route.askNanoCredit,
icon: 'cash'
},
{
title: I18n.t('REFUND_NANO_CREDIT'),
title: 'REFUND_NANO_CREDIT',
screen: route.refundNanoCreditUser,
icon: "cash-refund"
},
/* {
screen: "",
icon: 'briefcase-edit',
title: I18n.t('MANAGE_SAVINGS'),
title: 'MANAGE_SAVINGS',
}, */
{
screen: route.epargnerArgentUser,
icon: 'cash-register',
title: I18n.t('SAVE_MONEY'),
title: 'SAVE_MONEY',
},
{
screen: route.casserEpargneUser,
icon: 'cash-multiple',
title: I18n.t('BREAK_EPARGNE'),
title: 'BREAK_EPARGNE',
},
]
@ -514,20 +476,20 @@ export const optionNanoCreditScreen = {
export const optionNanoCreditAgentScreen = {
type: 'NANO_CREDIT',
title: I18n.t('NANO_CREDIT'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'NANO_CREDIT',
subTitle: 'CHOOSE_OPTION',
options: [
{
screen: route.cautionNanoCreditAgent,
icon: 'cash',
title: I18n.t('CAUTION_CREDIT'),
title: 'CAUTION_CREDIT',
},
]
}
export const optionPaiementEauElectricite = {
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPERATOR'),
title: 'PAIEMENT_FACTURE',
subTitle: 'CHOOSE_OPERATOR',
options: [
{
type: 'PAIEMENT_EAU_ELECTRICITE',
@ -569,8 +531,8 @@ export const optionPaiementEauElectricite = {
}
export const optionPaiementCreditTelephonique = {
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPERATOR'),
title: 'PAIEMENT_FACTURE',
subTitle: 'CHOOSE_OPERATOR',
options: [
{
type: 'PAIEMENT_CREDIT_TELEPHONE',
@ -612,8 +574,8 @@ export const optionPaiementCreditTelephonique = {
}
export const optionPaiementAbonnementTV = {
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPERATOR'),
title: 'PAIEMENT_FACTURE',
subTitle: 'CHOOSE_OPERATOR',
options: [
{
type: 'PAIEMENT_ABONNEMENT_TV',
@ -655,8 +617,8 @@ export const optionPaiementAbonnementTV = {
}
export const optionPaiementEcole = {
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPERATOR'),
title: 'PAIEMENT_FACTURE',
subTitle: 'CHOOSE_OPERATOR',
options: [
{
type: 'PAIEMENT_ECOLE',
@ -699,34 +661,34 @@ export const optionPaiementEcole = {
export const optionPaiementFacture = {
type: 'FACTURE',
title: I18n.t('PAIEMENT_FACTURE'),
subTitle: I18n.t('CHOOSE_OPTION'),
title: 'PAIEMENT_FACTURE',
subTitle: 'CHOOSE_OPTION',
options: [
{
type: 'FACTURE_WATER_ELECTRICITY',
icon: 'water',
title: 'Paiement eau/électricité',
title: 'PAIEMENT_EAU_ELECTRICITY',
screen: route.operateurOptionSelect,
subScreenOption: optionPaiementEauElectricite
},
{
type: 'FACTURE_SCHOOL',
icon: 'school',
title: 'Paiement école',
title: 'PAIEMENT_ECOLE',
screen: route.operateurOptionSelect,
subScreenOption: optionPaiementEcole
},
{
type: 'FACTURE_PHONE',
icon: 'phone-classic',
title: 'Paiement crédit téléphonique',
title: 'PAIEMENT_CREDIT_TELEPHONIQUE',
screen: route.operateurOptionSelect,
subScreenOption: optionPaiementCreditTelephonique
},
{
type: 'FACTURE_TV',
icon: 'television-classic',
title: 'Paiement abonnement TV',
title: 'PAIEMENT_ABONNEMENT_TV',
screen: route.operateurOptionSelect,
subScreenOption: optionPaiementAbonnementTV
},

View File

@ -35,6 +35,7 @@
"ASK_MEMBERS": "Membership applications",
"MY_ACCOUNT": "My account",
"WALLET": "Wallet",
"NO_BANK_AVAILABLE": "No bank available",
"ENTER_VALID_AMOUNT": "Enter a valid amount",
"ENTER_AMOUNT_SUPERIOR_ZEROR": "Enter amount superior to zero",
"AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT": "Amount greater than that of the agent's main account",
@ -111,7 +112,7 @@
"DEPOSIT_WALLET_TO_BANK": "Your Wallet to bank",
"ENVOIE_WALLET_TO_BANK": "Send Wallet to bank",
"DEPOSIT_CASH_TO_CASH": "Cash to cash",
"ENVOIE_CASH_TO_CASH": "Send money in cash to cash",
"ENVOIE_CASH_TO_CASH": "Send money from cash to cash",
"TRANSACTION_DETAIL": "Transaction detail",
"DEMAND_DETAIL": "Demand detail",
"CODE_IBAN": "IBAN Code",
@ -140,7 +141,7 @@
"OPEN_ACCOUNT": "Open account",
"MANAGE_CREDIT": "Manage credit",
"MANAGE_SAVINGS": "Manage savings",
"INIT_COUNTRY": "Departure countryt",
"INIT_COUNTRY": "Departure country",
"FINAL_COUNTRY": "Arrival country",
"INIT_AMOUNT": "Init amount",
"FINAL_AMOUNT": "Final amount",
@ -161,11 +162,15 @@
"DEMAND_NANO_CREDIT": "Nano credit demand",
"REFUND_NANO_CREDIT": "Refund nano credit",
"REFUND_DONE": "Refund done",
"SAVE_MONEY": "Epargner de l'argent",
"SAVE_MONEY": "Save money",
"SAVE_MONEY_TYPE": "Savings type",
"CAUTION_CREDIT": "Caution credit demand",
"ID_DEMAND": "Demand ID",
"DATE": "Date",
"PAIEMENT_EAU_ELECTRICITY": "Water/electricity bill",
"PAIEMENT_ECOLE": "School fees",
"PAIEMENT_CREDIT_TELEPHONIQUE": "Phone credit bills",
"PAIEMENT_ABONNEMENT_TV": "TV subscription",
"DEMAND_DATE": "Demand date",
"DATE_REMBOURSEMENT_PREVU": "Expected refund date",
"DATE_REMBOURSEMENT": "Refund date",
@ -174,7 +179,7 @@
"FINAL_DATE": "End date",
"CASSATION_DATE": "Cassation date",
"VALIDATION_DATE": "Validation date",
"HISTORY_DETAIL": "History detail",
"DEMAND_DURATION_IN_MONTH": "Duration (in months)",
"PAIEMENT_FACTURE": "Bill payment",
"NUMERO_ABONNE": "Subscriber number",
@ -273,6 +278,7 @@
"IDENTITY_NUMBER": "N° of piece",
"IDENTITY_PIECE_EXPIRY_DATE": "Expiry date",
"LAST_STEP": "Last step",
"ID_TRANSACTION": "Transaction ID",
"ACTIVE_ACCOUNT": "Activate the account !",
"ACTIVE_USER": "Active",
"LAST_STEP_TEXT": "Activate your account using the verification code that was sent to you on your e-mail address and on your phone number",
@ -437,14 +443,14 @@
"CREATE_MY_IDENTIFICATION": "Create my identification",
"NOT_IDENTIFIED": "This number exists, its identification is not yet entered",
"NOT_VALIDATED": "Your identicaiton is not yet validated",
"ALREADY_VALIDATED": "The identification of this client has already been validated",
"ALREADY_VALIDATED": "The identification of this customer has already been validated",
"MODIFY_IDENTIFICATION": "Modify my identification",
"NOT_YET_IDENTIFY": "You are not yet identified",
"IDENTIFICATION": " Identification",
"CREATION_IDENTIFICATION": "Creation",
"CREATION_IDENTIFICATION_CLIENT": "Identify me",
"CREATION_IDENTIFICATION_DESCRIPTION": "Identify a client",
"CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN": "Enter the identity of a client",
"CREATION_IDENTIFICATION_DESCRIPTION": "Identify a customer",
"CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN": "Enter the identity of a customer",
"VALIDATE_IDENTIFICATION": "Validation",
"VALIDATE_IDENTIFICATION_DESCRIPTION": "Validate an identi...",
"IDENTIFICATION_INFORMATION": "Identification information",

View File

@ -38,6 +38,7 @@
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur",
"NO_BANK_AVAILABLE": "Aucune banque disponible",
"DEPOSIT_SUCCESS": "Dépôt effectué avec succès",
"SUCCESS": "Succès",
"ETAT": "Etat",
@ -172,7 +173,11 @@
"REFUND_DONE": "Remboursement effectué",
"CAUTION_CREDIT": "Cautionner une demande de crédit",
"ID_DEMAND": "Identifiant de la demande",
"PAIEMENT_EAU_ELECTRICITY": "Paiement eau/électricité",
"PAIEMENT_ECOLE": "Paiement école",
"PAIEMENT_CREDIT_TELEPHONIQUE": "Paiement crédit téléphonique",
"PAIEMENT_ABONNEMENT_TV": "Paiement abonnement TV",
"DATE": "Date",
"DEMAND_DATE": "Date de la demande",
"DATE_REMBOURSEMENT_PREVU": "Date de remboursement prévu",
"DATE_REMBOURSEMENT": "Date de remboursement",
@ -181,7 +186,7 @@
"FINAL_DATE": "Date de fin",
"CASSATION_DATE": "Date de cassation",
"VALIDATION_DATE": "Date de validation",
"HISTORY_DETAIL": "Détail de l'historique",
"DEMAND_DURATION_IN_MONTH": "Durée (en mois)",
"PAIEMENT_FACTURE": "Paiement de facture",
"NUMERO_ABONNE": "Numéro d'abonnée",

47
webservice/BankApi.js Normal file
View File

@ -0,0 +1,47 @@
import {store} from "../redux/store";
import axios from "axios";
import {getBankUrl} from "./IlinkConstants";
import I18n from "react-native-i18n";
import {
fetchGetBankListError,
fetchGetBankListPending,
fetchGetBankListReset,
fetchGetBankListSucsess
} from "../redux/actions/BankAction";
export const getBankListAction = (idWallet) => {
const auth = store.getState().authKeyReducer;
const authKey = auth !== null ? `${auth.authKey.token_type} ${auth.authKey.access_token}` : '';
return dispatch => {
dispatch(fetchGetBankListPending());
axios({
url: `${getBankUrl}/${idWallet}`,
method: 'GET',
headers: {
'Authorization': authKey,
'X-Localization': I18n.currentLocale()
}
})
.then(response => {
console.log(response);
dispatch(fetchGetBankListSucsess(response));
})
.catch(error => {
if (error.response)
dispatch(fetchGetBankListError(error.response));
else if (error.request)
dispatch(fetchGetBankListError(error.request))
else
dispatch(fetchGetBankListError(error.message))
});
}
}
export const getBankListReset = () => {
return dispatch => {
dispatch(fetchGetBankListReset());
}
}

View File

@ -1,9 +1,39 @@
import axios from "axios";
import I18n from 'react-native-i18n';
import { store } from "../redux/store";
import { envoieUserWalletToWallet, envoieCommissionUrl } from "./IlinkConstants";
import { fetchEnvoieUserWalletToWalletPending, fetchEnvoieUserWalletToWalletSuccess, fetchEnvoieUserWalletToWalletError, fetchEnvoieUserWalletToCardGetCommissionError, fetchEnvoieUserWalletToWalletReset, fetchEnvoieUserWalletToWalleGetCommissiontPending, fetchEnvoieUserWalletToWalleGetCommissiontReset, fetchEnvoieUserWalletToWalletGetCommissionSuccess, fetchEnvoieUserWalletToWalletGetCommissionError, fetchEnvoieUserWalletToCashPending, fetchEnvoieUserWalletToCashSuccess, fetchEnvoieUserWalletToCashError, fetchEnvoieUserWalletToCashReset, fetchEnvoieUserWalletToCashGetCommissiontPending, fetchEnvoieUserWalletToCashGetCommissiontReset, fetchEnvoieUserWalletToCashGetCommissionError, fetchEnvoieUserWalletToCashGetCommissionSuccess, fetchEnvoieUserWalletToCardPending, fetchEnvoieUserWalletToCardSuccess, fetchEnvoieUserWalletToCardError, fetchEnvoieUserWalletToCardReset, fetchEnvoieUserWalletToCardGetCommissiontPending, fetchEnvoieUserWalletToCardGetCommissionSuccess, fetchEnvoieUserWalletToCardGetCommissiontReset } from "../redux/actions/EnvoieUserType";
import {store} from "../redux/store";
import {envoieCommissionUrl, envoieUserWalletToWallet} from "./IlinkConstants";
import {
fetchEnvoieUserWalletToCardError,
fetchEnvoieUserWalletToCardGetCommissionError,
fetchEnvoieUserWalletToCardGetCommissionSuccess,
fetchEnvoieUserWalletToCardGetCommissiontPending,
fetchEnvoieUserWalletToCardGetCommissiontReset,
fetchEnvoieUserWalletToCardPending,
fetchEnvoieUserWalletToCardReset,
fetchEnvoieUserWalletToCardSuccess,
fetchEnvoieUserWalletToCashError,
fetchEnvoieUserWalletToCashGetCommissionError,
fetchEnvoieUserWalletToCashGetCommissionSuccess,
fetchEnvoieUserWalletToCashGetCommissiontPending,
fetchEnvoieUserWalletToCashGetCommissiontReset,
fetchEnvoieUserWalletToCashPending,
fetchEnvoieUserWalletToCashReset,
fetchEnvoieUserWalletToCashSuccess,
fetchEnvoieUserWalletToWalleGetCommissiontPending,
fetchEnvoieUserWalletToWalleGetCommissiontReset,
fetchEnvoieUserWalletToWalletError,
fetchEnvoieUserWalletToWalletGetCommissionError,
fetchEnvoieUserWalletToWalletGetCommissionSuccess,
fetchEnvoieUserWalletToWalletPending,
fetchEnvoieUserWalletToWalletReset,
fetchEnvoieUserWalletToWalletSuccess
} from "../redux/actions/EnvoieUserType";
import {
fetchEnvoieWalletToBankUserError,
fetchEnvoieWalletToBankUserPending,
fetchEnvoieWalletToBankUserReset,
fetchEnvoieWalletToBankUserSucsess
} from "../redux/actions/BankAction";
export const envoieUserWalletToWalletAction = (data) => {
@ -241,3 +271,41 @@ export const getCommissionUserWalletToCardReset = () => {
dispatch(fetchEnvoieUserWalletToCardGetCommissiontReset());
}
}
export const envoieUserWalletToBankAction = (data) => {
const auth = store.getState().authKeyReducer;
const authKey = auth !== null ? `${auth.authKey.token_type} ${auth.authKey.access_token}` : '';
return dispatch => {
dispatch(fetchEnvoieWalletToBankUserPending());
axios({
url: `${envoieUserWalletToWallet}`,
method: 'POST',
data,
headers: {
'Authorization': authKey,
'X-Localization': I18n.currentLocale()
}
})
.then(response => {
console.log(response);
dispatch(fetchEnvoieWalletToBankUserSucsess(response));
})
.catch(error => {
if (error.response)
dispatch(fetchEnvoieWalletToBankUserError(error.response));
else if (error.request)
dispatch(fetchEnvoieWalletToBankUserError(error.request))
else
dispatch(fetchEnvoieWalletToBankUserError(error.message))
});
}
}
export const envoieUserWalletToBankReset = () => {
return dispatch => {
dispatch(fetchEnvoieWalletToBankUserReset());
}
}

View File

@ -69,7 +69,7 @@ export const getNanoCreditAccount = testBaseUrl + '/walletService/groups/nanoCre
export const getNanoCreditUserHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/all_demands';
export const getNanoCreditAgentHistoryUrl = testBaseUrl + '/walletService/groups/nanoCredit/guarantee_demands';
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/banks';
export const authKeyUrl = testBaseUrl + '/oauth/token';
export const videoUrl = "https://www.youtube.com/watch?v=wwGPDPsSLWY";