Ajout du month_price lors du renouvellement
This commit is contained in:
parent
5f6e41b3ae
commit
f1e42c4570
File diff suppressed because one or more lines are too long
|
@ -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",
|
||||||
|
@ -268,6 +268,7 @@
|
||||||
"EMETTEUR": "Emetteur",
|
"EMETTEUR": "Emetteur",
|
||||||
"FIRSTNAME_EMETTEUR": "Prénom(s) émetteur",
|
"FIRSTNAME_EMETTEUR": "Prénom(s) émetteur",
|
||||||
"EMAIL_EMETTEUR": "Email émetteur ",
|
"EMAIL_EMETTEUR": "Email émetteur ",
|
||||||
|
"PHONE_EMETTEUR": "Téléphone émetteur ",
|
||||||
"ID_DESTINATAIRE": "Identifiant destinataire ",
|
"ID_DESTINATAIRE": "Identifiant destinataire ",
|
||||||
"NUMERO_IDENTITE_EMETTEUR": "Numéro d'identité de l'émetteur",
|
"NUMERO_IDENTITE_EMETTEUR": "Numéro d'identité de l'émetteur",
|
||||||
"NAME_DESTINATAIRE": "Nom(s) destinataire",
|
"NAME_DESTINATAIRE": "Nom(s) destinataire",
|
||||||
|
@ -336,7 +337,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.",
|
||||||
|
@ -571,10 +572,10 @@
|
||||||
"RENEW_INSSURANCE": "Renouveler son assurance ",
|
"RENEW_INSSURANCE": "Renouveler son assurance ",
|
||||||
"MANAGE_ASSURANCE": "Gérer son assurance",
|
"MANAGE_ASSURANCE": "Gérer son assurance",
|
||||||
"MANAGE_HEALTH": "Gérer ses soins",
|
"MANAGE_HEALTH": "Gérer ses soins",
|
||||||
"DEMAND_AUTORIZATION_HEALTH": "Demande autorisation soin",
|
"DEMAND_AUTORIZATION_HEALTH": "Demande de prise en charge",
|
||||||
"HISTORIC_HEALTH": "Historique",
|
"HISTORIC_HEALTH": "Historique",
|
||||||
"VALID_HEALTH": "Valider un soin ",
|
"VALID_HEALTH": "Valider un soin ",
|
||||||
"ACTIVATE_INSSURANCE": "Activer son assurance",
|
"ACTIVATE_INSSURANCE": "Payer son assurance",
|
||||||
"AMOUNT_PER_DURATION": "Montant par durée",
|
"AMOUNT_PER_DURATION": "Montant par durée",
|
||||||
"AMOUNT_PRIME": "Montant de la prime",
|
"AMOUNT_PRIME": "Montant de la prime",
|
||||||
"ASSURE": "Assuré",
|
"ASSURE": "Assuré",
|
||||||
|
@ -601,7 +602,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)",
|
||||||
|
@ -628,7 +629,7 @@
|
||||||
"LONGUE": "Longue",
|
"LONGUE": "Longue",
|
||||||
"ACCIDENT": "Accident",
|
"ACCIDENT": "Accident",
|
||||||
"GROSSESSE": "Grossesse",
|
"GROSSESSE": "Grossesse",
|
||||||
"ADD_PRESTATION": "Ajouter une prestation",
|
"ADD_PRESTATION": "Ajouter une consultation",
|
||||||
"ADD_PRESCRIPTION": "Ajouter une prescription",
|
"ADD_PRESCRIPTION": "Ajouter une prescription",
|
||||||
"VISITE_DOMICILE": "Visite domicile ",
|
"VISITE_DOMICILE": "Visite domicile ",
|
||||||
"CODE_ACTE": "Code acte ",
|
"CODE_ACTE": "Code acte ",
|
||||||
|
@ -653,7 +654,7 @@
|
||||||
"CLASSE_PRESTATAIRE": "Classe de prestataire",
|
"CLASSE_PRESTATAIRE": "Classe de prestataire",
|
||||||
"FRAIS_DEPLACEMENT": "Frais de déplacement",
|
"FRAIS_DEPLACEMENT": "Frais de déplacement",
|
||||||
"AJOUTER_MEDICAMENT": "Ajouter médicament/appareil",
|
"AJOUTER_MEDICAMENT": "Ajouter médicament/appareil",
|
||||||
"AJOUTER_EXAMEN": "Ajouter examen",
|
"AJOUTER_EXAMEN": "Ajouter autre acte ou examen",
|
||||||
"NAME": "Nom",
|
"NAME": "Nom",
|
||||||
"POSOLOGIE": "Posologie",
|
"POSOLOGIE": "Posologie",
|
||||||
"QUANTITE": "Quantité",
|
"QUANTITE": "Quantité",
|
||||||
|
@ -666,7 +667,7 @@
|
||||||
"PRESCRIPTIONS_SUCCESSFULLY_ADD": "Prescription ajouté avec succès",
|
"PRESCRIPTIONS_SUCCESSFULLY_ADD": "Prescription ajouté avec succès",
|
||||||
"PRESCRIPTIONS_SUCCESSFULLY_MODIFY": "Prescription modifié avec succès",
|
"PRESCRIPTIONS_SUCCESSFULLY_MODIFY": "Prescription modifié avec succès",
|
||||||
"YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION": "Vous devez ajouter au moins une prestation",
|
"YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION": "Vous devez ajouter au moins une prestation",
|
||||||
"NO_DRUG_MATCH_YOU_SEARCH": "Aucun médicament ne correspond à votre rechercher, voulez-vous en ajouter ?",
|
"NO_DRUG_MATCH_YOU_SEARCH": "Aucun médicament ne correspond à votre recherche, voulez-vous en ajouter ?",
|
||||||
"COMPRESSED": "Comprimé",
|
"COMPRESSED": "Comprimé",
|
||||||
"SYRUP": "Sirop",
|
"SYRUP": "Sirop",
|
||||||
"SOLUTION": "Solution",
|
"SOLUTION": "Solution",
|
||||||
|
@ -689,8 +690,8 @@
|
||||||
"MODIFIER_EXAMEN": "Modifier examen",
|
"MODIFIER_EXAMEN": "Modifier examen",
|
||||||
"EXAMENS_SUCCESSFULLY_MODIFY": "Examen modifié avec succès",
|
"EXAMENS_SUCCESSFULLY_MODIFY": "Examen modifié avec succès",
|
||||||
"PRESTATION_SUCCESSFULLY_MODIFY": "Prestation modifié avec succès",
|
"PRESTATION_SUCCESSFULLY_MODIFY": "Prestation modifié avec succès",
|
||||||
"MODIFY_PRESTATION": "Modifier une prestation",
|
"MODIFY_PRESTATION": "Modifier une consultation",
|
||||||
"LIST_PRESTATION": "Liste des prestations",
|
"LIST_PRESTATION": "Liste des consultations",
|
||||||
"NO_CONSULTATION": "Aucune consultation",
|
"NO_CONSULTATION": "Aucune consultation",
|
||||||
"NO_EXECUTION": "Aucune exécution",
|
"NO_EXECUTION": "Aucune exécution",
|
||||||
"LISTE_CONSULTATION": "Liste des consultations",
|
"LISTE_CONSULTATION": "Liste des consultations",
|
||||||
|
@ -707,6 +708,8 @@
|
||||||
"DEMANDES": "Demandes",
|
"DEMANDES": "Demandes",
|
||||||
"ACTE": "Acte",
|
"ACTE": "Acte",
|
||||||
"AGENT_VALIDEUR": "Agent valideur",
|
"AGENT_VALIDEUR": "Agent valideur",
|
||||||
|
"AGENT_VALIDEUR_EMAIL": "Email agent valideur",
|
||||||
|
"AGENT_VALIDEUR_PHONE": "Téléphone agent valideur",
|
||||||
"TEXT_SUPPRESS_CONFIRM_BENEFICIARY": "Voulez vous vraiment supprimer cet ayant droit ?",
|
"TEXT_SUPPRESS_CONFIRM_BENEFICIARY": "Voulez vous vraiment supprimer cet ayant droit ?",
|
||||||
"ENTER_PASSWORD_TO_VALID_MODIFICATION": "Renseigner votre mot de passe et valider la suppression de l'ayant pour le supprimé définitivement",
|
"ENTER_PASSWORD_TO_VALID_MODIFICATION": "Renseigner votre mot de passe et valider la suppression de l'ayant pour le supprimé définitivement",
|
||||||
"PLEASE_SELECT_AT_LEAST_ASSURE": "Veuillez sélectionner au moins un ayant droit",
|
"PLEASE_SELECT_AT_LEAST_ASSURE": "Veuillez sélectionner au moins un ayant droit",
|
||||||
|
@ -717,5 +720,41 @@
|
||||||
"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",
|
||||||
|
"CONSULTATION": "Consultation",
|
||||||
|
"ACTE_EXAMEN": "Acte et examen",
|
||||||
|
"AMOUNT_FREE": "Montant libre",
|
||||||
|
"DESCRIPTION": "Description",
|
||||||
|
"EXECUTION": "Execution",
|
||||||
|
"UNIT_QUANTITE": "Qté unitaire",
|
||||||
|
"NO_USAGER_CORRESPONDING_TO_SEARCH": "Aucun usager ne correspond à votre recherche",
|
||||||
|
"USAGER_SEARCH": "Recherche d'un usager",
|
||||||
|
"BY_NAME": "Par nom",
|
||||||
|
"BY_QR_CODE": "Par QR Code",
|
||||||
|
"SCAN": "Scanner",
|
||||||
|
"BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE": "Approchez votre caméra du QR Code afin de le scanner",
|
||||||
|
"QUANTITY_CANNOT_BE_SUPERIOR": "La quantité ne doit pas être supérieure à",
|
||||||
|
"EXCLUSION": "Exclusion",
|
||||||
|
"VALIDATION_EFFECTUE": "Validation effectué",
|
||||||
|
"USER_SUCCESSFULLY_VALIDATED": "Utilisateur validé avec succès",
|
||||||
|
"BENEFICIARY": "Bénéficiaire",
|
||||||
|
"AUTORISATION_SOIN": "Autorisation soin",
|
||||||
|
"PAYMENT_METHOD": "Méthode de paiement",
|
||||||
|
"MOBILE_MONEY": "Mobile Money",
|
||||||
|
"PAYPAL": "Paypal",
|
||||||
|
"RESTE":"Reste",
|
||||||
|
"MOTIF": "Motif",
|
||||||
|
"NEXT_ECHEANCE": "Prochaine échéance",
|
||||||
|
"MONTANT_RESTANT": "Montant restant",
|
||||||
|
"LAST_PAYMENT": "Dernier paiement",
|
||||||
|
"AMOUNT_PER_SPLIT": "Montant par échéance",
|
||||||
|
"ETAT_ASSURANCE": "Etat assurance"
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ import {
|
||||||
getUserByIdQRCodeUrl,
|
getUserByIdQRCodeUrl,
|
||||||
getUserByNameOrNumberUrl,
|
getUserByNameOrNumberUrl,
|
||||||
invoiceUrl,
|
invoiceUrl,
|
||||||
|
invoiceUserUrl,
|
||||||
subscribeInsuranceUrl,
|
subscribeInsuranceUrl,
|
||||||
uploadInsuranceImagetUrl
|
uploadInsuranceImagetUrl
|
||||||
} from "../../webservice/IlinkConstants";
|
} from "../../webservice/IlinkConstants";
|
||||||
|
@ -552,9 +553,9 @@ export const fetchGetConsultation = (user_id, state = 'UNTREATED', typeParam = '
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const fetchGetInvoiceHistory = (otherParam) => {
|
export const fetchGetInvoiceHistory = (otherParam, isUser = false) => {
|
||||||
return ApiAction({
|
return ApiAction({
|
||||||
url: `${invoiceUrl}${otherParam}`,
|
url: isUser ? `${invoiceUserUrl}${otherParam}` : `${invoiceUrl}${otherParam}`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
onLoading: fetchGetConsultationPending,
|
onLoading: fetchGetConsultationPending,
|
||||||
onSuccess: fetchGetConsultationSuccess,
|
onSuccess: fetchGetConsultationSuccess,
|
||||||
|
|
|
@ -778,7 +778,7 @@ const HistoriqueNanoSanteAgentScreen = ({
|
||||||
setLoadMore(false);
|
setLoadMore(false);
|
||||||
setHistoryResult([]);
|
setHistoryResult([]);
|
||||||
setHistoriqueDetailLabel(I18n.t('INVOICE'));
|
setHistoriqueDetailLabel(I18n.t('INVOICE'));
|
||||||
fetchGetInvoiceHistory(`?network_id=${wallet.id_network}&network_agent_id=${wallet.network_agent_id}&page=1&perPage=20`);
|
fetchGetInvoiceHistory(`?network_id=${wallet.id_network}&network_agent_id=${wallet.network_agent_id}&page=1&perPage=20`, false);
|
||||||
}}>
|
}}>
|
||||||
{` ${I18n.t('INVOICE')}`}
|
{` ${I18n.t('INVOICE')}`}
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|
|
@ -599,7 +599,7 @@ const HistoriqueNanoSanteSuperHyperScreen = ({
|
||||||
setLoadMore(false);
|
setLoadMore(false);
|
||||||
setHistoryResult([]);
|
setHistoryResult([]);
|
||||||
setHistoriqueDetailLabel(I18n.t('INVOICE'));
|
setHistoriqueDetailLabel(I18n.t('INVOICE'));
|
||||||
fetchGetInvoiceHistory(`?network_id=${wallet.id_network}&page=1&perPage=20`);
|
fetchGetInvoiceHistory(`?network_id=${wallet.id_network}&page=1&perPage=20`, false);
|
||||||
}}>
|
}}>
|
||||||
{` ${I18n.t('INVOICE')}`}
|
{` ${I18n.t('INVOICE')}`}
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {
|
||||||
View,
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import {connect, useDispatch} from 'react-redux';
|
import {connect, useDispatch} from 'react-redux';
|
||||||
import {Formik} from 'formik';
|
import {useFormik} from 'formik';
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import * as Utils from '../../../utils/UtilsFunction';
|
import * as Utils from '../../../utils/UtilsFunction';
|
||||||
import {Color} from "../../../config/Color";
|
import {Color} from "../../../config/Color";
|
||||||
|
@ -44,6 +44,7 @@ import {store} from "../../../redux/store";
|
||||||
import Modal from "react-native-modal";
|
import Modal from "react-native-modal";
|
||||||
import Text from "../../../components/Text";
|
import Text from "../../../components/Text";
|
||||||
import Icon from "react-native-vector-icons/FontAwesome5";
|
import Icon from "react-native-vector-icons/FontAwesome5";
|
||||||
|
import TextInput from "../../../components/TextInput";
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
|
||||||
|
@ -217,7 +218,7 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
const [password, setPassword] = useState(null);
|
const [password, setPassword] = useState(null);
|
||||||
const [subscriptions, setSubscriptions] = useState([]);
|
const [subscriptions, setSubscriptions] = useState([]);
|
||||||
const [subscription, setSubscription] = useState(null);
|
const [subscription, setSubscription] = useState(null);
|
||||||
const [modalPaymentModal, setModalPaymentModal] = useState(true);
|
const [modalPaymentModal, setModalPaymentModal] = useState(false);
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
let dropDownAlertRef: any = null;
|
let dropDownAlertRef: any = null;
|
||||||
|
@ -312,8 +313,37 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
}, [activatePaySubscription]);
|
}, [activatePaySubscription]);
|
||||||
|
|
||||||
const RegisterSchema = Yup.object().shape({
|
const RegisterSchema = Yup.object().shape({
|
||||||
password: wallet.password_validation === "MAX" ? Yup.string()
|
password: Yup.string().required(I18n.t('THIS_FIELD_IS_REQUIRED')),
|
||||||
.required(I18n.t('THIS_FIELD_IS_REQUIRED')) : Yup.string()
|
amount: Yup.number().required(I18n.t('THIS_FIELD_IS_REQUIRED'))
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const {
|
||||||
|
handleChange,
|
||||||
|
handleSubmit,
|
||||||
|
handleBlur,
|
||||||
|
values,
|
||||||
|
errors,
|
||||||
|
touched,
|
||||||
|
setFieldValue,
|
||||||
|
setFieldTouched,
|
||||||
|
isValid,
|
||||||
|
} = useFormik({
|
||||||
|
validationSchema: RegisterSchema,
|
||||||
|
initialValues: {
|
||||||
|
password: '',
|
||||||
|
amount: ''
|
||||||
|
},
|
||||||
|
onSubmit: values => {
|
||||||
|
if (user !== null) {
|
||||||
|
if (subscription === null) {
|
||||||
|
subscriptionRef.shake(800);
|
||||||
|
} else {
|
||||||
|
console.log("subscription", subscription);
|
||||||
|
setModalPaymentModal(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const renderPaymentMethodModal = () => (
|
const renderPaymentMethodModal = () => (
|
||||||
|
@ -347,6 +377,7 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'wallet'});
|
||||||
}}>
|
}}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -354,9 +385,9 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
}}>
|
}}>
|
||||||
<View style={styles.iconContent}>
|
<View style={styles.iconContent}>
|
||||||
<Icon name="paypal" size={24} color={Color.textColor}/>
|
<Icon name="wallet" size={24} color={Color.textColor}/>
|
||||||
</View>
|
</View>
|
||||||
<Text headline>{I18n.t('PAYPAL')}</Text>
|
<Text headline>{I18n.t('WALLET')}</Text>
|
||||||
</View>
|
</View>
|
||||||
<Icon
|
<Icon
|
||||||
name="angle-right"
|
name="angle-right"
|
||||||
|
@ -374,7 +405,7 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'card'});
|
||||||
}}>
|
}}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -406,10 +437,7 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
/* navigation.navigate('WebviewModalScreen', {
|
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'mobile_money'});
|
||||||
url: `${Config.YOOLEARN_CINET_PAY}`,
|
|
||||||
title: t('terms_of_services'),
|
|
||||||
}); */
|
|
||||||
}}>
|
}}>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
@ -454,31 +482,6 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
style={{flex: 1}}>
|
style={{flex: 1}}>
|
||||||
|
|
||||||
<ScrollView style={{flex: 1}}>
|
<ScrollView style={{flex: 1}}>
|
||||||
<Formik validationSchema={RegisterSchema}
|
|
||||||
initialValues={{
|
|
||||||
password: '',
|
|
||||||
}}
|
|
||||||
onSubmit={(values) => {
|
|
||||||
if (user !== null) {
|
|
||||||
if (subscription === null) {
|
|
||||||
subscriptionRef.shake(800);
|
|
||||||
} else {
|
|
||||||
console.log("subscription", subscription);
|
|
||||||
setModalPaymentModal(true);
|
|
||||||
//fetchActivePaySubscription(subscription.id, {password: values.password});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}}>
|
|
||||||
|
|
||||||
{({
|
|
||||||
values,
|
|
||||||
errors,
|
|
||||||
touched,
|
|
||||||
handleChange,
|
|
||||||
handleBlur,
|
|
||||||
handleSubmit,
|
|
||||||
isSubmitting,
|
|
||||||
}) => (
|
|
||||||
<View style={styles.contain}>
|
<View style={styles.contain}>
|
||||||
<Animatable.View ref={(comp) => {
|
<Animatable.View ref={(comp) => {
|
||||||
subscriptionRef = comp
|
subscriptionRef = comp
|
||||||
|
@ -523,26 +526,36 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
return value
|
return value
|
||||||
}}
|
}}
|
||||||
labelExtractor={(value) => {
|
labelExtractor={(value) => {
|
||||||
return `${I18n.t('MNT')}: ${value.amount} | ${I18n.t('FACT')}: ${value.invoice_id.slice(0, 7)} | ${I18n.t('ECH')}: ${value.deadline_number}`
|
return `${I18n.t('MNT')}: ${value.amount} | ${I18n.t('FACT')}: ${value.invoice_id.slice(0, 7)} | ${I18n.t('RESTE')}: ${value.remaining_amount}`
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
|
|
||||||
{
|
<TextInput
|
||||||
wallet.password_validation === "MAX" &&
|
style={{marginTop: 10}}
|
||||||
<PasswordInput
|
placeholder={I18n.t('AMOUNT')}
|
||||||
style={{marginTop: 10}}
|
value={values.amount}
|
||||||
onChangeText={handleChange('password')}
|
onChangeText={(text) => {
|
||||||
placeholder={I18n.t('PASSWORD')}
|
setFieldValue('amount', text);
|
||||||
secureTextEntry
|
}}
|
||||||
icon={<FontAwesome name="lock" size={20}/>}
|
onBlur={handleBlur('amount')}
|
||||||
value={values.password}
|
success={touched.amount && !errors.amount}
|
||||||
onBlur={handleBlur('password')}
|
touched={touched.amount}
|
||||||
success={touched.password && !errors.password}
|
error={errors.amount}
|
||||||
touched={touched.password}
|
/>
|
||||||
error={errors.password}
|
|
||||||
/>
|
<PasswordInput
|
||||||
}
|
style={{marginTop: 10}}
|
||||||
|
onChangeText={handleChange('password')}
|
||||||
|
placeholder={I18n.t('PASSWORD')}
|
||||||
|
secureTextEntry
|
||||||
|
icon={<FontAwesome name="lock" size={20}/>}
|
||||||
|
value={values.password}
|
||||||
|
onBlur={handleBlur('password')}
|
||||||
|
success={touched.password && !errors.password}
|
||||||
|
touched={touched.password}
|
||||||
|
error={errors.password}
|
||||||
|
/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style={{marginTop: 20}}
|
style={{marginTop: 20}}
|
||||||
|
@ -552,8 +565,6 @@ const ActivateBuySubscriptionScreen = ({
|
||||||
{I18n.t('SUBMIT_LABEL')}
|
{I18n.t('SUBMIT_LABEL')}
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
)}
|
|
||||||
</Formik>
|
|
||||||
{modalPaymentModal && renderPaymentMethodModal()}
|
{modalPaymentModal && renderPaymentMethodModal()}
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
|
@ -398,13 +398,14 @@ const AddBeneficiaryScreen = ({
|
||||||
gender: gender,
|
gender: gender,
|
||||||
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
||||||
affiliation: affiliation,
|
affiliation: affiliation,
|
||||||
birthdate_proof: childAyantDroitDocument[0].checboxSelectedValue,
|
birthdate_proof: childAyantDroitDocument[1].checboxSelectedValue,
|
||||||
birthdate_proof_doc: uploadInsuranceImages.result.response[0],
|
profile_image: uploadInsuranceImages.result.response[0],
|
||||||
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[1] : null,
|
birthdate_proof_doc: uploadInsuranceImages.result.response[1],
|
||||||
marriage_certificate_doc: uploadInsuranceImages.result.response[0],
|
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[2] : null,
|
||||||
|
marriage_certificate_doc: uploadInsuranceImages.result.response[1],
|
||||||
id_document_type: "CNI",
|
id_document_type: "CNI",
|
||||||
id_document_front: uploadInsuranceImages.result.response[1],
|
id_document_front: uploadInsuranceImages.result.response[2],
|
||||||
id_document_back: uploadInsuranceImages.result.response[2],
|
id_document_back: uploadInsuranceImages.result.response[3],
|
||||||
isEditable: true
|
isEditable: true
|
||||||
}, ...beneficiaries]);
|
}, ...beneficiaries]);
|
||||||
dropDownAlertRef.alertWithType(
|
dropDownAlertRef.alertWithType(
|
||||||
|
@ -465,6 +466,13 @@ const AddBeneficiaryScreen = ({
|
||||||
}
|
}
|
||||||
|
|
||||||
const [childAyantDroitDocument, setChildAyantDroitDocument] = useState([
|
const [childAyantDroitDocument, setChildAyantDroitDocument] = useState([
|
||||||
|
{
|
||||||
|
label: I18n.t('PROFILE_PICTURE'),
|
||||||
|
name: 'profile_image',
|
||||||
|
isFrontCamera: false,
|
||||||
|
file: null,
|
||||||
|
hasCheckbox: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: I18n.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),
|
label: I18n.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),
|
||||||
name: 'birthdate_proof_doc',
|
name: 'birthdate_proof_doc',
|
||||||
|
@ -485,6 +493,13 @@ const AddBeneficiaryScreen = ({
|
||||||
const [beneficiaries, setBeneficiaries] = useState([]);
|
const [beneficiaries, setBeneficiaries] = useState([]);
|
||||||
|
|
||||||
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
||||||
|
{
|
||||||
|
label: I18n.t('PROFILE_PICTURE'),
|
||||||
|
name: 'profile_image',
|
||||||
|
isFrontCamera: false,
|
||||||
|
file: null,
|
||||||
|
hasCheckbox: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: I18n.t('ACTE_MARIAGE'),
|
label: I18n.t('ACTE_MARIAGE'),
|
||||||
name: 'marriage_certificate_doc',
|
name: 'marriage_certificate_doc',
|
||||||
|
|
|
@ -30,6 +30,7 @@ import {
|
||||||
fetchGetConsultation,
|
fetchGetConsultation,
|
||||||
fetchGetConsultationReset,
|
fetchGetConsultationReset,
|
||||||
fetchGetDemandeAutorisationSoin,
|
fetchGetDemandeAutorisationSoin,
|
||||||
|
fetchGetInvoiceHistory,
|
||||||
fetchGetSubscription
|
fetchGetSubscription
|
||||||
} from "../../../redux/insurance/insurance.actions";
|
} from "../../../redux/insurance/insurance.actions";
|
||||||
import DropdownAlert from "react-native-dropdownalert";
|
import DropdownAlert from "react-native-dropdownalert";
|
||||||
|
@ -49,6 +50,7 @@ import {Typography} from "../../../config/typography";
|
||||||
import Tag from "../../../components/Tag";
|
import Tag from "../../../components/Tag";
|
||||||
import FontAwesome5 from "react-native-vector-icons/FontAwesome5";
|
import FontAwesome5 from "react-native-vector-icons/FontAwesome5";
|
||||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
|
import {store} from "../../../redux/store";
|
||||||
|
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
@ -60,6 +62,7 @@ const HistoriqueNanoSanteUserScreen = ({
|
||||||
fetchGetConsultation,
|
fetchGetConsultation,
|
||||||
fetchGetSubscription,
|
fetchGetSubscription,
|
||||||
fetchGetDemandeAutorisationSoin,
|
fetchGetDemandeAutorisationSoin,
|
||||||
|
fetchGetInvoiceHistory,
|
||||||
fetchAcceptRejectConsultation,
|
fetchAcceptRejectConsultation,
|
||||||
acceptRefuseConsultation,
|
acceptRefuseConsultation,
|
||||||
getConsultation
|
getConsultation
|
||||||
|
@ -72,6 +75,7 @@ const HistoriqueNanoSanteUserScreen = ({
|
||||||
const [historiqueDetailLabel, setHistoriqueDetailLabel] = useState(I18n.t('SOINS'));
|
const [historiqueDetailLabel, setHistoriqueDetailLabel] = useState(I18n.t('SOINS'));
|
||||||
const [loadMore, setLoadMore] = useState(false);
|
const [loadMore, setLoadMore] = useState(false);
|
||||||
const [historyResult, setHistoryResult] = useState([]);
|
const [historyResult, setHistoryResult] = useState([]);
|
||||||
|
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
||||||
|
|
||||||
let dropDownAlertRef: any = null;
|
let dropDownAlertRef: any = null;
|
||||||
|
|
||||||
|
@ -404,8 +408,111 @@ const HistoriqueNanoSanteUserScreen = ({
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
:
|
: 'payments' in historyItemDetail ?
|
||||||
<ScrollView persistentScrollbar={true}>
|
<ScrollView persistentScrollbar={true}>
|
||||||
|
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>ID</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.id}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>Date</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{moment(historyItemDetail.created_at).format('YYYY-MM-DD')}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('AMOUNT')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{`${historyItemDetail.amount}`}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('MONTANT_RESTANT')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{`${historyItemDetail.remaining_amount}`}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('LAST_PAYMENT')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.amount_last_payment}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('AMOUNT_PER_SPLIT')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.amount_per_split}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('MOTIF')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{historyItemDetail.reason}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('STATE')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{uppercaseFirstLetter(historyItemDetail.state.toLowerCase())}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('ETAT_ASSURANCE')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{uppercaseFirstLetter(historyItemDetail.insurance.state.toLowerCase())}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
<View style={{flex: 1}}>
|
||||||
|
<Text style={[styles.body2]}>{I18n.t('NEXT_ECHEANCE')}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
style={[Typography.caption1, Color.grayColor]}>{moment(historyItemDetail.next_payment_deadline).format('YYYY-MM-DD')}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
</ScrollView>
|
||||||
|
|
||||||
|
: <ScrollView persistentScrollbar={true}>
|
||||||
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
|
<View style={[styles.blockView, {borderBottomColor: Color.borderColor}]}>
|
||||||
|
|
||||||
<View style={{flexDirection: 'row', marginTop: 10}}>
|
<View style={{flexDirection: 'row', marginTop: 10}}>
|
||||||
|
@ -667,7 +774,48 @@ const HistoriqueNanoSanteUserScreen = ({
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
:
|
: 'payments' in item ?
|
||||||
|
<TouchableOpacity
|
||||||
|
style={[styles.content, {backgroundColor: Color.cardBackgroundColor}]}
|
||||||
|
onPress={() => {
|
||||||
|
setDisplayModalHistory(true);
|
||||||
|
setHistoryItemDetail(item);
|
||||||
|
/*navigation.navigate('validateConsultationDetailScreen', {
|
||||||
|
item
|
||||||
|
});*/
|
||||||
|
}}>
|
||||||
|
<View style={[styles.contentTop, {borderColor: Color.borderColor}]}>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-start'}}>
|
||||||
|
<Text caption1>{`${I18n.t('AMOUNT')}: ${item.amount}`}</Text>
|
||||||
|
<Text footnote light numberOfLines={1}>
|
||||||
|
{`${I18n.t('STATE')}: ${item.state.toLowerCase()}`}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{flex: 1, alignItems: 'flex-end'}}>
|
||||||
|
<Text
|
||||||
|
caption1>{`${I18n.t('NEXT_ECHEANCE')}: ${moment(item.next_parment_reminder).format('YYYY-MM-DD')}`}</Text>
|
||||||
|
<Text footnote light numberOfLines={1}>
|
||||||
|
{`${I18n.t('MONTANT_RESTANT')}: ${item.remaining_amount}`}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
</View>
|
||||||
|
<View style={styles.contentBottom}>
|
||||||
|
<View style={styles.bottomLeft}>
|
||||||
|
<View style={{marginHorizontal: 5}}>
|
||||||
|
<Text caption1 semibold accentColor>
|
||||||
|
{`${I18n.t('MOTIF')}: ${item.reason}`}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={{flexDirection: 'row', alignItems: 'flex-end'}}>
|
||||||
|
<Text caption1 semibold primaryColor>
|
||||||
|
{`Date: ${moment(item.created_at).format('YYYY-MM-DD')}`}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</TouchableOpacity>
|
||||||
|
:
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[styles.content, {backgroundColor: Color.cardBackgroundColor}]}
|
style={[styles.content, {backgroundColor: Color.cardBackgroundColor}]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
@ -770,6 +918,31 @@ const HistoriqueNanoSanteUserScreen = ({
|
||||||
}}>
|
}}>
|
||||||
{` ${I18n.t('DEMANDES')}`}
|
{` ${I18n.t('DEMANDES')}`}
|
||||||
</Tag>
|
</Tag>
|
||||||
|
<Tag primary
|
||||||
|
icon={<FontAwesome5 name='file-alt' size={20} color={Color.whiteColor}
|
||||||
|
style={{marginLeft: 15}}/>}
|
||||||
|
style={{
|
||||||
|
paddingRight: 10,
|
||||||
|
width: 120,
|
||||||
|
borderTopRightRadius: 0,
|
||||||
|
borderBottomRightRadius: 0,
|
||||||
|
borderTopLeftRadius: 0,
|
||||||
|
borderBottomLeftRadius: 0,
|
||||||
|
borderRightWidth: 1,
|
||||||
|
borderRightColor: Color.whiteColor,
|
||||||
|
borderLeftWidth: 1,
|
||||||
|
borderLeftColor: Color.whiteColor
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
dispatch(fetchGetConsultationReset());
|
||||||
|
setPage(1);
|
||||||
|
setLoadMore(false);
|
||||||
|
setHistoryResult([]);
|
||||||
|
setHistoriqueDetailLabel(I18n.t('INVOICE'));
|
||||||
|
fetchGetInvoiceHistory(`?user_id=${user.id}&page=1&perPage=20&pagination=true`, true);
|
||||||
|
}}>
|
||||||
|
{` ${I18n.t('INVOICE')}`}
|
||||||
|
</Tag>
|
||||||
<Tag icon={<MaterialCommunityIcons name='medical-bag' size={20} color={Color.whiteColor}/>}
|
<Tag icon={<MaterialCommunityIcons name='medical-bag' size={20} color={Color.whiteColor}/>}
|
||||||
style={{width: 110, borderTopLeftRadius: 0, borderBottomLeftRadius: 0,}}
|
style={{width: 110, borderTopLeftRadius: 0, borderBottomLeftRadius: 0,}}
|
||||||
primary
|
primary
|
||||||
|
@ -832,7 +1005,8 @@ export default connect(mapStateToProps, {
|
||||||
fetchGetConsultation,
|
fetchGetConsultation,
|
||||||
fetchAcceptRejectConsultation,
|
fetchAcceptRejectConsultation,
|
||||||
fetchGetSubscription,
|
fetchGetSubscription,
|
||||||
fetchGetDemandeAutorisationSoin
|
fetchGetDemandeAutorisationSoin,
|
||||||
|
fetchGetInvoiceHistory
|
||||||
|
|
||||||
})(
|
})(
|
||||||
HistoriqueNanoSanteUserScreen,
|
HistoriqueNanoSanteUserScreen,
|
||||||
|
|
|
@ -424,13 +424,14 @@ const InsuranceSubscriptionScreen = ({
|
||||||
gender: gender,
|
gender: gender,
|
||||||
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
||||||
affiliation: affiliation,
|
affiliation: affiliation,
|
||||||
birthdate_proof: childAyantDroitDocument[0].checboxSelectedValue,
|
birthdate_proof: childAyantDroitDocument[1].checboxSelectedValue,
|
||||||
birthdate_proof_doc: uploadInsuranceImages.result.response[0],
|
profile_image: uploadInsuranceImages.result.response[0],
|
||||||
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[1] : null,
|
birthdate_proof_doc: uploadInsuranceImages.result.response[1],
|
||||||
marriage_certificate_doc: uploadInsuranceImages.result.response[0],
|
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[2] : null,
|
||||||
|
marriage_certificate_doc: uploadInsuranceImages.result.response[1],
|
||||||
id_document_type: "CNI",
|
id_document_type: "CNI",
|
||||||
id_document_front: uploadInsuranceImages.result.response[1],
|
id_document_front: uploadInsuranceImages.result.response[2],
|
||||||
id_document_back: uploadInsuranceImages.result.response[2]
|
id_document_back: uploadInsuranceImages.result.response[3]
|
||||||
}, ...beneficiaries]);
|
}, ...beneficiaries]);
|
||||||
dropDownAlertRef.alertWithType(
|
dropDownAlertRef.alertWithType(
|
||||||
'success',
|
'success',
|
||||||
|
@ -491,6 +492,13 @@ const InsuranceSubscriptionScreen = ({
|
||||||
|
|
||||||
const [isOriginalActeNaissance, setIsOriginalActeNaissance] = useState(true);
|
const [isOriginalActeNaissance, setIsOriginalActeNaissance] = useState(true);
|
||||||
const [childAyantDroitDocument, setChildAyantDroitDocument] = useState([
|
const [childAyantDroitDocument, setChildAyantDroitDocument] = useState([
|
||||||
|
{
|
||||||
|
label: I18n.t('PROFILE_PICTURE'),
|
||||||
|
name: 'profile_image',
|
||||||
|
isFrontCamera: false,
|
||||||
|
file: null,
|
||||||
|
hasCheckbox: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: I18n.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),
|
label: I18n.t('COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE'),
|
||||||
name: 'birthdate_proof_doc',
|
name: 'birthdate_proof_doc',
|
||||||
|
@ -511,6 +519,13 @@ const InsuranceSubscriptionScreen = ({
|
||||||
const [beneficiaries, setBeneficiaries] = useState([]);
|
const [beneficiaries, setBeneficiaries] = useState([]);
|
||||||
|
|
||||||
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
||||||
|
{
|
||||||
|
label: I18n.t('PROFILE_PICTURE'),
|
||||||
|
name: 'profile_image',
|
||||||
|
isFrontCamera: false,
|
||||||
|
file: null,
|
||||||
|
hasCheckbox: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: I18n.t('ACTE_MARIAGE'),
|
label: I18n.t('ACTE_MARIAGE'),
|
||||||
name: 'marriage_certificate_doc',
|
name: 'marriage_certificate_doc',
|
||||||
|
|
|
@ -27,6 +27,7 @@ import {selectInsuranceList, selectStopSubscription} from "../../../redux/insura
|
||||||
|
|
||||||
import {Dropdown} from "react-native-material-dropdown";
|
import {Dropdown} from "react-native-material-dropdown";
|
||||||
import {store} from "../../../redux/store";
|
import {store} from "../../../redux/store";
|
||||||
|
import isNil from "lodash/isNil";
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
|
||||||
|
@ -173,7 +174,8 @@ const RenewAssuranceScreen = ({
|
||||||
stopSubscription,
|
stopSubscription,
|
||||||
fetchGetSubscriptionList,
|
fetchGetSubscriptionList,
|
||||||
fetchGetListInsuranceWithBeneficiaries,
|
fetchGetListInsuranceWithBeneficiaries,
|
||||||
insuranceList,
|
fetchGetListInsurance,
|
||||||
|
insuranceList,
|
||||||
fetchRenewSubscription,
|
fetchRenewSubscription,
|
||||||
navigation
|
navigation
|
||||||
}) => {
|
}) => {
|
||||||
|
@ -183,6 +185,7 @@ const RenewAssuranceScreen = ({
|
||||||
const [subscriptions, setSubscriptions] = useState([]);
|
const [subscriptions, setSubscriptions] = useState([]);
|
||||||
const [subscription, setSubscription] = useState(null);
|
const [subscription, setSubscription] = useState(null);
|
||||||
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
||||||
|
const [amountPerMonth, setAmountPerMonth] = useState(null);
|
||||||
|
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
let dropDownAlertRef: any = null;
|
let dropDownAlertRef: any = null;
|
||||||
|
@ -281,6 +284,28 @@ const RenewAssuranceScreen = ({
|
||||||
password: Yup.string().required(I18n.t('THIS_FIELD_IS_REQUIRED'))
|
password: Yup.string().required(I18n.t('THIS_FIELD_IS_REQUIRED'))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const onSelectAmountPerMonth = (selected) => {
|
||||||
|
let insuranceTemp = subscription;
|
||||||
|
setSubscription(
|
||||||
|
{
|
||||||
|
...subscription,
|
||||||
|
months_prices: insuranceTemp.months_prices.map(item => {
|
||||||
|
return {
|
||||||
|
id: item.id,
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScreenComponent>
|
<ScreenComponent>
|
||||||
<DropdownAlert ref={ref => (dropDownAlertRef = ref)}/>
|
<DropdownAlert ref={ref => (dropDownAlertRef = ref)}/>
|
||||||
|
@ -299,7 +324,9 @@ const RenewAssuranceScreen = ({
|
||||||
subscriptionRef.shake(800);
|
subscriptionRef.shake(800);
|
||||||
} else {
|
} else {
|
||||||
console.log("subscription", subscription);
|
console.log("subscription", subscription);
|
||||||
fetchRenewSubscription(subscription.id, {password: values.password});
|
fetchRenewSubscription(subscription.id, {password: values.password,
|
||||||
|
month_price_id: subscription.months_prices.filter(item => item.checked)[0].id,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
|
@ -349,7 +376,20 @@ const RenewAssuranceScreen = ({
|
||||||
end_at: value.end_at,
|
end_at: value.end_at,
|
||||||
reason: value.reason,
|
reason: value.reason,
|
||||||
network: value.network,
|
network: value.network,
|
||||||
beneficiaries: value.beneficiaries
|
beneficiaries: value.beneficiaries,
|
||||||
|
months_prices: value.months_prices.map((item, index) => {
|
||||||
|
return {
|
||||||
|
id: item.id,
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
@ -362,6 +402,47 @@ const RenewAssuranceScreen = ({
|
||||||
/>
|
/>
|
||||||
</Animatable.View>
|
</Animatable.View>
|
||||||
|
|
||||||
|
{
|
||||||
|
subscription !== null &&
|
||||||
|
<Animatable.View ref={(comp) => {
|
||||||
|
amountPerMonthRef = comp
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
width: responsiveWidth(90),
|
||||||
|
height: 60,
|
||||||
|
marginTop: 10,
|
||||||
|
alignSelf: 'center',
|
||||||
|
borderRadius: 10,
|
||||||
|
paddingLeft: 20,
|
||||||
|
paddingRight: 20,
|
||||||
|
backgroundColor: 'white'
|
||||||
|
}}>
|
||||||
|
<Dropdown
|
||||||
|
label={I18n.t('AMOUNT_PER_MONTH')}
|
||||||
|
value={amountPerMonth !== null
|
||||||
|
? `${I18n.t('PRIME_PRINCIPAL')}: ${amountPerMonth.min_amount} | ${amountPerMonth.payment_period} | ${I18n.t('ECH')}: ${amountPerMonth.number_of_fractions}`
|
||||||
|
: ``
|
||||||
|
}
|
||||||
|
data={subscription.months_prices.map((item, index) => ({
|
||||||
|
checked: !isNil(item.checked) ? item.checked : index === 0,
|
||||||
|
...item
|
||||||
|
}))}
|
||||||
|
useNativeDriver={true}
|
||||||
|
onChangeText={(value, index, data) => {
|
||||||
|
console.log("Value", data[index]);
|
||||||
|
setAmountPerMonth(data[index]);
|
||||||
|
onSelectAmountPerMonth(data[index]);
|
||||||
|
}}
|
||||||
|
valueExtractor={(value) => {
|
||||||
|
return `${I18n.t('PRIME_PRINCIPAL')}: ${value.min_amount} | ${value.payment_period} | ${I18n.t('ECH')}: ${value.number_of_fractions}`
|
||||||
|
}}
|
||||||
|
labelExtractor={(value) => {
|
||||||
|
return `${I18n.t('PRIME_PRINCIPAL')}: ${value.min_amount} | ${value.payment_period} | ${I18n.t('ECH')}: ${value.number_of_fractions}`
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Animatable.View>
|
||||||
|
}
|
||||||
|
|
||||||
<PasswordInput
|
<PasswordInput
|
||||||
style={{marginTop: 10}}
|
style={{marginTop: 10}}
|
||||||
onChangeText={handleChange('password')}
|
onChangeText={handleChange('password')}
|
||||||
|
|
|
@ -749,5 +749,12 @@
|
||||||
"AUTORISATION_SOIN": "Autorisation soin",
|
"AUTORISATION_SOIN": "Autorisation soin",
|
||||||
"PAYMENT_METHOD": "Méthode de paiement",
|
"PAYMENT_METHOD": "Méthode de paiement",
|
||||||
"MOBILE_MONEY": "Mobile Money",
|
"MOBILE_MONEY": "Mobile Money",
|
||||||
"PAYPAL": "Paypal"
|
"PAYPAL": "Paypal",
|
||||||
|
"RESTE":"Reste",
|
||||||
|
"MOTIF": "Motif",
|
||||||
|
"NEXT_ECHEANCE": "Prochaine échéance",
|
||||||
|
"MONTANT_RESTANT": "Montant restant",
|
||||||
|
"LAST_PAYMENT": "Dernier paiement",
|
||||||
|
"AMOUNT_PER_SPLIT": "Montant par échéance",
|
||||||
|
"ETAT_ASSURANCE": "Etat assurance"
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,6 +89,7 @@ export const getQRCodeDetail = testBaseUrl + '/walletService/qrcode/read';
|
||||||
|
|
||||||
export const facturerSoinUrl = testBaseUrl + '/nanoSanteService/generate-invoice';
|
export const facturerSoinUrl = testBaseUrl + '/nanoSanteService/generate-invoice';
|
||||||
export const invoiceUrl = testBaseUrl + '/nanoSanteService/invoices';
|
export const invoiceUrl = testBaseUrl + '/nanoSanteService/invoices';
|
||||||
|
export const invoiceUserUrl = testBaseUrl + '/nanoSanteService/insurances/invoices';
|
||||||
export const exclusionUrl = testBaseUrl + '/nanoSanteService/exclusions';
|
export const exclusionUrl = testBaseUrl + '/nanoSanteService/exclusions';
|
||||||
export const getInsuranceListUrl = testBaseUrl + '/nanoSanteService/insurances';
|
export const getInsuranceListUrl = testBaseUrl + '/nanoSanteService/insurances';
|
||||||
export const checkInsuranceCoverageAmountUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/check-insurance-coverage-amount';
|
export const checkInsuranceCoverageAmountUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/check-insurance-coverage-amount';
|
||||||
|
|
Loading…
Reference in New Issue