Identification OK

This commit is contained in:
Brice Zele 2020-07-28 18:37:46 +01:00
parent 7339ecb3dd
commit 8199e6c181
15 changed files with 262 additions and 213 deletions

File diff suppressed because one or more lines are too long

View File

@ -1390,6 +1390,7 @@ class Home extends BaseScreen {
translucent={true} translucent={true}
/> />
{/* Start here to comment */} {/* Start here to comment */}
{/*
{ {
(this.state.loadingDialog || this.props.loading) ? (this.state.loadingDialog || this.props.loading) ?
<View <View
@ -1426,7 +1427,7 @@ class Home extends BaseScreen {
this.setState({ showProgress: false }) this.setState({ showProgress: false })
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{ text: "Ok", onPress: () => { } }]) Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{ text: "Ok", onPress: () => { } }])
}} }}
/> /> */}
{this.makeCardSearch()} {this.makeCardSearch()}
{this.makeSlidingUp()} {this.makeSlidingUp()}
{this.makeDialogLoader()} {this.makeDialogLoader()}

View File

@ -90,9 +90,10 @@ class CreateIdentificationUser extends Component {
readUser().then((user) => { readUser().then((user) => {
if (user) { if (user) {
if (user !== undefined) { if (user !== undefined) {
let firstname = user.firstname !== null ? user.firstname : '';
this.setState({ this.setState({
user, user,
lastname: `${user.firstname} ${user.lastname}` lastname: `${firstname} ${user.lastname}`
}); });
} }
} }
@ -364,7 +365,7 @@ class CreateIdentificationUser extends Component {
id_identity_document: this.state.numeroIdentite, id_identity_document: this.state.numeroIdentite,
expiry_date_document: moment(this.state.dateExpiration).format('DD-MM-YYYY'), expiry_date_document: moment(this.state.dateExpiration).format('DD-MM-YYYY'),
phone_number: null, phone_number: null,
id_user: 321 id_user: this.state.user.id
}); });
} }
this.setState({ this.setState({

View File

@ -307,7 +307,7 @@ class WalletDetail extends Component {
} }
]}> ]}>
<View style={[styles.contentLeftItem]}> <View style={[styles.contentLeftItem]}>
<Text numberOfLines={1} style={[Typography.body1, Typography.semibold]}>{I18n.t('COUNTRY')}</Text> <Text numberOfLines={1} style={[Typography.caption2, Typography.semibold]}>{I18n.t('COUNTRY')}</Text>
<Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{wallet.country}</Text> <Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{wallet.country}</Text>
</View> </View>
@ -405,8 +405,8 @@ class WalletDetail extends Component {
</View> </View>
</View> </View>
<View style={styles.contentLeftItem}> <View style={styles.contentLeftItem}>
<Text numberOfLines={1} style={[Typography.body1, Typography.semibold]} >{I18n.t('CREATION_DATE')}</Text> <Text numberOfLines={1} style={[Typography.caption2, Typography.semibold]} >{I18n.t('CREATION_DATE')}</Text>
<Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{this.getCreationDateToHumanFormat(wallet.created_date)}</Text> <Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{moment(wallet.created_date).format('DD/MM/YYYY')}</Text>
</View> </View>
</View> </View>
); );
@ -776,18 +776,12 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={{ paddingTop: 20, }}>
<Text style={[Typography.headline, Typography.semibold]}> <Text style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_CREDIT')} {I18n.t('NANO_CREDIT')}
</Text> </Text>
</View> </View>
<View style={{ flex: 1 }}>
<Text style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}>
{I18n.t('NANO_CREDIT_DESCRIPTION')}
</Text>
</View>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
@ -803,18 +797,12 @@ class WalletDetail extends Component {
<View style={[styles.content]}> <View style={[styles.content]}>
<View style={styles.contentTitle}> <View style={{ paddingTop: 20, }}>
<Text style={[Typography.headline, Typography.semibold]}> <Text style={[Typography.headline, Typography.semibold]}>
{I18n.t('NANO_SANTE')} {I18n.t('NANO_SANTE')}
</Text> </Text>
</View> </View>
<View style={{ flex: 1 }}>
<Text numberOfLines={1} style={[Typography.overline, Color.grayColor], { paddingVertical: 5 }} numberOfLines={5}>
{I18n.t('NANO_SANTE_DESCRIPTION')}
</Text>
</View>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>

View File

@ -34,7 +34,7 @@ import 'moment/locale/en-nz'
import 'moment/locale/en-gb' import 'moment/locale/en-gb'
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { bindActionCreators } from 'redux'; import { bindActionCreators } from 'redux';
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel, optionPaiementFacture, displayToast, transactionHistoryIlinkLabel, isIlinkWorldWallet, cutStringWithoutDot } from '../../utils/UtilsFunction'; import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel, optionPaiementFacture, displayToast, transactionHistoryIlinkLabel, isIlinkWorldWallet, cutStringWithoutDot, cutString } from '../../utils/UtilsFunction';
import DeviceInfo from 'react-native-device-info'; import DeviceInfo from 'react-native-device-info';
import { readUser } from '../../webservice/AuthApi'; import { readUser } from '../../webservice/AuthApi';
const thousands = require('thousands'); const thousands = require('thousands');
@ -217,8 +217,8 @@ class WalletDetailUser extends Component {
} }
]}> ]}>
<View style={[styles.contentLeftItem]}> <View style={[styles.contentLeftItem]}>
<Text numberOfLines={1} style={[Typography.body1, Typography.semibold]}>{I18n.t('COUNTRY')}</Text> <Text numberOfLines={1} style={[Typography.caption2, Typography.semibold]}>{I18n.t('COUNTRY')}</Text>
<Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>Pays</Text> <Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{wallet.country}</Text>
</View> </View>
<View style={{ <View style={{
@ -268,8 +268,8 @@ class WalletDetailUser extends Component {
</View> </View>
</View> </View>
<View style={styles.contentLeftItem}> <View style={styles.contentLeftItem}>
<Text numberOfLines={1} style={[Typography.body1, Typography.semibold]} >{I18n.t('CREATION_DATE')}</Text> <Text numberOfLines={1} style={[Typography.caption2, Typography.semibold]} >{I18n.t('CREATION_DATE')}</Text>
<Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{this.getCreationDateToHumanFormat(wallet.createdAt)}</Text> <Text numberOfLines={1} adjustsFontSizeToFit={true} style={Typography.caption1}>{moment(wallet.created_date).format('DD/MM/YYYY')}</Text>
</View> </View>
</View> </View>
); );
@ -579,7 +579,7 @@ class WalletDetailUser extends Component {
<TouchableOpacity style={styles.contain} <TouchableOpacity style={styles.contain}
onPress={() => { onPress={() => {
if (this.state.isIdentified) if (!this.state.isIdentified)
this.props.navigation.push(route.createIdentificationUser) this.props.navigation.push(route.createIdentificationUser)
else else
displayToast(I18n.t('ALREADY_IDENTIFIED')) displayToast(I18n.t('ALREADY_IDENTIFIED'))

View File

@ -361,7 +361,7 @@ class EnvoiCashVersCashAgent extends Component {
<Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text> <Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text>
</View> </View>
<View style={{ flex: 1, alignItems: 'flex-end' }}> <View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')} ${this.state.wallet.currency_code}`}</Text> <Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')}}`}</Text>
</View> </View>
</View> </View>
</View> </View>

View File

@ -361,7 +361,7 @@ class EnvoieCashVersAutreWalletAgent extends Component {
<Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text> <Text tyle={[Typography.body2, FontWeight.bold]}>{I18n.t('NET_AMOUNT')}:</Text>
</View> </View>
<View style={{ flex: 1, alignItems: 'flex-end' }}> <View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')} ${this.state.wallet.currency_code}`}</Text> <Text style={[Typography.caption1, Color.grayColor]}>{`${thousands(montant_net_final, ' ')}`}</Text>
</View> </View>
</View> </View>
</View> </View>

View File

@ -66,6 +66,8 @@ class EnvoieCashVersCarteAgent extends Component {
displayCardError: false, displayCardError: false,
loading: false, loading: false,
user: null, user: null,
displayFirstStep: true,
displaySecondStep: false,
triggerSubmitClick: false, triggerSubmitClick: false,
isSubmitClick: false, isSubmitClick: false,
isDataSubmit: false, isDataSubmit: false,
@ -156,7 +158,7 @@ class EnvoieCashVersCarteAgent extends Component {
if (resultEnvoieWalletToCard !== null) { if (resultEnvoieWalletToCard !== null) {
if (resultEnvoieWalletToCard.response !== null) { if (resultEnvoieWalletToCard.response !== null) {
Alert.alert( Alert.alert(
I18n.t("WITHDRAWAL_SUCCESS"), I18n.t("SUCCESS_TRANSFER"),
resultEnvoieWalletToCard.response, resultEnvoieWalletToCard.response,
[ [
{ {
@ -350,6 +352,10 @@ class EnvoieCashVersCarteAgent extends Component {
} }
<ScrollView style={styles.container}> <ScrollView style={styles.container}>
{this.state.displayFirstStep &&
<>
<Text style={styles.subbigtitle}>{I18n.t('DEPOSIT_CASH_TO_VISA_DESCRIPTION')}</Text> <Text style={styles.subbigtitle}>{I18n.t('DEPOSIT_CASH_TO_VISA_DESCRIPTION')}</Text>
<Animatable.View ref={(comp) => { this.codeCVVAnim = comp }}> <Animatable.View ref={(comp) => { this.codeCVVAnim = comp }}>
@ -404,6 +410,26 @@ class EnvoieCashVersCarteAgent extends Component {
</Fumi> */} </Fumi> */}
</Animatable.View> </Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => {
if (!this.state.creditCardInput.valid)
this.codeCVVAnim.shake(800);
else {
this.setState({
displayFirstStep: !this.state.displayFirstStep,
displaySecondStep: !this.state.displaySecondStep,
});
}
}}>
{I18n.t('NEXT')}</Button>
</>
}
{this.state.displaySecondStep &&
<>
<Animatable.View ref={(comp) => { this.montantAnim = comp }}> <Animatable.View ref={(comp) => { this.montantAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'money'} <Fumi iconClass={FontAwesomeIcon} iconName={'money'}
label={I18n.t('AMOUNT')} label={I18n.t('AMOUNT')}
@ -457,6 +483,9 @@ class EnvoieCashVersCarteAgent extends Component {
textStyle={styles.textbtnvalide} textStyle={styles.textbtnvalide}
onPress={() => { this.onSubmitSendWalletToCard() }}> onPress={() => { this.onSubmitSendWalletToCard() }}>
{I18n.t('SUBMIT_LABEL')}</Button> {I18n.t('SUBMIT_LABEL')}</Button>
</>
}
</ScrollView> </ScrollView>
</> </>
) )

View File

@ -66,6 +66,8 @@ class RetraitCarteVersCashAgent extends Component {
displayCardError: false, displayCardError: false,
loading: false, loading: false,
user: null, user: null,
displayFirstStep: true,
displaySecondStep: false,
triggerSubmitClick: false, triggerSubmitClick: false,
isSubmitClick: false, isSubmitClick: false,
isDataSubmit: false, isDataSubmit: false,
@ -350,6 +352,9 @@ class RetraitCarteVersCashAgent extends Component {
} }
<ScrollView style={styles.container}> <ScrollView style={styles.container}>
{this.state.displayFirstStep &&
<>
<Text style={styles.subbigtitle}>{I18n.t('WITHDRAWAL_CARD_TO_CASH_DESCRIPTION_AGENT')}</Text> <Text style={styles.subbigtitle}>{I18n.t('WITHDRAWAL_CARD_TO_CASH_DESCRIPTION_AGENT')}</Text>
<Animatable.View ref={(comp) => { this.codeCVVAnim = comp }}> <Animatable.View ref={(comp) => { this.codeCVVAnim = comp }}>
@ -404,6 +409,26 @@ class RetraitCarteVersCashAgent extends Component {
</Fumi> */} </Fumi> */}
</Animatable.View> </Animatable.View>
<Button style={styles.btnvalide}
textStyle={styles.textbtnvalide}
isLoading={this.state.isLoging}
onPress={() => {
if (!this.state.creditCardInput.valid)
this.codeCVVAnim.shake(800);
else {
this.setState({
displayFirstStep: !this.state.displayFirstStep,
displaySecondStep: !this.state.displaySecondStep,
});
}
}}>
{I18n.t('NEXT')}</Button>
</>
}
{this.state.displaySecondStep &&
<>
<Animatable.View ref={(comp) => { this.montantAnim = comp }}> <Animatable.View ref={(comp) => { this.montantAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'money'} <Fumi iconClass={FontAwesomeIcon} iconName={'money'}
label={I18n.t('AMOUNT')} label={I18n.t('AMOUNT')}
@ -457,6 +482,9 @@ class RetraitCarteVersCashAgent extends Component {
textStyle={styles.textbtnvalide} textStyle={styles.textbtnvalide}
onPress={() => { this.onSubmitSendWalletToCard() }}> onPress={() => { this.onSubmitSendWalletToCard() }}>
{I18n.t('SUBMIT_LABEL')}</Button> {I18n.t('SUBMIT_LABEL')}</Button>
</>
}
</ScrollView> </ScrollView>
</> </>
) )

View File

@ -283,7 +283,7 @@ class RetraitEnCashAgent extends Component {
{this.state.displayFirstStep && {this.state.displayFirstStep &&
<> <>
<Text style={styles.subbigtitle}>{I18n.t('ENVOIE_WALLET_TO_CASH')}</Text> <Text style={styles.subbigtitle}>{I18n.t('WITHDRAWAL_IN_CASH_DESCRIPTION')}</Text>
<Animatable.View ref={(comp) => { this.idTransactionAnim = comp }}> <Animatable.View ref={(comp) => { this.idTransactionAnim = comp }}>
<Fumi iconClass={FontAwesomeIcon} iconName={'barcode'} <Fumi iconClass={FontAwesomeIcon} iconName={'barcode'}

View File

@ -337,7 +337,7 @@ class EnvoieWalletToCashUser extends Component {
<Text style={[styles.body2]}>{I18n.t('DESTINATAIRE')}</Text> <Text style={[styles.body2]}>{I18n.t('DESTINATAIRE')}</Text>
</View> </View>
<View style={{ flex: 1, alignItems: 'flex-end' }}> <View style={{ flex: 1, alignItems: 'flex-end' }}>
<Text style={[Typography.caption1, Color.grayColor]}>{destinataire}</Text> <Text style={[Typography.caption1, Color.grayColor]}>{`${this.state.prenoms} ${this.state.noms}`}</Text>
</View> </View>
</View> </View>
<View style={{ flexDirection: 'row', marginTop: 10 }}> <View style={{ flexDirection: 'row', marginTop: 10 }}>

View File

@ -52,7 +52,7 @@ export const displayToast = (message) => {
} }
export const isIlinkWorldWallet = (walletName) => { export const isIlinkWorldWallet = (walletName) => {
return isEqual(slugify(walletName).toLowerCase(), 'ilink'); return isEqual(walletName, 'ilink');
} }

View File

@ -72,6 +72,7 @@
"WITHDRAWAL": "Withdrawal", "WITHDRAWAL": "Withdrawal",
"LINK_CARD": "Link my card", "LINK_CARD": "Link my card",
"WITHDRAWAL_IN_CASH": "Withdrawal in cash", "WITHDRAWAL_IN_CASH": "Withdrawal in cash",
"WITHDRAWAL_IN_CASH_DESCRIPTION": "Withdrawal money in cash",
"WITHDRAWAL_WALLET_TO_CASH": "Withdrawal wallet to cash", "WITHDRAWAL_WALLET_TO_CASH": "Withdrawal wallet to cash",
"WITHDRAWAL_WALLET_TO_CASH_DESCRIPTION": "Withdrawal money from wallet to cash", "WITHDRAWAL_WALLET_TO_CASH_DESCRIPTION": "Withdrawal money from wallet to cash",
"WITHDRAWAL_CARD_TO_WALLET": "Withdrawal card to wallet", "WITHDRAWAL_CARD_TO_WALLET": "Withdrawal card to wallet",

View File

@ -77,6 +77,7 @@
"WITHDRAWAL": "Retrait", "WITHDRAWAL": "Retrait",
"LINK_CARD": "Lier ma carte", "LINK_CARD": "Lier ma carte",
"WITHDRAWAL_IN_CASH": "Retrait en cash", "WITHDRAWAL_IN_CASH": "Retrait en cash",
"WITHDRAWAL_IN_CASH_DESCRIPTION": "Retrait d'argent en cash",
"WITHDRAWAL_WALLET_TO_CASH": "Retrait de votre wallet vers cash", "WITHDRAWAL_WALLET_TO_CASH": "Retrait de votre wallet vers cash",
"WITHDRAWAL_WALLET_TO_CASH_DESCRIPTION": "Retirer de l'argent de votre Wallet vers cash", "WITHDRAWAL_WALLET_TO_CASH_DESCRIPTION": "Retirer de l'argent de votre Wallet vers cash",
"WITHDRAWAL_CARD_TO_WALLET": "Retrait de votre carte vers wallet", "WITHDRAWAL_CARD_TO_WALLET": "Retrait de votre carte vers wallet",

View File

@ -7,11 +7,11 @@ export const isDebugMode = false
//export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest"; //export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest";
//const baseUrl = "https://ilink-app.com/mobilebackendtest2" //const baseUrl = "https://ilink-app.com/mobilebackendtest2"
/* export const baseUrl = "http://test.ilink-app.com:8080/mobilebackend"; export const baseUrl = "http://test.ilink-app.com:8080/mobilebackend";
export const testBaseUrl = "https://test.ilink-app.com"; */ export const testBaseUrl = "https://test.ilink-app.com";
export const baseUrl = "https://preprod.ilink-app.com:8080/mobilebackend"; /* export const baseUrl = "https://preprod.ilink-app.com:8080/mobilebackend";
export const testBaseUrl = "https://preprod.ilink-app.com"; export const testBaseUrl = "https://preprod.ilink-app.com"; */
//base url agent test //base url agent test
//const baseUrl = "https://ilink-app.com/mobilebackendtest"; //const baseUrl = "https://ilink-app.com/mobilebackendtest";