before switching to release

This commit is contained in:
Brice Zele 2022-04-04 18:47:36 +01:00
parent 9ef4ebf19f
commit 66fbbe0bf4
14 changed files with 2255 additions and 2669 deletions

View File

@ -1,44 +1,44 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.ilinktest"> package="com.ilinktest">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CALL_PHONE" /> <uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-sdk tools:overrideLibrary="com.shazam.android.widget.text.reflow" /> <uses-sdk tools:overrideLibrary="com.shazam.android.widget.text.reflow"/>
<application <application
android:name=".MainApplication" android:name=".MainApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:largeHeap="true" android:largeHeap="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme">
<meta-data <meta-data
android:name="com.google.android.geo.API_KEY" android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCz4B9uUu3gkuu78Sf72gPWZ3t_qKqf5zg" /> android:value="AIzaSyCz4B9uUu3gkuu78Sf72gPWZ3t_qKqf5zg"/>
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:launchMode="singleTask" android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
</application> </application>
</manifest> </manifest>

File diff suppressed because one or more lines are too long

View File

@ -37,7 +37,7 @@
"AMOUNT_LABEL": "Montant", "AMOUNT_LABEL": "Montant",
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant", "AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire", "DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur", "ERROR_LABEL": "Message d'information",
"NO_BANK_AVAILABLE": "Aucune banque disponible", "NO_BANK_AVAILABLE": "Aucune banque disponible",
"BANK_LIST": "Liste des banques", "BANK_LIST": "Liste des banques",
"NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible", "NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible",
@ -336,7 +336,7 @@
"english": "Anglais" "english": "Anglais"
}, },
"ERROR_FILTER": "Erreur survenue lors du filtre", "ERROR_FILTER": "Erreur survenue lors du filtre",
"ERROR_LABLE": "Erreur", "ERROR_LABLE": "Information",
"ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions", "ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions",
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible", "TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.", "ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
@ -601,7 +601,7 @@
"BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté", "BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté",
"NUMBER_OF_MONTHS": "Nbre de mois", "NUMBER_OF_MONTHS": "Nbre de mois",
"MINIMUM_AMOUNT": "Montant min.", "MINIMUM_AMOUNT": "Montant min.",
"AMOUNT_PER_MONTH": "Montant par durée de couverture", "AMOUNT_PER_MONTH": "Type d'assurance",
"DETAIL": "Détail", "DETAIL": "Détail",
"PRIME_AMOUNT": "Montant de la prime", "PRIME_AMOUNT": "Montant de la prime",
"AYANT_DROIT": "Ayant(s) droit(s)", "AYANT_DROIT": "Ayant(s) droit(s)",
@ -717,5 +717,13 @@
"INFORMATION_MESSAGE": "Message d'information", "INFORMATION_MESSAGE": "Message d'information",
"MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé", "MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé",
"MONTANT_ASSURANCE_RESTANTE": "Montant de l'assurance restante", "MONTANT_ASSURANCE_RESTANTE": "Montant de l'assurance restante",
"NO_BENEFICIARY": "Aucun ayant droit" "NO_BENEFICIARY": "Aucun ayant droit",
"PRIME_PRINCIPAL": "Prime principal",
"IDENTIFIANT": "ID",
"FACT": "Fact.",
"MNT": "Mnt.",
"ECH": "Ech.",
"PER": "Per.",
"ASSURE_SUSPENDU": "Cet assuré est suspendu",
"ASSURE_PRINCIPAL_SUSPENDU": "L'assuré principal est suspendu"
} }

View File

