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

File diff suppressed because one or more lines are too long

View File

@ -37,7 +37,7 @@
"AMOUNT_LABEL": "Montant",
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur",
"ERROR_LABEL": "Message d'information",
"NO_BANK_AVAILABLE": "Aucune banque disponible",
"BANK_LIST": "Liste des banques",
"NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible",
@ -336,7 +336,7 @@
"english": "Anglais"
},
"ERROR_FILTER": "Erreur survenue lors du filtre",
"ERROR_LABLE": "Erreur",
"ERROR_LABLE": "Information",
"ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions",
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
@ -601,7 +601,7 @@
"BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté",
"NUMBER_OF_MONTHS": "Nbre de mois",
"MINIMUM_AMOUNT": "Montant min.",
"AMOUNT_PER_MONTH": "Montant par durée de couverture",
"AMOUNT_PER_MONTH": "Type d'assurance",
"DETAIL": "Détail",
"PRIME_AMOUNT": "Montant de la prime",
"AYANT_DROIT": "Ayant(s) droit(s)",
@ -717,5 +717,13 @@
"INFORMATION_MESSAGE": "Message d'information",
"MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé",
"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 {
autorisationCareRequestUrl,
buyInsuranceUrl,
checkInsuranceCoverageAmountUrl,
consultationUrl,
createConsultationUrl,
@ -176,7 +177,7 @@ export const fetchGetSubscriptionListError = (error: any) => ({
export const fetchGetSubscriptionList = (idUser, type, includeSubscription = true) => {
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',
onLoading: fetchGetSubscriptionListPending,
onSuccess: fetchGetSubscriptionListSuccess,
@ -205,7 +206,7 @@ export const fetchActivePaySubscriptionError = (error: any) => ({
export const fetchActivePaySubscription = (id, data) => {
return ApiAction({
url: `${subscribeInsuranceUrl}/${id}/pay`,
url: `${buyInsuranceUrl}/${id}/pay`,
data,
method: 'PUT',
onLoading: fetchActivePaySubscriptionPending,

View File

@ -1,26 +1,18 @@
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 {
StyleSheet,
View,
Image,
Text,
Alert
} from 'react-native';
const theme = require("../../utils/theme");
import {StyleSheet, View} from 'react-native';
import {responsiveHeight, responsiveWidth} from "react-native-responsive-dimensions";
import IMarker from "./IMarker";
import I18n from "react-native-i18n";
import MapViewDirections from 'react-native-maps-directions';
import {IlinkEmitter} from "./../../utils/events";
const theme = require("../../utils/theme");
const API_KEY = "AIzaSyBUQoQYY31-S3DPp7aRRIAjEda8T2pZvJE";
const mnetwork = require('./../../datas/img/png/home_network.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 {

View File

@ -1,18 +1,11 @@
import React, { Component, PureComponent } from 'react';
import MapView, { Marker, MarkerAnimated, Callout, AnimatedRegion } from "react-native-maps"
import PropTypes from 'prop-types';
import {
StyleSheet,
View,
Image,
Animated,
Easing,
Platform,
Text,
} from 'react-native';
import React, {PureComponent} from 'react';
import {Marker} from "react-native-maps"
import {Animated, Easing, Image, Platform, StyleSheet, View,} from 'react-native';
const userposi = require('./../../datas/img/png/user_place.png');
const mnetwork = require('./../../datas/img/png/home_network.png');
const othernetwork = require('./../../datas/img/png/other_net.png');
class IMarker extends PureComponent {
constructor(props) {
super(props)
@ -26,6 +19,7 @@ class IMarker extends PureComponent {
}
}
}
componentWillReceiveProps(nextProps) {
const duration = 500
const oldCoord = {
@ -49,9 +43,11 @@ class IMarker extends PureComponent {
cord,
duration
}).start();
*/}
*/
}
}
}
startAnimation() {
const initialValue = 0
const finalValue = 1
@ -66,7 +62,9 @@ class IMarker extends PureComponent {
}
).start();
}
handleViewRef = ref => this.view = ref;
render() {
const {data, network, isSelected} = this.props;
const color = isSelected ? "#F48FB1A0" : "transparent"
@ -76,7 +74,10 @@ class IMarker extends PureComponent {
return (
<Marker.Animated
coordinate={this.state.coordinate.longitude ? this.state.coordinate : { longitude: data.longitude, latitude: data.latitude }}
coordinate={this.state.coordinate.longitude ? this.state.coordinate : {
longitude: data.longitude,
latitude: data.latitude
}}
id={data.id}
title={this.props.title}
ref={(re) => {
@ -95,6 +96,7 @@ class IMarker extends PureComponent {
return (<View/>)
}
error(erro) {
console.log("on error render image");
console.log(erro);
@ -175,9 +177,7 @@ const styles = StyleSheet.create({
width: 52,
height: 52
},
ring: {
}
ring: {}
});
export default IMarker;

View File

@ -797,7 +797,13 @@ const ExecuterPrescriptionScreen = ({
]}
key={item.id}
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'),
[{
text: I18n.t('OK'), onPress: () => {
@ -833,6 +839,13 @@ const ExecuterPrescriptionScreen = ({
{item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => {
if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else {
setAssure(item);
setBeneficiary(beneficiary);
setStatutPatient(0);
@ -846,6 +859,7 @@ const ExecuterPrescriptionScreen = ({
beneficiary.firstname,
);
fetchGetConsultation(item.user.id, 'TO_BILL', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`);
}
}}>
<View style={{width: 10}}/>

View File

@ -28,7 +28,9 @@ import {ScreenComponent} from "../../../components/ScreenComponent";
import Button from "../../../components/Button";
import {responsiveWidth} from "react-native-responsive-dimensions";
import {
fetchActivePaySubscription, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset,
fetchActivePaySubscription,
fetchCheckInsuranceCoverageAmount,
fetchCheckInsuranceCoverageAmountReset,
fetchCreateConsultation,
fetchCreateConsultationReset,
fetchExecutionPrescription,
@ -51,7 +53,8 @@ import {readUser} from "../../../webservice/AuthApi";
import TextInput from "../../../components/TextInput";
import {createStructuredSelector} from "reselect";
import {
selectActivatePaySubscription, selectCheckInsuranceCoverageAmount,
selectActivatePaySubscription,
selectCheckInsuranceCoverageAmount,
selectExecutionPrescription,
selectGetAmountConsultation,
selectGetConsultation,
@ -797,11 +800,21 @@ const ModifierExecutionPrescriptionScreen = ({
<TouchableOpacity
style={[
styles.contentActionModalBottom,
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',},
{
borderBottomColor: Color.borderColor,
width: "100%",
flexDirection: 'column',
},
]}
key={item.id}
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'),
[{
text: I18n.t('OK'), onPress: () => {
@ -837,6 +850,13 @@ const ModifierExecutionPrescriptionScreen = ({
{item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => {
if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else {
setAssure(item);
setBeneficiary(beneficiary);
setStatutPatient(0);
@ -850,7 +870,7 @@ const ModifierExecutionPrescriptionScreen = ({
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={{paddingHorizontal: 10, alignItems: 'flex-start'}}>

View File

@ -29,7 +29,9 @@ import {ScreenComponent} from "../../../components/ScreenComponent";
import Button from "../../../components/Button";
import {responsiveWidth} from "react-native-responsive-dimensions";
import {
fetchActivePaySubscription, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset,
fetchActivePaySubscription,
fetchCheckInsuranceCoverageAmount,
fetchCheckInsuranceCoverageAmountReset,
fetchCreateConsultation,
fetchCreateConsultationReset,
fetchExecutionPrescription,
@ -55,7 +57,8 @@ import DropdownAlert from "react-native-dropdownalert";
import {readUser} from "../../../webservice/AuthApi";
import TextInput from "../../../components/TextInput";
import {
selectActivatePaySubscription, selectCheckInsuranceCoverageAmount,
selectActivatePaySubscription,
selectCheckInsuranceCoverageAmount,
selectExecutionPrescription,
selectGetAmountConsultation,
selectGetConsultation,
@ -2065,12 +2068,22 @@ const ModifierFeuilleSoinScreen = ({
<TouchableOpacity
style={[
styles.contentActionModalBottom,
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',},
{
borderBottomColor: Color.borderColor,
width: "100%",
flexDirection: 'column',
},
]}
key={item.id}
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'),
[{
text: I18n.t('OK'), onPress: () => {
@ -2106,6 +2119,13 @@ const ModifierFeuilleSoinScreen = ({
{item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => {
if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else {
setAssure(item);
setBeneficiary(beneficiary);
setStatutPatient(0);
@ -2119,6 +2139,7 @@ const ModifierFeuilleSoinScreen = ({
beneficiary.firstname,
);
fetchGetConsultation(item.user.id, 'UNTREATED', 'CONSULTATION', `&beneficiary_id=${beneficiary.id}`);
}
}}>
<View style={{width: 10}}/>
<View style={{paddingHorizontal: 10, alignItems: 'flex-start'}}>

View File

@ -1420,7 +1420,13 @@ const SaisirFeuilleSoinScreen = ({
]}
key={item.id}
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'),
[{
text: I18n.t('OK'), onPress: () => {
@ -1457,6 +1463,13 @@ const SaisirFeuilleSoinScreen = ({
{item.beneficiaries.map((beneficiary) => (
<TouchableOpacity style={styles.beneficiarySubSection}
onPress={() => {
if (item.state === 'SUSPENDED') {
Alert.alert(I18n.t('ERROR_LABEL'), I18n.t('ASSURE_PRINCIPAL_SUSPENDU'),
[{
text: I18n.t('OK'), onPress: () => {
}
}]);
} else {
setAssure(item);
setBeneficiary(beneficiary);
setStatutPatient(0);
@ -1472,6 +1485,7 @@ const SaisirFeuilleSoinScreen = ({
fetchGetNetworkActs(wallet.id_network, '', `&user_id=${item.user.id}&beneficiary_id=${beneficiary.id}`);
dispatch(fetchGetUserByNameOrNumberReset());
wizard.current.next();
}
}}>
<View style={{width: 10}}/>
<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 {
fetchActivePaySubscription,
fetchActivePaySubscriptionReset, fetchCreateConsultationReset,
fetchActivePaySubscriptionReset,
fetchGetSubscriptionList,
fetchGetSubscriptionListReset
} from "../../../redux/insurance/insurance.actions";
@ -202,7 +202,7 @@ const ActivateBuySubscriptionScreen = ({
useEffect(() => {
if (user !== null) {
console.log("user", user.id);
fetchGetSubscriptionList(user.id, 'ACCEPTED', true);
fetchGetSubscriptionList(user.id, 'UNPAID', true);
}
}, [user]);
@ -358,7 +358,7 @@ const ActivateBuySubscriptionScreen = ({
return 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>

View File

@ -36,7 +36,6 @@ import {responsiveWidth} from "react-native-responsive-dimensions";
import SwitchSelector from "react-native-switch-selector";
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
import {
fetchGetConsultationReset,
fetchGetInsurancePrimeAmount,
fetchGetInsurancePrimeAmountReset,
fetchGetListInsurance,
@ -636,8 +635,13 @@ const InsuranceSubscriptionScreen = ({
months_prices: insuranceTemp.months_prices.map(item => {
return {
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,
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,
};
})
@ -1072,8 +1076,13 @@ const InsuranceSubscriptionScreen = ({
months_prices: value.months_prices.map((item, index) => {
return {
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,
number_of_fractions: item.number_of_fractions,
number_of_months: item.number_of_months,
payment_period: item.payment_period,
checked: index === 0,
};
})
@ -1145,8 +1154,8 @@ const InsuranceSubscriptionScreen = ({
<Dropdown
label={I18n.t('AMOUNT_PER_MONTH')}
value={amountPerMonth !== null
? `${I18n.t('NUMBER_OF_MONTHS')}: ${amountPerMonth.number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${amountPerMonth.min_amount}`
: `${I18n.t('NUMBER_OF_MONTHS')}: ${insurance.months_prices[0].number_of_months} | ${I18n.t('MINIMUM_AMOUNT')}: ${insurance.months_prices[0].min_amount}`
? `${I18n.t('PRIME_PRINCIPAL')}: ${amountPerMonth.min_amount} | ${amountPerMonth.payment_period} | ${I18n.t('ECH')}: ${amountPerMonth.number_of_fractions}`
: ``
}
data={insurance.months_prices.map((item, index) => ({
checked: !isNil(item.checked) ? item.checked : index === 0,
@ -1159,10 +1168,10 @@ const InsuranceSubscriptionScreen = ({
onSelectAmountPerMonth(data[index]);
}}
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) => {
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>
@ -1193,7 +1202,7 @@ const InsuranceSubscriptionScreen = ({
{`${I18n.t('NUMBER_OF_MONTHS')}: ${item.number_of_months}`}
</Text>
<Text body2 primaryColor={item.checked}>
{`${I18n.t('MINIMUM_AMOUNT')}: ${item.min_amount}`}
{`${I18n.t('PRIME_PRINCIPAL')}: ${item.min_amount}`}
</Text>
</View>
{item.checked && (

View File

@ -37,7 +37,7 @@
"AMOUNT_LABEL": "Montant",
"AMOUNT_LABEL_DESCRIPTION": "Veuillez saisir le montant",
"DESTINATAIRE": "Destinataire",
"ERROR_LABEL": "Erreur",
"ERROR_LABEL": "Message d'information",
"NO_BANK_AVAILABLE": "Aucune banque disponible",
"BANK_LIST": "Liste des banques",
"NO_OPERATOR_AVAILABLE": "Aucun opérateur disponible",
@ -336,7 +336,7 @@
"english": "Anglais"
},
"ERROR_FILTER": "Erreur survenue lors du filtre",
"ERROR_LABLE": "Erreur",
"ERROR_LABLE": "Information",
"ERROR_TRANSFER_COMMISSION": "Erreur de transfert des commissions",
"TRANSFER_COMMISSION_IMPOSSIBLE": "Transfert des commissions impossible",
"ERROR_FILTER_TEXT": "Probleme rencontré lors du filtrage.",
@ -601,7 +601,7 @@
"BENEFICIARY_SUCCESSFULLY_ADDED": "L'ayant droit a été correctement ajouté",
"NUMBER_OF_MONTHS": "Nbre de mois",
"MINIMUM_AMOUNT": "Montant min.",
"AMOUNT_PER_MONTH": "Montant par durée de couverture",
"AMOUNT_PER_MONTH": "Type d'assurance",
"DETAIL": "Détail",
"PRIME_AMOUNT": "Montant de la prime",
"AYANT_DROIT": "Ayant(s) droit(s)",
@ -717,5 +717,13 @@
"INFORMATION_MESSAGE": "Message d'information",
"MONTANT_ASSURANCE_CONSOMME": "Montant de l'assurance consommé",
"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
//base url test
//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 getDrugAndDevicesUrl = testBaseUrl + '/nanoSanteService/drugs-and-devices';
export const subscribeInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances/subscriptions';
export const buyInsuranceUrl = testBaseUrl + '/nanoSanteService/insurances/invoices';
export const getProviderClassUrl = testBaseUrl + '/nanoSanteService/provider-classes';
export const getNetworkActsUrl = testBaseUrl + '/nanoSanteService/acts';
export const createConsultationUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/consultation';