gestion du qr code
This commit is contained in:
parent
4fb3b5bae0
commit
9ef4ebf19f
File diff suppressed because one or more lines are too long
|
@ -560,8 +560,160 @@
|
|||
"TITLE_HELP_SOON": "Help not available!",
|
||||
"YOUR_NETWORK": "Select your network",
|
||||
"HELP_SOON": "A tutorial helping you in understanding the features of the application will soon be available.",
|
||||
"ATTACH_ASSURANCE_CARD": "Attached an insurance card",
|
||||
"SUBSCRIBE_ASSURANCE": "Taking out insurance",
|
||||
"ADD_SUBSCRIBE": "Add a beneficiary",
|
||||
"DELETE_SUBSCRIBE": "Delete beneficiary",
|
||||
"STOP_SUBSCRIBE": "Stop my insurance",
|
||||
"RENEW_INSSURANCE": "Renew my insurance ",
|
||||
"MANAGE_ASSURANCE": "Manage my insurance",
|
||||
"MANAGE_HEALTH": "Manage my care",
|
||||
"DEMAND_AUTORIZATION_HEALTH": "Request for care authorisation",
|
||||
"HISTORIC_HEALTH": "Historic",
|
||||
"VALID_HEALTH": "Validate a treatment ",
|
||||
"ACTIVATE_INSSURANCE": "Activate my insurance",
|
||||
"AMOUNT_PER_DURATION": "Amount per duration",
|
||||
"AMOUNT_PRIME": "Amount of the premium",
|
||||
"ASSURE": "Insured",
|
||||
"NUMERO_ASSURE": "Insured person's number",
|
||||
"NOM_ASSURE": "Insured first name",
|
||||
"PRENOM_ASSURE": "Insured last name",
|
||||
"DATE_NAISSANCE": "Date of birth",
|
||||
"SEXE": "Sex",
|
||||
"MASCULIN": "Male",
|
||||
"FEMININ": "Female",
|
||||
"AFFILIATION": "Affiliation",
|
||||
"ENFANT": "Child",
|
||||
"CONJOINT": "Spouse",
|
||||
"ADD_AYANT_DROIT": "Add a beneficiary",
|
||||
"AYANT_DROITS": "Beneficiary",
|
||||
"SELECT_INSURANCE": "Select an insurance",
|
||||
"COPIE_LEGALISE_ACTE_NAISSANCE_CERTIFICAT_NAISSANCE": "Birth \n certificate",
|
||||
"DOCUMENT_JUSTICE_ENFANT_ADOPTE": "Adoption document \n or guardianship (optional) ",
|
||||
"ACTE_MARIAGE": "Marriage certificate",
|
||||
"CNI_FRONT_FACE": "Front side identity",
|
||||
"CNI_BACK_FACE": "Rear side identity",
|
||||
"CLASSE_PRESTATAIRE": "Provider class",
|
||||
"PLEASE_SELECT_INSURANCE_BEFORE": "Please select insurance first",
|
||||
"NUMBER_MAX_BENEFICIARY": "Maximum number of beneficiaries reached",
|
||||
"BENEFICIARY_SUCCESSFULLY_ADDED": "The beneficiary has been correctly added"
|
||||
"BENEFICIARY_SUCCESSFULLY_ADDED": "The beneficiary has been correctly added",
|
||||
"NUMBER_OF_MONTHS": "Number of months",
|
||||
"MINIMUM_AMOUNT": "Min. amount",
|
||||
"AMOUNT_PER_MONTH": "Amount per duration of cover",
|
||||
"DETAIL": "Detail",
|
||||
"PRIME_AMOUNT": "Amount of the premium",
|
||||
"AYANT_DROIT": "Beneficiaries",
|
||||
"SELECT_SUBSCRIPTION": "Select a subscription",
|
||||
"SAISIR_FEUILLE_SOIN": "Create a consultation",
|
||||
"MODIFIER_FEUILLE_SOIN": "Modifying a care sheet",
|
||||
"EXECUTER_PRESCRIPTION": "Execute prescription",
|
||||
"FACTURER_FEUILLES_SOINS": "Invoice the health care sheets",
|
||||
"FICHE_DE_SOIN": "Care sheet",
|
||||
"PATIENT": "Patient",
|
||||
"PRATICIEN": "Practitioner",
|
||||
"PRESCRIPTION_MEDICALE": "Prescription",
|
||||
"ADD_PRESCRIPTION_MEDICALE": "Add prescription",
|
||||
"SITUATION": "Situation",
|
||||
"CODE_AGREMENT_ETS": "Approval code",
|
||||
"SITUATION": "Situation",
|
||||
"NOM_PRATICIEN": "Practitioner firstname",
|
||||
"PRENOM_PRATICIEN": "Practitioner lastname",
|
||||
"NOM_CLIENT": "Customer first name",
|
||||
"PRENOM_CLIENT": "Customer last name",
|
||||
"CODE_AGREMENT": "Approval code",
|
||||
"CLASSIFICATION": "Classification",
|
||||
"COURANTE": "Current",
|
||||
"LONGUE": "Long",
|
||||
"ACCIDENT": "Accident",
|
||||
"GROSSESSE": "Pregnancy",
|
||||
"ADD_PRESTATION": "Add a service",
|
||||
"ADD_PRESCRIPTION": "Add a prescription",
|
||||
"VISITE_DOMICILE": "Home visit",
|
||||
"CODE_ACTE": "Act code ",
|
||||
"TICKET_MONDERATEUR": "Co-payment",
|
||||
"AMOUNT_PER_INSURANCE": "Amount per insurance",
|
||||
"VISITE_DOMICILE": "Home visit",
|
||||
"CONDITION_PRISE_CHARGE": "Condition of coverage",
|
||||
"AFFECTION_COURANTE": "Current condition",
|
||||
"AFFECTION_LONGUE": "Long-term condition",
|
||||
"EXONERE": "Exempt",
|
||||
"DATE_ACCIDENT": "Accident date",
|
||||
"DATE_DEBUT_GROSSESSE": "Start date of pregnancy",
|
||||
"DATE_FIN_GROSSESSE": "End date of pregnancy",
|
||||
"SCAN": "Scanner",
|
||||
"BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE": "Move your camera close to the QR code to scan it",
|
||||
"CLOSE": "Close",
|
||||
"EMPTY_LIST": "Empty list",
|
||||
"NO_ASSURE_MATCH_SEARCH": "No policyholders match the search",
|
||||
"NO_ASSURE": "No insured",
|
||||
"LIST_ASSURE": "List of insured persons",
|
||||
"ASSURE_NON_EN_REGLE": "Insured not in good standing",
|
||||
"CLASSE_PRESTATAIRE": "Provider class",
|
||||
"FRAIS_DEPLACEMENT": "Travel costs",
|
||||
"AJOUTER_MEDICAMENT": "Add drug/device",
|
||||
"AJOUTER_EXAMEN": "Add exam",
|
||||
"NAME": "Name",
|
||||
"POSOLOGIE": "Dosage",
|
||||
"QUANTITE": "Quantity",
|
||||
"LISTE_MEDICAMENT": "Drugs list",
|
||||
"PRESTATION": "Prestation",
|
||||
"MEDICAMENT": "Drug",
|
||||
"EXAMEN": "Exam",
|
||||
"PRESTATION_SUCCESSFULLY_ADD": "Service successfully added",
|
||||
"EXAMENS_SUCCESSFULLY_ADD": "Exam successfully added",
|
||||
"PRESCRIPTIONS_SUCCESSFULLY_ADD": "Prescription successfully added",
|
||||
"PRESCRIPTIONS_SUCCESSFULLY_MODIFY": "Prescription successfully modified",
|
||||
"YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION": "You must add at least one benefit",
|
||||
"NO_DRUG_MATCH_YOU_SEARCH": "There are no drugs that match your search, do you want to add any?",
|
||||
"COMPRESSED": "Tablet",
|
||||
"SYRUP": "Syrup",
|
||||
"SOLUTION": "Solution",
|
||||
"SUPPOSITORY": "Suppository",
|
||||
"DEVICE": "Equipment",
|
||||
"AJOUTER_NOUVEAU_MEDICAMENT": "Add new drug",
|
||||
"SOUS_ORDONNANCE": "On prescription",
|
||||
"PLEASE_SELECT_CONDITON_PRISE_CHARGE_FIRST": "Please select the support condition first",
|
||||
"CONSULTATION": "Consultation",
|
||||
"STATE": "State",
|
||||
"INSTITUTE_NAME": "Institution name",
|
||||
"ACCEPT": "Accept",
|
||||
"REJECT": "Reject",
|
||||
"DETAIL": "Detail",
|
||||
"NO_CONSULTATION_DEMAND": "No consultation request",
|
||||
"LIST_CONSULTATION": "List of consultations",
|
||||
"MODIFY_CONSULTATION": "Modify consultation",
|
||||
"MEDICAMENTS": "Drugs",
|
||||
"MODIFIER_MEDICAMENT": "Modify drug",
|
||||
"MODIFIER_EXAMEN": "Modify exam",
|
||||
"EXAMENS_SUCCESSFULLY_MODIFY": "Exam successfully modified",
|
||||
"PRESTATION_SUCCESSFULLY_MODIFY": "Successfully modified service",
|
||||
"MODIFY_PRESTATION": "Modifying a service",
|
||||
"LIST_PRESTATION": "List of services",
|
||||
"NO_CONSULTATION": "No consultation",
|
||||
"NO_EXECUTION": "No execution",
|
||||
"LISTE_CONSULTATION": "List of consultations",
|
||||
"LIST_EXECUTION": "List of executions",
|
||||
"MODIFY_EXECUTION": "Modify execution",
|
||||
"SOUSCRIPTION": "Subscriptions",
|
||||
"FEUILLE_SOIN": "Care sheet",
|
||||
"SOINS": "Care",
|
||||
"NETWORK": "Network",
|
||||
"TOTAL_BONUS_AMOUNT": "Total prime",
|
||||
"BONUS_AMOUNT": "Amount of the basic premium",
|
||||
"MONTANT_ASSURANCE": "Amount of insurance",
|
||||
"MONTANT_ASSURE": "Amount of the insured",
|
||||
"DEMANDES": "Requests",
|
||||
"ACTE": "Act",
|
||||
"AGENT_VALIDEUR": "Validating agent",
|
||||
"TEXT_SUPPRESS_CONFIRM_BENEFICIARY": "Do you really want to remove this rightful claimant?",
|
||||
"ENTER_PASSWORD_TO_VALID_MODIFICATION": "Enter your password and validate the deletion of the account to delete it permanently",
|
||||
"PLEASE_SELECT_AT_LEAST_ASSURE": "Please select at least one beneficiary",
|
||||
"ID": "ID",
|
||||
"INVOICE_ID": "Bill ID",
|
||||
"INVOICE": "Bill",
|
||||
"HISTORY": "Historic",
|
||||
"INFORMATION_MESSAGE": "Information message",
|
||||
"MONTANT_ASSURANCE_CONSOMME": "Amount of insurance consumed",
|
||||
"MONTANT_ASSURANCE_RESTANTE": "Amount of remaining insurance",
|
||||
"NO_BENEFICIARY": "No beneficiary"
|
||||
}
|
||||
|
|
|
@ -634,7 +634,7 @@
|
|||
"CODE_ACTE": "Code acte ",
|
||||
"TICKET_MONDERATEUR": "Ticket modérateur",
|
||||
"AMOUNT_PER_INSURANCE": "Montant par assurance",
|
||||
"VISITE_DOMICILE": "Visible domicile",
|
||||
"VISITE_DOMICILE": "Visite domicile",
|
||||
"CONDITION_PRISE_CHARGE": "Condition de prise en charge",
|
||||
"AFFECTION_COURANTE": "Affection courante",
|
||||
"AFFECTION_LONGUE": "Affection longue durée",
|
||||
|
@ -716,5 +716,6 @@
|
|||
"HISTORY": "Historique",
|
||||
"INFORMATION_MESSAGE": "Message d'information",
|
||||
"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"
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
*/
|
||||
import InsuranceActions from './insurance.type';
|
||||
import {
|
||||
autorisationCareRequestUrl, checkInsuranceCoverageAmountUrl,
|
||||
autorisationCareRequestUrl,
|
||||
checkInsuranceCoverageAmountUrl,
|
||||
consultationUrl,
|
||||
createConsultationUrl,
|
||||
executionPrescriptionUrl,
|
||||
|
@ -18,7 +19,8 @@ import {
|
|||
getNetworkActsUrl,
|
||||
getProviderClassUrl,
|
||||
getUserByIdQRCodeUrl,
|
||||
getUserByNameOrNumberUrl, invoiceUrl,
|
||||
getUserByNameOrNumberUrl,
|
||||
invoiceUrl,
|
||||
subscribeInsuranceUrl,
|
||||
uploadInsuranceImagetUrl
|
||||
} from "../../webservice/IlinkConstants";
|
||||
|
@ -302,9 +304,9 @@ export const fetchGetUserByIdQRCodeError = (error: any) => ({
|
|||
payload: error,
|
||||
});
|
||||
|
||||
export const fetchGetUserByIdQRCode = (network_id, id) => {
|
||||
export const fetchGetUserByIdQRCode = (id) => {
|
||||
return ApiAction({
|
||||
url: `${getUserByIdQRCodeUrl}?network_id=${network_id}&${id}`,
|
||||
url: `${getUserByIdQRCodeUrl}?${id}`,
|
||||
method: 'GET',
|
||||
onLoading: fetchGetUserByIdQRCodePending,
|
||||
onSuccess: fetchGetUserByIdQRCodeSuccess,
|
||||
|
|
|
@ -62,13 +62,14 @@ import {
|
|||
import {resetCommissionReducer, transferCommissionAction} from '../../webservice/WalletTransferCommission';
|
||||
import {readUser} from '../../webservice/AuthApi';
|
||||
import chunk from "lodash/chunk";
|
||||
import _ from "lodash";
|
||||
import FontAwesome from "react-native-vector-icons/FontAwesome";
|
||||
import FontAwesome5 from "react-native-vector-icons/FontAwesome5";
|
||||
import {
|
||||
fetchGetConsultationReset,
|
||||
fetchGetDrugAppareilReset, fetchGetNetworkActsReset, fetchGetProviderClassReset,
|
||||
fetchGetSubscriptionListReset, fetchGetUserByIdQRCodeReset,
|
||||
fetchGetDrugAppareilReset,
|
||||
fetchGetNetworkActsReset,
|
||||
fetchGetProviderClassReset,
|
||||
fetchGetSubscriptionListReset,
|
||||
fetchGetUserByIdQRCodeReset,
|
||||
fetchGetUserByNameOrNumberReset
|
||||
} from "../../redux/insurance/insurance.actions";
|
||||
import {facturerSoinReset} from "../../webservice/NanoCreditApi";
|
||||
|
@ -1288,43 +1289,43 @@ class WalletDetail extends Component {
|
|||
}
|
||||
</View>
|
||||
) : (wallet.type === "ilink_sante") ?
|
||||
<View style={styles.transactionContainer}>
|
||||
<View style={styles.transactionContainer}>
|
||||
|
||||
<View style={[styles.containerTouch]}>
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => {
|
||||
this.props.navigation.push(route.historiqueNanoSanteSuperHyperScreen);
|
||||
}}
|
||||
activeOpacity={0.9}>
|
||||
<Icon name='clock'
|
||||
color={Color.primaryColor}
|
||||
size={30}
|
||||
style={styles.imageBanner}/>
|
||||
<View style={[styles.containerTouch]}>
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => {
|
||||
this.props.navigation.push(route.historiqueNanoSanteSuperHyperScreen);
|
||||
}}
|
||||
activeOpacity={0.9}>
|
||||
<Icon name='clock'
|
||||
color={Color.primaryColor}
|
||||
size={30}
|
||||
style={styles.imageBanner}/>
|
||||
|
||||
<View style={[styles.content]}>
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={{paddingTop: 20,}}>
|
||||
<Text
|
||||
style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={{paddingTop: 20,}}>
|
||||
<Text
|
||||
style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View> :
|
||||
<>
|
||||
<View style={[styles.checkDefault, {borderBottomColor: Color.borderColor}]}>
|
||||
<Text
|
||||
style={[Typography.title3, Typography.semibold]}>
|
||||
{I18n.t('TRANSACTION_HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
</View> :
|
||||
<>
|
||||
<View style={[styles.checkDefault, {borderBottomColor: Color.borderColor}]}>
|
||||
<Text
|
||||
style={[Typography.title3, Typography.semibold]}>
|
||||
{I18n.t('TRANSACTION_HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{this.renderSuperHyperHistoryTransactionList()}
|
||||
</>
|
||||
{this.renderSuperHyperHistoryTransactionList()}
|
||||
</>
|
||||
}
|
||||
</>
|
||||
)
|
||||
|
@ -1474,21 +1475,71 @@ class WalletDetail extends Component {
|
|||
</Text>
|
||||
</View>
|
||||
{(wallet.type === "ilink_sante") &&
|
||||
chunk(optionNanoSanteAgentScreen.options, 2).map((item, index) => (
|
||||
chunk(optionNanoSanteAgentScreen.options, 2).map((item, index) => {
|
||||
|
||||
<View key={index} style={styles.transactionContainer}>
|
||||
{
|
||||
item.length === 1 ?
|
||||
if (index <= 1)
|
||||
return (
|
||||
|
||||
item.map((wallet, i) => (
|
||||
this.renderItem(wallet, true, i)
|
||||
)) :
|
||||
item.map((wallet, i) => (
|
||||
this.renderItem(wallet, false, i)
|
||||
))
|
||||
}
|
||||
</View>
|
||||
))
|
||||
<View key={index} style={styles.transactionContainer}>
|
||||
{
|
||||
item.length === 1 ?
|
||||
|
||||
item.map((wallet, i) => (
|
||||
this.renderItem(wallet, true, i)
|
||||
)) :
|
||||
item.map((wallet, i) => (
|
||||
this.renderItem(wallet, false, i)
|
||||
))
|
||||
}
|
||||
</View>
|
||||
)
|
||||
else {
|
||||
return (
|
||||
<View key={index} style={styles.transactionContainer}>
|
||||
{this.renderItem(item[0], false, 0)}
|
||||
<>
|
||||
<View style={[styles.containerTouch]}>
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => {
|
||||
this.props.navigation.push(route.walletOptionSelect, {
|
||||
optionSelect: optionIdentificationScreen,
|
||||
lottie: {
|
||||
source: require("./../../datas/json/identification.json"),
|
||||
loop: true
|
||||
}
|
||||
})
|
||||
}}
|
||||
activeOpacity={0.9}>
|
||||
|
||||
<Icon name='pencil-plus'
|
||||
color={Color.primaryColor}
|
||||
size={30}
|
||||
style={styles.imageBanner}/>
|
||||
|
||||
<View style={[styles.content]}>
|
||||
|
||||
<View style={styles.contentTitle}>
|
||||
<Text
|
||||
style={[Typography.headline, Typography.semibold]}>
|
||||
{I18n.t('CREATION_IDENTIFICATION_DESCRIPTION')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<View style={{flex: 1}}>
|
||||
<Text
|
||||
style={[Typography.overline, Color.grayColor], {paddingVertical: 5}}
|
||||
numberOfLines={5}>
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
{(wallet.type === "ilink-world" || wallet.type === "ilink" || wallet.type === "visa") &&
|
||||
|
@ -1729,7 +1780,7 @@ class WalletDetail extends Component {
|
|||
|
||||
{!this.isHomeRootView && (wallet.type === 'ilink_sante' && wallet.category !== 'geolocated') ?
|
||||
this.renderHistoryTransaction(wallet)
|
||||
: !this.isHomeRootView && this.renderHistoryTransaction(wallet) }
|
||||
: !this.isHomeRootView && this.renderHistoryTransaction(wallet)}
|
||||
{this.isHomeRootView && this.renderSuperHyperHistoryTransaction(wallet)}
|
||||
</View>
|
||||
|
||||
|
|
|
@ -28,8 +28,9 @@ import {ScreenComponent} from "../../../components/ScreenComponent";
|
|||
import Button from "../../../components/Button";
|
||||
import {responsiveWidth} from "react-native-responsive-dimensions";
|
||||
import {
|
||||
fetchAcceptRejectConsultationReset,
|
||||
fetchActivePaySubscription, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset,
|
||||
fetchActivePaySubscription,
|
||||
fetchCheckInsuranceCoverageAmount,
|
||||
fetchCheckInsuranceCoverageAmountReset,
|
||||
fetchCreateConsultation,
|
||||
fetchCreateConsultationReset,
|
||||
fetchExecutionPrescription,
|
||||
|
@ -50,7 +51,8 @@ import {readUser} from "../../../webservice/AuthApi";
|
|||
import TextInput from "../../../components/TextInput";
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {
|
||||
selectActivatePaySubscription, selectCheckInsuranceCoverageAmount,
|
||||
selectActivatePaySubscription,
|
||||
selectCheckInsuranceCoverageAmount,
|
||||
selectExecutionPrescription,
|
||||
selectGetAmountConsultation,
|
||||
selectGetConsultation,
|
||||
|
@ -291,7 +293,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
const [modalPrice, setModalPrice] = useState(false);
|
||||
const [modalListAssure, setModalListAssure] = useState(false);
|
||||
const [modalListMedicament, setModalListMedicament] = useState(false);
|
||||
const [tmpSheetId, setTmpSheetId] = useState(''+Date.now());
|
||||
const [tmpSheetId, setTmpSheetId] = useState('' + Date.now());
|
||||
|
||||
const [prestations, setPrestations] = useState([]);
|
||||
|
||||
|
@ -346,7 +348,30 @@ const ExecuterPrescriptionScreen = ({
|
|||
}
|
||||
}, [user]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByIdQRCode);
|
||||
if (getUserByIdQRCode.result !== null) {
|
||||
setIsNumeroAssureSearch(false);
|
||||
setIsPhoneAssureSearch(true);
|
||||
setFieldValue('numero_assure', getUserByIdQRCode.result.response.phone);
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&phone=${getUserByIdQRCode.result.response.phone}`);
|
||||
}
|
||||
|
||||
if (getUserByIdQRCode.error) {
|
||||
Alert.alert(
|
||||
I18n.t("ERROR_LABLE"),
|
||||
Utils.getErrorMsg(getUserByIdQRCode),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
dispatch(fetchGetUserByIdQRCodeReset());
|
||||
}
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
);
|
||||
}
|
||||
}, [getUserByIdQRCode]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByNameOrNumber);
|
||||
|
@ -376,14 +401,8 @@ const ExecuterPrescriptionScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
}
|
||||
}, [getUserByNameOrNumber]);
|
||||
|
||||
|
@ -402,7 +421,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
if(elementToSetPrice.examen) {
|
||||
if (elementToSetPrice.examen) {
|
||||
setConsultation({
|
||||
...consultation,
|
||||
exams: consultation.exams.map(exam => {
|
||||
|
@ -427,7 +446,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
}
|
||||
}, [checkInsuranceCoverageAmount]);
|
||||
|
@ -447,14 +466,14 @@ const ExecuterPrescriptionScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getConsultation),
|
||||
);
|
||||
dispatch(fetchGetConsultationReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getConsultation),
|
||||
);
|
||||
dispatch(fetchGetConsultationReset());*/
|
||||
}
|
||||
}, [getConsultation]);
|
||||
|
||||
|
@ -487,14 +506,14 @@ const ExecuterPrescriptionScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(executionPrescription),
|
||||
);
|
||||
dispatch(fetchExecutionPrescriptionReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(executionPrescription),
|
||||
);
|
||||
dispatch(fetchExecutionPrescriptionReset());*/
|
||||
}
|
||||
}, [executionPrescription]);
|
||||
|
||||
|
@ -528,7 +547,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
<QRCodeScanner
|
||||
onRead={(result) => {
|
||||
setShowQRCodeScanner(false);
|
||||
console.log("result", result.data);
|
||||
fetchGetUserByIdQRCode(result.data);
|
||||
}}
|
||||
flashMode={RNCamera.Constants.FlashMode.off}
|
||||
/>
|
||||
|
@ -569,10 +588,10 @@ const ExecuterPrescriptionScreen = ({
|
|||
exams: [
|
||||
{
|
||||
unit_price: values.price,
|
||||
quantity: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].quantity
|
||||
quantity: consultation.exams.filter(exam => elementToSetPrice.id === exam.id)[0].quantity
|
||||
}
|
||||
],
|
||||
tmp_sheet_id:tmpSheetId,
|
||||
tmp_sheet_id: tmpSheetId,
|
||||
});
|
||||
} else {
|
||||
setConsultation({
|
||||
|
@ -590,11 +609,11 @@ const ExecuterPrescriptionScreen = ({
|
|||
care_condition: consultation._care_condition,
|
||||
act_action: "INSERT",
|
||||
act_type: "PRESCRIPTION",
|
||||
tmp_sheet_id:tmpSheetId,
|
||||
tmp_sheet_id: tmpSheetId,
|
||||
prescriptions: [
|
||||
{
|
||||
unit_price: values.price,
|
||||
quantity: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].quantity
|
||||
quantity: consultation.prescriptions.filter(prescription => elementToSetPrice.id === prescription.id)[0].quantity
|
||||
}
|
||||
],
|
||||
});
|
||||
|
@ -770,7 +789,11 @@ const ExecuterPrescriptionScreen = ({
|
|||
<TouchableOpacity
|
||||
style={[
|
||||
styles.contentActionModalBottom,
|
||||
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',},
|
||||
{
|
||||
borderBottomColor: Color.borderColor,
|
||||
width: "100%",
|
||||
flexDirection: 'column',
|
||||
},
|
||||
]}
|
||||
key={item.id}
|
||||
onPress={() => {
|
||||
|
@ -834,7 +857,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
{`${I18n.t('MONTANT_ASSURANCE_CONSOMME')}: ${beneficiary.insurance_consumed_amount}`}
|
||||
</Text>
|
||||
<Text footnote>
|
||||
{`${I18n.t('MONTANT_ASSURANCE_RESTANTE')}: ${beneficiary.insurance_remaining_amount}`}
|
||||
{`${I18n.t('MONTANT_ASSURANCE_RESTANTE')}: ${beneficiary.insurance_remaining_amount}`}
|
||||
</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
@ -1180,7 +1203,7 @@ const ExecuterPrescriptionScreen = ({
|
|||
case 0:
|
||||
console.log("values", values);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());
|
||||
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
|
||||
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
|
||||
if (isNumeroAssureSearch)
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`);
|
||||
else if (isPhoneAssureSearch)
|
||||
|
@ -1195,7 +1218,8 @@ const ExecuterPrescriptionScreen = ({
|
|||
default:
|
||||
return true;
|
||||
}
|
||||
};;
|
||||
};
|
||||
;
|
||||
|
||||
|
||||
const renderBtnExamen = () => (
|
||||
|
|
|
@ -348,6 +348,31 @@ const ModifierExecutionPrescriptionScreen = ({
|
|||
}
|
||||
}, [user]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByIdQRCode);
|
||||
if (getUserByIdQRCode.result !== null) {
|
||||
setIsNumeroAssureSearch(false);
|
||||
setIsPhoneAssureSearch(true);
|
||||
setFieldValue('numero_assure', getUserByIdQRCode.result.response.phone);
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&phone=${getUserByIdQRCode.result.response.phone}`);
|
||||
}
|
||||
|
||||
if (getUserByIdQRCode.error) {
|
||||
Alert.alert(
|
||||
I18n.t("ERROR_LABLE"),
|
||||
Utils.getErrorMsg(getUserByIdQRCode),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
dispatch(fetchGetUserByIdQRCodeReset());
|
||||
}
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
);
|
||||
}
|
||||
}, [getUserByIdQRCode]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByNameOrNumber);
|
||||
if (getUserByNameOrNumber.result !== null) {
|
||||
|
@ -529,6 +554,7 @@ const ModifierExecutionPrescriptionScreen = ({
|
|||
<QRCodeScanner
|
||||
onRead={(result) => {
|
||||
setShowQRCodeScanner(false);
|
||||
fetchGetUserByIdQRCode(result.data);
|
||||
console.log("result", result.data);
|
||||
}}
|
||||
flashMode={RNCamera.Constants.FlashMode.off}
|
||||
|
|
|
@ -457,6 +457,31 @@ const ModifierFeuilleSoinScreen = ({
|
|||
}
|
||||
}, [getUserByNameOrNumber]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByIdQRCode);
|
||||
if (getUserByIdQRCode.result !== null) {
|
||||
setIsNumeroAssureSearch(false);
|
||||
setIsPhoneAssureSearch(true);
|
||||
setFieldValue('numero_assure', getUserByIdQRCode.result.response.phone);
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&phone=${getUserByIdQRCode.result.response.phone}`);
|
||||
}
|
||||
|
||||
if (getUserByIdQRCode.error) {
|
||||
Alert.alert(
|
||||
I18n.t("ERROR_LABLE"),
|
||||
Utils.getErrorMsg(getUserByIdQRCode),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
dispatch(fetchGetUserByIdQRCodeReset());
|
||||
}
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
);
|
||||
}
|
||||
}, [getUserByIdQRCode]);
|
||||
|
||||
useEffect(() => {
|
||||
if (checkInsuranceCoverageAmount.result !== null) {
|
||||
if (checkInsuranceCoverageAmount.result.response !== null) {
|
||||
|
@ -700,6 +725,7 @@ const ModifierFeuilleSoinScreen = ({
|
|||
<QRCodeScanner
|
||||
onRead={(result) => {
|
||||
setShowQRCodeScanner(false);
|
||||
fetchGetUserByIdQRCode(result.data);
|
||||
console.log("result", result.data);
|
||||
}}
|
||||
flashMode={RNCamera.Constants.FlashMode.off}
|
||||
|
|
|
@ -32,7 +32,9 @@ import {
|
|||
fetchActivePaySubscription,
|
||||
fetchActivePaySubscriptionReset,
|
||||
fetchAddDrug,
|
||||
fetchAddDrugReset, fetchCheckInsuranceCoverageAmount, fetchCheckInsuranceCoverageAmountReset,
|
||||
fetchAddDrugReset,
|
||||
fetchCheckInsuranceCoverageAmount,
|
||||
fetchCheckInsuranceCoverageAmountReset,
|
||||
fetchCreateConsultation,
|
||||
fetchCreateConsultationReset,
|
||||
fetchGetAmountConsultation,
|
||||
|
@ -48,7 +50,7 @@ import {
|
|||
fetchGetUserByIdQRCode,
|
||||
fetchGetUserByIdQRCodeReset,
|
||||
fetchGetUserByNameOrNumber,
|
||||
fetchGetUserByNameOrNumberReset, fetchModifyPrescriptionReset
|
||||
fetchGetUserByNameOrNumberReset
|
||||
} from "../../../redux/insurance/insurance.actions";
|
||||
import DropdownAlert from "react-native-dropdownalert";
|
||||
import {readUser} from "../../../webservice/AuthApi";
|
||||
|
@ -56,7 +58,8 @@ import TextInput from "../../../components/TextInput";
|
|||
import {createStructuredSelector} from "reselect";
|
||||
import {
|
||||
selectActivatePaySubscription,
|
||||
selectAddDrug, selectCheckInsuranceCoverageAmount,
|
||||
selectAddDrug,
|
||||
selectCheckInsuranceCoverageAmount,
|
||||
selectCreateConsultation,
|
||||
selectGetAmountConsultation,
|
||||
selectGetDrugAppareil,
|
||||
|
@ -292,7 +295,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
const [showDateDebutGrossessePicker, setShowDateDebutGrossessePicker] = useState(false);
|
||||
const [showDateFinGrossessePicker, setShowDateFinGrossessePicker] = useState(false);
|
||||
const [careConditon, setCareCondition] = useState(null);
|
||||
const [tmpSheetId, setTmpSheetId] = useState(''+Date.now());
|
||||
const [tmpSheetId, setTmpSheetId] = useState('' + Date.now());
|
||||
|
||||
const [user, setUser] = useState(null);
|
||||
const [assure, setAssure] = useState(null);
|
||||
|
@ -417,14 +420,14 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
}
|
||||
}, [getUserByNameOrNumber]);
|
||||
useEffect(() => {
|
||||
|
@ -455,14 +458,14 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
}
|
||||
}, [getUserByNameOrNumber]);
|
||||
|
||||
|
@ -471,18 +474,18 @@ const SaisirFeuilleSoinScreen = ({
|
|||
console.log("Prestations", prestations);
|
||||
if (checkInsuranceCoverageAmount.result !== null) {
|
||||
if (checkInsuranceCoverageAmount.result.response !== null) {
|
||||
if(prestations !== null) {
|
||||
if (prestations !== null) {
|
||||
setModalPrestation(false);
|
||||
Utils.displayToast(I18n.t('PRESTATION_SUCCESSFULLY_ADD'));
|
||||
}
|
||||
/* if(examens !== null) {
|
||||
setModalExamen(false);
|
||||
Utils.displayToast(I18n.t('EXAMENS_SUCCESSFULLY_ADD'));
|
||||
}
|
||||
if(prescriptions !== null) {
|
||||
setModalMedicament(false);
|
||||
Utils.displayToast(I18n.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'));
|
||||
}*/
|
||||
/* if(examens !== null) {
|
||||
setModalExamen(false);
|
||||
Utils.displayToast(I18n.t('EXAMENS_SUCCESSFULLY_ADD'));
|
||||
}
|
||||
if(prescriptions !== null) {
|
||||
setModalMedicament(false);
|
||||
Utils.displayToast(I18n.t('PRESCRIPTIONS_SUCCESSFULLY_ADD'));
|
||||
}*/
|
||||
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
||||
|
||||
}
|
||||
|
@ -496,30 +499,30 @@ const SaisirFeuilleSoinScreen = ({
|
|||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
if(prestations !== null) {
|
||||
if (prestations !== null) {
|
||||
let newPrestation = [...prestations];
|
||||
newPrestation.shift();
|
||||
setPrestations(newPrestation);
|
||||
setModalPrestation(false);
|
||||
}
|
||||
/* if(examens !== null) {
|
||||
setModalExamen(false);
|
||||
}
|
||||
if(prescriptions !== null) {
|
||||
setModalMedicament(false);
|
||||
}*/
|
||||
/* if(examens !== null) {
|
||||
setModalExamen(false);
|
||||
}
|
||||
if(prescriptions !== null) {
|
||||
setModalMedicament(false);
|
||||
}*/
|
||||
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
||||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getUserByNameOrNumber),
|
||||
);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());*/
|
||||
}
|
||||
}, [checkInsuranceCoverageAmount]);
|
||||
|
||||
|
@ -557,14 +560,14 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getDrugAppareil),
|
||||
);
|
||||
dispatch(fetchGetDrugAppareilReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(getDrugAppareil),
|
||||
);
|
||||
dispatch(fetchGetDrugAppareilReset());*/
|
||||
}
|
||||
}, [getDrugAppareil]);
|
||||
|
||||
|
@ -585,14 +588,14 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(addDrug),
|
||||
);
|
||||
dispatch(fetchAddDrugReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(addDrug),
|
||||
);
|
||||
dispatch(fetchAddDrugReset());*/
|
||||
}
|
||||
}, [addDrug]);
|
||||
|
||||
|
@ -625,17 +628,42 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(createConsultation),
|
||||
);
|
||||
dispatch(fetchCreateConsultationReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(createConsultation),
|
||||
);
|
||||
dispatch(fetchCreateConsultationReset());*/
|
||||
}
|
||||
}, [createConsultation]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log("getUserByNameOrNumber.result", getUserByIdQRCode);
|
||||
if (getUserByIdQRCode.result !== null) {
|
||||
setIsNumeroAssureSearch(false);
|
||||
setIsPhoneAssureSearch(true);
|
||||
setFieldValue('numero_assure', getUserByIdQRCode.result.response.phone);
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&phone=${getUserByIdQRCode.result.response.phone}`);
|
||||
}
|
||||
|
||||
if (getUserByIdQRCode.error) {
|
||||
Alert.alert(
|
||||
I18n.t("ERROR_LABLE"),
|
||||
Utils.getErrorMsg(getUserByIdQRCode),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
dispatch(fetchGetUserByIdQRCodeReset());
|
||||
}
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
);
|
||||
}
|
||||
}, [getUserByIdQRCode]);
|
||||
|
||||
const SaisirFeuilleSoinSchema = Yup.object().shape({
|
||||
numero_assure: Yup.string()
|
||||
.required(I18n.t('THIS_FIELD_IS_REQUIRED')),
|
||||
|
@ -764,7 +792,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
<QRCodeScanner
|
||||
onRead={(result) => {
|
||||
setShowQRCodeScanner(false);
|
||||
console.log("result", result.data);
|
||||
fetchGetUserByIdQRCode(result.data);
|
||||
}}
|
||||
flashMode={RNCamera.Constants.FlashMode.off}
|
||||
/>
|
||||
|
@ -800,7 +828,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
care_condition: careConditon,
|
||||
act_action: "INSERT",
|
||||
act_type: "PERFORMANCE",
|
||||
tmp_sheet_id:tmpSheetId,
|
||||
tmp_sheet_id: tmpSheetId,
|
||||
performances: [
|
||||
{
|
||||
amount: values.amount_prestation,
|
||||
|
@ -884,7 +912,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
style={{marginTop: 10}}
|
||||
placeholder={I18n.t('AMOUNT')}
|
||||
value={values.amount_prestation}
|
||||
onChangeText={(text)=> {
|
||||
onChangeText={(text) => {
|
||||
setFieldValue('amount_prestation', text);
|
||||
fetchGetAmountConsultation({
|
||||
network_id: wallet.id_network,
|
||||
|
@ -894,7 +922,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}}
|
||||
onBlur={handleBlur('amount_prestation')}
|
||||
success={touched.amount_prestation && !errors.amount_prestation}
|
||||
touched={touched.amount_prestation}A
|
||||
touched={touched.amount_prestation} A
|
||||
error={errors.amount_prestation}
|
||||
|
||||
/>
|
||||
|
@ -1384,7 +1412,11 @@ const SaisirFeuilleSoinScreen = ({
|
|||
<TouchableOpacity
|
||||
style={[
|
||||
styles.contentActionModalBottom,
|
||||
{borderBottomColor: Color.borderColor, width: "100%",flexDirection: 'column',},
|
||||
{
|
||||
borderBottomColor: Color.borderColor,
|
||||
width: "100%",
|
||||
flexDirection: 'column',
|
||||
},
|
||||
]}
|
||||
key={item.id}
|
||||
onPress={() => {
|
||||
|
@ -1569,13 +1601,13 @@ const SaisirFeuilleSoinScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
I18n.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION'),
|
||||
);*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
I18n.t('YOU_MUST_ADD_AT_LEAST_ONE_PRESTATION'),
|
||||
);*/
|
||||
} else {
|
||||
fetchCreateConsultation({
|
||||
insured_id: assure.insured_id,
|
||||
|
@ -1603,7 +1635,7 @@ const SaisirFeuilleSoinScreen = ({
|
|||
case 0:
|
||||
console.log("values", values);
|
||||
dispatch(fetchGetUserByNameOrNumberReset());
|
||||
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
|
||||
if (values.numero_assure !== '' && getUserByNameOrNumber.result === null) {
|
||||
if (isNumeroAssureSearch)
|
||||
fetchGetUserByNameOrNumber(wallet.id_network, `&insured_id=${values.numero_assure}`);
|
||||
else if (isPhoneAssureSearch)
|
||||
|
|
|
@ -3,8 +3,6 @@ import {
|
|||
Alert,
|
||||
Dimensions,
|
||||
FlatList,
|
||||
Image,
|
||||
Keyboard,
|
||||
KeyboardAvoidingView,
|
||||
Platform,
|
||||
ScrollView,
|
||||
|
@ -17,38 +15,35 @@ import Modal from 'react-native-modal';
|
|||
import {Formik} from 'formik';
|
||||
import * as Yup from 'yup';
|
||||
import * as Utils from '../../../utils/UtilsFunction';
|
||||
import {displayToast} from '../../../utils/UtilsFunction';
|
||||
import {Color} from "../../../config/Color";
|
||||
import I18n from 'react-native-i18n';
|
||||
import {ScreenComponent} from "../../../components/ScreenComponent";
|
||||
import TextInput from '../../../components/TextInput';
|
||||
import Text from '../../../components/Text';
|
||||
import PasswordInput from '../../../components/PasswordInput';
|
||||
import Button from "../../../components/Button";
|
||||
import FontAwesome from "react-native-vector-icons/FontAwesome";
|
||||
import {responsiveWidth} from "react-native-responsive-dimensions";
|
||||
import SwitchSelector from "react-native-switch-selector";
|
||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import {
|
||||
fetchAddBeneficiaryToSubscription,
|
||||
fetchAddBeneficiaryToSubscriptionReset, fetchDeleteBeneficiary, fetchDeleteBeneficiaryReset,
|
||||
fetchAddBeneficiaryToSubscriptionReset,
|
||||
fetchDeleteBeneficiary,
|
||||
fetchDeleteBeneficiaryReset,
|
||||
fetchGetInsurancePrimeAmount,
|
||||
fetchGetListInsurance,
|
||||
fetchGetListInsuranceReset,
|
||||
fetchGetSubscriptionList,
|
||||
fetchGetSubscriptionListReset,
|
||||
fetchSubscribeInsurance,
|
||||
fetchSubscribeInsuranceReset,
|
||||
fetchUploadInsurance,
|
||||
fetchUploadInsuranceReset
|
||||
fetchUploadInsurance
|
||||
} from "../../../redux/insurance/insurance.actions";
|
||||
import DropdownAlert from "react-native-dropdownalert";
|
||||
import {readUser} from "../../../webservice/AuthApi";
|
||||
import ImagePicker from "react-native-image-crop-picker";
|
||||
import DateTimePicker from "@react-native-community/datetimepicker";
|
||||
import * as Animatable from 'react-native-animatable';
|
||||
import {createStructuredSelector} from "reselect";
|
||||
import {
|
||||
selectAddBeneficiaryToSubscription, selectDeleteBeneficiary,
|
||||
selectAddBeneficiaryToSubscription,
|
||||
selectDeleteBeneficiary,
|
||||
selectInsuranceList,
|
||||
selectInsurancePrimeAmount,
|
||||
selectSubscribeInsurance,
|
||||
|
@ -58,7 +53,6 @@ import {
|
|||
|
||||
import {Dropdown} from "react-native-material-dropdown";
|
||||
import Icon from "react-native-vector-icons/FontAwesome5";
|
||||
import {displayToast} from "../../../utils/UtilsFunction";
|
||||
|
||||
let moment = require('moment-timezone');
|
||||
|
||||
|
@ -202,14 +196,14 @@ const styles = StyleSheet.create({
|
|||
});
|
||||
|
||||
const DeleteBeneficiaryScreen = ({
|
||||
fetchAddBeneficiaryToSubscription,
|
||||
addBeneficiaryToSubscription,
|
||||
fetchGetSubscriptionList,
|
||||
fetchAddBeneficiaryToSubscription,
|
||||
addBeneficiaryToSubscription,
|
||||
fetchGetSubscriptionList,
|
||||
fetchDeleteBeneficiary,
|
||||
subscriptionList,
|
||||
subscriptionList,
|
||||
deleteBeneficiary,
|
||||
navigation
|
||||
}) => {
|
||||
navigation
|
||||
}) => {
|
||||
|
||||
const [user, setUser] = useState(null);
|
||||
const [insurance, setInsurance] = useState(null);
|
||||
|
@ -260,14 +254,14 @@ const DeleteBeneficiaryScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(subscriptionList),
|
||||
);
|
||||
dispatch(fetchGetListInsuranceReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(subscriptionList),
|
||||
);
|
||||
dispatch(fetchGetListInsuranceReset());*/
|
||||
}
|
||||
}, [subscriptionList]);
|
||||
|
||||
|
@ -300,14 +294,14 @@ const DeleteBeneficiaryScreen = ({
|
|||
}
|
||||
}
|
||||
],
|
||||
{ cancelable: false }
|
||||
{cancelable: false}
|
||||
);
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(deleteBeneficiary),
|
||||
);
|
||||
dispatch(fetchDeleteBeneficiaryReset());*/
|
||||
/* dropDownAlertRef.alertWithType(
|
||||
'error',
|
||||
I18n.t('ERROR_LABEL'),
|
||||
Utils.getErrorMsg(deleteBeneficiary),
|
||||
);
|
||||
dispatch(fetchDeleteBeneficiaryReset());*/
|
||||
}
|
||||
}, [deleteBeneficiary]);
|
||||
|
||||
|
@ -339,6 +333,11 @@ const DeleteBeneficiaryScreen = ({
|
|||
data={beneficiaries}
|
||||
extraData={beneficiaries}
|
||||
keyExtractor={(item, index) => index}
|
||||
ListEmptyComponent={() => {
|
||||
return (
|
||||
<Text>{I18n.t('NO_WALLET_HISTORY')}</Text>
|
||||
)
|
||||
}}
|
||||
renderItem={({item, index}) => {
|
||||
console.log("Item", item);
|
||||
return (
|
||||
|
@ -356,34 +355,34 @@ const DeleteBeneficiaryScreen = ({
|
|||
</Text>
|
||||
</View>
|
||||
<View style={styles.iconRight}>
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
<TouchableOpacity
|
||||
onPress={() => {
|
||||
|
||||
Alert.alert(
|
||||
I18n.t("TITLE_SUPPRESS_CONFIRM"),
|
||||
I18n.t("TEXT_SUPPRESS_CONFIRM_BENEFICIARY"),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
setBeneficiariesToDelete([...beneficiariesToDelete, item.id]);
|
||||
setBeneficiaries(beneficiaries.filter(beneficiary => beneficiary.id !== item.id));
|
||||
}
|
||||
},
|
||||
{
|
||||
text: I18n.t("CANCEL_LABEL"), onPress: () => {
|
||||
|
||||
}
|
||||
Alert.alert(
|
||||
I18n.t("TITLE_SUPPRESS_CONFIRM"),
|
||||
I18n.t("TEXT_SUPPRESS_CONFIRM_BENEFICIARY"),
|
||||
[
|
||||
{
|
||||
text: I18n.t("OK"), onPress: () => {
|
||||
setBeneficiariesToDelete([...beneficiariesToDelete, item.id]);
|
||||
setBeneficiaries(beneficiaries.filter(beneficiary => beneficiary.id !== item.id));
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
}}>
|
||||
<Icon
|
||||
name="minus-circle"
|
||||
size={24}
|
||||
color={Color.grayColor}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
},
|
||||
{
|
||||
text: I18n.t("CANCEL_LABEL"), onPress: () => {
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
}}>
|
||||
<Icon
|
||||
name="minus-circle"
|
||||
size={24}
|
||||
color={Color.grayColor}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
@ -394,7 +393,9 @@ const DeleteBeneficiaryScreen = ({
|
|||
style={{marginTop: 20, marginBottom: 20}}
|
||||
full
|
||||
onPress={() => {
|
||||
displayToast(I18n.t('ENTER_PASSWORD_TO_VALID_MODIFICATION'));
|
||||
if (beneficiaries.length >= 1 && beneficiariesToDelete.length > 0)
|
||||
displayToast(I18n.t('ENTER_PASSWORD_TO_VALID_MODIFICATION'));
|
||||
|
||||
setModalViewBeneficiariesVisible(false)
|
||||
}}>
|
||||
{I18n.t('OK')}
|
||||
|
|
|
@ -506,40 +506,40 @@ export const optionNanoSanteUserScreen = {
|
|||
title: 'SUBSCRIBE_ASSURANCE',
|
||||
screen: 'insuranceSubscriptionScreen',
|
||||
icon: 'file-medical',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
title: 'ADD_SUBSCRIBE',
|
||||
screen: 'addBeneficiaryScreen',
|
||||
icon: "user-plus",
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
title: 'ACTIVATE_INSSURANCE',
|
||||
screen: 'activateBuySubscriptionScreen',
|
||||
icon: "check-circle",
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
|
||||
},
|
||||
{
|
||||
title: 'RENEW_INSSURANCE',
|
||||
screen: 'renewAssuranceScreen',
|
||||
icon: "sync",
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
|
||||
},
|
||||
{
|
||||
screen: 'deleteBeneficiaryScreen',
|
||||
icon: 'user-minus',
|
||||
title: 'DELETE_SUBSCRIBE',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
|
||||
},
|
||||
{
|
||||
screen: 'stopSubscriptionScreen',
|
||||
icon: 'hand-spock',
|
||||
title: 'STOP_SUBSCRIBE',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
|
||||
},
|
||||
]
|
||||
|
@ -551,20 +551,20 @@ export const optionNanoSanteUserScreen = {
|
|||
icon: 'book-medical',
|
||||
title: 'DEMAND_AUTORIZATION_HEALTH',
|
||||
screen: 'demandeAutorisationSoinScreen',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
title: 'HISTORIC_HEALTH',
|
||||
screen: 'historiqueNanoSanteUserScreen',
|
||||
icon: 'history',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
|
||||
},
|
||||
{
|
||||
title: 'VALID_HEALTH',
|
||||
screen: 'validateConsultationScreen',
|
||||
icon: 'check-circle',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -649,38 +649,33 @@ export const optionNanoSanteAgentScreen = {
|
|||
screen: route.saisirFeuilleSoinScreen,
|
||||
icon: 'file-medical',
|
||||
title: 'SAISIR_FEUILLE_SOIN',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
screen: route.executerPrescriptionScreen,
|
||||
icon: 'check-circle',
|
||||
title: 'EXECUTER_PRESCRIPTION',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
screen: route.modifierFeuilleSoinScreen,
|
||||
icon: 'edit',
|
||||
title: 'MODIFY_CONSULTATION',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
screen: route.modifierExecutionPrescriptionScreen,
|
||||
icon: 'edit',
|
||||
title: 'MODIFY_EXECUTION',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
screen: route.historiqueNanoSanteAgentScreen,
|
||||
icon: 'history',
|
||||
title: 'HISTORY',
|
||||
iconType:"FontAwesome5"
|
||||
iconType: "FontAwesome5"
|
||||
},
|
||||
{
|
||||
screen: route.createIdentification,
|
||||
icon: 'user',
|
||||
iconType:"FontAwesome5",
|
||||
title: 'CREATION_IDENTIFICATION_DESCRIPTION_SUBSCREEN',
|
||||
}
|
||||
{}
|
||||
|
||||
]
|
||||
}
|
||||
|
|
|
@ -714,5 +714,6 @@
|
|||
"HISTORY": "Historic",
|
||||
"INFORMATION_MESSAGE": "Information message",
|
||||
"MONTANT_ASSURANCE_CONSOMME": "Amount of insurance consumed",
|
||||
"MONTANT_ASSURANCE_RESTANTE": "Amount of remaining insurance"
|
||||
"MONTANT_ASSURANCE_RESTANTE": "Amount of remaining insurance",
|
||||
"NO_BENEFICIARY": "No beneficiary"
|
||||
}
|
||||
|
|
|
@ -716,5 +716,6 @@
|
|||
"HISTORY": "Historique",
|
||||
"INFORMATION_MESSAGE": "Message d'information",
|
||||
"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"
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ export const facturerSoinUrl = testBaseUrl + '/nanoSanteService/generate-invoice
|
|||
export const invoiceUrl = testBaseUrl + '/nanoSanteService/invoices';
|
||||
export const getInsuranceListUrl = testBaseUrl + '/nanoSanteService/insurances';
|
||||
export const checkInsuranceCoverageAmountUrl = testBaseUrl + '/nanoSanteService/health-care-sheets/check-insurance-coverage-amount';
|
||||
export const getUserByIdQRCodeUrl = testBaseUrl + '/nanoSanteService/qrcode/read';
|
||||
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';
|
||||
|
|
Loading…
Reference in New Issue