Liste des exclusions
This commit is contained in:
parent
50f248c3f4
commit
dbe5e91178
|
@ -12,6 +12,7 @@ import {
|
||||||
checkInsuranceCoverageAmountUrl,
|
checkInsuranceCoverageAmountUrl,
|
||||||
consultationUrl,
|
consultationUrl,
|
||||||
createConsultationUrl,
|
createConsultationUrl,
|
||||||
|
exclusionUrl,
|
||||||
executionPrescriptionUrl,
|
executionPrescriptionUrl,
|
||||||
getAmountConsultationUrl,
|
getAmountConsultationUrl,
|
||||||
getDrugAndDevicesUrl,
|
getDrugAndDevicesUrl,
|
||||||
|
@ -762,3 +763,32 @@ export const fetchCheckInsuranceCoverageAmount = (data) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/************************************************************/
|
||||||
|
export const fetchGetExclusionPending = () => ({
|
||||||
|
type: InsuranceActions.GET_EXCLUSION_PENDING,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchGetExclusionReset = () => ({
|
||||||
|
type: InsuranceActions.GET_EXCLUSION_RESET,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchGetExclusionSuccess = (authkey: any) => ({
|
||||||
|
type: InsuranceActions.GET_EXCLUSION_SUCCESS,
|
||||||
|
payload: authkey,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchGetExclusionError = (error: any) => ({
|
||||||
|
type: InsuranceActions.GET_EXCLUSION_ERROR,
|
||||||
|
payload: error,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchGetExclusion = (network_id) => {
|
||||||
|
return ApiAction({
|
||||||
|
url: `${exclusionUrl}/${network_id}`,
|
||||||
|
method: 'GET',
|
||||||
|
onLoading: fetchGetExclusionPending,
|
||||||
|
onSuccess: fetchGetExclusionSuccess,
|
||||||
|
onError: fetchGetExclusionError,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -768,3 +768,34 @@ export const checkInsuranceCoverageAmountReducer = (state = INITIAL_STATE, actio
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getExclusionReducer = (state = INITIAL_STATE, action: InsuranceActions) => {
|
||||||
|
console.log("ACTION", action);
|
||||||
|
switch (action.type) {
|
||||||
|
case InsuranceActions.GET_EXCLUSION_PENDING:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
loading: true
|
||||||
|
}
|
||||||
|
case InsuranceActions.GET_EXCLUSION_SUCCESS:
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
result: action.payload.response,
|
||||||
|
error: null
|
||||||
|
}
|
||||||
|
case InsuranceActions.GET_EXCLUSION_ERROR:
|
||||||
|
return {
|
||||||
|
...state,
|
||||||
|
loading: false,
|
||||||
|
result: null,
|
||||||
|
error: action.payload
|
||||||
|
}
|
||||||
|
|
||||||
|
case InsuranceActions.GET_EXCLUSION_RESET:
|
||||||
|
return INITIAL_STATE;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return state
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
* Date: 13/09/2021
|
* Date: 13/09/2021
|
||||||
*/
|
*/
|
||||||
import {createSelector} from "reselect";
|
import {createSelector} from "reselect";
|
||||||
import {checkInsuranceCoverageAmountReducer, deleteBeneficiaryeducer, facturerSoinReducer} from "./insurance.reducer";
|
|
||||||
|
|
||||||
const selectInsuranceListReducer = (state) => state.insuranceList;
|
const selectInsuranceListReducer = (state) => state.insuranceList;
|
||||||
const selectSubscribeInsuranceReducer = (state) => state.subscribeInsurance;
|
const selectSubscribeInsuranceReducer = (state) => state.subscribeInsurance;
|
||||||
|
@ -32,6 +31,7 @@ const selectDemandeAutorisationSoinReducer = (state) => state.demandeAutorisatio
|
||||||
const selectDeleteBeneficiaryeducerReducer = (state) => state.deleteBeneficiaryeducer;
|
const selectDeleteBeneficiaryeducerReducer = (state) => state.deleteBeneficiaryeducer;
|
||||||
const selectFacturerSoinReducer = (state) => state.facturerSoinReducer;
|
const selectFacturerSoinReducer = (state) => state.facturerSoinReducer;
|
||||||
const selectCheckInsuranceCoverageAmountReducer = (state) => state.checkInsuranceCoverageAmountReducer;
|
const selectCheckInsuranceCoverageAmountReducer = (state) => state.checkInsuranceCoverageAmountReducer;
|
||||||
|
const selectGetExclusionReducer = (state) => state.getExclusionReducer;
|
||||||
|
|
||||||
export const selectInsuranceList = createSelector(
|
export const selectInsuranceList = createSelector(
|
||||||
[selectInsuranceListReducer],
|
[selectInsuranceListReducer],
|
||||||
|
@ -142,3 +142,8 @@ export const selectCheckInsuranceCoverageAmount = createSelector(
|
||||||
[selectCheckInsuranceCoverageAmountReducer],
|
[selectCheckInsuranceCoverageAmountReducer],
|
||||||
(checkInsuranceCoverageAmount) => checkInsuranceCoverageAmount
|
(checkInsuranceCoverageAmount) => checkInsuranceCoverageAmount
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const selectGetExclusion = createSelector(
|
||||||
|
[selectGetExclusionReducer],
|
||||||
|
(getExclusion) => getExclusion
|
||||||
|
);
|
||||||
|
|
|
@ -130,5 +130,10 @@ const InsuranceActions = {
|
||||||
CHECK_HEALTH_CARE_SHEET_SUCCESS: 'CHECK_HEALTH_CARE_SHEET_SUCCESS',
|
CHECK_HEALTH_CARE_SHEET_SUCCESS: 'CHECK_HEALTH_CARE_SHEET_SUCCESS',
|
||||||
CHECK_HEALTH_CARE_SHEET_ERROR: 'CHECK_HEALTH_CARE_SHEET_ERROR',
|
CHECK_HEALTH_CARE_SHEET_ERROR: 'CHECK_HEALTH_CARE_SHEET_ERROR',
|
||||||
CHECK_HEALTH_CARE_SHEET_RESET: 'CHECK_HEALTH_CARE_SHEET_RESET',
|
CHECK_HEALTH_CARE_SHEET_RESET: 'CHECK_HEALTH_CARE_SHEET_RESET',
|
||||||
|
|
||||||
|
GET_EXCLUSION_PENDING: 'GET_EXCLUSION_PENDING',
|
||||||
|
GET_EXCLUSION_SUCCESS: 'GET_EXCLUSION_SUCCESS',
|
||||||
|
GET_EXCLUSION_ERROR: 'GET_EXCLUSION_ERROR',
|
||||||
|
GET_EXCLUSION_RESET: 'GET_EXCLUSION_RESET',
|
||||||
}
|
}
|
||||||
export default InsuranceActions;
|
export default InsuranceActions;
|
||||||
|
|
|
@ -64,6 +64,7 @@ import {
|
||||||
getAmountConsultationReducer,
|
getAmountConsultationReducer,
|
||||||
getConsultationReducer,
|
getConsultationReducer,
|
||||||
getDrugAppareilReducer,
|
getDrugAppareilReducer,
|
||||||
|
getExclusionReducer,
|
||||||
getInsurancePrimeAmountReducer,
|
getInsurancePrimeAmountReducer,
|
||||||
getNetworkActReducer,
|
getNetworkActReducer,
|
||||||
getProviderClassReducer,
|
getProviderClassReducer,
|
||||||
|
@ -192,6 +193,7 @@ const rootReducer = persistCombineReducers(persistConfig, {
|
||||||
checkInsuranceCoverageAmountReducer: checkInsuranceCoverageAmountReducer,
|
checkInsuranceCoverageAmountReducer: checkInsuranceCoverageAmountReducer,
|
||||||
searchUserReducer: SearchUserReducer,
|
searchUserReducer: SearchUserReducer,
|
||||||
getQRCodeDetailReducer: GetQRCodeDetailReducer,
|
getQRCodeDetailReducer: GetQRCodeDetailReducer,
|
||||||
|
getExclusionReducer: getExclusionReducer
|
||||||
});
|
});
|
||||||
|
|
||||||
export default rootReducer;
|
export default rootReducer;
|
||||||
|
|
|
@ -21,8 +21,6 @@ import {IlinkEmitter} from "../../utils/events";
|
||||||
import {connect} from "react-redux";
|
import {connect} from "react-redux";
|
||||||
import {bindActionCreators} from "redux";
|
import {bindActionCreators} from "redux";
|
||||||
import {getBankListAction, getBankListReset} from "../../webservice/BankApi";
|
import {getBankListAction, getBankListReset} from "../../webservice/BankApi";
|
||||||
import {store} from "../../redux/store";
|
|
||||||
import {readUser} from "../../webservice/AuthApi";
|
|
||||||
import {getOperatorListAction, getOperatorListReset} from "../../webservice/WalletApi";
|
import {getOperatorListAction, getOperatorListReset} from "../../webservice/WalletApi";
|
||||||
|
|
||||||
const route = require('../../route.json');
|
const route = require('../../route.json');
|
||||||
|
@ -242,7 +240,7 @@ const mapDispatchToProps = dispatch => bindActionCreators({
|
||||||
getBankListAction,
|
getBankListAction,
|
||||||
getBankListReset,
|
getBankListReset,
|
||||||
getOperatorListAction,
|
getOperatorListAction,
|
||||||
getOperatorListReset
|
getOperatorListReset,
|
||||||
}, dispatch);
|
}, dispatch);
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(SouscrireAssuranceUser);
|
export default connect(mapStateToProps, mapDispatchToProps)(SouscrireAssuranceUser);
|
||||||
|
|
|
@ -41,6 +41,7 @@ import {
|
||||||
fetchGetConsultation,
|
fetchGetConsultation,
|
||||||
fetchGetConsultationReset,
|
fetchGetConsultationReset,
|
||||||
fetchGetDrugAppareil,
|
fetchGetDrugAppareil,
|
||||||
|
fetchGetExclusion,
|
||||||
fetchGetNetworkActs,
|
fetchGetNetworkActs,
|
||||||
fetchGetNetworkActsReset,
|
fetchGetNetworkActsReset,
|
||||||
fetchGetProviderClass,
|
fetchGetProviderClass,
|
||||||
|
@ -63,6 +64,7 @@ import {
|
||||||
selectGetAmountConsultation,
|
selectGetAmountConsultation,
|
||||||
selectGetConsultation,
|
selectGetConsultation,
|
||||||
selectGetDrugAppareil,
|
selectGetDrugAppareil,
|
||||||
|
selectGetExclusion,
|
||||||
selectGetNetworkAct,
|
selectGetNetworkAct,
|
||||||
selectGetProviderClass,
|
selectGetProviderClass,
|
||||||
selectGetUserByIdQRCode,
|
selectGetUserByIdQRCode,
|
||||||
|
@ -91,6 +93,7 @@ import DateTimePicker from "@react-native-community/datetimepicker";
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import Fontisto from "react-native-vector-icons/Fontisto";
|
import Fontisto from "react-native-vector-icons/Fontisto";
|
||||||
|
import WebView from "react-native-webview";
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
|
||||||
|
@ -273,6 +276,8 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
fetchCheckInsuranceCoverageAmount,
|
fetchCheckInsuranceCoverageAmount,
|
||||||
checkInsuranceCoverageAmount,
|
checkInsuranceCoverageAmount,
|
||||||
getConsultation,
|
getConsultation,
|
||||||
|
fetchGetExclusion,
|
||||||
|
getExclusion,
|
||||||
getUserByNameOrNumber,
|
getUserByNameOrNumber,
|
||||||
getUserByIdQRCode,
|
getUserByIdQRCode,
|
||||||
getProviderClass,
|
getProviderClass,
|
||||||
|
@ -337,6 +342,8 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
const [modalModifyMedicament, setModalModifyMedicament] = useState(false);
|
const [modalModifyMedicament, setModalModifyMedicament] = useState(false);
|
||||||
const [modalModifyExamen, setModalModifyExamen] = useState(false);
|
const [modalModifyExamen, setModalModifyExamen] = useState(false);
|
||||||
const [modalAddMedicament, setModalAddMedicament] = useState(false);
|
const [modalAddMedicament, setModalAddMedicament] = useState(false);
|
||||||
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
const [prestations, setPrestations] = useState([]);
|
const [prestations, setPrestations] = useState([]);
|
||||||
|
|
||||||
|
@ -409,7 +416,7 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
dispatch(fetchModifyPrescriptionReset());
|
dispatch(fetchModifyPrescriptionReset());
|
||||||
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
||||||
|
|
||||||
|
fetchGetExclusion(wallet.id_network);
|
||||||
fetchGetProviderClass(wallet.id_network);
|
fetchGetProviderClass(wallet.id_network);
|
||||||
fetchGetNetworkActs(wallet.id_network, '');
|
fetchGetNetworkActs(wallet.id_network, '');
|
||||||
|
|
||||||
|
@ -683,6 +690,49 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
setFieldValue('pregnancy_start_at', moment(currentDate).format('YYYY-MM-DD'));
|
setFieldValue('pregnancy_start_at', moment(currentDate).format('YYYY-MM-DD'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const renderModalExclusion = () => (
|
||||||
|
<View style={[styles.containModal, {backgroundColor: Color.containerBackgroundColor}]}>
|
||||||
|
<Modal
|
||||||
|
isVisible={modalVisible}
|
||||||
|
onSwipeComplete={() => {
|
||||||
|
setModalVisible(false);
|
||||||
|
}}
|
||||||
|
swipeDirection={['down']}
|
||||||
|
style={styles.bottomModal}>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
styles.contentFilterBottom,
|
||||||
|
{backgroundColor: Color.containerBackgroundColor},
|
||||||
|
]}>
|
||||||
|
<View style={styles.contentSwipeDown}>
|
||||||
|
<View style={styles.lineSwipeDown}/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text body2 style={{marginTop: 10}}>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
|
||||||
|
<View style={{
|
||||||
|
height: Dimensions.get('window').height - 200,
|
||||||
|
width: Dimensions.get('window').width,
|
||||||
|
}}>
|
||||||
|
<WebView
|
||||||
|
style={{flex: 1}}
|
||||||
|
originWhitelist={['*']}
|
||||||
|
source={{html: getExclusion.result.document}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style={{marginTop: 20, marginBottom: 20}}
|
||||||
|
full
|
||||||
|
onPress={() => setModalVisible(false)}>
|
||||||
|
{I18n.t('OK')}
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
const renderDateDebutGrossessePicker = () => {
|
const renderDateDebutGrossessePicker = () => {
|
||||||
return (<DateTimePicker
|
return (<DateTimePicker
|
||||||
timeZoneOffsetInMinutes={0}
|
timeZoneOffsetInMinutes={0}
|
||||||
|
@ -3174,6 +3224,7 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
{modalVisible && renderModalExclusion()}
|
||||||
{modalPrestation && renderAddNewPrestation()}
|
{modalPrestation && renderAddNewPrestation()}
|
||||||
{modalListPrestation && renderPresatationList()}
|
{modalListPrestation && renderPresatationList()}
|
||||||
{modalModifyPrestation && renderModifyPrestation()}
|
{modalModifyPrestation && renderModifyPrestation()}
|
||||||
|
@ -3194,6 +3245,25 @@ const ModifierFeuilleSoinScreen = ({
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
|
{(getExclusion.result !== null) && (<TouchableOpacity
|
||||||
|
style={{
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
width: 60,
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 10,
|
||||||
|
right: 10,
|
||||||
|
height: 60,
|
||||||
|
padding: 3,
|
||||||
|
backgroundColor: Color.primaryColor,
|
||||||
|
borderRadius: 100,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
setModalVisible(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text whiteColor caption2>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
</TouchableOpacity>)}
|
||||||
</ScreenComponent>
|
</ScreenComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -3209,7 +3279,8 @@ const mapStateToProps = createStructuredSelector({
|
||||||
getConsultation: selectGetConsultation,
|
getConsultation: selectGetConsultation,
|
||||||
getNetworkAct: selectGetNetworkAct,
|
getNetworkAct: selectGetNetworkAct,
|
||||||
modifyPrescription: selectModifyPrescription,
|
modifyPrescription: selectModifyPrescription,
|
||||||
checkInsuranceCoverageAmount: selectCheckInsuranceCoverageAmount
|
checkInsuranceCoverageAmount: selectCheckInsuranceCoverageAmount,
|
||||||
|
getExclusion: selectGetExclusion
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, {
|
export default connect(mapStateToProps, {
|
||||||
|
@ -3224,7 +3295,8 @@ export default connect(mapStateToProps, {
|
||||||
fetchGetConsultation,
|
fetchGetConsultation,
|
||||||
fetchExecutionPrescription,
|
fetchExecutionPrescription,
|
||||||
fetchModifyPrescription,
|
fetchModifyPrescription,
|
||||||
fetchCheckInsuranceCoverageAmount
|
fetchCheckInsuranceCoverageAmount,
|
||||||
|
fetchGetExclusion
|
||||||
})(
|
})(
|
||||||
ModifierFeuilleSoinScreen,
|
ModifierFeuilleSoinScreen,
|
||||||
);
|
);
|
||||||
|
|
|
@ -41,6 +41,7 @@ import {
|
||||||
fetchGetAmountConsultationReset,
|
fetchGetAmountConsultationReset,
|
||||||
fetchGetDrugAppareil,
|
fetchGetDrugAppareil,
|
||||||
fetchGetDrugAppareilReset,
|
fetchGetDrugAppareilReset,
|
||||||
|
fetchGetExclusion,
|
||||||
fetchGetNetworkActs,
|
fetchGetNetworkActs,
|
||||||
fetchGetNetworkActsReset,
|
fetchGetNetworkActsReset,
|
||||||
fetchGetProviderClass,
|
fetchGetProviderClass,
|
||||||
|
@ -63,6 +64,7 @@ import {
|
||||||
selectCreateConsultation,
|
selectCreateConsultation,
|
||||||
selectGetAmountConsultation,
|
selectGetAmountConsultation,
|
||||||
selectGetDrugAppareil,
|
selectGetDrugAppareil,
|
||||||
|
selectGetExclusion,
|
||||||
selectGetNetworkAct,
|
selectGetNetworkAct,
|
||||||
selectGetProviderClass,
|
selectGetProviderClass,
|
||||||
selectGetUserByIdQRCode,
|
selectGetUserByIdQRCode,
|
||||||
|
@ -88,6 +90,7 @@ import * as Utils from "../../../utils/UtilsFunction";
|
||||||
import {store} from "../../../redux/store";
|
import {store} from "../../../redux/store";
|
||||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import Fontisto from "react-native-vector-icons/Fontisto";
|
import Fontisto from "react-native-vector-icons/Fontisto";
|
||||||
|
import WebView from "react-native-webview";
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
|
||||||
|
@ -264,6 +267,8 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
fetchCreateConsultation,
|
fetchCreateConsultation,
|
||||||
fetchGetAmountConsultation,
|
fetchGetAmountConsultation,
|
||||||
fetchCheckInsuranceCoverageAmount,
|
fetchCheckInsuranceCoverageAmount,
|
||||||
|
fetchGetExclusion,
|
||||||
|
getExclusion,
|
||||||
getUserByNameOrNumber,
|
getUserByNameOrNumber,
|
||||||
getUserByIdQRCode,
|
getUserByIdQRCode,
|
||||||
getDrugAppareil,
|
getDrugAppareil,
|
||||||
|
@ -312,6 +317,8 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
const [modalListAssure, setModalListAssure] = useState(false);
|
const [modalListAssure, setModalListAssure] = useState(false);
|
||||||
const [modalListMedicament, setModalListMedicament] = useState(false);
|
const [modalListMedicament, setModalListMedicament] = useState(false);
|
||||||
|
|
||||||
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
|
|
||||||
const [networkAct, setNetworkAct] = useState(null);
|
const [networkAct, setNetworkAct] = useState(null);
|
||||||
const [prestations, setPrestations] = useState([]);
|
const [prestations, setPrestations] = useState([]);
|
||||||
|
|
||||||
|
@ -383,6 +390,7 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
dispatch(fetchAddDrugReset());
|
dispatch(fetchAddDrugReset());
|
||||||
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
dispatch(fetchCheckInsuranceCoverageAmountReset());
|
||||||
|
|
||||||
|
fetchGetExclusion(wallet.id_network);
|
||||||
fetchGetProviderClass(wallet.id_network);
|
fetchGetProviderClass(wallet.id_network);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
@ -727,6 +735,48 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
setFieldValue('accident_date', moment(currentDate).format('YYYY-MM-DD'));
|
setFieldValue('accident_date', moment(currentDate).format('YYYY-MM-DD'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const renderModalExclusion = () => (
|
||||||
|
<View style={[styles.containModal, {backgroundColor: Color.containerBackgroundColor}]}>
|
||||||
|
<Modal
|
||||||
|
isVisible={modalVisible}
|
||||||
|
onSwipeComplete={() => {
|
||||||
|
setModalVisible(false);
|
||||||
|
}}
|
||||||
|
swipeDirection={['down']}
|
||||||
|
style={styles.bottomModal}>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
styles.contentFilterBottom,
|
||||||
|
{backgroundColor: Color.containerBackgroundColor},
|
||||||
|
]}>
|
||||||
|
<View style={styles.contentSwipeDown}>
|
||||||
|
<View style={styles.lineSwipeDown}/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text body2 style={{marginTop: 10}}>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
|
||||||
|
<View style={{
|
||||||
|
height: Dimensions.get('window').height - 200,
|
||||||
|
width: Dimensions.get('window').width,
|
||||||
|
}}>
|
||||||
|
<WebView
|
||||||
|
style={{flex: 1}}
|
||||||
|
originWhitelist={['*']}
|
||||||
|
source={{html: getExclusion.result.document}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style={{marginTop: 20, marginBottom: 20}}
|
||||||
|
full
|
||||||
|
onPress={() => setModalVisible(false)}>
|
||||||
|
{I18n.t('OK')}
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
const renderDateAccidentPicker = () => {
|
const renderDateAccidentPicker = () => {
|
||||||
return (<DateTimePicker
|
return (<DateTimePicker
|
||||||
timeZoneOffsetInMinutes={0}
|
timeZoneOffsetInMinutes={0}
|
||||||
|
@ -2234,6 +2284,7 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
{modalVisible && renderModalExclusion()}
|
||||||
{modalPrestation && renderAddNewPrestation()}
|
{modalPrestation && renderAddNewPrestation()}
|
||||||
{modalMedicament && renderAddNewMedicament()}
|
{modalMedicament && renderAddNewMedicament()}
|
||||||
{modalExamen && renderAddNewExamen()}
|
{modalExamen && renderAddNewExamen()}
|
||||||
|
@ -2248,6 +2299,25 @@ const SaisirFeuilleSoinScreen = ({
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
|
{(getExclusion.result !== null) && (<TouchableOpacity
|
||||||
|
style={{
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
width: 60,
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 10,
|
||||||
|
right: 10,
|
||||||
|
height: 60,
|
||||||
|
padding: 3,
|
||||||
|
backgroundColor: Color.primaryColor,
|
||||||
|
borderRadius: 100,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
setModalVisible(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text whiteColor caption2>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
</TouchableOpacity>)}
|
||||||
</ScreenComponent>
|
</ScreenComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -2263,7 +2333,8 @@ const mapStateToProps = createStructuredSelector({
|
||||||
createConsultation: selectCreateConsultation,
|
createConsultation: selectCreateConsultation,
|
||||||
getNetworkAct: selectGetNetworkAct,
|
getNetworkAct: selectGetNetworkAct,
|
||||||
getAmountConsultation: selectGetAmountConsultation,
|
getAmountConsultation: selectGetAmountConsultation,
|
||||||
checkInsuranceCoverageAmount: selectCheckInsuranceCoverageAmount
|
checkInsuranceCoverageAmount: selectCheckInsuranceCoverageAmount,
|
||||||
|
getExclusion: selectGetExclusion
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, {
|
export default connect(mapStateToProps, {
|
||||||
|
@ -2277,7 +2348,8 @@ export default connect(mapStateToProps, {
|
||||||
fetchGetNetworkActs,
|
fetchGetNetworkActs,
|
||||||
fetchCreateConsultation,
|
fetchCreateConsultation,
|
||||||
fetchGetAmountConsultation,
|
fetchGetAmountConsultation,
|
||||||
fetchCheckInsuranceCoverageAmount
|
fetchCheckInsuranceCoverageAmount,
|
||||||
|
fetchGetExclusion
|
||||||
})(
|
})(
|
||||||
SaisirFeuilleSoinScreen,
|
SaisirFeuilleSoinScreen,
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,6 +36,7 @@ import {responsiveWidth} from "react-native-responsive-dimensions";
|
||||||
import SwitchSelector from "react-native-switch-selector";
|
import SwitchSelector from "react-native-switch-selector";
|
||||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||||
import {
|
import {
|
||||||
|
fetchGetExclusion,
|
||||||
fetchGetInsurancePrimeAmount,
|
fetchGetInsurancePrimeAmount,
|
||||||
fetchGetInsurancePrimeAmountReset,
|
fetchGetInsurancePrimeAmountReset,
|
||||||
fetchGetListInsurance,
|
fetchGetListInsurance,
|
||||||
|
@ -52,6 +53,7 @@ import DateTimePicker from "@react-native-community/datetimepicker";
|
||||||
import * as Animatable from 'react-native-animatable';
|
import * as Animatable from 'react-native-animatable';
|
||||||
import {createStructuredSelector} from "reselect";
|
import {createStructuredSelector} from "reselect";
|
||||||
import {
|
import {
|
||||||
|
selectGetExclusion,
|
||||||
selectInsuranceList,
|
selectInsuranceList,
|
||||||
selectInsurancePrimeAmount,
|
selectInsurancePrimeAmount,
|
||||||
selectSubscribeInsurance,
|
selectSubscribeInsurance,
|
||||||
|
@ -63,6 +65,8 @@ import {Typography} from "../../../config/typography";
|
||||||
import {Dropdown} from "react-native-material-dropdown";
|
import {Dropdown} from "react-native-material-dropdown";
|
||||||
import Icon from "react-native-vector-icons/FontAwesome5";
|
import Icon from "react-native-vector-icons/FontAwesome5";
|
||||||
import isNil from "lodash/isNil";
|
import isNil from "lodash/isNil";
|
||||||
|
import {store} from "../../../redux/store";
|
||||||
|
import WebView from "react-native-webview";
|
||||||
|
|
||||||
let moment = require('moment-timezone');
|
let moment = require('moment-timezone');
|
||||||
|
|
||||||
|
@ -213,11 +217,14 @@ const InsuranceSubscriptionScreen = ({
|
||||||
fetchGetListInsurance,
|
fetchGetListInsurance,
|
||||||
fetchGetInsurancePrimeAmount,
|
fetchGetInsurancePrimeAmount,
|
||||||
fetchUploadInsurance,
|
fetchUploadInsurance,
|
||||||
|
fetchGetExclusion,
|
||||||
|
getExclusion,
|
||||||
uploadInsuranceImages,
|
uploadInsuranceImages,
|
||||||
navigation
|
navigation
|
||||||
}) => {
|
}) => {
|
||||||
|
|
||||||
const [modalVisible, setModalVisible] = useState(false);
|
const [modalVisible, setModalVisible] = useState(false);
|
||||||
|
const [modalVisibleExclusion, setModalVisibleExclusion] = useState(false);
|
||||||
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
||||||
const [user, setUser] = useState(null);
|
const [user, setUser] = useState(null);
|
||||||
const [insurance, setInsurance] = useState(null);
|
const [insurance, setInsurance] = useState(null);
|
||||||
|
@ -243,6 +250,7 @@ const InsuranceSubscriptionScreen = ({
|
||||||
{label: I18n.t('MASCULIN'), value: "M"},
|
{label: I18n.t('MASCULIN'), value: "M"},
|
||||||
{label: I18n.t('FEMININ'), value: "F"},
|
{label: I18n.t('FEMININ'), value: "F"},
|
||||||
]);
|
]);
|
||||||
|
const [wallet] = useState(store.getState().walletDetailReducer.result.response);
|
||||||
const [dateNaissance, setDateNaissance] = useState('' + moment(new Date(((new Date()).getFullYear() - 5), 0, 1)).format('YYYY-MM-DD'));
|
const [dateNaissance, setDateNaissance] = useState('' + moment(new Date(((new Date()).getFullYear() - 5), 0, 1)).format('YYYY-MM-DD'));
|
||||||
const [showDateNaissancePicker, setShowDateNaissancePicker] = useState(false);
|
const [showDateNaissancePicker, setShowDateNaissancePicker] = useState(false);
|
||||||
const [showModalDetail, setShowModalDetail] = useState(false);
|
const [showModalDetail, setShowModalDetail] = useState(false);
|
||||||
|
@ -266,6 +274,8 @@ const InsuranceSubscriptionScreen = ({
|
||||||
dispatch(fetchUploadInsuranceReset());
|
dispatch(fetchUploadInsuranceReset());
|
||||||
dispatch(fetchGetInsurancePrimeAmountReset());
|
dispatch(fetchGetInsurancePrimeAmountReset());
|
||||||
dispatch(fetchSubscribeInsuranceReset());
|
dispatch(fetchSubscribeInsuranceReset());
|
||||||
|
|
||||||
|
fetchGetExclusion(wallet.id_network);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -1009,6 +1019,48 @@ const InsuranceSubscriptionScreen = ({
|
||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const renderModalExclusion = () => (
|
||||||
|
<View style={[styles.containModal, {backgroundColor: Color.containerBackgroundColor}]}>
|
||||||
|
<Modal
|
||||||
|
isVisible={modalVisibleExclusion}
|
||||||
|
onSwipeComplete={() => {
|
||||||
|
setModalVisible(false);
|
||||||
|
}}
|
||||||
|
swipeDirection={['down']}
|
||||||
|
style={styles.bottomModal}>
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
styles.contentFilterBottom,
|
||||||
|
{backgroundColor: Color.containerBackgroundColor},
|
||||||
|
]}>
|
||||||
|
<View style={styles.contentSwipeDown}>
|
||||||
|
<View style={styles.lineSwipeDown}/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text body2 style={{marginTop: 10}}>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
|
||||||
|
<View style={{
|
||||||
|
height: Dimensions.get('window').height - 200,
|
||||||
|
width: Dimensions.get('window').width,
|
||||||
|
}}>
|
||||||
|
<WebView
|
||||||
|
style={{flex: 1}}
|
||||||
|
originWhitelist={['*']}
|
||||||
|
source={{html: getExclusion.result.document}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style={{marginTop: 20, marginBottom: 20}}
|
||||||
|
full
|
||||||
|
onPress={() => setModalVisibleExclusion(false)}>
|
||||||
|
{I18n.t('OK')}
|
||||||
|
</Button>
|
||||||
|
</View>
|
||||||
|
</Modal>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScreenComponent>
|
<ScreenComponent>
|
||||||
<DropdownAlert ref={ref => (dropDownAlertRef = ref)}/>
|
<DropdownAlert ref={ref => (dropDownAlertRef = ref)}/>
|
||||||
|
@ -1290,6 +1342,7 @@ const InsuranceSubscriptionScreen = ({
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
|
{modalVisibleExclusion && renderModalExclusion()}
|
||||||
{modalVisible && renderAddNewIdentification()}
|
{modalVisible && renderAddNewIdentification()}
|
||||||
{modalViewBeneficiariesVisible && renderModalViewBeneficiaries()}
|
{modalViewBeneficiariesVisible && renderModalViewBeneficiaries()}
|
||||||
{showDateNaissancePicker && renderDateNaissancePicker()}
|
{showDateNaissancePicker && renderDateNaissancePicker()}
|
||||||
|
@ -1311,6 +1364,25 @@ const InsuranceSubscriptionScreen = ({
|
||||||
<Text whiteColor title2>{beneficiaries.length}</Text>
|
<Text whiteColor title2>{beneficiaries.length}</Text>
|
||||||
<Text whiteColor caption2>{I18n.t('AYANT_DROIT')}</Text>
|
<Text whiteColor caption2>{I18n.t('AYANT_DROIT')}</Text>
|
||||||
</TouchableOpacity>)}
|
</TouchableOpacity>)}
|
||||||
|
{(getExclusion.result !== null) && (<TouchableOpacity
|
||||||
|
style={{
|
||||||
|
alignItems: 'center',
|
||||||
|
flexDirection: 'row',
|
||||||
|
width: 60,
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: 10,
|
||||||
|
left: 10,
|
||||||
|
height: 60,
|
||||||
|
padding: 3,
|
||||||
|
backgroundColor: Color.primaryColor,
|
||||||
|
borderRadius: 100,
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
setModalVisibleExclusion(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text whiteColor caption2>{I18n.t('EXCLUSION')}</Text>
|
||||||
|
</TouchableOpacity>)}
|
||||||
</ScreenComponent>
|
</ScreenComponent>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1319,14 +1391,16 @@ const mapStateToProps = createStructuredSelector({
|
||||||
insuranceList: selectInsuranceList,
|
insuranceList: selectInsuranceList,
|
||||||
subscribeInsurance: selectSubscribeInsurance,
|
subscribeInsurance: selectSubscribeInsurance,
|
||||||
uploadInsuranceImages: selectUploadInsuranceImages,
|
uploadInsuranceImages: selectUploadInsuranceImages,
|
||||||
insurancePrimeAmount: selectInsurancePrimeAmount
|
insurancePrimeAmount: selectInsurancePrimeAmount,
|
||||||
|
getExclusion: selectGetExclusion
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps, {
|
export default connect(mapStateToProps, {
|
||||||
fetchGetListInsurance,
|
fetchGetListInsurance,
|
||||||
fetchSubscribeInsurance,
|
fetchSubscribeInsurance,
|
||||||
fetchGetInsurancePrimeAmount,
|
fetchGetInsurancePrimeAmount,
|
||||||
fetchUploadInsurance
|
fetchUploadInsurance,
|
||||||
|
fetchGetExclusion
|
||||||
})(
|
})(
|
||||||
InsuranceSubscriptionScreen,
|
InsuranceSubscriptionScreen,
|
||||||
);
|
);
|
||||||
|
|
|
@ -738,5 +738,6 @@
|
||||||
"BY_QR_CODE": "Par QR Code",
|
"BY_QR_CODE": "Par QR Code",
|
||||||
"SCAN": "Scanner",
|
"SCAN": "Scanner",
|
||||||
"BRING_YOUR_CAMERA_CLOSER_TO_SCAN_QR_CODE": "Approchez votre caméra du QR Code afin de le 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 à"
|
"QUANTITY_CANNOT_BE_SUPERIOR": "La quantité ne doit pas être supérieure à",
|
||||||
|
"EXCLUSION": "Exclusion"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 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';
|
||||||
export const getUserByIdQRCodeUrl = testBaseUrl + '/walletService/qrcode/read';
|
export const getUserByIdQRCodeUrl = testBaseUrl + '/walletService/qrcode/read';
|
||||||
|
|
Loading…
Reference in New Issue