Update images and adjust styles across multiple screens
This commit is contained in:
parent
a67d6fdf06
commit
c09626f480
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 47 KiB |
|
@ -420,7 +420,10 @@ export default class AddNetwork extends Component {
|
||||||
<ScrollView style={{flex: 1, paddingTop: 30}}>
|
<ScrollView style={{flex: 1, paddingTop: 30}}>
|
||||||
<View style={style.appContainer}>
|
<View style={style.appContainer}>
|
||||||
<Image source={require('../../assets/img/icon3.png')}
|
<Image source={require('../../assets/img/icon3.png')}
|
||||||
style={{width: responsiveWidth(90), resizeMode: "contain"}}/>
|
style={{width: responsiveWidth(90), resizeMode: "contain",
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
|
||||||
|
}}/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={style.title}>{I18n.t('ADD_NETWORK')}</Text>
|
<Text style={style.title}>{I18n.t('ADD_NETWORK')}</Text>
|
||||||
|
|
|
@ -52,7 +52,10 @@ export default class About extends React.Component {
|
||||||
|
|
||||||
<View style={{ flex: 6, alignItems: "center", justifyContent: "space-evenly" }}>
|
<View style={{ flex: 6, alignItems: "center", justifyContent: "space-evenly" }}>
|
||||||
<Image resizeMode="contain" style={{ width: responsiveWidth(50), height: responsiveHeight(20) }} source={require("../../assets/img/ilinklogo.png")} />
|
<Image resizeMode="contain" style={{ width: responsiveWidth(50), height: responsiveHeight(20) }} source={require("../../assets/img/ilinklogo.png")} />
|
||||||
<Image resizeMode="contain" style={{ width: responsiveWidth(90) }} source={require("../../assets/img/icon3.png")} />
|
<Image resizeMode="contain" style={{ width: responsiveWidth(90),
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
|
||||||
|
}} source={require("../../assets/img/icon3.png")} />
|
||||||
<Text style={{ color: "white", margin: 10, fontSize: 15, alignSelf: "center" }}>{I18n.t("ABOUT_TEXT")}</Text>
|
<Text style={{ color: "white", margin: 10, fontSize: 15, alignSelf: "center" }}>{I18n.t("ABOUT_TEXT")}</Text>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -105,6 +105,7 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
img_style: {
|
img_style: {
|
||||||
resizeMode: 'contain',
|
resizeMode: 'contain',
|
||||||
width: responsiveWidth(90)
|
width: responsiveWidth(90),
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -126,7 +126,9 @@ export default class ActivateAccount extends Component {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
||||||
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',}}
|
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
}}
|
||||||
source={require('../../assets/img/icon3.png')}/>
|
source={require('../../assets/img/icon3.png')}/>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
@ -177,7 +179,9 @@ export default class ActivateAccount extends Component {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
||||||
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',}}
|
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
}}
|
||||||
source={require('../../assets/img/icon3.png')}/>
|
source={require('../../assets/img/icon3.png')}/>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
@ -284,7 +288,9 @@ export default class ActivateAccount extends Component {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
<View style={{flexDirection: 'row', alignItems: 'center', justifyContent: 'center'}}>
|
||||||
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',}}
|
<Image style={{width: responsiveWidth(90), resizeMode: 'contain',
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
}}
|
||||||
source={require('../../assets/img/icon3.png')}/>
|
source={require('../../assets/img/icon3.png')}/>
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -124,6 +124,7 @@ class CreateUserStep extends Component {
|
||||||
latlng: [],
|
latlng: [],
|
||||||
id_company_type: null,
|
id_company_type: null,
|
||||||
identification_number: null,
|
identification_number: null,
|
||||||
|
remainingCharacters: 14,
|
||||||
trade_registry: null,
|
trade_registry: null,
|
||||||
tabTaxe: [0],
|
tabTaxe: [0],
|
||||||
taxes_selected: [],
|
taxes_selected: [],
|
||||||
|
@ -193,7 +194,6 @@ class CreateUserStep extends Component {
|
||||||
const {type} = this.props;
|
const {type} = this.props;
|
||||||
if (!this.state.isTaxesLoaded) {
|
if (!this.state.isTaxesLoaded) {
|
||||||
let taxesTemp = new Array();
|
let taxesTemp = new Array();
|
||||||
|
|
||||||
if (!_.isNil(this.result.required_taxes)) {
|
if (!_.isNil(this.result.required_taxes)) {
|
||||||
this.result.required_taxes.map((taxes, index) => {
|
this.result.required_taxes.map((taxes, index) => {
|
||||||
if (this.state.companies_types_selected_value !== null) {
|
if (this.state.companies_types_selected_value !== null) {
|
||||||
|
@ -366,7 +366,7 @@ class CreateUserStep extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
}, (e) => {
|
}, (e) => {
|
||||||
Alert.alert(I18n.t('TITLE_PROBLE_COME'), "Impossible de recuperer les informations du code parrain", [{
|
Alert.alert(I18n.t('TITLE_PROBLE_COME'), "Impossible de recuperer les informations du code hiérarchique ou taxe", [{
|
||||||
text: "Reesayer",
|
text: "Reesayer",
|
||||||
onPress: () => this.watchLocation(param)
|
onPress: () => this.watchLocation(param)
|
||||||
}])
|
}])
|
||||||
|
@ -804,7 +804,7 @@ class CreateUserStep extends Component {
|
||||||
backgroundColor: 'white'
|
backgroundColor: 'white'
|
||||||
}}>
|
}}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={I18n.t('TAXES')}
|
label={`${I18n.t('TAXES')} *`}
|
||||||
data={this.state.result.taxes}
|
data={this.state.result.taxes}
|
||||||
useNativeDriver={true}
|
useNativeDriver={true}
|
||||||
valueExtractor={(value) => {
|
valueExtractor={(value) => {
|
||||||
|
@ -1229,7 +1229,7 @@ class CreateUserStep extends Component {
|
||||||
null}
|
null}
|
||||||
</MapView>
|
</MapView>
|
||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
<TouchableOpacity style={{flexDirection: 'row', alignItems: 'center'}}>
|
{/* <TouchableOpacity style={{flexDirection: 'row', alignItems: 'center'}}>
|
||||||
<Image
|
<Image
|
||||||
|
|
||||||
style={{
|
style={{
|
||||||
|
@ -1244,7 +1244,7 @@ class CreateUserStep 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> */}
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
<Animatable.View ref={(comp) => {
|
<Animatable.View ref={(comp) => {
|
||||||
|
@ -1337,7 +1337,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
backgroundColor: 'white'
|
backgroundColor: 'white'
|
||||||
}}>
|
}}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={I18n.t('SOCIETY_TYPE')}
|
label={`${I18n.t('SOCIETY_TYPE')} *`}
|
||||||
data={this.state.result !== null ? this.state.result.companies_types : []}
|
data={this.state.result !== null ? this.state.result.companies_types : []}
|
||||||
useNativeDriver={true}
|
useNativeDriver={true}
|
||||||
valueExtractor={(value) => {
|
valueExtractor={(value) => {
|
||||||
|
@ -1476,13 +1476,27 @@ handleTaxSlection = (selectedTax) => {
|
||||||
<Animatable.View>
|
<Animatable.View>
|
||||||
<Fumi iconClass={FontAwesomeIcon}
|
<Fumi iconClass={FontAwesomeIcon}
|
||||||
iconName={'lock'}
|
iconName={'lock'}
|
||||||
label={I18n.t('IMMATRICULATION_DGI')}
|
label={`${I18n.t('IMMATRICULATION_DGI')}`}
|
||||||
iconColor={'#f95a25'}
|
iconColor={'#f95a25'}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
|
maxLength={14}
|
||||||
|
keyboardType="default"
|
||||||
|
autoCapitalize="characters"
|
||||||
onChangeText={(text) => {
|
onChangeText={(text) => {
|
||||||
this.setState({identification_number: text})
|
// Update the identification_number state
|
||||||
|
this.setState({
|
||||||
|
identification_number: text,
|
||||||
|
remainingCharacters: 14 - text.length // Update the remaining characters
|
||||||
|
});
|
||||||
}}/>
|
}}/>
|
||||||
|
<Text style={{
|
||||||
|
color: 'white',
|
||||||
|
marginLeft: responsiveWidth(5),
|
||||||
|
marginTop: 5
|
||||||
|
}}>
|
||||||
|
{this.state.remainingCharacters} caractères restants
|
||||||
|
</Text>
|
||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
|
|
||||||
<Animatable.View>
|
<Animatable.View>
|
||||||
|
@ -1514,7 +1528,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
}}>
|
}}>
|
||||||
<Fumi iconClass={FontAwesomeIcon}
|
<Fumi iconClass={FontAwesomeIcon}
|
||||||
iconName={'user-o'}
|
iconName={'user-o'}
|
||||||
label={I18n.t('NOM_RESPONSABLE')}
|
label={`${I18n.t('NOM_RESPONSABLE')} *`}
|
||||||
iconColor={'#f95a25'}
|
iconColor={'#f95a25'}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
|
@ -1538,7 +1552,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
backgroundColor: 'white'
|
backgroundColor: 'white'
|
||||||
}}>
|
}}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={I18n.t("COMMUNE_SIEGE_SOCIAL")}
|
label={`${I18n.t("COMMUNE_SIEGE_SOCIAL")} *`}
|
||||||
data={this.state.result.municipalities}
|
data={this.state.result.municipalities}
|
||||||
useNativeDriver={true}
|
useNativeDriver={true}
|
||||||
valueExtractor={(value) => {
|
valueExtractor={(value) => {
|
||||||
|
@ -1570,7 +1584,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
backgroundColor: 'white'
|
backgroundColor: 'white'
|
||||||
}}>
|
}}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={I18n.t('ARRONDISSEMENT')}
|
label={`${I18n.t('ARRONDISSEMENT')} *`}
|
||||||
data={this.result.districts}
|
data={this.result.districts}
|
||||||
useNativeDriver={true}
|
useNativeDriver={true}
|
||||||
valueExtractor={(value) => {
|
valueExtractor={(value) => {
|
||||||
|
@ -1591,7 +1605,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
}}>
|
}}>
|
||||||
<Fumi iconClass={FontAwesomeIcon}
|
<Fumi iconClass={FontAwesomeIcon}
|
||||||
iconName={'map-marker'}
|
iconName={'map-marker'}
|
||||||
label={I18n.t('QUARTIER_COMMUNE')}
|
label={`${I18n.t('QUARTIER_COMMUNE')} *`}
|
||||||
iconColor={'#f95a25'}
|
iconColor={'#f95a25'}
|
||||||
iconSize={20}
|
iconSize={20}
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
|
@ -1639,8 +1653,15 @@ handleTaxSlection = (selectedTax) => {
|
||||||
style={styles.checkbox}/>
|
style={styles.checkbox}/>
|
||||||
<Text style={styles.label}>{I18n.t('IRPP')}</Text>
|
<Text style={styles.label}>{I18n.t('IRPP')}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
style={styles.checkboxContainer}>
|
||||||
|
<CheckBox
|
||||||
|
onValueChange={value => this.setState({IRPP: value})}
|
||||||
|
value={this.state.IRPP}
|
||||||
|
style={styles.checkbox}/>
|
||||||
|
<Text style={styles.label}>Licence</Text>
|
||||||
|
</View>
|
||||||
|
{/* <View
|
||||||
style={styles.checkboxContainer}>
|
style={styles.checkboxContainer}>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
onValueChange={value => this.setState({year_tax_paid_N: value})}
|
onValueChange={value => this.setState({year_tax_paid_N: value})}
|
||||||
|
@ -1648,12 +1669,12 @@ handleTaxSlection = (selectedTax) => {
|
||||||
style={styles.checkbox}/>
|
style={styles.checkbox}/>
|
||||||
<Text
|
<Text
|
||||||
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 1)}</Text>
|
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 1)}</Text>
|
||||||
</View>
|
</View> */}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|
||||||
<View style={{
|
{/* <View style={{
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
paddingLeft: 5,
|
paddingLeft: 5,
|
||||||
paddingRight: 5,
|
paddingRight: 5,
|
||||||
|
@ -1670,9 +1691,9 @@ handleTaxSlection = (selectedTax) => {
|
||||||
<Text
|
<Text
|
||||||
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 2)}</Text>
|
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 2)}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View> */}
|
||||||
|
|
||||||
<View style={{
|
{/* <View style={{
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
paddingLeft: 5,
|
paddingLeft: 5,
|
||||||
paddingRight: 5,
|
paddingRight: 5,
|
||||||
|
@ -1689,7 +1710,7 @@ handleTaxSlection = (selectedTax) => {
|
||||||
<Text
|
<Text
|
||||||
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 3)}</Text>
|
style={styles.label}>{I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 3)}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View> */}
|
||||||
</>
|
</>
|
||||||
|
|
||||||
<Button style={styles.btnvalide} textStyle={styles.textbtnvalide}
|
<Button style={styles.btnvalide} textStyle={styles.textbtnvalide}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class FilteredList extends Component {
|
||||||
>
|
>
|
||||||
<TextInput
|
<TextInput
|
||||||
style={{ padding: 18, borderBottomWidth: 1 }}
|
style={{ padding: 18, borderBottomWidth: 1 }}
|
||||||
placeholder="Quel est votre activité..."
|
placeholder="Quelle est votre activité *"
|
||||||
value={searchTerm}
|
value={searchTerm}
|
||||||
onChangeText={this.handleSearch}
|
onChangeText={this.handleSearch}
|
||||||
onFilterChange={this.handleFilter}
|
onFilterChange={this.handleFilter}
|
||||||
|
|
|
@ -95,7 +95,8 @@ const log = StyleSheet.create({
|
||||||
img: {
|
img: {
|
||||||
width: responsiveWidth(90),
|
width: responsiveWidth(90),
|
||||||
resizeMode: 'contain',
|
resizeMode: 'contain',
|
||||||
alignSelf: 'center'
|
alignSelf: 'center',
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
color: "white",
|
color: "white",
|
||||||
|
|
|
@ -147,7 +147,10 @@ export default class CreateAccount extends Component {
|
||||||
this.checkCodeParrain()
|
this.checkCodeParrain()
|
||||||
}}>
|
}}>
|
||||||
{I18n.t('NEXT')}</Button>
|
{I18n.t('NEXT')}</Button>
|
||||||
|
<View style={{display:"flex", flexDirection: 'column'}}>
|
||||||
|
<Text style={styles.indication}><Text style={styles.indicationTitle}>Code Hierachique :</Text> Code entré lors de la création d'un administrateur de taxe ou d'un régisseur</Text>
|
||||||
|
<Text style={styles.indication}><Text style={styles.indicationTitle}>Code Taxe :</Text> Code entré lors de la création d'un contribuable</Text>
|
||||||
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -746,6 +749,19 @@ const styles = StyleSheet.create({
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
margin: 5,
|
margin: 5,
|
||||||
},
|
},
|
||||||
|
indication: {
|
||||||
|
color: 'white',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 20,
|
||||||
|
marginRight: 20,
|
||||||
|
marginBottom: 10,
|
||||||
|
},
|
||||||
|
indicationTitle: {
|
||||||
|
color: 'white',
|
||||||
|
fontSize: 14,
|
||||||
|
marginLeft: 20,
|
||||||
|
fontWeight: '600',
|
||||||
|
},
|
||||||
btnvalide: {
|
btnvalide: {
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
marginLeft: 20,
|
marginLeft: 20,
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
import React, {Component, useState} from 'react';
|
import Button from 'apsl-react-native-button';
|
||||||
|
import axios from "axios";
|
||||||
|
import isEqual from 'lodash/isEqual';
|
||||||
|
import isNil from 'lodash/isNil';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import React, { Component } from 'react';
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
BackHandler,
|
BackHandler,
|
||||||
|
@ -13,20 +18,22 @@ import {
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
|
||||||
import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions';
|
|
||||||
import {Fumi} from 'react-native-textinput-effects'
|
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import Button from 'apsl-react-native-button';
|
import Dialog from "react-native-dialog";
|
||||||
|
import Geolocation from 'react-native-geolocation-service';
|
||||||
|
import I18n from 'react-native-i18n';
|
||||||
import MapView, { Marker } from 'react-native-maps';
|
import MapView, { Marker } from 'react-native-maps';
|
||||||
|
import { MaterialDialog } from "react-native-material-dialog";
|
||||||
import { Dropdown } from 'react-native-material-dropdown-v2';
|
import { Dropdown } from 'react-native-material-dropdown-v2';
|
||||||
import isEqual from 'lodash/isEqual';
|
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions';
|
||||||
import isNil from 'lodash/isNil';
|
import { ProgressDialog } from "react-native-simple-dialogs";
|
||||||
import {getPositionInformation} from './../../webservice/MapService';
|
import { Fumi } from 'react-native-textinput-effects';
|
||||||
import I18n from 'react-native-i18n'
|
|
||||||
import { material } from 'react-native-typography';
|
import { material } from 'react-native-typography';
|
||||||
|
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
|
import { store } from "../../redux/store";
|
||||||
|
import { getDefaultTown } from "../../webservice/AuthApi";
|
||||||
|
import { uploadImage } from "../../webservice/IlinkConstants";
|
||||||
import {
|
import {
|
||||||
createGeolocatedAccount,
|
createGeolocatedAccount,
|
||||||
createUserAccount,
|
createUserAccount,
|
||||||
|
@ -35,17 +42,7 @@ import {
|
||||||
getListCountriesActive,
|
getListCountriesActive,
|
||||||
getTownInformationName
|
getTownInformationName
|
||||||
} from './../../webservice/AuthApi';
|
} from './../../webservice/AuthApi';
|
||||||
import {MaterialDialog} from "react-native-material-dialog";
|
import { getPositionInformation } from './../../webservice/MapService';
|
||||||
import Geolocation from 'react-native-geolocation-service';
|
|
||||||
import ImagePicker from 'react-native-image-crop-picker';
|
|
||||||
import {Color} from "../../config/Color";
|
|
||||||
import {FontWeight, Typography} from "../../config/typography";
|
|
||||||
import Dialog from "react-native-dialog";
|
|
||||||
import {store} from "../../redux/store";
|
|
||||||
import axios from "axios";
|
|
||||||
import {uploadImage} from "../../webservice/IlinkConstants";
|
|
||||||
import {ProgressDialog} from "react-native-simple-dialogs";
|
|
||||||
import {getDefaultTown} from "../../webservice/AuthApi";
|
|
||||||
|
|
||||||
const GEOLOCATION_OPTIONS = {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true};
|
const GEOLOCATION_OPTIONS = {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true};
|
||||||
|
|
||||||
|
@ -123,7 +120,8 @@ export default class CreateUserStep2 extends Component {
|
||||||
isLoging: false,
|
isLoging: false,
|
||||||
countries: '',
|
countries: '',
|
||||||
selectedCountry: null,
|
selectedCountry: null,
|
||||||
indicatif: '',
|
indicatif: '+237',
|
||||||
|
country: "Cameroon",
|
||||||
snackVisible: false,
|
snackVisible: false,
|
||||||
snackText: '',
|
snackText: '',
|
||||||
disableNetwork: false,
|
disableNetwork: false,
|
||||||
|
@ -219,7 +217,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const result = await this.retreiveCodeInformation();
|
const result = await this.retreiveCodeInformation();
|
||||||
console.log("RESULTAT ", result);
|
console.log("RESULTAT===>> ", result);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
throw new Error("Aucun résultat obtenu");
|
throw new Error("Aucun résultat obtenu");
|
||||||
|
@ -229,8 +227,8 @@ export default class CreateUserStep2 extends Component {
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
result,
|
result,
|
||||||
country,
|
// country,
|
||||||
indicatif: dial_code
|
// indicatif: dial_code
|
||||||
});
|
});
|
||||||
|
|
||||||
if (child) {
|
if (child) {
|
||||||
|
@ -246,10 +244,10 @@ export default class CreateUserStep2 extends Component {
|
||||||
} : {})
|
} : {})
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Impossible de récupérer les informations du code parrain");
|
throw new Error("Impossible de récupérer les informations du code hiérarchique ou taxe");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const networks = await getCountryNetwork(indicatif);
|
const networks = await getCountryNetwork("+237");
|
||||||
const reseaux = Object.values(networks).filter(network => network !== "");
|
const reseaux = Object.values(networks).filter(network => network !== "");
|
||||||
this.setState({
|
this.setState({
|
||||||
networks: reseaux,
|
networks: reseaux,
|
||||||
|
@ -260,7 +258,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
console.error("Erreur dans getNetworks:", error);
|
console.error("Erreur dans getNetworks:", error);
|
||||||
this.setState({ modalVisible: false });
|
this.setState({ modalVisible: false });
|
||||||
|
|
||||||
if (error.message === "Impossible de récupérer les informations du code parrain") {
|
if (error.message === "Impossible de récupérer les informations du code hiérarchique ou taxe") {
|
||||||
Alert.alert(I18n.t('TITLE_PROBLE_COME'), error.message, [{
|
Alert.alert(I18n.t('TITLE_PROBLE_COME'), error.message, [{
|
||||||
text: "Revenir",
|
text: "Revenir",
|
||||||
onPress: () => this.props.navigation.pop()
|
onPress: () => this.props.navigation.pop()
|
||||||
|
@ -313,6 +311,8 @@ export default class CreateUserStep2 extends Component {
|
||||||
if (jsonMatch) {
|
if (jsonMatch) {
|
||||||
countriesData = JSON.parse(jsonMatch[0]);
|
countriesData = JSON.parse(jsonMatch[0]);
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
countriesData = response;
|
||||||
}
|
}
|
||||||
|
|
||||||
const formattedCountries = countriesData.map(country => ({
|
const formattedCountries = countriesData.map(country => ({
|
||||||
|
@ -323,11 +323,11 @@ export default class CreateUserStep2 extends Component {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
country: formattedCountries,
|
// country: formattedCountries,
|
||||||
countries: formattedCountries[0],
|
countries: formattedCountries[0],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
selectedCountry: formattedCountries[0], // Sélectionne le premier pays par défaut
|
selectedCountry: formattedCountries[0], // Sélectionne le premier pays par défaut
|
||||||
indicatif: formattedCountries[0].code_dial
|
// indicatif: formattedCountries[0].code_dial
|
||||||
});
|
});
|
||||||
this.getNetworks(formattedCountries[0].label);
|
this.getNetworks(formattedCountries[0].label);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -339,7 +339,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
onSelectCountry = (country) => {
|
onSelectCountry = (country) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedCountry: country,
|
selectedCountry: country,
|
||||||
indicatif: country.code_dial,
|
// indicatif: country.code_dial,
|
||||||
modalVisible: false
|
modalVisible: false
|
||||||
});
|
});
|
||||||
this.getNetworks(country.code_dial);
|
this.getNetworks(country.code_dial);
|
||||||
|
@ -387,7 +387,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
const selectedCountry = this.state.countries[index];
|
const selectedCountry = this.state.countries[index];
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedCountry: selectedCountry,
|
selectedCountry: selectedCountry,
|
||||||
indicatif: selectedCountry.code_dial,
|
// indicatif: selectedCountry.code_dial,
|
||||||
network: null
|
network: null
|
||||||
});
|
});
|
||||||
this.getNetworks(selectedCountry.code_dial);
|
this.getNetworks(selectedCountry.code_dial);
|
||||||
|
@ -511,7 +511,11 @@ export default class CreateUserStep2 extends Component {
|
||||||
town = result[0];
|
town = result[0];
|
||||||
} else
|
} else
|
||||||
town = result;
|
town = result;
|
||||||
this.setState({town: town});
|
this.setState({town: {
|
||||||
|
name: "Douala",
|
||||||
|
id: "38",
|
||||||
|
indicatif: "+237"
|
||||||
|
}});
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getDefaultTown().then(result => {
|
getDefaultTown().then(result => {
|
||||||
|
@ -521,7 +525,11 @@ export default class CreateUserStep2 extends Component {
|
||||||
town = resultTowwn[0];
|
town = resultTowwn[0];
|
||||||
} else
|
} else
|
||||||
town = resultTowwn;
|
town = resultTowwn;
|
||||||
this.setState({town: town});
|
this.setState({town: {
|
||||||
|
name: "Douala",
|
||||||
|
id: "38",
|
||||||
|
indicatif: "+237"
|
||||||
|
}});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -534,7 +542,10 @@ export default class CreateUserStep2 extends Component {
|
||||||
for (let i of cnt) {
|
for (let i of cnt) {
|
||||||
if (i.code_country === shortcountry) {
|
if (i.code_country === shortcountry) {
|
||||||
found = true
|
found = true
|
||||||
this.setState({indicatif: i.code_dial, country: i.name})
|
this.setState({
|
||||||
|
// indicatif: i.code_dial,
|
||||||
|
country: i.name
|
||||||
|
})
|
||||||
this.getNetworks(i.code_dial);
|
this.getNetworks(i.code_dial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1043,21 +1054,24 @@ export default class CreateUserStep2 extends Component {
|
||||||
>
|
>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
label={I18n.t('COUNTRY_CHOICE')}
|
label={I18n.t('COUNTRY_CHOICE')}
|
||||||
data={this.state.countries}
|
data={[{"code_country": "CM", "code_dial": "+237", "label": "Cameroon", "value": "Cameroon"}]}
|
||||||
useNativeDriver={true}
|
useNativeDriver={true}
|
||||||
value={this.state.country === null ? "" :
|
// value={this.state.country === null ? "" :
|
||||||
this.state.country}
|
// this.state.country}
|
||||||
|
value={this.state.country}
|
||||||
onChangeText={(value, index, data) => {
|
onChangeText={(value, index, data) => {
|
||||||
this.setState({country: value, indicatif: value.code_dial, network: null})
|
this.setState({
|
||||||
|
// country: value,
|
||||||
|
// indicatif: value.code_dial,
|
||||||
|
network: null})
|
||||||
this.getNetworks(value.code_dial)
|
this.getNetworks(value.code_dial)
|
||||||
}}
|
}}
|
||||||
valueExtractor={(value) => {
|
// valueExtractor={(value) => {
|
||||||
return value
|
// return value
|
||||||
}}
|
// }}
|
||||||
labelExtractor={(value) => {
|
// labelExtractor={(value) => {
|
||||||
return value.name
|
// return value.name
|
||||||
}}
|
// }}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<Animatable.View ref={(comp) => {
|
<Animatable.View ref={(comp) => {
|
||||||
|
@ -1070,7 +1084,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
|
|
||||||
onChangeText={(text) => {
|
onChangeText={(text) => {
|
||||||
|
|
||||||
this.setState({indicatif: text})
|
// this.setState({indicatif: text})
|
||||||
}}
|
}}
|
||||||
style={{
|
style={{
|
||||||
width: responsiveWidth(30),
|
width: responsiveWidth(30),
|
||||||
|
@ -1159,7 +1173,12 @@ export default class CreateUserStep2 extends Component {
|
||||||
data['type'] = "create_user"
|
data['type'] = "create_user"
|
||||||
data['phone'] = indicatif + phone;
|
data['phone'] = indicatif + phone;
|
||||||
data['network'] = network;
|
data['network'] = network;
|
||||||
data['town'] = this.state.town;
|
// data['town'] = this.state.town;
|
||||||
|
data['town'] = {
|
||||||
|
name: "Douala",
|
||||||
|
id: "38",
|
||||||
|
indicatif: "+237"
|
||||||
|
}
|
||||||
data['latitude'] = myPosition.latitude;
|
data['latitude'] = myPosition.latitude;
|
||||||
data['longitude'] = myPosition.longitude;
|
data['longitude'] = myPosition.longitude;
|
||||||
for (let i in user) {
|
for (let i in user) {
|
||||||
|
@ -1188,7 +1207,7 @@ export default class CreateUserStep2 extends Component {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Alert.alert(I18n.t("CONNEXION_SUCCESSFUL"), result.error_msg
|
Alert.alert(I18n.t("CONNEXION_SUCCESSFUL"), result.error_msg
|
||||||
, [{text: 'OK', onPress: () => ""}], {cancelable: false})
|
, [{text: 'OK', onPress: () =>this.props.navigation.popToTop()}], {cancelable: false})
|
||||||
}
|
}
|
||||||
this.setState({isLoading: false})
|
this.setState({isLoading: false})
|
||||||
}
|
}
|
||||||
|
|
|
@ -518,6 +518,9 @@ export class LoginUi extends Component {
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
<View style={style.logoContaner}>
|
||||||
|
<Image style={style.byIlinkLogo} source={require('../../../assets/img/by-ilink-world.png')}/>
|
||||||
|
</View>
|
||||||
|
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
|
|
||||||
|
@ -810,6 +813,12 @@ const style = StyleSheet.create({
|
||||||
},
|
},
|
||||||
logo: {
|
logo: {
|
||||||
width: responsiveWidth(90),
|
width: responsiveWidth(90),
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
|
resizeMode: "contain"
|
||||||
|
},
|
||||||
|
byIlinkLogo: {
|
||||||
|
width: responsiveWidth(30),
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
resizeMode: "contain"
|
resizeMode: "contain"
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
|
|
|
@ -240,7 +240,8 @@ const styles=StyleSheet.create({
|
||||||
},
|
},
|
||||||
logo:{
|
logo:{
|
||||||
width:responsiveWidth(90),
|
width:responsiveWidth(90),
|
||||||
resizeMode:'contain'
|
resizeMode:'contain',
|
||||||
|
height: responsiveHeight(16), // Delete this line if the image size sucks and change the width and the height of icon3.png to 257 x 112
|
||||||
},
|
},
|
||||||
lottie: {
|
lottie: {
|
||||||
width: 48
|
width: 48
|
||||||
|
|
|
@ -650,7 +650,7 @@
|
||||||
"PRINCIPAL_AMOUNT": "Principal amount",
|
"PRINCIPAL_AMOUNT": "Principal amount",
|
||||||
"DATE_AVIS_IMPOSITION": "Tax notice date",
|
"DATE_AVIS_IMPOSITION": "Tax notice date",
|
||||||
"TEXT_NETWORK_UNABLE_CHOOSE_ANOTHER": "This network is inactive, please choose another",
|
"TEXT_NETWORK_UNABLE_CHOOSE_ANOTHER": "This network is inactive, please choose another",
|
||||||
"ENTER_SPONSOR_CODE": "Renseignez votre code parrain",
|
"ENTER_SPONSOR_CODE": "Renseignez votre code hiérarchique ou taxe",
|
||||||
"NOM_SOCIETE": "Society name",
|
"NOM_SOCIETE": "Society name",
|
||||||
"TAKE_My_POSITION": "Retreive position",
|
"TAKE_My_POSITION": "Retreive position",
|
||||||
"CREATE_ACTIF": "Create asset",
|
"CREATE_ACTIF": "Create asset",
|
||||||
|
|
|
@ -148,9 +148,9 @@
|
||||||
"ANNEE_TAXE_N_1": "Année taxé payée N-1",
|
"ANNEE_TAXE_N_1": "Année taxé payée N-1",
|
||||||
"ANNEE_TAXE_N_2": "Année taxé payée N-2",
|
"ANNEE_TAXE_N_2": "Année taxé payée N-2",
|
||||||
"TYPE_ACTIVITE": "Type d'activité",
|
"TYPE_ACTIVITE": "Type d'activité",
|
||||||
"TECHNICAL_AGREMENT": "Agrément technique",
|
"TECHNICAL_AGREMENT": "Agrément technique ou Licence",
|
||||||
"IMMATRICULATION_DGI": "Immatriculation DGI",
|
"IMMATRICULATION_DGI": "NIU",
|
||||||
"INFORMATION_FICHE_CIRCUIT": "Information fiche circuit",
|
"INFORMATION_FICHE_CIRCUIT": "Fiche d'identification",
|
||||||
"OTHERS_INFORMATIONS": "Autres informations",
|
"OTHERS_INFORMATIONS": "Autres informations",
|
||||||
"CREATE_GROUP": "Créer un groupe",
|
"CREATE_GROUP": "Créer un groupe",
|
||||||
"MANAGE_GROUP": "Gérer le groupe",
|
"MANAGE_GROUP": "Gérer le groupe",
|
||||||
|
@ -301,15 +301,15 @@
|
||||||
"SUPER_ADMIN": "Super administrateur",
|
"SUPER_ADMIN": "Super administrateur",
|
||||||
"GEOLOCATED": "Agent géo-localisé",
|
"GEOLOCATED": "Agent géo-localisé",
|
||||||
"DELETE_GEOLOCATED_USER": "Supprimer",
|
"DELETE_GEOLOCATED_USER": "Supprimer",
|
||||||
"ADDRESS": "Adresse",
|
"ADDRESS": "Adresse EX:TotalEnergies Bonateki",
|
||||||
"CREDIT": "Crédit",
|
"CREDIT": "Crédit",
|
||||||
"NEXT": "Suivant",
|
"NEXT": "Suivant",
|
||||||
"PREVIOUS": "Précédent",
|
"PREVIOUS": "Précédent",
|
||||||
"SPONSOR_CODE": "Code réseau de taxe",
|
"SPONSOR_CODE": "Code réseau de taxe",
|
||||||
"CODE_PARRAIN": "Code parrain",
|
"CODE_PARRAIN": "Code hiérarchique ou taxe",
|
||||||
"CODE_SPONSOR": "Code sponsor",
|
"CODE_SPONSOR": "Code sponsor",
|
||||||
"SOLDE_UNVAIBLE": "solde non disponible",
|
"SOLDE_UNVAIBLE": "solde non disponible",
|
||||||
"TEXT_BIG_CREATE_AGENT_1": "Inscrivez-vous en tant qu'agent",
|
"TEXT_BIG_CREATE_AGENT_1": "Créer un administrateur un régisseur ou un contribuable",
|
||||||
"EMAIL": "Email",
|
"EMAIL": "Email",
|
||||||
"COUNTRY": "Pays",
|
"COUNTRY": "Pays",
|
||||||
"LOADING_INFO": "Chargement des informations...",
|
"LOADING_INFO": "Chargement des informations...",
|
||||||
|
@ -426,7 +426,7 @@
|
||||||
"WAY": "Itinéraire",
|
"WAY": "Itinéraire",
|
||||||
"ADD_NETWORK": "Ajouter réseau de taxe",
|
"ADD_NETWORK": "Ajouter réseau de taxe",
|
||||||
"POINT_NUMBER": "Nombres de points",
|
"POINT_NUMBER": "Nombres de points",
|
||||||
"SUPERIOR_CODE": "Code parrain",
|
"SUPERIOR_CODE": "Code hiérarchique ou taxe",
|
||||||
"ADD_SUCCES": "Ajout reussi",
|
"ADD_SUCCES": "Ajout reussi",
|
||||||
"ADD_SUCCESS_TEXT": "La taxe a été ajoutée avec succès ",
|
"ADD_SUCCESS_TEXT": "La taxe a été ajoutée avec succès ",
|
||||||
"MEMBER_CODE": "Code membre",
|
"MEMBER_CODE": "Code membre",
|
||||||
|
@ -588,7 +588,7 @@
|
||||||
"UNABLE_GET_INFORMATION_TEXT": "Vérifiez que votre GPS est activé et mis en mode haute precision et relancez iLink City",
|
"UNABLE_GET_INFORMATION_TEXT": "Vérifiez que votre GPS est activé et mis en mode haute precision et relancez iLink City",
|
||||||
"TITLE_HELP_SOON": "Aide non disponible !",
|
"TITLE_HELP_SOON": "Aide non disponible !",
|
||||||
"YOUR_NETWORK": "Sélectionner votre réseau",
|
"YOUR_NETWORK": "Sélectionner votre réseau",
|
||||||
"YOUR_NETWORK_SELECTED": "Votre réseau",
|
"YOUR_NETWORK_SELECTED": "Classe de la taxe",
|
||||||
"UNIT_PER_TAXE_UNIT_COUNT": "Taxe par unité",
|
"UNIT_PER_TAXE_UNIT_COUNT": "Taxe par unité",
|
||||||
"HELP_SOON": "Un tutoriel vous aidant dans la compréhension des fonctionnalités de l'application vous sera bientôt mis à disposition.",
|
"HELP_SOON": "Un tutoriel vous aidant dans la compréhension des fonctionnalités de l'application vous sera bientôt mis à disposition.",
|
||||||
"UPLOAD_PHOTO": "Chargement de la photo",
|
"UPLOAD_PHOTO": "Chargement de la photo",
|
||||||
|
@ -657,7 +657,7 @@
|
||||||
"PRINCIPAL_AMOUNT": "Montant principal",
|
"PRINCIPAL_AMOUNT": "Montant principal",
|
||||||
"DATE_AVIS_IMPOSITION": "Date avis imposition",
|
"DATE_AVIS_IMPOSITION": "Date avis imposition",
|
||||||
"TEXT_NETWORK_UNABLE_CHOOSE_ANOTHER": "Ce réseau n'est pas actif, veuillez choisir un autre",
|
"TEXT_NETWORK_UNABLE_CHOOSE_ANOTHER": "Ce réseau n'est pas actif, veuillez choisir un autre",
|
||||||
"ENTER_SPONSOR_CODE": "Renseignez votre code parrain",
|
"ENTER_SPONSOR_CODE": "Renseignez votre code hiérarchique ou taxe",
|
||||||
"NOM_SOCIETE": "Nom de la société",
|
"NOM_SOCIETE": "Nom de la société",
|
||||||
"TAKE_My_POSITION": "Récupération de votre position",
|
"TAKE_My_POSITION": "Récupération de votre position",
|
||||||
"CREATE_ACTIF": "Créer un actif",
|
"CREATE_ACTIF": "Créer un actif",
|
||||||
|
|
Loading…
Reference in New Issue