@ -8,6 +8,7 @@
import InsuranceActions from './insurance.type'; import InsuranceActions from './insurance.type';
import { import {
autorisationCareRequestUrl, autorisationCareRequestUrl,
buyInsuranceUrl,
checkInsuranceCoverageAmountUrl, checkInsuranceCoverageAmountUrl,
consultationUrl, consultationUrl,
createConsultationUrl, createConsultationUrl,
@ -176,7 +177,7 @@ export const fetchGetSubscriptionListError = (error: any) => ({
export const fetchGetSubscriptionList = (idUser, type, includeSubscription = true) => { export const fetchGetSubscriptionList = (idUser, type, includeSubscription = true) => {
return ApiAction({ return ApiAction({
url: includeSubscription ? `${getInsuranceListUrl}/subscriptions?user_id=${idUser}&type=${type}` : `${getInsuranceListUrl}?user_id=${idUser}&type=${type}`, url: includeSubscription ? `${buyInsuranceUrl}?user_id=${idUser}&state=${type}` : `${getInsuranceListUrl}?user_id=${idUser}&type=${type}`,
method: 'GET', method: 'GET',
onLoading: fetchGetSubscriptionListPending, onLoading: fetchGetSubscriptionListPending,
onSuccess: fetchGetSubscriptionListSuccess, onSuccess: fetchGetSubscriptionListSuccess,
@ -205,7 +206,7 @@ export const fetchActivePaySubscriptionError = (error: any) => ({
export const fetchActivePaySubscription = (id, data) => { export const fetchActivePaySubscription = (id, data) => {
return ApiAction({ return ApiAction({
url: `${subscribeInsuranceUrl}/${id}/pay`, url: `${buyInsuranceUrl}/${id}/pay`,
data, data,
method: 'PUT', method: 'PUT',
onLoading: fetchActivePaySubscriptionPending, onLoading: fetchActivePaySubscriptionPending,

View File

@ -1,26 +1,18 @@
import React, {Component} from 'react'; import React, {Component} from 'react';
import MapView, {Marker, MarkerAnimated} from "react-native-maps" import MapView from "react-native-maps"
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { import {StyleSheet, View} from 'react-native';
StyleSheet,
View,
Image,
Text,
Alert
} from 'react-native';
const theme = require("../../utils/theme");
import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions"; import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
import IMarker from "./IMarker"; import IMarker from "./IMarker";
import I18n from "react-native-i18n"; import I18n from "react-native-i18n";
import MapViewDirections from 'react-native-maps-directions'; import MapViewDirections from 'react-native-maps-directions';
import {IlinkEmitter} from "./../../utils/events";
const theme = require("../../utils/theme");
const API_KEY = "AIzaSyBUQoQYY31-S3DPp7aRRIAjEda8T2pZvJE"; const API_KEY = "AIzaSyBUQoQYY31-S3DPp7aRRIAjEda8T2pZvJE";
const mnetwork = require('./../../datas/img/png/home_network.png'); const mnetwork = require('./../../datas/img/png/home_network.png');
const othernetwork = require('./../../datas/img/png/other_net.png'); const othernetwork = require('./../../datas/img/png/other_net.png');
import {copilot, CopilotStep} from 'react-native-copilot';
import {IlinkEmitter} from "./../../utils/events";
import DeviceInfo from 'react-native-device-info';
class IMap extends Component { class IMap extends Component {

View File

@ -1,183 +1,183 @@
import React, { Component, PureComponent } from 'react'; import React, {PureComponent} from 'react';
import MapView, { Marker, MarkerAnimated, Callout, AnimatedRegion } from "react-native-maps" import {Marker} from "react-native-maps"
import PropTypes from 'prop-types'; import {Animated, Easing, Image, Platform, StyleSheet, View,} from 'react-native';
import {
StyleSheet,
View,
Image,
Animated,
Easing,
Platform,
Text,
} from 'react-native';
const userposi = require('./../../datas/img/png/user_place.png'); const userposi = require('./../../datas/img/png/user_place.png');
const mnetwork = require('./../../datas/img/png/home_network.png'); const mnetwork = require('./../../datas/img/png/home_network.png');
const othernetwork = require('./../../datas/img/png/other_net.png'); const othernetwork = require('./../../datas/img/png/other_net.png');
class IMarker extends PureComponent { class IMarker extends PureComponent {
constructor(props) { constructor(props) {
super(props) super(props)
const data = this.props.data const data = this.props.data
this.state = { this.state = {
animation: new Animated.Value(0), animation: new Animated.Value(0),
subanimation: new Animated.Value(0), subanimation: new Animated.Value(0),
coordinate: { coordinate: {
longitude: parseFloat(data.longitude), longitude: parseFloat(data.longitude),
latitude: parseFloat(data.latitude), latitude: parseFloat(data.latitude),
} }
} }
} }
componentWillReceiveProps(nextProps) {
const duration = 500 componentWillReceiveProps(nextProps) {
const oldCoord = { const duration = 500
longitude: parseFloat(this.props.data.longitude), const oldCoord = {
latitude: parseFloat(this.props.data.latitude), longitude: parseFloat(this.props.data.longitude),
} latitude: parseFloat(this.props.data.latitude),
const coord = { }
longitude: parseFloat(nextProps.data.longitude), const coord = {
latitude: parseFloat(nextProps.data.latitude), longitude: parseFloat(nextProps.data.longitude),
} latitude: parseFloat(nextProps.data.latitude),
if (oldCoord.longitude !== coord.longitude || oldCoord.latitude !== coord.latitude) { }
if (Platform.OS === 'android') { if (oldCoord.longitude !== coord.longitude || oldCoord.latitude !== coord.latitude) {
if (this.markerRef) { if (Platform.OS === 'android') {
this.markerRef._component.animateMarkerToCoordinate( if (this.markerRef) {
coord, this.markerRef._component.animateMarkerToCoordinate(
duration coord,
); duration
);
}
} else {
/*this.state.coordinate.timing({
cord,
duration
}).start();
*/
}
}
}
startAnimation() {
const initialValue = 0
const finalValue = 1
this.state.animation.setValue(initialValue); //Step 3
Animated.timing( //Step 4
this.state.animation,
{
toValue: finalValue,
duration: 500,
easing: Easing.linear(),
useNativeDriver: true
}
).start();
}
handleViewRef = ref => this.view = ref;
render() {
const {data, network, isSelected} = this.props;
const color = isSelected ? "#F48FB1A0" : "transparent"
const colorSup = isSelected ? "#F06292A0" : "transparent"
const display = isSelected ? "block" : "none";
if (data.longitude && data.latitude) {
return (
<Marker.Animated
coordinate={this.state.coordinate.longitude ? this.state.coordinate : {
longitude: data.longitude,
latitude: data.latitude
}}
id={data.id}
title={this.props.title}
ref={(re) => {
this.markerRef = re
}}
onPress={e => {
if (!this.props.isUser)
this.props.onPress(data)
}}
image={this.getImage(data)}
/>
);
}
return (<View/>)
}
error(erro) {
console.log("on error render image");
console.log(erro);
}
componentDidMount() {
}
componentDidUpdate(prevProps, prevState, snapshot) {
if (this.props.isUser)
if (this.markerRef && this.props.isNeedFocus) {
this.markerRef._component.showCallout()
}
}
getImage(data) {
const {isUser, network} = this.props;
if (isUser) {
return userposi
} else if (network && data.network === network.name) {
return mnetwork
}
return othernetwork
}
getIcon(data) {
const {isSelected} = this.props
return isSelected ? (
<Animated.View style={{
width: 32,
height: 32,
justifyContent: 'center',
alignItems: 'center',
borderRadius: 16,
backgroundColor: isSelected ? "#81D4FAA0" : "transparent",
transform: [
{
scaleX: this.animatedValue.interpolate({
inputRange: [0, 1],
outputRange: [1, 32]
})
},
{
scaleY: this.animatedValue.interpolate({
inputRange: [0, 1],
outputRange: [1, 32]
})
} }
} else { ]
/*this.state.coordinate.timing({ }}>
cord, <Image style={{alignSelf: 'center'}} source={this.getImage(data)}/>
duration </Animated.View>
}).start(); ) : (<Image style={{alignSelf: 'center'}} source={this.getImage(data)}/>);
*/}
}
}
startAnimation() {
const initialValue = 0
const finalValue = 1
this.state.animation.setValue(initialValue); //Step 3
Animated.timing( //Step 4
this.state.animation,
{
toValue: finalValue,
duration: 500,
easing: Easing.linear(),
useNativeDriver: true
}
).start();
}
handleViewRef = ref => this.view = ref;
render() {
const { data, network, isSelected } = this.props;
const color = isSelected ? "#F48FB1A0" : "transparent"
const colorSup = isSelected ? "#F06292A0" : "transparent"
const display = isSelected ? "block" : "none";
if (data.longitude && data.latitude) {
return ( }
<Marker.Animated
coordinate={this.state.coordinate.longitude ? this.state.coordinate : { longitude: data.longitude, latitude: data.latitude }}
id={data.id}
title={this.props.title}
ref={(re) => {
this.markerRef = re
}}
onPress={e => { startLoopSelectedAnimation() {
if (!this.props.isUser) const initialValue = 0
this.props.onPress(data) const finalValue = 1
}} this.state.animation.setValue(initialValue); //Step 3
image={this.getImage(data)} Animated.loop(Animated.timing( //Step 4
/> this.state.subanimation,
{
); toValue: finalValue,
} duration: 1000,
return (<View />) easing: Easing.linear(),
useNativeDriver: true
} }
error(erro) { ), {iteration: -1}).start();
console.log("on error render image"); }
console.log(erro);
}
componentDidMount() {
}
componentDidUpdate(prevProps, prevState, snapshot) {
if (this.props.isUser)
if (this.markerRef && this.props.isNeedFocus) {
this.markerRef._component.showCallout()
}
}
getImage(data) {
const { isUser, network } = this.props;
if (isUser) {
return userposi
} else if (network && data.network === network.name) {
return mnetwork
}
return othernetwork
}
getIcon(data) {
const { isSelected } = this.props
return isSelected ? (
<Animated.View style={{
width: 32,
height: 32,
justifyContent: 'center',
alignItems: 'center',
borderRadius: 16,
backgroundColor: isSelected ? "#81D4FAA0" : "transparent",
transform: [
{
scaleX: this.animatedValue.interpolate({
inputRange: [0, 1],
outputRange: [1, 32]
})
},
{
scaleY: this.animatedValue.interpolate({
inputRange: [0, 1],
outputRange: [1, 32]
})
}
]
}}>
<Image style={{ alignSelf: 'center' }} source={this.getImage(data)} />
</Animated.View>
) : (<Image style={{ alignSelf: 'center' }} source={this.getImage(data)} />);
}
startLoopSelectedAnimation() {
const initialValue = 0
const finalValue = 1
this.state.animation.setValue(initialValue); //Step 3
Animated.loop(Animated.timing( //Step 4
this.state.subanimation,
{
toValue: finalValue,
duration: 1000,
easing: Easing.linear(),
useNativeDriver: true
}
), { iteration: -1 }).start();
}
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
width: 52, width: 52,
height: 52 height: 52
}, },
ring: { ring: {}
}
}); });
export default IMarker; export default IMarker;

View File

@ -797,7 +797,13 @@ const ExecuterPrescriptionScreen = ({
]} ]}
key={item.id} key={item.id}
onPress={() => { onPress={() => {
if (item.state !== 'PAID') { if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else if (item.state !== 'PAID') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'), Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'),
[{ [{
text: I18n.t('OK'), onPress: () => { text: I18n.t('OK'), onPress: () => {
@ -833,19 +839,27 @@ const ExecuterPrescriptionScreen = ({
{item.beneficiaries.map((beneficiary) => ( {item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection} <TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => { onPress={() => {
setAssure(item); if (item.state === 'SUSPENDED') {
setBeneficiary(beneficiary); Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
setStatutPatient(0); [{
setModalListAssure(false); text: I18n.t('OK'), onPress: () => {
setFieldValue( }
'lastname_patient', }]);
beneficiary.lastname, } else {
); setAssure(item);
setFieldValue( setBeneficiary(beneficiary);
'firstname_patient', setStatutPatient(0);
beneficiary.firstname, setModalListAssure(false);
); setFieldValue(
fetchGetConsultation(item.user.id, 'TO_BILL', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`); 'lastname_patient',
beneficiary.lastname,
);
setFieldValue(
'firstname_patient',
beneficiary.firstname,
);
fetchGetConsultation(item.user.id, 'TO_BILL', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`);
}
}}> }}>
<View style={{width: 10}}/> <View style={{width: 10}}/>

View File

@ -28,7 +28,9 @@ import {ScreenComponent} from "../../../components/ScreenComponent";
import Button from "../../../components/Button"; import Button from "../../../components/Button";
import {responsiveWidth} from "react-native-responsive-dimensions"; import {responsiveWidth} from "react-native-responsive-dimensions";
import { import {
fetchActivePaySubscription, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset, fetchActivePaySubscription,
fetchCheckInsuranceCoverageAmount,
fetchCheckInsuranceCoverageAmountReset,
fetchCreateConsultation, fetchCreateConsultation,
fetchCreateConsultationReset, fetchCreateConsultationReset,
fetchExecutionPrescription, fetchExecutionPrescription,
@ -51,7 +53,8 @@ import {readUser} from "../../../webservice/AuthApi";
import TextInput from "../../../components/TextInput"; import TextInput from "../../../components/TextInput";
import {createStructuredSelector} from "reselect"; import {createStructuredSelector} from "reselect";
import { import {
selectActivatePaySubscription, selectCheckInsuranceCoverageAmount, selectActivatePaySubscription,
selectCheckInsuranceCoverageAmount,
selectExecutionPrescription, selectExecutionPrescription,
selectGetAmountConsultation, selectGetAmountConsultation,
selectGetConsultation, selectGetConsultation,
@ -277,7 +280,7 @@ const ModifierExecutionPrescriptionScreen = ({
const [beneficiary, setBeneficiary] = useState(null); const [beneficiary, setBeneficiary] = useState(null);
const [medicament, setMedicament] = useState(null); const [medicament, setMedicament] = useState(null);
const [elementToSetPrice, setElementToSetPrice] = useState(null); const [elementToSetPrice, setElementToSetPrice] = useState(null);
const [tmpSheetId, setTmpSheetId] = useState(''+Date.now()); const [tmpSheetId, setTmpSheetId] = useState('' + Date.now());
const wizard = useRef(); const wizard = useRef();
const [isFirstStep, setIsFirstStep] = useState(true); const [isFirstStep, setIsFirstStep] = useState(true);
@ -401,14 +404,14 @@ const ModifierExecutionPrescriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(getUserByNameOrNumber), Utils.getErrorMsg(getUserByNameOrNumber),
); );
dispatch(fetchGetUserByNameOrNumberReset());*/ dispatch(fetchGetUserByNameOrNumberReset());*/
} }
}, [getUserByNameOrNumber]); }, [getUserByNameOrNumber]);
@ -428,14 +431,14 @@ const ModifierExecutionPrescriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(getConsultation), Utils.getErrorMsg(getConsultation),
); );
dispatch(fetchGetConsultationReset());*/ dispatch(fetchGetConsultationReset());*/
} }
}, [getConsultation]); }, [getConsultation]);
@ -468,14 +471,14 @@ const ModifierExecutionPrescriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(modifyPrescription), Utils.getErrorMsg(modifyPrescription),
); );
dispatch(fetchModifyPrescriptionReset());*/ dispatch(fetchModifyPrescriptionReset());*/
} }
}, [modifyPrescription]); }, [modifyPrescription]);
@ -494,7 +497,7 @@ const ModifierExecutionPrescriptionScreen = ({
[ [
{ {
text: I18n.t("OK"), onPress: () => { text: I18n.t("OK"), onPress: () => {
if(elementToSetPrice.examen) { if (elementToSetPrice.examen) {
setConsultation({ setConsultation({
...consultation, ...consultation,
exams: consultation.exams.map(exam => { exams: consultation.exams.map(exam => {
@ -519,7 +522,7 @@ const ModifierExecutionPrescriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
} }
}, [checkInsuranceCoverageAmount]); }, [checkInsuranceCoverageAmount]);
@ -590,16 +593,16 @@ const ModifierExecutionPrescriptionScreen = ({
insurance_id: assure.id, insurance_id: assure.id,
beneficiary_id: beneficiary !== null ? beneficiary.id : null, beneficiary_id: beneficiary !== null ? beneficiary.id : null,
care_condition: consultation._care_condition, care_condition: consultation._care_condition,
act_id: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].act_id, act_id: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].act_id,
act_action: "UPDATE", act_action: "UPDATE",
act_type: "EXAM", act_type: "EXAM",
exams: [ exams: [
{ {
unit_price: values.price, unit_price: values.price,
quantity: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].quantity quantity: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].quantity
} }
], ],
tmp_sheet_id:tmpSheetId, tmp_sheet_id: tmpSheetId,
}); });
} else { } else {
setConsultation({ setConsultation({
@ -615,16 +618,16 @@ const ModifierExecutionPrescriptionScreen = ({
insurance_id: assure.id, insurance_id: assure.id,
beneficiary_id: beneficiary !== null ? beneficiary.id : null, beneficiary_id: beneficiary !== null ? beneficiary.id : null,
care_condition: consultation._care_condition, care_condition: consultation._care_condition,
act_id: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].act_id, act_id: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].act_id,
act_action: "UPDATE", act_action: "UPDATE",
act_type: "PRESCRIPTION", act_type: "PRESCRIPTION",
prescriptions: [ prescriptions: [
{ {
unit_price: values.price, unit_price: values.price,
quantity: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].quantity quantity: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].quantity
} }
], ],
tmp_sheet_id:tmpSheetId, tmp_sheet_id: tmpSheetId,
}); });
} }
}}> }}>
@ -797,11 +800,21 @@ const ModifierExecutionPrescriptionScreen = ({
<TouchableOpacity <TouchableOpacity
style={[ style={[
styles.contentActionModalBottom, styles.contentActionModalBottom,
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',}, {
borderBottomColor: Color.borderColor,
width: "100%",
flexDirection: 'column',
},
]} ]}
key={item.id} key={item.id}
onPress={() => { onPress={() => {
if (item.state !== 'PAID') { if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else if (item.state !== 'PAID') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'), Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'),
[{ [{
text: I18n.t('OK'), onPress: () => { text: I18n.t('OK'), onPress: () => {
@ -837,20 +850,27 @@ const ModifierExecutionPrescriptionScreen = ({
{item.beneficiaries.map((beneficiary) => ( {item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection} <TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => { onPress={() => {
setAssure(item); if (item.state === 'SUSPENDED') {
setBeneficiary(beneficiary); Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
setStatutPatient(0); [{
setModalListAssure(false); text: I18n.t('OK'), onPress: () => {
setFieldValue( }
'lastname_patient', }]);
beneficiary.lastname, } else {
); setAssure(item);
setFieldValue( setBeneficiary(beneficiary);
'firstname_patient', setStatutPatient(0);
beneficiary.firstname, setModalListAssure(false);
); setFieldValue(
fetchGetConsultation(item.user.id, 'UNTREATED', 'EXECUTION', `&beneficiary_id=${beneficiary.id}&network_agent_id=${wallet.network_agent_id}`); 'lastname_patient',
beneficiary.lastname,
);
setFieldValue(
'firstname_patient',
beneficiary.firstname,
);
fetchGetConsultation(item.user.id, 'UNTREATED', 'EXECUTION', `&beneficiary_id=${beneficiary.id}&network_agent_id=${wallet.network_agent_id}`);
}
}}> }}>
<View style={{width: 10}}/> <View style={{width: 10}}/>
<View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}> <View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}>
@ -1207,7 +1227,7 @@ const ModifierExecutionPrescriptionScreen = ({
switch (currentStep) { switch (currentStep) {
case 0: case 0:
console.log("values", values); console.log("values", values);
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
dispatch(fetchGetUserByNameOrNumberReset()); dispatch(fetchGetUserByNameOrNumberReset());
if (isNumeroAssureSearch) if (isNumeroAssureSearch)
fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`);

View File

@ -29,7 +29,9 @@ import {ScreenComponent} from "../../../components/ScreenComponent";
import Button from "../../../components/Button"; import Button from "../../../components/Button";
import {responsiveWidth} from "react-native-responsive-dimensions"; import {responsiveWidth} from "react-native-responsive-dimensions";
import { import {
fetchActivePaySubscription, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset, fetchActivePaySubscription,
fetchCheckInsuranceCoverageAmount,
fetchCheckInsuranceCoverageAmountReset,
fetchCreateConsultation, fetchCreateConsultation,
fetchCreateConsultationReset, fetchCreateConsultationReset,
fetchExecutionPrescription, fetchExecutionPrescription,
@ -55,7 +57,8 @@ import DropdownAlert from "react-native-dropdownalert";
import {readUser} from "../../../webservice/AuthApi"; import {readUser} from "../../../webservice/AuthApi";
import TextInput from "../../../components/TextInput"; import TextInput from "../../../components/TextInput";
import { import {
selectActivatePaySubscription, selectCheckInsuranceCoverageAmount, selectActivatePaySubscription,
selectCheckInsuranceCoverageAmount,
selectExecutionPrescription, selectExecutionPrescription,
selectGetAmountConsultation, selectGetAmountConsultation,
selectGetConsultation, selectGetConsultation,
@ -294,7 +297,7 @@ const ModifierFeuilleSoinScreen = ({
const [isNumeroAssureSearch, setIsNumeroAssureSearch] = useState(false); const [isNumeroAssureSearch, setIsNumeroAssureSearch] = useState(false);
const [isPhoneAssureSearch, setIsPhoneAssureSearch] = useState(false); const [isPhoneAssureSearch, setIsPhoneAssureSearch] = useState(false);
const [tmpSheetId, setTmpSheetId] = useState(''+Date.now()); const [tmpSheetId, setTmpSheetId] = useState('' + Date.now());
const [datePrestation, setDatePrestation] = useState('' + moment(new Date()).format('YYYY-MM-DD HH:mm')); const [datePrestation, setDatePrestation] = useState('' + moment(new Date()).format('YYYY-MM-DD HH:mm'));
const [showDatePrestation, setShowDatePrestation] = useState(false); const [showDatePrestation, setShowDatePrestation] = useState(false);
@ -446,14 +449,14 @@ const ModifierFeuilleSoinScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(getUserByNameOrNumber), Utils.getErrorMsg(getUserByNameOrNumber),
); );
dispatch(fetchGetUserByNameOrNumberReset());*/ dispatch(fetchGetUserByNameOrNumberReset());*/
} }
}, [getUserByNameOrNumber]); }, [getUserByNameOrNumber]);
@ -485,7 +488,7 @@ const ModifierFeuilleSoinScreen = ({
useEffect(() => { useEffect(() => {
if (checkInsuranceCoverageAmount.result !== null) { if (checkInsuranceCoverageAmount.result !== null) {
if (checkInsuranceCoverageAmount.result.response !== null) { if (checkInsuranceCoverageAmount.result.response !== null) {
if(consultation.performances.length >= 1) { if (consultation.performances.length >= 1) {
setModalPrestation(false); setModalPrestation(false);
Utils.displayToast(I18n.t('PRESTATION_SUCCESSFULLY_ADD')); Utils.displayToast(I18n.t('PRESTATION_SUCCESSFULLY_ADD'));
} }
@ -502,7 +505,7 @@ const ModifierFeuilleSoinScreen = ({
[ [
{ {
text: I18n.t("OK"), onPress: () => { text: I18n.t("OK"), onPress: () => {
if(consultation.performances.length >= 1) { if (consultation.performances.length >= 1) {
setConsultation({...consultation, performances: [...consultationClone.performances]}); setConsultation({...consultation, performances: [...consultationClone.performances]});
setModalPrestation(false); setModalPrestation(false);
} }
@ -510,7 +513,7 @@ const ModifierFeuilleSoinScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
} }
}, [checkInsuranceCoverageAmount]); }, [checkInsuranceCoverageAmount]);
@ -531,14 +534,14 @@ const ModifierFeuilleSoinScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(getConsultation), Utils.getErrorMsg(getConsultation),
); );
dispatch(fetchGetConsultationReset());*/ dispatch(fetchGetConsultationReset());*/
} }
}, [getConsultation]); }, [getConsultation]);
@ -571,14 +574,14 @@ const ModifierFeuilleSoinScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(modifyPrescription), Utils.getErrorMsg(modifyPrescription),
); );
dispatch(fetchModifyPrescriptionReset());*/ dispatch(fetchModifyPrescriptionReset());*/
} }
}, [modifyPrescription]); }, [modifyPrescription]);
@ -777,7 +780,7 @@ const ModifierFeuilleSoinScreen = ({
act_action: "UPDATE", act_action: "UPDATE",
act_type: "PERFORMANCE", act_type: "PERFORMANCE",
act_id: values.code_acte.id, act_id: values.code_acte.id,
tmp_sheet_id:tmpSheetId, tmp_sheet_id: tmpSheetId,
performances: [ performances: [
{ {
amount: values.amount_prestation, amount: values.amount_prestation,
@ -1057,7 +1060,7 @@ const ModifierFeuilleSoinScreen = ({
success={touched.amount_prestation && !errors.amount_prestation} success={touched.amount_prestation && !errors.amount_prestation}
touched={touched.amount_prestation} touched={touched.amount_prestation}
error={errors.amount_prestation} error={errors.amount_prestation}
onChangeText={(text)=> { onChangeText={(text) => {
setFieldValue('amount_prestation', text); setFieldValue('amount_prestation', text);
fetchGetAmountConsultation({ fetchGetAmountConsultation({
network_id: wallet.id_network, network_id: wallet.id_network,
@ -2065,12 +2068,22 @@ const ModifierFeuilleSoinScreen = ({
<TouchableOpacity <TouchableOpacity
style={[ style={[
styles.contentActionModalBottom, styles.contentActionModalBottom,
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',}, {
borderBottomColor: Color.borderColor,
width: "100%",
flexDirection: 'column',
},
]} ]}
key={item.id} key={item.id}
onPress={() => { onPress={() => {
if (item.state !== 'PAID') { if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else if (item.state !== 'PAID') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'), Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'),
[{ [{
text: I18n.t('OK'), onPress: () => { text: I18n.t('OK'), onPress: () => {
@ -2106,19 +2119,27 @@ const ModifierFeuilleSoinScreen = ({
{item.beneficiaries.map((beneficiary) => ( {item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection} <TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => { onPress={() => {
setAssure(item); if (item.state === 'SUSPENDED') {
setBeneficiary(beneficiary); Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
setStatutPatient(0); [{
setModalListAssure(false); text: I18n.t('OK'), onPress: () => {
setFieldValue( }
'lastname_patient', }]);
beneficiary.lastname, } else {
); setAssure(item);
setFieldValue( setBeneficiary(beneficiary);
'firstname_patient', setStatutPatient(0);
beneficiary.firstname, setModalListAssure(false);
); setFieldValue(
fetchGetConsultation(item.user.id, 'UNTREATED', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`); 'lastname_patient',
beneficiary.lastname,
);
setFieldValue(
'firstname_patient',
beneficiary.firstname,
);
fetchGetConsultation(item.user.id, 'UNTREATED', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`);
}
}}> }}>
<View style={{width: 10}}/> <View style={{width: 10}}/>
<View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}> <View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}>
@ -2530,7 +2551,7 @@ const ModifierFeuilleSoinScreen = ({
switch (currentStep) { switch (currentStep) {
case 0: case 0:
console.log("values", values); console.log("values", values);
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) { if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
dispatch(fetchGetUserByNameOrNumberReset()); dispatch(fetchGetUserByNameOrNumberReset());
if (isNumeroAssureSearch) if (isNumeroAssureSearch)
fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`); fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`);
@ -2744,16 +2765,16 @@ const ModifierFeuilleSoinScreen = ({
<Animatable.View ref={(comp) => { <Animatable.View ref={(comp) => {
classificationRef = comp classificationRef = comp
}} }}
style={{ style={{
width: responsiveWidth(90), width: responsiveWidth(90),
height: 60, height: 60,
alignSelf: 'center', alignSelf: 'center',
borderRadius: 10, borderRadius: 10,
paddingLeft: 20, paddingLeft: 20,
marginTop: 10, marginTop: 10,
paddingRight: 20, paddingRight: 20,
backgroundColor: 'white' backgroundColor: 'white'
}}> }}>
<Dropdown <Dropdown
label={I18n.t('CONDITION_PRISE_CHARGE')} label={I18n.t('CONDITION_PRISE_CHARGE')}
value={historyItemDetail !== null ? historyItemDetail.care_condition : ''} value={historyItemDetail !== null ? historyItemDetail.care_condition : ''}

View File

@ -1420,7 +1420,13 @@ const SaisirFeuilleSoinScreen = ({
]} ]}
key={item.id} key={item.id}
onPress={() => { onPress={() => {
if (item.state !== 'PAID') { if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else if (item.state !== 'PAID') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'), Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_NON_EN_REGLE'),
[{ [{
text: I18n.t('OK'), onPress: () => { text: I18n.t('OK'), onPress: () => {
@ -1457,21 +1463,29 @@ const SaisirFeuilleSoinScreen = ({
{item.beneficiaries.map((beneficiary) => ( {item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection} <TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => { onPress={() => {
setAssure(item); if (item.state === 'SUSPENDED') {
setBeneficiary(beneficiary); Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
setStatutPatient(0); [{
setModalListAssure(false); text: I18n.t('OK'), onPress: () => {
setFieldValue( }
'lastname_patient', }]);
beneficiary.lastname, } else {
); setAssure(item);
setFieldValue( setBeneficiary(beneficiary);
'firstname_patient', setStatutPatient(0);
beneficiary.firstname, setModalListAssure(false);
); setFieldValue(
fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.user.id}&beneficiary_id=${beneficiary.id}`); 'lastname_patient',
dispatch(fetchGetUserByNameOrNumberReset()); beneficiary.lastname,
wizard.current.next(); );
setFieldValue(
'firstname_patient',
beneficiary.firstname,
);
fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.user.id}&beneficiary_id=${beneficiary.id}`);
dispatch(fetchGetUserByNameOrNumberReset());
wizard.current.next();
}
}}> }}>
<View style={{width: 10}}/> <View style={{width: 10}}/>
<View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}> <View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}>

View File

@ -20,7 +20,7 @@ import FontAwesome from "react-native-vector-icons/FontAwesome";
import {responsiveWidth} from "react-native-responsive-dimensions"; import {responsiveWidth} from "react-native-responsive-dimensions";
import { import {
fetchActivePaySubscription, fetchActivePaySubscription,
fetchActivePaySubscriptionReset, fetchCreateConsultationReset, fetchActivePaySubscriptionReset,
fetchGetSubscriptionList, fetchGetSubscriptionList,
fetchGetSubscriptionListReset fetchGetSubscriptionListReset
} from "../../../redux/insurance/insurance.actions"; } from "../../../redux/insurance/insurance.actions";
@ -202,7 +202,7 @@ const ActivateBuySubscriptionScreen = ({
useEffect(() => { useEffect(() => {
if (user !== null) { if (user !== null) {
console.log("user", user.id); console.log("user", user.id);
fetchGetSubscriptionList(user.id, 'ACCEPTED', true); fetchGetSubscriptionList(user.id, 'UNPAID', true);
} }
}, [user]); }, [user]);
@ -226,14 +226,14 @@ const ActivateBuySubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(subscriptionList), Utils.getErrorMsg(subscriptionList),
); );
dispatch(fetchGetSubscriptionListReset());*/ dispatch(fetchGetSubscriptionListReset());*/
} }
}, [subscriptionList]); }, [subscriptionList]);
@ -266,14 +266,14 @@ const ActivateBuySubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(activatePaySubscription), Utils.getErrorMsg(activatePaySubscription),
); );
dispatch(fetchActivePaySubscriptionReset());*/ dispatch(fetchActivePaySubscriptionReset());*/
} }
}, [activatePaySubscription]); }, [activatePaySubscription]);
@ -358,7 +358,7 @@ const ActivateBuySubscriptionScreen = ({
return value return value
}} }}
labelExtractor={(value) => { labelExtractor={(value) => {
return `${value.network.name} | ${I18n.t('ETAT')}: ${value.state} | ${I18n.t('AMOUNT_LABEL')}: ${value.total_bonus_amount}` return `${I18n.t('MNT')}: ${value.amount} | ${I18n.t('FACT')}: ${value.invoice_id.slice(0,7)} | ${I18n.t('ECH')}: ${value.deadline_number}`
}} }}
/> />
</Animatable.View> </Animatable.View>

View File

@ -36,7 +36,6 @@ import {responsiveWidth} from "react-native-responsive-dimensions";
import SwitchSelector from "react-native-switch-selector"; import SwitchSelector from "react-native-switch-selector";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
import { import {
fetchGetConsultationReset,
fetchGetInsurancePrimeAmount, fetchGetInsurancePrimeAmount,
fetchGetInsurancePrimeAmountReset, fetchGetInsurancePrimeAmountReset,
fetchGetListInsurance, fetchGetListInsurance,
@ -302,14 +301,14 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(insuranceList), Utils.getErrorMsg(insuranceList),
); );
dispatch(fetchGetListInsuranceReset());*/ dispatch(fetchGetListInsuranceReset());*/
} }
}, [insuranceList]); }, [insuranceList]);
@ -342,14 +341,14 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(subscribeInsurance), Utils.getErrorMsg(subscribeInsurance),
); );
dispatch(fetchSubscribeInsuranceReset());*/ dispatch(fetchSubscribeInsuranceReset());*/
} }
}, [subscribeInsurance]); }, [subscribeInsurance]);
@ -368,14 +367,14 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(insurancePrimeAmount), Utils.getErrorMsg(insurancePrimeAmount),
); );
dispatch(fetchGetInsurancePrimeAmountReset());*/ dispatch(fetchGetInsurancePrimeAmountReset());*/
} }
}, [insurancePrimeAmount]); }, [insurancePrimeAmount]);
@ -398,13 +397,13 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
I18n.t('NUMBER_MAX_BENEFICIARY'), I18n.t('NUMBER_MAX_BENEFICIARY'),
);*/ );*/
} else { } else {
console.log("affiliation", affiliation); console.log("affiliation", affiliation);
let beneficiariesTemp = beneficiaries; let beneficiariesTemp = beneficiaries;
@ -443,14 +442,14 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
Utils.getErrorMsg(uploadInsuranceImages), Utils.getErrorMsg(uploadInsuranceImages),
); );
dispatch(fetchUploadInsuranceReset());*/ dispatch(fetchUploadInsuranceReset());*/
} }
}, [uploadInsuranceImages]); }, [uploadInsuranceImages]);
@ -636,8 +635,13 @@ const InsuranceSubscriptionScreen = ({
months_prices: insuranceTemp.months_prices.map(item => { months_prices: insuranceTemp.months_prices.map(item => {
return { return {
id: item.id, id: item.id,
number_of_months: item.number_of_months, child_prices: item.child_prices,
max_insurance_coverage_amount: item.max_insurance_coverage_amount,
min_amount: item.min_amount, min_amount: item.min_amount,
number_of_fractions: item.number_of_fractions,
number_of_months: item.number_of_months,
payment_period: item.payment_period,
dealine_amount: item.dealine_amount,
checked: item.id === selected.id, checked: item.id === selected.id,
}; };
}) })
@ -1072,8 +1076,13 @@ const InsuranceSubscriptionScreen = ({
months_prices: value.months_prices.map((item, index) => { months_prices: value.months_prices.map((item, index) => {
return { return {
id: item.id, id: item.id,
number_of_months: item.number_of_months, child_prices: item.child_prices,
dealine_amount: item.dealine_amount,
max_insurance_coverage_amount: item.max_insurance_coverage_amount,
min_amount: item.min_amount, min_amount: item.min_amount,
number_of_fractions: item.number_of_fractions,
number_of_months: item.number_of_months,
payment_period: item.payment_period,
checked: index === 0, checked: index === 0,
}; };
}) })
@ -1145,8 +1154,8 @@ const InsuranceSubscriptionScreen = ({
<Dropdown <Dropdown
label={I18n.t('AMOUNT_PER_MONTH')} label={I18n.t('AMOUNT_PER_MONTH')}
value={amountPerMonth !== null value={amountPerMonth !== null
? `${I18n.t('NUMBER_OF_MONTHS')}: ${amountPerMonth.number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${amountPerMonth.min_amount}` ? `${I18n.t('PRIME_PRINCIPAL')}: ${amountPerMonth.min_amount} | ${amountPerMonth.payment_period} | ${I18n.t('ECH')}: ${amountPerMonth.number_of_fractions}`
: `${I18n.t('NUMBER_OF_MONTHS')}: ${insurance.months_prices[0].number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${insurance.months_prices[0].min_amount}` : ``
} }
data={insurance.months_prices.map((item, index) => ({ data={insurance.months_prices.map((item, index) => ({
checked: !isNil(item.checked) ? item.checked : index === 0, checked: !isNil(item.checked) ? item.checked : index === 0,
@ -1159,10 +1168,10 @@ const InsuranceSubscriptionScreen = ({
onSelectAmountPerMonth(data[index]); onSelectAmountPerMonth(data[index]);
}} }}
valueExtractor={(value) => { valueExtractor={(value) => {
return `${I18n.t('NUMBER_OF_MONTHS')}: ${value.number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${value.min_amount}` return `${I18n.t('PRIME_PRINCIPAL')}: ${value.min_amount} | ${value.payment_period} | ${I18n.t('ECH')}: ${value.number_of_fractions}`
}} }}
labelExtractor={(value) => { labelExtractor={(value) => {
return `${I18n.t('NUMBER_OF_MONTHS')}: ${value.number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${value.min_amount}` return `${I18n.t('PRIME_PRINCIPAL')}: ${value.min_amount} | ${value.payment_period} | ${I18n.t('ECH')}: ${value.number_of_fractions}`
}} }}
/> />
</Animatable.View> </Animatable.View>
@ -1193,7 +1202,7 @@ const InsuranceSubscriptionScreen = ({
{`${I18n.t('NUMBER_OF_MONTHS')}: ${item.number_of_months}`} {`${I18n.t('NUMBER_OF_MONTHS')}: ${item.number_of_months}`}
</Text> </Text>
<Text body2 primaryColor={item.checked}> <Text body2 primaryColor={item.checked}>
{`${I18n.t('MINIMUM_AMOUNT')}: ${item.min_amount}`} {`${I18n.t('PRIME_PRINCIPAL')}: ${item.min_amount}`}
</Text> </Text>
</View> </View>
{item.checked && ( {item.checked && (
@ -1240,13 +1249,13 @@ const InsuranceSubscriptionScreen = ({
} }
} }
], ],
{ cancelable: false } {cancelable: false}
); );
/* dropDownAlertRef.alertWithType( /* dropDownAlertRef.alertWithType(
'error', 'error',
I18n.t('ERROR_LABEL'), I18n.t('ERROR_LABEL'),
I18n.t('PLEASE_SELECT_INSURANCE_BEFORE'), I18n.t('PLEASE_SELECT_INSURANCE_BEFORE'),
);*/ );*/
} else { } else {
setModalVisible(true); setModalVisible(true);
setShowDateNaissancePicker(false); setShowDateNaissancePicker(false);

View File

@ -37,7 +37,7 @@
"AMOUNT_LABEL": "Montant", "AMOUNT_LABEL": "Montant",
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant", "AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire", "DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur", "ERROR_LABEL": "Message d'information",
"NO_BANK_AVAILABLE": "Aucune banque disponible", "NO_BANK_AVAILABLE": "Aucune banque disponible",
"BANK_LIST": "Liste des banques", "BANK_LIST": "Liste des banques",
"NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible", "NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible",
@ -336,7 +336,7 @@
"english": "Anglais" "english": "Anglais"
}, },
"ERROR_FILTER": "Erreur survenue lors du filtre", "ERROR_FILTER": "Erreur survenue lors du filtre",
"ERROR_LABLE": "Erreur", "ERROR_LABLE": "Information",
"ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions", "ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions",
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible", "TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.", "ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
@ -601,7 +601,7 @@
"BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté", "BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté",
"NUMBER_OF_MONTHS": "Nbre de mois", "NUMBER_OF_MONTHS": "Nbre de mois",
"MINIMUM_AMOUNT": "Montant min.", "MINIMUM_AMOUNT": "Montant min.",
"AMOUNT_PER_MONTH": "Montant par durée de couverture", "AMOUNT_PER_MONTH": "Type d'assurance",
"DETAIL": "Détail", "DETAIL": "Détail",
"PRIME_AMOUNT": "Montant de la prime", "PRIME_AMOUNT": "Montant de la prime",
"AYANT_DROIT": "Ayant(s) droit(s)", "AYANT_DROIT": "Ayant(s) droit(s)",
@ -717,5 +717,13 @@
"INFORMATION_MESSAGE": "Message d'information", "INFORMATION_MESSAGE": "Message d'information",
"MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé", "MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé",
"MONTANT_ASSURANCE_RESTANTE": "Montant de l'assurance restante", "MONTANT_ASSURANCE_RESTANTE": "Montant de l'assurance restante",
"NO_BENEFICIARY": "Aucun ayant droit" "NO_BENEFICIARY": "Aucun ayant droit",
"PRIME_PRINCIPAL": "Prime principal",
"IDENTIFIANT": "ID",
"FACT": "Fact.",
"MNT": "Mnt.",
"ECH": "Ech.",
"PER": "Per.",
"ASSURE_SUSPENDU": "Cet assuré est suspendu",
"ASSURE_PRINCIPAL_SUSPENDU": "L'assuré principal est suspendu"
} }

View File

@ -1,5 +1,3 @@
import {fetchCheckInsuranceCoverageAmountPending} from "../redux/insurance/insurance.actions";
export const isDebugMode = false export const isDebugMode = false
//base url test //base url test
//export const baseUrl = "https://ilink-app.com/mobilebackendbeta" //export const baseUrl = "https://ilink-app.com/mobilebackendbeta"
@ -92,6 +90,7 @@ export const getUserByIdQRCodeUrl = testBaseUrl + '/walletService/qrcode/read';
export const getUserByNameOrNumberUrl = testBaseUrl + '/nanoSanteService/insured'; export const getUserByNameOrNumberUrl = testBaseUrl + '/nanoSanteService/insured';
export const getDrugAndDevicesUrl = testBaseUrl + '/nanoSanteService/drugs-and-devices'; export const getDrugAndDevicesUrl = testBaseUrl + '/nanoSanteService/drugs-and-devices';
export const subscribeInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions'; export const subscribeInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions';
export const buyInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances/invoices';
export const getProviderClassUrl = testBaseUrl + '/nanoSanteService/provider-classes'; export const getProviderClassUrl = testBaseUrl + '/nanoSanteService/provider-classes';
export const getNetworkActsUrl = testBaseUrl + '/nanoSanteService/acts'; export const getNetworkActsUrl = testBaseUrl + '/nanoSanteService/acts';
export const createConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/consultation'; export const createConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/consultation';
@ -100,8 +99,8 @@ export const consultationUrl = testBaseUrl + '/nanoSanteService/health-care-shee
export const getAmountConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/performances-amount'; export const getAmountConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/performances-amount';
export const getInsurancePrimeAmountUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions/bonus-amount'; export const getInsurancePrimeAmountUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions/bonus-amount';
export const autorisationCareRequestUrl = testBaseUrl + '/nanoSanteService/authorizations-care-requests'; export const autorisationCareRequestUrl = testBaseUrl + '/nanoSanteService/authorizations-care-requests';
export const uploadInsuranceImagetUrl = testBaseUrlWithPort + '/insurances/subscriptions/upload-images'; export const uploadInsuranceImagetUrl = testBaseUrlWithPort + '/insurances/subscriptions/upload-images';
export const pdfViewerUrl = testBaseUrlWithPort + '/pdf-viewer'; export const pdfViewerUrl = testBaseUrlWithPort + '/pdf-viewer';
export const authKeyUrl = testBaseUrl + '/oauth/token'; export const authKeyUrl = testBaseUrl + '/oauth/token';
export const videoUrl = "https://www.youtube.com/watch?v=wwGPDPsSLWY"; export const videoUrl = "https://www.youtube.com/watch?v=wwGPDPsSLWY";