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_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",
|
||||
|
@ -268,6 +268,7 @@
|
|||
"EMETTEUR": "Emetteur",
|
||||
"FIRSTNAME_EMETTEUR": "Prénom(s) émetteur",
|
||||
"EMAIL_EMETTEUR": "Email émetteur ",
|
||||
"PHONE_EMETTEUR": "Téléphone émetteur ",
|
||||
"ID_DESTINATAIRE": "Identifiant destinataire ",
|
||||
"NUMERO_IDENTITE_EMETTEUR": "Numéro d'identité de l'émetteur",
|
||||
"NAME_DESTINATAIRE": "Nom(s) destinataire",
|
||||
|
@ -336,7 +337,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.",
|
||||
|
@ -571,10 +572,10 @@
|
|||
"RENEW_INSSURANCE": "Renouveler son assurance ",
|
||||
"MANAGE_ASSURANCE": "Gérer son assurance",
|
||||
"MANAGE_HEALTH": "Gérer ses soins",
|
||||
"DEMAND_AUTORIZATION_HEALTH": "Demande autorisation soin",
|
||||
"DEMAND_AUTORIZATION_HEALTH": "Demande de prise en charge",
|
||||
"HISTORIC_HEALTH": "Historique",
|
||||
"VALID_HEALTH": "Valider un soin ",
|
||||
"ACTIVATE_INSSURANCE": "Activer son assurance",
|
||||
"ACTIVATE_INSSURANCE": "Payer son assurance",
|
||||
"AMOUNT_PER_DURATION": "Montant par durée",
|
||||
"AMOUNT_PRIME": "Montant de la prime",
|
||||
"ASSURE": "Assuré",
|
||||
|
@ -601,7 +602,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)",
|
||||
|
@ -628,7 +629,7 @@
|
|||
"LONGUE": "Longue",
|
||||
"ACCIDENT": "Accident",
|
||||
"GROSSESSE": "Grossesse",
|
||||
"ADD_PRESTATION": "Ajouter une prestation",
|
||||
"ADD_PRESTATION": "Ajouter une consultation",
|
||||
"ADD_PRESCRIPTION": "Ajouter une prescription",
|
||||
"VISITE_DOMICILE": "Visite domicile ",
|
||||
"CODE_ACTE": "Code acte ",
|
||||
|
@ -653,7 +654,7 @@
|
|||
"CLASSE_PRESTATAIRE": "Classe de prestataire",
|
||||
"FRAIS_DEPLACEMENT": "Frais de déplacement",
|
||||
"AJOUTER_MEDICAMENT": "Ajouter médicament/appareil",
|
||||
"AJOUTER_EXAMEN": "Ajouter examen",
|
||||
"AJOUTER_EXAMEN": "Ajouter autre acte ou examen",
|
||||
"NAME": "Nom",
|
||||
"POSOLOGIE": "Posologie",
|
||||
"QUANTITE": "Quantité",
|
||||
|
@ -666,7 +667,7 @@
|
|||
"PRESCRIPTIONS_SUCCESSFULLY_ADD": "Prescription ajouté 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",
|
||||
"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é",
|
||||
"SYRUP": "Sirop",
|
||||
"SOLUTION": "Solution",
|
||||
|
@ -689,8 +690,8 @@
|
|||
"MODIFIER_EXAMEN": "Modifier examen",
|
||||
"EXAMENS_SUCCESSFULLY_MODIFY": "Examen modifié avec succès",
|
||||
"PRESTATION_SUCCESSFULLY_MODIFY": "Prestation modifié avec succès",
|
||||
"MODIFY_PRESTATION": "Modifier une prestation",
|
||||
"LIST_PRESTATION": "Liste des prestations",
|
||||
"MODIFY_PRESTATION": "Modifier une consultation",
|
||||
"LIST_PRESTATION": "Liste des consultations",
|
||||
"NO_CONSULTATION": "Aucune consultation",
|
||||
"NO_EXECUTION": "Aucune exécution",
|
||||
"LISTE_CONSULTATION": "Liste des consultations",
|
||||
|
@ -707,6 +708,8 @@
|
|||
"DEMANDES": "Demandes",
|
||||
"ACTE": "Acte",
|
||||
"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 ?",
|
||||
"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",
|
||||
|
@ -717,5 +720,41 @@
|
|||
"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",
|
||||
"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,
|
||||
getUserByNameOrNumberUrl,
|
||||
invoiceUrl,
|
||||
invoiceUserUrl,
|
||||
subscribeInsuranceUrl,
|
||||
uploadInsuranceImagetUrl
|
||||
} 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({
|
||||
url: `${invoiceUrl}${otherParam}`,
|
||||
url: isUser ? `${invoiceUserUrl}${otherParam}` : `${invoiceUrl}${otherParam}`,
|
||||
method: 'GET',
|
||||
onLoading: fetchGetConsultationPending,
|
||||
onSuccess: fetchGetConsultationSuccess,
|
||||
|
|
|
@ -778,7 +778,7 @@ const HistoriqueNanoSanteAgentScreen = ({
|
|||
setLoadMore(false);
|
||||
setHistoryResult([]);
|
||||
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')}`}
|
||||
</Tag>
|
||||
|
|
|
@ -599,7 +599,7 @@ const HistoriqueNanoSanteSuperHyperScreen = ({
|
|||
setLoadMore(false);
|
||||
setHistoryResult([]);
|
||||
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')}`}
|
||||
</Tag>
|
||||
|
|
|
@ -17,7 +17,7 @@ import {
|
|||
View,
|
||||
} from 'react-native';
|
||||
import {connect, useDispatch} from 'react-redux';
|
||||
import {Formik} from 'formik';
|
||||
import {useFormik} from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import * as Utils from '../../../utils/UtilsFunction';
|
||||
import {Color} from "../../../config/Color";
|
||||
|
@ -44,6 +44,7 @@ import {store} from "../../../redux/store";
|
|||
import Modal from "react-native-modal";
|
||||
import Text from "../../../components/Text";
|
||||
import Icon from "react-native-vector-icons/FontAwesome5";
|
||||
import TextInput from "../../../components/TextInput";
|
||||
|
||||
let moment = require('moment-timezone');
|
||||
|
||||
|
@ -217,7 +218,7 @@ const ActivateBuySubscriptionScreen = ({
|
|||
const [password, setPassword] = useState(null);
|
||||
const [subscriptions, setSubscriptions] = useState([]);
|
||||
const [subscription, setSubscription] = useState(null);
|
||||
const [modalPaymentModal, setModalPaymentModal] = useState(true);
|
||||
const [modalPaymentModal, setModalPaymentModal] = useState(false);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
let dropDownAlertRef: any = null;
|
||||
|
@ -312,8 +313,37 @@ const ActivateBuySubscriptionScreen = ({
|
|||
}, [activatePaySubscription]);
|
||||
|
||||
const RegisterSchema = Yup.object().shape({
|
||||
password: wallet.password_validation === "MAX" ? Yup.string()
|
||||
.required(I18n.t('THIS_FIELD_IS_REQUIRED')) : Yup.string()
|
||||
password: Yup.string().required(I18n.t('THIS_FIELD_IS_REQUIRED')),
|
||||
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 = () => (
|
||||
|
@ -347,6 +377,7 @@ const ActivateBuySubscriptionScreen = ({
|
|||
},
|
||||
]}
|
||||
onPress={() => {
|
||||
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'wallet'});
|
||||
}}>
|
||||
<View
|
||||
style={{
|
||||
|
@ -354,9 +385,9 @@ const ActivateBuySubscriptionScreen = ({
|
|||
alignItems: 'center',
|
||||
}}>
|
||||
<View style={styles.iconContent}>
|
||||
<Icon name="paypal" size={24} color={Color.textColor}/>
|
||||
<Icon name="wallet" size={24} color={Color.textColor}/>
|
||||
</View>
|
||||
<Text headline>{I18n.t('PAYPAL')}</Text>
|
||||
<Text headline>{I18n.t('WALLET')}</Text>
|
||||
</View>
|
||||
<Icon
|
||||
name="angle-right"
|
||||
|
@ -374,7 +405,7 @@ const ActivateBuySubscriptionScreen = ({
|
|||
},
|
||||
]}
|
||||
onPress={() => {
|
||||
|
||||
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'card'});
|
||||
}}>
|
||||
<View
|
||||
style={{
|
||||
|
@ -406,10 +437,7 @@ const ActivateBuySubscriptionScreen = ({
|
|||
},
|
||||
]}
|
||||
onPress={() => {
|
||||
/* navigation.navigate('WebviewModalScreen', {
|
||||
url: `${Config.YOOLEARN_CINET_PAY}`,
|
||||
title: t('terms_of_services'),
|
||||
}); */
|
||||
fetchActivePaySubscription(subscription.id, {password: values.password, amount: values.amount, payment_mthod: 'mobile_money'});
|
||||
}}>
|
||||
<View
|
||||
style={{
|
||||
|
@ -454,31 +482,6 @@ const ActivateBuySubscriptionScreen = ({
|
|||
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}>
|
||||
<Animatable.View ref={(comp) => {
|
||||
subscriptionRef = comp
|
||||
|
@ -523,26 +526,36 @@ const ActivateBuySubscriptionScreen = ({
|
|||
return 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>
|
||||
|
||||
{
|
||||
wallet.password_validation === "MAX" &&
|
||||
<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}
|
||||
/>
|
||||
}
|
||||
<TextInput
|
||||
style={{marginTop: 10}}
|
||||
placeholder={I18n.t('AMOUNT')}
|
||||
value={values.amount}
|
||||
onChangeText={(text) => {
|
||||
setFieldValue('amount', text);
|
||||
}}
|
||||
onBlur={handleBlur('amount')}
|
||||
success={touched.amount && !errors.amount}
|
||||
touched={touched.amount}
|
||||
error={errors.amount}
|
||||
/>
|
||||
|
||||
<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
|
||||
style={{marginTop: 20}}
|
||||
|
@ -552,8 +565,6 @@ const ActivateBuySubscriptionScreen = ({
|
|||
{I18n.t('SUBMIT_LABEL')}
|
||||
</Button>
|
||||
</View>
|
||||
)}
|
||||
</Formik>
|
||||
{modalPaymentModal && renderPaymentMethodModal()}
|
||||
|
||||
</ScrollView>
|
||||
|
|
|
@ -398,13 +398,14 @@ const AddBeneficiaryScreen = ({
|
|||
gender: gender,
|
||||
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
||||
affiliation: affiliation,
|
||||
birthdate_proof: childAyantDroitDocument[0].checboxSelectedValue,
|
||||
birthdate_proof_doc: uploadInsuranceImages.result.response[0],
|
||||
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[1] : null,
|
||||
marriage_certificate_doc: uploadInsuranceImages.result.response[0],
|
||||
birthdate_proof: childAyantDroitDocument[1].checboxSelectedValue,
|
||||
profile_image: uploadInsuranceImages.result.response[0],
|
||||
birthdate_proof_doc: uploadInsuranceImages.result.response[1],
|
||||
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_front: uploadInsuranceImages.result.response[1],
|
||||
id_document_back: uploadInsuranceImages.result.response[2],
|
||||
id_document_front: uploadInsuranceImages.result.response[2],
|
||||
id_document_back: uploadInsuranceImages.result.response[3],
|
||||
isEditable: true
|
||||
}, ...beneficiaries]);
|
||||
dropDownAlertRef.alertWithType(
|
||||
|
@ -465,6 +466,13 @@ const AddBeneficiaryScreen = ({
|
|||
}
|
||||
|
||||
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'),
|
||||
name: 'birthdate_proof_doc',
|
||||
|
@ -485,6 +493,13 @@ const AddBeneficiaryScreen = ({
|
|||
const [beneficiaries, setBeneficiaries] = useState([]);
|
||||
|
||||
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
||||
{
|
||||
label: I18n.t('PROFILE_PICTURE'),
|
||||
name: 'profile_image',
|
||||
isFrontCamera: false,
|
||||
file: null,
|
||||
hasCheckbox: false,
|
||||
},
|
||||
{
|
||||
label: I18n.t('ACTE_MARIAGE'),
|
||||
name: 'marriage_certificate_doc',
|
||||
|
|
|
@ -30,6 +30,7 @@ import {
|
|||
fetchGetConsultation,
|
||||
fetchGetConsultationReset,
|
||||
fetchGetDemandeAutorisationSoin,
|
||||
fetchGetInvoiceHistory,
|
||||
fetchGetSubscription
|
||||
} from "../../../redux/insurance/insurance.actions";
|
||||
import DropdownAlert from "react-native-dropdownalert";
|
||||
|
@ -49,6 +50,7 @@ import {Typography} from "../../../config/typography";
|
|||
import Tag from "../../../components/Tag";
|
||||
import FontAwesome5 from "react-native-vector-icons/FontAwesome5";
|
||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import {store} from "../../../redux/store";
|
||||
|
||||
|
||||
let moment = require('moment-timezone');
|
||||
|
@ -60,6 +62,7 @@ const HistoriqueNanoSanteUserScreen = ({
|
|||
fetchGetConsultation,
|
||||
fetchGetSubscription,
|
||||
fetchGetDemandeAutorisationSoin,
|
||||
fetchGetInvoiceHistory,
|
||||
fetchAcceptRejectConsultation,
|
||||
acceptRefuseConsultation,
|
||||
getConsultation
|
||||
|
@ -72,6 +75,7 @@ const HistoriqueNanoSanteUserScreen = ({
|
|||
const [historiqueDetailLabel, setHistoriqueDetailLabel] = useState(I18n.t('SOINS'));
|
||||
const [loadMore, setLoadMore] = useState(false);
|
||||
const [historyResult, setHistoryResult] = useState([]);
|
||||
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
||||
|
||||
let dropDownAlertRef: any = null;
|
||||
|
||||
|
@ -404,8 +408,111 @@ const HistoriqueNanoSanteUserScreen = ({
|
|||
|
||||
</View>
|
||||
</ScrollView>
|
||||
:
|
||||
<ScrollView persistentScrollbar={true}>
|
||||
: 'payments' in historyItemDetail ?
|
||||
<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={{flexDirection: 'row', marginTop: 10}}>
|
||||
|
@ -667,7 +774,48 @@ const HistoriqueNanoSanteUserScreen = ({
|
|||
</View>
|
||||
</View>
|
||||
</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
|
||||
style={[styles.content, {backgroundColor: Color.cardBackgroundColor}]}
|
||||
onPress={() => {
|
||||
|
@ -770,6 +918,31 @@ const HistoriqueNanoSanteUserScreen = ({
|
|||
}}>
|
||||
{` ${I18n.t('DEMANDES')}`}
|
||||
</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}/>}
|
||||
style={{width: 110, borderTopLeftRadius: 0, borderBottomLeftRadius: 0,}}
|
||||
primary
|
||||
|
@ -832,7 +1005,8 @@ export default connect(mapStateToProps, {
|
|||
fetchGetConsultation,
|
||||
fetchAcceptRejectConsultation,
|
||||
fetchGetSubscription,
|
||||
fetchGetDemandeAutorisationSoin
|
||||
fetchGetDemandeAutorisationSoin,
|
||||
fetchGetInvoiceHistory
|
||||
|
||||
})(
|
||||
HistoriqueNanoSanteUserScreen,
|
||||
|
|
|
@ -424,13 +424,14 @@ const InsuranceSubscriptionScreen = ({
|
|||
gender: gender,
|
||||
birthdate: moment(dateNaissance).format('YYYY-MM-DD'),
|
||||
affiliation: affiliation,
|
||||
birthdate_proof: childAyantDroitDocument[0].checboxSelectedValue,
|
||||
birthdate_proof_doc: uploadInsuranceImages.result.response[0],
|
||||
justice_doc: uploadInsuranceImages.result.response.length > 1 ? uploadInsuranceImages.result.response[1] : null,
|
||||
marriage_certificate_doc: uploadInsuranceImages.result.response[0],
|
||||
birthdate_proof: childAyantDroitDocument[1].checboxSelectedValue,
|
||||
profile_image: uploadInsuranceImages.result.response[0],
|
||||
birthdate_proof_doc: uploadInsuranceImages.result.response[1],
|
||||
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_front: uploadInsuranceImages.result.response[1],
|
||||
id_document_back: uploadInsuranceImages.result.response[2]
|
||||
id_document_front: uploadInsuranceImages.result.response[2],
|
||||
id_document_back: uploadInsuranceImages.result.response[3]
|
||||
}, ...beneficiaries]);
|
||||
dropDownAlertRef.alertWithType(
|
||||
'success',
|
||||
|
@ -491,6 +492,13 @@ const InsuranceSubscriptionScreen = ({
|
|||
|
||||
const [isOriginalActeNaissance, setIsOriginalActeNaissance] = useState(true);
|
||||
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'),
|
||||
name: 'birthdate_proof_doc',
|
||||
|
@ -511,6 +519,13 @@ const InsuranceSubscriptionScreen = ({
|
|||
const [beneficiaries, setBeneficiaries] = useState([]);
|
||||
|
||||
const [conjointAyantDroitDocument, setConjointAyantDroitDocument] = useState([
|
||||
{
|
||||
label: I18n.t('PROFILE_PICTURE'),
|
||||
name: 'profile_image',
|
||||
isFrontCamera: false,
|
||||
file: null,
|
||||
hasCheckbox: false,
|
||||
},
|
||||
{
|
||||
label: I18n.t('ACTE_MARIAGE'),
|
||||
name: 'marriage_certificate_doc',
|
||||
|
|
|
@ -27,6 +27,7 @@ import {selectInsuranceList, selectStopSubscription} from "../../../redux/insura
|
|||
|
||||
import {Dropdown} from "react-native-material-dropdown";
|
||||
import {store} from "../../../redux/store";
|
||||
import isNil from "lodash/isNil";
|
||||
|
||||
let moment = require('moment-timezone');
|
||||
|
||||
|
@ -173,7 +174,8 @@ const RenewAssuranceScreen = ({
|
|||
stopSubscription,
|
||||
fetchGetSubscriptionList,
|
||||
fetchGetListInsuranceWithBeneficiaries,
|
||||
insuranceList,
|
||||
fetchGetListInsurance,
|
||||
insuranceList,
|
||||
fetchRenewSubscription,
|
||||
navigation
|
||||
}) => {
|
||||
|
@ -183,6 +185,7 @@ const RenewAssuranceScreen = ({
|
|||
const [subscriptions, setSubscriptions] = useState([]);
|
||||
const [subscription, setSubscription] = useState(null);
|
||||
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
||||
const [amountPerMonth, setAmountPerMonth] = useState(null);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
let dropDownAlertRef: any = null;
|
||||
|
@ -281,6 +284,28 @@ const RenewAssuranceScreen = ({
|
|||
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 (
|
||||
<ScreenComponent>
|
||||
<DropdownAlert ref={ref => (dropDownAlertRef = ref)}/>
|
||||
|
@ -299,7 +324,9 @@ const RenewAssuranceScreen = ({
|
|||
subscriptionRef.shake(800);
|
||||
} else {
|
||||
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,
|
||||
reason: value.reason,
|
||||
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>
|
||||
|
||||
{
|
||||
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
|
||||
style={{marginTop: 10}}
|
||||
onChangeText={handleChange('password')}
|
||||
|
|
|
@ -749,5 +749,12 @@
|
|||
"AUTORISATION_SOIN": "Autorisation soin",
|
||||
"PAYMENT_METHOD": "Méthode de paiement",
|
||||
"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 invoiceUrl = testBaseUrl + '/nanoSanteService/invoices';
|
||||
export const invoiceUserUrl = testBaseUrl + '/nanoSanteService/insurances/invoices';
|
||||
export const exclusionUrl = testBaseUrl + '/nanoSanteService/exclusions';
|
||||
export const getInsuranceListUrl = testBaseUrl + '/nanoSanteService/insurances';
|
||||
export const checkInsuranceCoverageAmountUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/check-insurance-coverage-amount';
|
||||
|
|
Loading…
Reference in New Issue