ajout de la fontionalité copie le code membre
This commit is contained in:
parent
cccee161ab
commit
a9e7c2dd90
|
@ -6,16 +6,16 @@
|
|||
* Date: 26/08/2021
|
||||
*/
|
||||
import React from 'react';
|
||||
import {SafeAreaView} from 'react-native';
|
||||
import {SafeAreaView, View} from 'react-native';
|
||||
import {NetInfoBar} from './NetInfoBar';
|
||||
import {Color} from "../config/Color";
|
||||
|
||||
export const ScreenComponent = React.forwardRef((props, ref) => (
|
||||
<SafeAreaView style={[{flex: 1, backgroundColor: Color.containerBackgroundColor}, props.style]} {...props}>
|
||||
<SafeAreaView style={[ props.style]} {...props}>
|
||||
<NetInfoBar/>
|
||||
{/* React.Children.map(props.children, child =>
|
||||
{React.Children.map(props.children, child =>
|
||||
React.cloneElement(child, {}),
|
||||
) */}
|
||||
{props.children}
|
||||
)}
|
||||
{/* {props.children} */}
|
||||
</SafeAreaView>
|
||||
));
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { StyleSheet } from "react-native";
|
||||
import { responsiveFontSize } from "react-native-responsive-dimensions";
|
||||
|
||||
export const FontWeight = {
|
||||
thin: "100",
|
||||
|
@ -26,7 +27,7 @@ export const Typography = StyleSheet.create({
|
|||
fontWeight: FontWeight.regular
|
||||
},
|
||||
title3: {
|
||||
fontSize: 20,
|
||||
fontSize: responsiveFontSize(2),
|
||||
fontWeight: FontWeight.regular
|
||||
},
|
||||
headline: {
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
TouchableOpacity,
|
||||
View
|
||||
} from 'react-native';
|
||||
import { NetInfoBar } from '../../components/NetInfoBar';
|
||||
import axios from "axios";
|
||||
import IMap from './IMap'
|
||||
import ActionButton from 'react-native-action-button';
|
||||
|
@ -1732,83 +1733,86 @@ class Home extends BaseScreen {
|
|||
|
||||
renderOldHome() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
backgroundColor="#00000030"
|
||||
barStyle="light-content"
|
||||
translucent={true}
|
||||
/>
|
||||
{/* Start here to comment */}
|
||||
{/* {
|
||||
(this.state.loadingDialog || this.props.loading) ?
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
zIndex: 1,
|
||||
backgroundColor: "#00000050",
|
||||
width: this.state.loadingDialog ? responsiveWidth(100) : 0,
|
||||
height: this.state.loadingDialog ? responsiveHeight(100) : 0,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
<View style={styles.container}>
|
||||
<StatusBar
|
||||
backgroundColor="#00000030"
|
||||
barStyle="light-content"
|
||||
translucent={false}
|
||||
/>
|
||||
|
||||
|
||||
{/* Start here to comment */}
|
||||
{/* {
|
||||
(this.state.loadingDialog || this.props.loading) ?
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
zIndex: 1,
|
||||
backgroundColor: "#00000050",
|
||||
width: this.state.loadingDialog ? responsiveWidth(100) : 0,
|
||||
height: this.state.loadingDialog ? responsiveHeight(100) : 0,
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center'
|
||||
}}
|
||||
|
||||
>
|
||||
<Text style={{
|
||||
fontSize: 20,
|
||||
color: 'white',
|
||||
fontWeight: 'bold'
|
||||
}}>{I18n.t("LOADING_DOTS")}</Text>
|
||||
</View> : null
|
||||
} */}
|
||||
<IMap
|
||||
ref={(re) => {
|
||||
this.map = re
|
||||
if (re != null) {
|
||||
this.mapRef = re.getMapRef();
|
||||
}
|
||||
}}
|
||||
typeMap={this.state.typeMap}
|
||||
onMarkerClick={(e) => this.onMarkerPress(e)}
|
||||
network={this.state.filternetwork}
|
||||
initialRegion={this.state.region}
|
||||
markers={this.state.markers}
|
||||
selectedMarker={this.state.currentMarker}
|
||||
myNetwork={this.state.myNetwork}
|
||||
lang={this.state.lang}
|
||||
myPosition={this.state.myPosition}
|
||||
onMapReady={Platform.OS === 'android' ? this.onMapReady : null}
|
||||
onLayout={Platform.OS === 'ios' ? this.onMapReady : null}
|
||||
needRoad={this.state.needRoad}
|
||||
onNeedRoadReady={(data) => {
|
||||
this.setState({showProgress: false})
|
||||
}}
|
||||
onNeedRoadError={(message) => {
|
||||
this.setState({showProgress: false})
|
||||
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{
|
||||
text: "Ok",
|
||||
onPress: () => {
|
||||
_.isNil(user.latitude)
|
||||
>
|
||||
<Text style={{
|
||||
fontSize: 20,
|
||||
color: 'white',
|
||||
fontWeight: 'bold'
|
||||
}}>{I18n.t("LOADING_DOTS")}</Text>
|
||||
</View> : null
|
||||
} */}
|
||||
<IMap
|
||||
ref={(re) => {
|
||||
this.map = re
|
||||
if (re != null) {
|
||||
this.mapRef = re.getMapRef();
|
||||
}
|
||||
}])
|
||||
}}
|
||||
/>
|
||||
{this.makeCardSearch()}
|
||||
{this.showInterticiel()}
|
||||
{this.makeSlidingUp()}
|
||||
{this.makeDialogLoader()}
|
||||
{this.makeDistanceDialog()}
|
||||
{this.makeNetworkChangeDialog()}
|
||||
{this.renderSearchUser()}
|
||||
{this.state.showQRCodeScanner && this.renderDialogQRCodeScanner()}
|
||||
{this.state.displayDialogResultSearch && this.renderDialogResultSearchUser()}
|
||||
<SnackBar visible={this.state.snack_visible}
|
||||
textMessage={this.state.snack_text_message}
|
||||
autoHidingTime={5000}
|
||||
/>
|
||||
{this.makeActionButon()}
|
||||
|
||||
</View>
|
||||
}}
|
||||
typeMap={this.state.typeMap}
|
||||
onMarkerClick={(e) => this.onMarkerPress(e)}
|
||||
network={this.state.filternetwork}
|
||||
initialRegion={this.state.region}
|
||||
markers={this.state.markers}
|
||||
selectedMarker={this.state.currentMarker}
|
||||
myNetwork={this.state.myNetwork}
|
||||
lang={this.state.lang}
|
||||
myPosition={this.state.myPosition}
|
||||
onMapReady={Platform.OS === 'android' ? this.onMapReady : null}
|
||||
onLayout={Platform.OS === 'ios' ? this.onMapReady : null}
|
||||
needRoad={this.state.needRoad}
|
||||
onNeedRoadReady={(data) => {
|
||||
this.setState({showProgress: false})
|
||||
}}
|
||||
onNeedRoadError={(message) => {
|
||||
this.setState({showProgress: false})
|
||||
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{
|
||||
text: "Ok",
|
||||
onPress: () => {
|
||||
_.isNil(user.latitude)
|
||||
}
|
||||
}])
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
{this.makeCardSearch()}
|
||||
{this.showInterticiel()}
|
||||
{this.makeSlidingUp()}
|
||||
{this.makeDialogLoader()}
|
||||
{this.makeDistanceDialog()}
|
||||
{this.makeNetworkChangeDialog()}
|
||||
{this.renderSearchUser()}
|
||||
{this.state.showQRCodeScanner && this.renderDialogQRCodeScanner()}
|
||||
{this.state.displayDialogResultSearch && this.renderDialogResultSearchUser()}
|
||||
<SnackBar visible={this.state.snack_visible}
|
||||
textMessage={this.state.snack_text_message}
|
||||
autoHidingTime={5000}
|
||||
/>
|
||||
{this.makeActionButon()}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -562,7 +562,7 @@ export default class CreateUserStep2 extends Component {
|
|||
/>
|
||||
</View>}
|
||||
|
||||
<Text
|
||||
{/* <Text
|
||||
style={{
|
||||
fontSize: 16,
|
||||
marginTop: 10,
|
||||
|
@ -611,7 +611,8 @@ export default class CreateUserStep2 extends Component {
|
|||
marginTop: 10, marginRight: responsiveWidth(6), color: 'white', fontWeight: 'bold'
|
||||
}}
|
||||
>{this.state.textadress !== undefined ? this.state.textadress : I18n.t('TAKE_MY_POSITION')}</Text>
|
||||
</TouchableOpacity>
|
||||
</TouchableOpacity> */}
|
||||
|
||||
<Button style={styles.btnvalide} textStyle={styles.textbtnvalide}
|
||||
isLoading={this.state.isLoading}
|
||||
onPress={() => {
|
||||
|
|
|
@ -29,6 +29,7 @@ import {readUser} from "../../../webservice/AuthApi";
|
|||
import Spinner from "react-native-loading-spinner-overlay";
|
||||
import Geolocation from "react-native-geolocation-service";
|
||||
import {callingCodes} from '@ideditor/country-coder';
|
||||
import { ScreenComponent } from '../../../components/ScreenComponent';
|
||||
|
||||
let theme = require('./../../../utils/theme.json');
|
||||
|
||||
|
@ -390,131 +391,136 @@ export class LoginUi extends Component {
|
|||
render() {
|
||||
|
||||
return (
|
||||
<Animated.View style={[style.container,
|
||||
{backgroundColor: this.BackgroundColorConfig}]}>
|
||||
<StatusBar
|
||||
backgroundColor={theme.primaryDark}
|
||||
barStyle="light-content"
|
||||
translucent={false}
|
||||
|
||||
<Animated.View style={[style.container,
|
||||
{backgroundColor: this.BackgroundColorConfig}]}>
|
||||
<ScreenComponent>
|
||||
<StatusBar
|
||||
backgroundColor={theme.primaryDark}
|
||||
barStyle="light-content"
|
||||
translucent={false}
|
||||
|
||||
/><Spinner
|
||||
visible={this.state.loadingDialog}
|
||||
textContent={I18n.t("LOADING_PROGRESS")}
|
||||
textStyle={{color: '#FFF'}}
|
||||
/>
|
||||
/>
|
||||
</ScreenComponent>
|
||||
<Spinner
|
||||
visible={this.state.loadingDialog}
|
||||
textContent={I18n.t("LOADING_PROGRESS")}
|
||||
textStyle={{color: '#FFF'}}
|
||||
/>
|
||||
|
||||
<ScrollView>
|
||||
<TouchableOpacity onPress={() => {
|
||||
<ScrollView>
|
||||
<TouchableOpacity onPress={() => {
|
||||
|
||||
this.props.navigation.push(route.helpScreen)
|
||||
this.props.navigation.push(route.helpScreen)
|
||||
|
||||
}}>
|
||||
<View style={{
|
||||
alignSelf: 'flex-end',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: theme.primaryLight,
|
||||
height: 32,
|
||||
borderRadius: 12,
|
||||
marginTop: 30,
|
||||
marginRight: 20
|
||||
}}>
|
||||
<Text style={{
|
||||
color: 'white',
|
||||
fontSize: 18,
|
||||
fontWeight: 'bold',
|
||||
padding: 5
|
||||
}}>{I18n.t('HELP')}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
<View style={style.logoContaner}>
|
||||
<Image style={style.logo} source={require('./../../../datas/img/icon3.png')}/>
|
||||
</View>
|
||||
<Animatable.View ref={this.handlePhoneRef}>
|
||||
<Sae
|
||||
label={this.state.stateLogin !== 1 ? I18n.t('PHONE_NUMBER') : I18n.t('PHONE_NUMBER_ADMIN')}
|
||||
iconClass={FontAwesomeIcon}
|
||||
iconName={'phone'}
|
||||
iconColor={'white'}
|
||||
keyboardType={"numeric"}
|
||||
enabled={this.state.phoneEnabled}
|
||||
style={style.input}
|
||||
autoCapitalize={'none'}
|
||||
autoCorrect={false}
|
||||
value={this.state.enterPhone}
|
||||
ref={(com) => {
|
||||
this.numberRef = com
|
||||
}}
|
||||
onChangeText={(text) => this.setState({enterPhone: text})}
|
||||
labelStyle={style.labelInput}
|
||||
/>
|
||||
</Animatable.View>
|
||||
<Animatable.View ref={this.handlePasswordRef}>
|
||||
<Sae
|
||||
label={I18n.t('PASSWORD')}
|
||||
ref={component => {
|
||||
this._pass = component
|
||||
}}
|
||||
iconClass={FontAwesomeIcon}
|
||||
iconName={'lock'}
|
||||
style={style.input}
|
||||
iconColor={'white'}
|
||||
labelStyle={style.labelInput}
|
||||
autoCapitalize={'none'}
|
||||
secureTextEntry={true}
|
||||
onChangeText={(text) => this.setState({password: text})}
|
||||
autoCorrect={false}
|
||||
/>
|
||||
</Animatable.View>
|
||||
}}>
|
||||
<View style={{
|
||||
alignSelf: 'flex-end',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: theme.primaryLight,
|
||||
height: 32,
|
||||
borderRadius: 12,
|
||||
marginTop: 30,
|
||||
marginRight: 20
|
||||
}}>
|
||||
<Text style={{
|
||||
color: 'white',
|
||||
fontSize: 18,
|
||||
fontWeight: 'bold',
|
||||
padding: 5
|
||||
}}>{I18n.t('HELP')}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
<View style={style.logoContaner}>
|
||||
<Image style={style.logo} source={require('./../../../datas/img/icon3.png')}/>
|
||||
</View>
|
||||
<Animatable.View ref={this.handlePhoneRef}>
|
||||
<Sae
|
||||
label={this.state.stateLogin !== 1 ? I18n.t('PHONE_NUMBER') : I18n.t('PHONE_NUMBER_ADMIN')}
|
||||
iconClass={FontAwesomeIcon}
|
||||
iconName={'phone'}
|
||||
iconColor={'white'}
|
||||
keyboardType={"numeric"}
|
||||
enabled={this.state.phoneEnabled}
|
||||
style={style.input}
|
||||
autoCapitalize={'none'}
|
||||
autoCorrect={false}
|
||||
value={this.state.enterPhone}
|
||||
ref={(com) => {
|
||||
this.numberRef = com
|
||||
}}
|
||||
onChangeText={(text) => this.setState({enterPhone: text})}
|
||||
labelStyle={style.labelInput}
|
||||
/>
|
||||
</Animatable.View>
|
||||
<Animatable.View ref={this.handlePasswordRef}>
|
||||
<Sae
|
||||
label={I18n.t('PASSWORD')}
|
||||
ref={component => {
|
||||
this._pass = component
|
||||
}}
|
||||
iconClass={FontAwesomeIcon}
|
||||
iconName={'lock'}
|
||||
style={style.input}
|
||||
iconColor={'white'}
|
||||
labelStyle={style.labelInput}
|
||||
autoCapitalize={'none'}
|
||||
secureTextEntry={true}
|
||||
onChangeText={(text) => this.setState({password: text})}
|
||||
autoCorrect={false}
|
||||
/>
|
||||
</Animatable.View>
|
||||
|
||||
|
||||
<View style={separator.btnContainer}>
|
||||
<TouchableOpacity onPress={() => {
|
||||
this.gotoForgottenPass()
|
||||
}}>
|
||||
<Text style={style.lostpassword}>
|
||||
{I18n.t("FORGOTTEN_PASSWORD")}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<View style={style.contentSwitch}>
|
||||
<SwitchSelector options={this.options}
|
||||
initial={0}
|
||||
buttonColor={theme.accentLight}
|
||||
backgroundColor={theme.primaryDark}
|
||||
textColor='white'
|
||||
bold={true}
|
||||
hasPadding
|
||||
height={32}
|
||||
style={style.switch}
|
||||
onPress={(value) => {
|
||||
this.StartBackgroundColorAnimation(value)
|
||||
}}/>
|
||||
</View>
|
||||
<Button style={style.loginBtn1}
|
||||
isLoading={this.state.isLoging}
|
||||
onPress={() => {
|
||||
this.connectClicked()
|
||||
}}
|
||||
>
|
||||
<Text style={style.loginBtnText2}>{I18n.t("CONNECT_USER")}</Text>
|
||||
</Button>
|
||||
<View style={separator.container}>
|
||||
<View style={separator.line}/>
|
||||
<Text style={separator.text}>{I18n.t("OR_BIG")}</Text>
|
||||
<View style={separator.line}/>
|
||||
</View>
|
||||
<Button style={style.loginBtn}
|
||||
onPress={() => {
|
||||
this.gotoTypeCreated()
|
||||
}}
|
||||
>
|
||||
<Text style={style.loginBtnText}>{I18n.t("CREATE_ACCOUNT")} </Text>
|
||||
</Button>
|
||||
</View>
|
||||
<View style={separator.btnContainer}>
|
||||
<TouchableOpacity onPress={() => {
|
||||
this.gotoForgottenPass()
|
||||
}}>
|
||||
<Text style={style.lostpassword}>
|
||||
{I18n.t("FORGOTTEN_PASSWORD")}
|
||||
</Text>
|
||||
</TouchableOpacity>
|
||||
<View style={style.contentSwitch}>
|
||||
<SwitchSelector options={this.options}
|
||||
initial={0}
|
||||
buttonColor={theme.accentLight}
|
||||
backgroundColor={theme.primaryDark}
|
||||
textColor='white'
|
||||
bold={true}
|
||||
hasPadding
|
||||
height={32}
|
||||
style={style.switch}
|
||||
onPress={(value) => {
|
||||
this.StartBackgroundColorAnimation(value)
|
||||
}}/>
|
||||
</View>
|
||||
<Button style={style.loginBtn1}
|
||||
isLoading={this.state.isLoging}
|
||||
onPress={() => {
|
||||
this.connectClicked()
|
||||
}}
|
||||
>
|
||||
<Text style={style.loginBtnText2}>{I18n.t("CONNECT_USER")}</Text>
|
||||
</Button>
|
||||
<View style={separator.container}>
|
||||
<View style={separator.line}/>
|
||||
<Text style={separator.text}>{I18n.t("OR_BIG")}</Text>
|
||||
<View style={separator.line}/>
|
||||
</View>
|
||||
<Button style={style.loginBtn}
|
||||
onPress={() => {
|
||||
this.gotoTypeCreated()
|
||||
}}
|
||||
>
|
||||
<Text style={style.loginBtnText}>{I18n.t("CREATE_ACCOUNT")} </Text>
|
||||
</Button>
|
||||
</View>
|
||||
|
||||
</ScrollView>
|
||||
</ScrollView>
|
||||
|
||||
</Animated.View>
|
||||
</Animated.View>
|
||||
|
||||
|
||||
)
|
||||
}
|
||||
|
|
|
@ -2371,6 +2371,6 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
},
|
||||
contentTitle: {
|
||||
paddingTop: 5,
|
||||
paddingTop: 15,
|
||||
}
|
||||
})
|
||||
|
|
|
@ -18,11 +18,12 @@ import I18n from 'react-native-i18n'
|
|||
import * as Utils from '../../utils/DeviceUtils';
|
||||
import Icons from 'react-native-vector-icons/Ionicons'
|
||||
import {Color} from '../../config/Color';
|
||||
import { ToastProvider, useToast } from 'react-native-toast-notifications';
|
||||
import omit from 'lodash/omit';
|
||||
import Tag from '../../components/Tag';
|
||||
import {IlinkEmitter} from "../../utils/events";
|
||||
import {Typography} from '../../config/typography';
|
||||
import {responsiveWidth,} from 'react-native-responsive-dimensions';
|
||||
import {responsiveHeight, responsiveWidth, responsiveFontSize} from 'react-native-responsive-dimensions';
|
||||
import {
|
||||
getWalletDetailActivated,
|
||||
passwordValidationAction,
|
||||
|
@ -70,6 +71,8 @@ import {Fumi} from "react-native-textinput-effects";
|
|||
import FontAwesomeIcon from "react-native-vector-icons/FontAwesome";
|
||||
import Button from "../../components/Button";
|
||||
import Entypo from "react-native-vector-icons/Entypo";
|
||||
import Clipboard from '@react-native-clipboard/clipboard';
|
||||
import DropdownAlert from 'react-native-dropdownalert';
|
||||
|
||||
let moment = require('moment-timezone');
|
||||
|
||||
|
@ -79,6 +82,7 @@ let route = require('./../../route.json');
|
|||
let slugify = require('slugify');
|
||||
require('../../utils/Translations');
|
||||
|
||||
|
||||
class WalletDetailUser extends Component {
|
||||
|
||||
constructor(props) {
|
||||
|
@ -98,9 +102,12 @@ class WalletDetailUser extends Component {
|
|||
isIdentified: false,
|
||||
isIdentifiedValidated: false,
|
||||
password: '',
|
||||
isLogged: false
|
||||
isLogged: false,
|
||||
isCopied: false,
|
||||
|
||||
};
|
||||
|
||||
this.copyToClipboard = this.copyToClipboard.bind(this);
|
||||
// this.dropdownAlertRef = React.createRef();
|
||||
slugify.extend({'+': 'plus'});
|
||||
|
||||
this.scrollY = new Animated.Value(0);
|
||||
|
@ -166,7 +173,6 @@ class WalletDetailUser extends Component {
|
|||
)*/
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
getWalletDetail = () => {
|
||||
|
@ -415,8 +421,36 @@ class WalletDetailUser extends Component {
|
|||
)
|
||||
}
|
||||
|
||||
renderAccountDetail = (wallet) => (
|
||||
<View style={{flexDirection: 'row', flex: 1, justifyContent: 'space-between'}}>
|
||||
copyToClipboard = (wallet) => {
|
||||
const textToCopy = `${wallet.user_code}`;
|
||||
|
||||
Clipboard.setString(textToCopy);
|
||||
|
||||
Clipboard.getString().then((copiedText) => {
|
||||
console.log('Texte copié :', copiedText);
|
||||
this.setState({ isCopied: true });
|
||||
|
||||
// this.dropdownAlertRef.current.alertWithType('success', 'Copié avec succès', copiedText);
|
||||
|
||||
|
||||
showToast({
|
||||
type: 'success', // ou 'warn', 'error', 'info'
|
||||
text1: 'Code copier avec succès',
|
||||
text2: copiedText,
|
||||
visibilityTime: 2000,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
renderAccountDetail = (wallet) => {
|
||||
|
||||
|
||||
return(
|
||||
<>
|
||||
<ToastProvider>
|
||||
<View style={{ flexDirection: 'row', flex: 1, justifyContent: 'space-between' }}>
|
||||
|
||||
<View
|
||||
style={{
|
||||
|
@ -426,23 +460,20 @@ class WalletDetailUser extends Component {
|
|||
<View
|
||||
style={[
|
||||
styles.circlePoint,
|
||||
{backgroundColor: Color.primaryColor},
|
||||
{ backgroundColor: Color.primaryColor },
|
||||
]}>
|
||||
<Icons name='md-wallet'
|
||||
size={28}
|
||||
color={Color.whiteColor}
|
||||
/>
|
||||
size={28}
|
||||
color={Color.whiteColor} />
|
||||
</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>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View
|
||||
</View><View
|
||||
style={{
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
|
@ -450,26 +481,48 @@ class WalletDetailUser extends Component {
|
|||
<View
|
||||
style={[
|
||||
styles.circlePoint,
|
||||
{backgroundColor: Color.primaryColor},
|
||||
{ backgroundColor: Color.primaryColor },
|
||||
]}>
|
||||
<Icons name='md-key'
|
||||
size={28}
|
||||
color={Color.whiteColor}
|
||||
/>
|
||||
size={28}
|
||||
color={Color.whiteColor} />
|
||||
</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>
|
||||
<TouchableOpacity onPress={() => this.copyToClipboard(wallet)}>
|
||||
<View style={{ flexDirection: 'row' }}>
|
||||
<Animatable.Text
|
||||
style={[Typography.body2, { color: this.state.isCopied ? 'green' : 'black' }]}
|
||||
animation={this.state.isCopied ? 'fadeIn' : null}
|
||||
>
|
||||
{wallet.user_code}
|
||||
</Animatable.Text>
|
||||
{this.state.isCopied ? (
|
||||
<Icons name='md-checkmark' size={16} color={Color.greenColor} style={{ marginLeft: 6 }} />
|
||||
) : (
|
||||
<Icons name='md-copy' size={16} color={Color.greenColor} style={{ marginLeft: 6 }} />
|
||||
)}
|
||||
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
|
||||
</View>
|
||||
);
|
||||
</ToastProvider>
|
||||
{/* <DropdownAlert ref={this.dropdownAlertRef} /> */}
|
||||
|
||||
</>
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
renderDetailWallet = (wallet) => {
|
||||
const { width } = Dimensions.get('window');
|
||||
// const { width } = Dimensions.get('window');
|
||||
return (
|
||||
!isEmptyObject(wallet) ?
|
||||
(<>
|
||||
|
@ -479,7 +532,7 @@ class WalletDetailUser extends Component {
|
|||
//</>style={styles.container}
|
||||
style={{
|
||||
flex: 1,
|
||||
width: width >= 768 ? '50%' : '100%',
|
||||
// width: width >= 768 ? '50%' : '100%',
|
||||
backgroundColor: Color.containerBackgroundColor
|
||||
}}
|
||||
>
|
||||
|
@ -511,7 +564,7 @@ class WalletDetailUser extends Component {
|
|||
listener: (event) => {
|
||||
this.setState({scrollHeaderY: event.nativeEvent.contentOffset.y});
|
||||
}
|
||||
})}>
|
||||
})}>
|
||||
<View style={{marginTop: 80,}}>
|
||||
|
||||
{this.renderHeader(wallet)}
|
||||
|
@ -551,7 +604,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={styles.contentTitle}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('ENVOIE_ARGENT')}
|
||||
</Text>
|
||||
|
@ -589,7 +642,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={styles.contentTitle}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('RETRAIT_ARGENT')}
|
||||
</Text>
|
||||
|
@ -640,7 +693,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={{paddingTop: 5,}}>
|
||||
<View style={styles.centerText}>
|
||||
<Text
|
||||
style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('NANO_CREDIT')}
|
||||
|
@ -672,7 +725,7 @@ class WalletDetailUser extends Component {
|
|||
style={styles.imageBanner}/>
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={{paddingTop: 20,}}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('NANO_SANTE')}
|
||||
</Text>
|
||||
|
@ -707,7 +760,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={styles.contentTitle}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('PAIEMENT_FACTURE')}
|
||||
</Text>
|
||||
|
@ -752,7 +805,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={{paddingTop: 20,}}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('CREATION_IDENTIFICATION_CLIENT')}
|
||||
</Text>
|
||||
|
@ -787,7 +840,7 @@ class WalletDetailUser extends Component {
|
|||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={styles.contentTitle}>
|
||||
<View style={styles.centerText}>
|
||||
<Text style={[Typography.headline, Typography.semibold]}>
|
||||
Agency Banking
|
||||
</Text>
|
||||
|
@ -1233,6 +1286,9 @@ class WalletDetailUser extends Component {
|
|||
console.warn("Wallet Detail user Props", this.props);
|
||||
return (
|
||||
<>
|
||||
<ToastProvider >
|
||||
|
||||
|
||||
{this.state.displayModalHistory && this.renderModalHistoryDetail()}
|
||||
<StatusBar
|
||||
backgroundColor={Color.primaryDarkColor}
|
||||
|
@ -1297,7 +1353,7 @@ class WalletDetailUser extends Component {
|
|||
)
|
||||
)
|
||||
}
|
||||
|
||||
</ToastProvider>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@ -1421,8 +1477,8 @@ const styles = StyleSheet.create({
|
|||
borderBottomWidth: 0.5,
|
||||
},
|
||||
circlePoint: {
|
||||
width: 50,
|
||||
height: 50,
|
||||
width: responsiveWidth(10),
|
||||
height: responsiveHeight(5),
|
||||
borderRadius: 25,
|
||||
marginRight: 5,
|
||||
alignItems: 'center',
|
||||
|
@ -1431,7 +1487,7 @@ const styles = StyleSheet.create({
|
|||
transactionContainer: {
|
||||
flexDirection: 'row',
|
||||
flex: 1,
|
||||
paddingTop: 10,
|
||||
paddingTop: 20,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
},
|
||||
|
@ -1444,6 +1500,7 @@ const styles = StyleSheet.create({
|
|||
borderColor: Color.borderColor,
|
||||
borderWidth: 0.5,
|
||||
shadowOffset: {width: 1.5, height: 1.5},
|
||||
height: responsiveHeight(10),
|
||||
shadowOpacity: 1.0,
|
||||
elevation: 5,
|
||||
borderRadius: 10,
|
||||
|
@ -1468,6 +1525,13 @@ const styles = StyleSheet.create({
|
|||
flex: 1,
|
||||
},
|
||||
contentTitle: {
|
||||
paddingTop: 5,
|
||||
textAlign: 'center',
|
||||
},
|
||||
centerText: {
|
||||
display: 'flex',
|
||||
marginTop: 22,
|
||||
textAlign: 'center',
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
@ -22,6 +22,7 @@ import {connect} from 'react-redux';
|
|||
import {readUser} from '../../webservice/AuthApi';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {Typography} from '../../config/typography';
|
||||
import { ScreenComponent } from '../../components/ScreenComponent';
|
||||
|
||||
const route = require('./../../route.json');
|
||||
let slugify = require('slugify');
|
||||
|
@ -182,11 +183,11 @@ class WalletSelect extends Component {
|
|||
return (
|
||||
<Provider>
|
||||
<View style={{flex: 1}}>
|
||||
|
||||
|
||||
<StatusBar
|
||||
backgroundColor={Color.primaryDarkColor}
|
||||
barStyle="light-content"
|
||||
translucent={false}
|
||||
translucent={true}
|
||||
/>
|
||||
|
||||
<Appbar.Header dark={true} style={{backgroundColor: Color.primaryColor}}>
|
||||
|
|
|
@ -678,7 +678,7 @@
|
|||
"EXAMENS_SUCCESSFULLY_ADD": "Examen ajouté avec succès",
|
||||
"PRESCRIPTIONS_SUCCESSFULLY_ADD": "Prescription ajouté avec succès",
|
||||
"PRESCRIPTIONS_SUCCESSFULLY_MODIFY": "Prescription modifié avec succès",
|
||||
"YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION": "Vous devez ajouter au moins une prestation",
|
||||
"YOU_MUST_ADD_AT_LEAST_ONE_PRESTATIONcode ": "Vous devez ajouter au moins une prestation",
|
||||
"NO_DRUG_MATCH_YOU_SEARCH": "Aucun médicament ne correspond à votre recherche, voulez-vous en ajouter ?",
|
||||
"COMPRESSED": "Comprimé",
|
||||
"SYRUP": "Sirop",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,6 +16,7 @@
|
|||
"dependencies": {
|
||||
"@expo/react-native-action-sheet": "^3.8.0",
|
||||
"@ideditor/country-coder": "^4.0.0",
|
||||
"@react-native-clipboard/clipboard": "^1.12.1",
|
||||
"@react-native-community/async-storage": "^1.9.0",
|
||||
"@react-native-community/datetimepicker": "^3.5.2",
|
||||
"@react-native-community/netinfo": "^6.0.2",
|
||||
|
@ -89,6 +90,7 @@
|
|||
"react-native-switch-selector": "^1.1.14",
|
||||
"react-native-tab-view": "^2.14.0",
|
||||
"react-native-textinput-effects": "^0.5.1",
|
||||
"react-native-toast-notifications": "^3.4.0",
|
||||
"react-native-vector-icons": "^6.5.0",
|
||||
"react-native-webview": "^11.26.1",
|
||||
"react-native-wizard": "^2.1.0",
|
||||
|
|
Loading…
Reference in New Issue