From 969dd9a4d550b88ee3282a7693bab3b2368da382 Mon Sep 17 00:00:00 2001 From: Brice Zele Date: Mon, 25 Apr 2022 04:02:48 +0100 Subject: [PATCH] Correction de nombreux bugs --- App.js | 78 ++++++++++++++++--- screens/home/Home.js | 2 +- .../identification/validateIdentification.js | 55 ++++++++----- screens/wallet/WalletDetail.js | 2 +- .../agent/HistoriqueNanoSanteAgentScreen.js | 16 ++-- .../wallet/agent/ModifierFeuilleSoinScreen.js | 3 +- .../wallet/agent/SaisirFeuilleSoinScreen.js | 30 +++---- .../user/InsuranceSubscriptionScreen.js | 3 +- utils/i18n/fr.json | 4 +- 9 files changed, 136 insertions(+), 57 deletions(-) diff --git a/App.js b/App.js index eaf486fe..6a089299 100755 --- a/App.js +++ b/App.js @@ -148,15 +148,33 @@ const AppStack = createDrawerNavigator({ envoieWalletToCashUser: EnvoieWalletToCashUser, envoieWalletToCardUser: EnvoieWalletToCardUser, envoieWalletToBankUser: EnvoieWalletToBankUser, - addBeneficiaryScreen: AddBeneficiaryScreen, - insuranceSubscriptionScreen: InsuranceSubscriptionScreen, + insuranceSubscriptionScreen: {screen: InsuranceSubscriptionScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('SUBSCRIBE_ASSURANCE'), + title: I18n.t('SUBSCRIBE_ASSURANCE'), + })}, + addBeneficiaryScreen: {screen: AddBeneficiaryScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('ADD_SUBSCRIBE'), + title: I18n.t('ADD_SUBSCRIBE'), + })}, + activateBuySubscriptionScreen: {screen: ActivateBuySubscriptionScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('ACTIVATE_INSSURANCE'), + title: I18n.t('ACTIVATE_INSSURANCE'), + })}, + renewAssuranceScreen: {screen: RenewAssuranceScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('RENEW_INSSURANCE'), + title: I18n.t('RENEW_INSSURANCE'), + })}, + deleteBeneficiaryScreen: {screen: DeleteBeneficiaryScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('DELETE_SUBSCRIBE'), + title: I18n.t('DELETE_SUBSCRIBE'), + })}, + stopSubscriptionScreen: {screen: StopSubscriptionScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('STOP_SUBSCRIBE'), + title: I18n.t('STOP_SUBSCRIBE'), + })}, validateConsultationScreen: ValidateConsultationScreen, validateConsultationDetailScreen: ValidateConsultationDetailScreen, - activateBuySubscriptionScreen: ActivateBuySubscriptionScreen, - stopSubscriptionScreen: StopSubscriptionScreen, - renewAssuranceScreen: RenewAssuranceScreen, historiqueNanoSanteUserScreen: HistoriqueNanoSanteUserScreen, - deleteBeneficiaryScreen: DeleteBeneficiaryScreen, retraitWalletVersCashUser: RetraitWalletVersCashUser, retraitCarteVersCashUser: RetraitCarteVersCashUser, retraitCarteVersWalletUser: RetraitCarteVersWalletUser, @@ -242,7 +260,6 @@ const AppAgentStack = createDrawerNavigator({ walletSelect: WalletSelect, createIdentification: CreateIdentification, validateIdentification: ValidateIdentification, - demandeAutorisationSoinScreen: DemandeAutorisationSoinScreen, Historique: { screen: createBottomTabNavigator({myDemand: MyHistory}, { @@ -275,10 +292,48 @@ const AppAgentStack = createDrawerNavigator({ historyItemDetails: HistoryItemDetails, creditrequest: HistoryRequester, - saisirFeuilleSoinScreen: SaisirFeuilleSoinScreen, - executerPrescriptionScreen: ExecuterPrescriptionScreen, - modifierExecutionPrescriptionScreen: ModifierExecutionPrescriptionScreen, - modifierFeuilleSoinScreen: ModifierFeuilleSoinScreen, + saisirFeuilleSoinScreen: {screen: SaisirFeuilleSoinScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('SAISIR_FEUILLE_SOIN'), + title: I18n.t('SAISIR_FEUILLE_SOIN'), + headerStyle: { + marginTop: 20 + }, + })}, + executerPrescriptionScreen: {screen: ExecuterPrescriptionScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('EXECUTER_PRESCRIPTION'), + title: I18n.t('EXECUTER_PRESCRIPTION'), + headerStyle: { + marginTop: 20 + }, + })}, + modifierExecutionPrescriptionScreen: {screen: ModifierExecutionPrescriptionScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('MODIFY_CONSULTATION'), + title: I18n.t('MODIFY_CONSULTATION'), + headerStyle: { + marginTop: 20 + }, + })}, + modifierFeuilleSoinScreen: {screen: ModifierFeuilleSoinScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('MODIFY_EXECUTION'), + title: I18n.t('MODIFY_EXECUTION'), + headerStyle: { + marginTop: 20 + }, + })}, + demandeAutorisationSoinScreen: {screen: DemandeAutorisationSoinScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('DEMAND_AUTORIZATION_HEALTH'), + title: I18n.t('DEMAND_AUTORIZATION_HEALTH'), + headerStyle: { + marginTop: 20 + }, + })}, + historiqueNanoSanteAgentScreen: {screen: HistoriqueNanoSanteAgentScreen, navigationOptions: ()=> ({ + headerTitle: I18n.t('HISTORY'), + title: I18n.t('HISTORY'), + headerStyle: { + marginTop: 20 + }, + })}, addNetwork: AddNetwork, updateinformation: UpdateInformations, notificationview: Notifications, @@ -299,7 +354,6 @@ const AppAgentStack = createDrawerNavigator({ envoieWalletToBankAgent: EnvoieWalletToBankAgent, createGroupNanoCredit: CreateGroupNanoCredit, cautionNanoCreditAgent: CautionNanoCreditAgent, - historiqueNanoSanteAgentScreen: HistoriqueNanoSanteAgentScreen, PDFViewerScreen: PDFViewerScreen, }) }, { diff --git a/screens/home/Home.js b/screens/home/Home.js index 9393d0e0..46d1f6e1 100755 --- a/screens/home/Home.js +++ b/screens/home/Home.js @@ -1466,7 +1466,7 @@ class Home extends BaseScreen { console.log("PUBLICITE", this.state.publicite); if (!_.isNil(this.state.publicite) && !_.isNil(this.state.user)) { - if (this.state.user.country_id === this.state.publicite.id_country) { + if (this.state.isPubShow) { return ( this.setState({isPubShow: false})} navigation={this.props.navigation} diff --git a/screens/identification/validateIdentification.js b/screens/identification/validateIdentification.js index a6b09372..e2d0a9e2 100755 --- a/screens/identification/validateIdentification.js +++ b/screens/identification/validateIdentification.js @@ -1,27 +1,43 @@ import Button from 'apsl-react-native-button'; -import React, { Component } from 'react'; -import { Alert, Image, PermissionsAndroid, Platform, ProgressBarAndroid, ScrollView, StyleSheet, Text, View } from 'react-native'; +import React, {Component} from 'react'; +import { + Alert, + Image, + PermissionsAndroid, + Platform, + ProgressBarAndroid, + ScrollView, + StyleSheet, + Text, + View +} from 'react-native'; import * as Animatable from 'react-native-animatable'; import Dialog from "react-native-dialog"; -import { TouchableOpacity } from 'react-native-gesture-handler'; +import {TouchableOpacity} from 'react-native-gesture-handler'; import I18n from 'react-native-i18n'; import ImagePicker from 'react-native-image-crop-picker'; -import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'; -import { Fumi } from 'react-native-textinput-effects'; +import {responsiveHeight, responsiveWidth} from 'react-native-responsive-dimensions'; +import {Fumi} from 'react-native-textinput-effects'; import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; -import { Color } from '../../config/Color'; +import {Color} from '../../config/Color'; import isNil from 'lodash/isNil'; import isEqual from 'lodash/isEqual'; -import { SinglePickerMaterialDialog, MultiPickerMaterialDialog, MaterialDialog } from "react-native-material-dialog"; -import { readUser, getTownInformationName, getListCountriesActive } from './../../webservice/AuthApi'; -import { Typography, FontWeight } from '../../config/typography'; -import { connect } from 'react-redux'; +import {MaterialDialog} from "react-native-material-dialog"; +import {getListCountriesActive, getTownInformationName, readUser} from './../../webservice/AuthApi'; +import {FontWeight, Typography} from '../../config/typography'; +import {connect} from 'react-redux'; import Geolocation from 'react-native-geolocation-service'; -import { bindActionCreators } from 'redux'; -import { ProgressDialog } from 'react-native-simple-dialogs'; -import { getUserIdentificationResetAction, getUserIdentificationAction, validateIdentificationAction, validateIdentificationResetAction } from '../../webservice/IdentificationApi' -import { getPositionInformation } from '../../webservice/MapService'; +import {bindActionCreators} from 'redux'; +import {ProgressDialog} from 'react-native-simple-dialogs'; +import { + getUserIdentificationAction, + getUserIdentificationResetAction, + validateIdentificationAction, + validateIdentificationResetAction +} from '../../webservice/IdentificationApi' +import {getPositionInformation} from '../../webservice/MapService'; + let theme = require('./../../utils/theme.json'); let route = require('./../../route.json'); const GEOLOCATION_OPTIONS = { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000, useSignificantChanges: true }; @@ -366,16 +382,17 @@ class ValidateIdentification extends Component { } - renderValidationResponse = () => { - const { resultValidateIdentification, errorValidateIdentification } = this.props; + componentWillReceiveProps(nextProps: Readonly

, nextContext: any) { + + const { resultValidateIdentification, errorValidateIdentification } = nextProps; if (resultValidateIdentification !== null) { if (typeof resultValidateIdentification.response !== 'undefined') { if (resultValidateIdentification.status === 200) { Alert.alert( - 'Validation effectué', - 'Utilisateur validé avec succès', + I18n.t('VALIDATION_EFFECTUE'), + I18n.t('USER_SUCCESSFULLY_VALIDATED'), [ { text: I18n.t("OK"), onPress: () => { @@ -492,7 +509,7 @@ class ValidateIdentification extends Component { {this.state.displayImage && this.renderDialogImage()} {this.state.modalVisible && this.renderLoaderModal()} {this.state.triggerSubmitClick && this.renderGetUserIdentificationResponse()} - {this.state.triggerValidateClick && this.renderValidationResponse()} + {/*this.state.triggerValidateClick && this.renderValidationResponse()*/} {I18n.t('CREATE_IDENTIFICATION_TITLE')} diff --git a/screens/wallet/WalletDetail.js b/screens/wallet/WalletDetail.js index a4ac2182..610816a4 100755 --- a/screens/wallet/WalletDetail.js +++ b/screens/wallet/WalletDetail.js @@ -2165,7 +2165,7 @@ class WalletDetail extends Component { network_agent_id: this.props.result.response.network_agent_id }); }}> - {I18n.t('SUBMIT_LABEL')}l + {I18n.t('SUBMIT_LABEL')} : diff --git a/screens/wallet/agent/HistoriqueNanoSanteAgentScreen.js b/screens/wallet/agent/HistoriqueNanoSanteAgentScreen.js index 7ae9fab1..aeaf1314 100644 --- a/screens/wallet/agent/HistoriqueNanoSanteAgentScreen.js +++ b/screens/wallet/agent/HistoriqueNanoSanteAgentScreen.js @@ -7,7 +7,8 @@ */ import React, {useEffect, useState} from 'react'; import { - ActivityIndicator, Alert, + ActivityIndicator, + Alert, Dimensions, FlatList, Platform, @@ -25,16 +26,18 @@ import {ScreenComponent} from "../../../components/ScreenComponent"; import { fetchAcceptRejectConsultation, fetchAcceptRejectConsultationReset, - fetchActivePaySubscription, fetchDemaneAutorisationSoinReset, + fetchActivePaySubscription, fetchGetConsultation, - fetchGetConsultationReset, fetchGetDemandeAutorisationSoin, fetchGetInvoiceHistory, + fetchGetConsultationReset, + fetchGetDemandeAutorisationSoin, + fetchGetInvoiceHistory, fetchGetSubscription } from "../../../redux/insurance/insurance.actions"; import DropdownAlert from "react-native-dropdownalert"; import {createStructuredSelector} from "reselect"; import { selectAcceptRefuseConsultation, - selectActivatePaySubscription, selectDemandeAutorisationSoin, + selectActivatePaySubscription, selectGetConsultation, selectSubscriptionList } from "../../../redux/insurance/insurance.selector"; @@ -49,7 +52,6 @@ import FontAwesome5 from "react-native-vector-icons/FontAwesome5"; import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; import {store} from "../../../redux/store"; import AccordionComponent from "../../../components/AccordionComponent"; -import {pdfViewerUrl} from "../../../webservice/IlinkConstants"; let moment = require('moment-timezone'); @@ -446,8 +448,8 @@ const HistoriqueNanoSanteAgentScreen = ({ ${I18n.t('AMOUNT')}: ${history_care.amount}\ ${I18n.t('MONTANT_ASSURANCE')}: ${history_care.insuredAmount}\ ${I18n.t('MONTANT_ASSURE')}: ${history_care.insurerAmount}\ - ${I18n.t('PATIENT')}: ${history_care.patient_firstname} ${history_care.patient_lastname}\ - ${I18n.t('PRATICIEN')}: ${history_care.practitioner_firstname} ${history_care.practitioner_lastname}\ + ${I18n.t('PATIENT')}: ${history_care.patient_firstname !== null ? history_care.patient_firstname : '' } ${history_care.patient_lastname}\n + ${I18n.t('PRATICIEN')}: ${history_care.practitioner_firstname !== null ? history_care.practitioner_firstname : ''} ${history_care.practitioner_lastname}\ `} open style={{marginTop: 20, marginBottom: 10}} diff --git a/screens/wallet/agent/ModifierFeuilleSoinScreen.js b/screens/wallet/agent/ModifierFeuilleSoinScreen.js index ffb473ce..33aab323 100644 --- a/screens/wallet/agent/ModifierFeuilleSoinScreen.js +++ b/screens/wallet/agent/ModifierFeuilleSoinScreen.js @@ -700,7 +700,7 @@ const ModifierFeuilleSoinScreen = ({ onSwipeComplete={() => { setModalVisible(false); }} - swipeDirection={['down']} + swipeDirection={null} style={styles.bottomModal}> { - handleSubmit(e); if (onNext()) wizard.current.next(); }}> diff --git a/screens/wallet/agent/SaisirFeuilleSoinScreen.js b/screens/wallet/agent/SaisirFeuilleSoinScreen.js index a8167bd2..963c941c 100644 --- a/screens/wallet/agent/SaisirFeuilleSoinScreen.js +++ b/screens/wallet/agent/SaisirFeuilleSoinScreen.js @@ -679,7 +679,7 @@ const SaisirFeuilleSoinScreen = ({ const SaisirFeuilleSoinSchema = Yup.object().shape({ numero_assure: Yup.string() .required(I18n.t('THIS_FIELD_IS_REQUIRED')), - password: wallet.password_validation === "MAX" ? Yup.string() + password: wallet.password_validation === "MAX" ? Yup.string() .required(I18n.t('THIS_FIELD_IS_REQUIRED')) : Yup.string(), practitioner_lastname: Yup.string() .required(I18n.t('THIS_FIELD_IS_REQUIRED')), @@ -745,7 +745,7 @@ const SaisirFeuilleSoinScreen = ({ onSwipeComplete={() => { setModalVisible(false); }} - swipeDirection={['down']} + swipeDirection={null} style={styles.bottomModal}> - + {values.code_acte !== '' ? + values.code_acte.billing_type !== 'PACKAGE' && + : + null + } { setModalVisible(false); }} - swipeDirection={['down']} + swipeDirection={null} style={styles.bottomModal}>