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