diff --git a/app/assets/img/by-ilink-world.png b/app/assets/img/by-ilink-world.png new file mode 100644 index 0000000..236adf3 Binary files /dev/null and b/app/assets/img/by-ilink-world.png differ diff --git a/app/assets/img/icon3.png b/app/assets/img/icon3.png index f5d2919..a0b3ca5 100644 Binary files a/app/assets/img/icon3.png and b/app/assets/img/icon3.png differ diff --git a/app/screens/account/AddNetwork.js b/app/screens/account/AddNetwork.js index 6456a6c..123b797 100644 --- a/app/screens/account/AddNetwork.js +++ b/app/screens/account/AddNetwork.js @@ -419,8 +419,11 @@ export default class AddNetwork extends Component { {this.state.loadingUpload && this.renderLoader()} - + {I18n.t('ADD_NETWORK')} diff --git a/app/screens/configurations/About.js b/app/screens/configurations/About.js index 6e73071..b7d38a1 100644 --- a/app/screens/configurations/About.js +++ b/app/screens/configurations/About.js @@ -52,7 +52,10 @@ export default class About extends React.Component { - + {I18n.t("ABOUT_TEXT")} diff --git a/app/screens/help/HelpMenu.js b/app/screens/help/HelpMenu.js index 6e1bd8e..dd5d29e 100644 --- a/app/screens/help/HelpMenu.js +++ b/app/screens/help/HelpMenu.js @@ -105,6 +105,7 @@ const styles = StyleSheet.create({ }, img_style: { 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 } }); diff --git a/app/screens/login/ActivateAccount.js b/app/screens/login/ActivateAccount.js index 9163508..52c181d 100644 --- a/app/screens/login/ActivateAccount.js +++ b/app/screens/login/ActivateAccount.js @@ -125,8 +125,10 @@ export default class ActivateAccount extends Component { justifyContent: 'center', alignItems: 'center', }}> - - + @@ -177,7 +179,9 @@ export default class ActivateAccount extends Component { alignItems: 'center', }}> - @@ -284,7 +288,9 @@ export default class ActivateAccount extends Component { alignItems: 'center', }}> - diff --git a/app/screens/login/CreateUserStep.js b/app/screens/login/CreateUserStep.js index bbb7461..24be32f 100644 --- a/app/screens/login/CreateUserStep.js +++ b/app/screens/login/CreateUserStep.js @@ -124,6 +124,7 @@ class CreateUserStep extends Component { latlng: [], id_company_type: null, identification_number: null, + remainingCharacters: 14, trade_registry: null, tabTaxe: [0], taxes_selected: [], @@ -193,7 +194,6 @@ class CreateUserStep extends Component { const {type} = this.props; if (!this.state.isTaxesLoaded) { let taxesTemp = new Array(); - if (!_.isNil(this.result.required_taxes)) { this.result.required_taxes.map((taxes, index) => { if (this.state.companies_types_selected_value !== null) { @@ -366,7 +366,7 @@ class CreateUserStep extends Component { } }, (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", onPress: () => this.watchLocation(param) }]) @@ -804,7 +804,7 @@ class CreateUserStep extends Component { backgroundColor: 'white' }}> { @@ -1229,7 +1229,7 @@ class CreateUserStep extends Component { null} - + {/* {this.state.textadress !== undefined ? this.state.textadress : I18n.t('TAKE_MY_POSITION')} - + */} } { @@ -1337,7 +1337,7 @@ handleTaxSlection = (selectedTax) => { backgroundColor: 'white' }}> { @@ -1476,13 +1476,27 @@ handleTaxSlection = (selectedTax) => { { - this.setState({identification_number: text}) - }}/> + // Update the identification_number state + this.setState({ + identification_number: text, + remainingCharacters: 14 - text.length // Update the remaining characters + }); + }}/> + + {this.state.remainingCharacters} caractères restants + @@ -1514,7 +1528,7 @@ handleTaxSlection = (selectedTax) => { }}> { backgroundColor: 'white' }}> { @@ -1570,7 +1584,7 @@ handleTaxSlection = (selectedTax) => { backgroundColor: 'white' }}> { @@ -1591,7 +1605,7 @@ handleTaxSlection = (selectedTax) => { }}> { style={styles.checkbox}/> {I18n.t('IRPP')} - + this.setState({IRPP: value})} + value={this.state.IRPP} + style={styles.checkbox}/> + Licence + + {/* this.setState({year_tax_paid_N: value})} @@ -1648,12 +1669,12 @@ handleTaxSlection = (selectedTax) => { style={styles.checkbox}/> {I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 1)} - + */} - { {I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 2)} - + */} - { {I18n.t('ANNEE_TAXE')} {Number(year.getFullYear() - 3)} - + */} - + + Code Hierachique : Code entré lors de la création d'un administrateur de taxe ou d'un régisseur + Code Taxe : Code entré lors de la création d'un contribuable + ); } @@ -746,6 +749,19 @@ const styles = StyleSheet.create({ textAlign: 'center', margin: 5, }, + indication: { + color: 'white', + fontSize: 14, + marginLeft: 20, + marginRight: 20, + marginBottom: 10, + }, + indicationTitle: { + color: 'white', + fontSize: 14, + marginLeft: 20, + fontWeight: '600', + }, btnvalide: { marginTop: 20, marginLeft: 20, diff --git a/app/screens/login/createUserStep2.js b/app/screens/login/createUserStep2.js index e296ae4..a5f1ff6 100644 --- a/app/screens/login/createUserStep2.js +++ b/app/screens/login/createUserStep2.js @@ -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 { Alert, BackHandler, @@ -13,20 +18,22 @@ import { TouchableOpacity, View } 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 Button from 'apsl-react-native-button'; -import MapView, {Marker} from 'react-native-maps'; -import {Dropdown} from 'react-native-material-dropdown-v2'; -import isEqual from 'lodash/isEqual'; -import isNil from 'lodash/isNil'; -import {getPositionInformation} from './../../webservice/MapService'; -import I18n from 'react-native-i18n' -import {material} from 'react-native-typography'; +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 { MaterialDialog } from "react-native-material-dialog"; +import { Dropdown } from 'react-native-material-dropdown-v2'; +import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'; +import { ProgressDialog } from "react-native-simple-dialogs"; +import { Fumi } from 'react-native-textinput-effects'; +import { material } from 'react-native-typography'; +import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; +import { store } from "../../redux/store"; +import { getDefaultTown } from "../../webservice/AuthApi"; +import { uploadImage } from "../../webservice/IlinkConstants"; import { createGeolocatedAccount, createUserAccount, @@ -35,17 +42,7 @@ import { getListCountriesActive, getTownInformationName } from './../../webservice/AuthApi'; -import {MaterialDialog} from "react-native-material-dialog"; -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"; +import { getPositionInformation } from './../../webservice/MapService'; const GEOLOCATION_OPTIONS = {enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true}; @@ -123,7 +120,8 @@ export default class CreateUserStep2 extends Component { isLoging: false, countries: '', selectedCountry: null, - indicatif: '', + indicatif: '+237', + country: "Cameroon", snackVisible: false, snackText: '', disableNetwork: false, @@ -219,7 +217,7 @@ export default class CreateUserStep2 extends Component { try { const result = await this.retreiveCodeInformation(); - console.log("RESULTAT ", result); + console.log("RESULTAT===>> ", result); if (!result) { throw new Error("Aucun résultat obtenu"); @@ -229,8 +227,8 @@ export default class CreateUserStep2 extends Component { this.setState({ result, - country, - indicatif: dial_code + // country, + // indicatif: dial_code }); if (child) { @@ -246,10 +244,10 @@ export default class CreateUserStep2 extends Component { } : {}) }); } 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 { - const networks = await getCountryNetwork(indicatif); + const networks = await getCountryNetwork("+237"); const reseaux = Object.values(networks).filter(network => network !== ""); this.setState({ networks: reseaux, @@ -260,7 +258,7 @@ export default class CreateUserStep2 extends Component { console.error("Erreur dans getNetworks:", error); 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, [{ text: "Revenir", onPress: () => this.props.navigation.pop() @@ -313,6 +311,8 @@ export default class CreateUserStep2 extends Component { if (jsonMatch) { countriesData = JSON.parse(jsonMatch[0]); } + }else{ + countriesData = response; } const formattedCountries = countriesData.map(country => ({ @@ -323,11 +323,11 @@ export default class CreateUserStep2 extends Component { })); this.setState({ - country: formattedCountries, + // country: formattedCountries, countries: formattedCountries[0], isLoading: false, 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); } catch (error) { @@ -339,7 +339,7 @@ export default class CreateUserStep2 extends Component { onSelectCountry = (country) => { this.setState({ selectedCountry: country, - indicatif: country.code_dial, + // indicatif: country.code_dial, modalVisible: false }); this.getNetworks(country.code_dial); @@ -387,7 +387,7 @@ export default class CreateUserStep2 extends Component { const selectedCountry = this.state.countries[index]; this.setState({ selectedCountry: selectedCountry, - indicatif: selectedCountry.code_dial, + // indicatif: selectedCountry.code_dial, network: null }); this.getNetworks(selectedCountry.code_dial); @@ -511,7 +511,11 @@ export default class CreateUserStep2 extends Component { town = result[0]; } else town = result; - this.setState({town: town}); + this.setState({town: { + name: "Douala", + id: "38", + indicatif: "+237" + }}); }) } else { getDefaultTown().then(result => { @@ -521,7 +525,11 @@ export default class CreateUserStep2 extends Component { town = resultTowwn[0]; } else 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) { if (i.code_country === shortcountry) { 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); } } @@ -1043,21 +1054,24 @@ export default class CreateUserStep2 extends Component { > { - 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) }} - valueExtractor={(value) => { - return value - }} - labelExtractor={(value) => { - return value.name - }} + // valueExtractor={(value) => { + // return value + // }} + // labelExtractor={(value) => { + // return value.name + // }} /> { @@ -1070,7 +1084,7 @@ export default class CreateUserStep2 extends Component { onChangeText={(text) => { - this.setState({indicatif: text}) + // this.setState({indicatif: text}) }} style={{ width: responsiveWidth(30), @@ -1159,7 +1173,12 @@ export default class CreateUserStep2 extends Component { data['type'] = "create_user" data['phone'] = indicatif + phone; 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['longitude'] = myPosition.longitude; for (let i in user) { @@ -1188,7 +1207,7 @@ export default class CreateUserStep2 extends Component { break; default: 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}) } diff --git a/app/screens/login/ui/Login.ui.js b/app/screens/login/ui/Login.ui.js index 6e4647e..24e1c2f 100644 --- a/app/screens/login/ui/Login.ui.js +++ b/app/screens/login/ui/Login.ui.js @@ -518,6 +518,9 @@ export class LoginUi extends Component { + + + @@ -810,6 +813,12 @@ const style = StyleSheet.create({ }, logo: { 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" }, title: { diff --git a/app/screens/splashscreen/qSplashScreen.js b/app/screens/splashscreen/qSplashScreen.js index 95f6462..ca82eba 100644 --- a/app/screens/splashscreen/qSplashScreen.js +++ b/app/screens/splashscreen/qSplashScreen.js @@ -240,7 +240,8 @@ const styles=StyleSheet.create({ }, logo:{ 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: { width: 48 diff --git a/app/utils/i18n/en.json b/app/utils/i18n/en.json index 81c3619..a5c3faf 100644 --- a/app/utils/i18n/en.json +++ b/app/utils/i18n/en.json @@ -650,7 +650,7 @@ "PRINCIPAL_AMOUNT": "Principal amount", "DATE_AVIS_IMPOSITION": "Tax notice date", "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", "TAKE_My_POSITION": "Retreive position", "CREATE_ACTIF": "Create asset", diff --git a/app/utils/i18n/fr.json b/app/utils/i18n/fr.json index f3e6739..f025c14 100644 --- a/app/utils/i18n/fr.json +++ b/app/utils/i18n/fr.json @@ -148,9 +148,9 @@ "ANNEE_TAXE_N_1": "Année taxé payée N-1", "ANNEE_TAXE_N_2": "Année taxé payée N-2", "TYPE_ACTIVITE": "Type d'activité", - "TECHNICAL_AGREMENT": "Agrément technique", - "IMMATRICULATION_DGI": "Immatriculation DGI", - "INFORMATION_FICHE_CIRCUIT": "Information fiche circuit", + "TECHNICAL_AGREMENT": "Agrément technique ou Licence", + "IMMATRICULATION_DGI": "NIU", + "INFORMATION_FICHE_CIRCUIT": "Fiche d'identification", "OTHERS_INFORMATIONS": "Autres informations", "CREATE_GROUP": "Créer un groupe", "MANAGE_GROUP": "Gérer le groupe", @@ -301,15 +301,15 @@ "SUPER_ADMIN": "Super administrateur", "GEOLOCATED": "Agent géo-localisé", "DELETE_GEOLOCATED_USER": "Supprimer", - "ADDRESS": "Adresse", + "ADDRESS": "Adresse EX:TotalEnergies Bonateki", "CREDIT": "Crédit", "NEXT": "Suivant", "PREVIOUS": "Précédent", "SPONSOR_CODE": "Code réseau de taxe", - "CODE_PARRAIN": "Code parrain", + "CODE_PARRAIN": "Code hiérarchique ou taxe", "CODE_SPONSOR": "Code sponsor", "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", "COUNTRY": "Pays", "LOADING_INFO": "Chargement des informations...", @@ -426,7 +426,7 @@ "WAY": "Itinéraire", "ADD_NETWORK": "Ajouter réseau de taxe", "POINT_NUMBER": "Nombres de points", - "SUPERIOR_CODE": "Code parrain", + "SUPERIOR_CODE": "Code hiérarchique ou taxe", "ADD_SUCCES": "Ajout reussi", "ADD_SUCCESS_TEXT": "La taxe a été ajoutée avec succès ", "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", "TITLE_HELP_SOON": "Aide non disponible !", "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é", "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", @@ -657,7 +657,7 @@ "PRINCIPAL_AMOUNT": "Montant principal", "DATE_AVIS_IMPOSITION": "Date avis imposition", "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é", "TAKE_My_POSITION": "Récupération de votre position", "CREATE_ACTIF": "Créer un actif",