From 6b053091a36dad9622fa7a4405450bd4ba6b3815 Mon Sep 17 00:00:00 2001 From: Brice Zele Date: Thu, 7 Apr 2022 14:48:10 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20et=20modification=20des=20consu?= =?UTF-8?q?ltations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/src/main/AndroidManifest.xml | 2 +- screens/home/IMarker.js | 331 +++++++++--------- .../agent/ExecuterPrescriptionScreen.js | 55 ++- .../ModifierExecutionPrescriptionScreen.js | 1 + .../wallet/agent/ModifierFeuilleSoinScreen.js | 119 +++++-- .../wallet/agent/SaisirFeuilleSoinScreen.js | 64 ++-- utils/i18n/fr.json | 12 +- 7 files changed, 352 insertions(+), 232 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 7feb002b..b2bcc48a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -25,7 +25,7 @@ + android:value="AIzaSyBUQoQYY31-S3DPp7aRRIAjEda8T2pZvJE"/> this.view = ref; - - render() { - const {data, network, isSelected} = this.props; - const color = isSelected ? "#F48FB1A0" : "transparent" - const colorSup = isSelected ? "#F06292A0" : "transparent" - const display = isSelected ? "block" : "none"; - if (data.longitude && data.latitude) { - - return ( - { - this.markerRef = re - }} - - onPress={e => { - if (!this.props.isUser) - this.props.onPress(data) - }} - image={this.getImage(data)} - /> - - ); - } - return () - - } - - error(erro) { - console.log("on error render image"); - console.log(erro); - } - - componentDidMount() { - - - } - - componentDidUpdate(prevProps, prevState, snapshot) { - if (this.props.isUser) - if (this.markerRef && this.props.isNeedFocus) { - this.markerRef._component.showCallout() - } - } - - getImage(data) { - const {isUser, network} = this.props; - if (isUser) { - return userposi - } else if (network && data.network === network.name) { - return mnetwork - } - return othernetwork - } - - getIcon(data) { - const {isSelected} = this.props - return isSelected ? ( - - - - ) : (); + } else { + /*this.state.coordinate.timing({ + cord, + duration + }).start(); + */ + } + } + } - } + startAnimation() { + const initialValue = 0 + const finalValue = 1 + this.state.animation.setValue(initialValue); //Step 3 + Animated.timing( //Step 4 + this.state.animation, + { + toValue: finalValue, + duration: 500, + easing: Easing.linear(), + useNativeDriver: true + } + ).start(); + } - startLoopSelectedAnimation() { - const initialValue = 0 - const finalValue = 1 - this.state.animation.setValue(initialValue); //Step 3 - Animated.loop(Animated.timing( //Step 4 - this.state.subanimation, - { - toValue: finalValue, - duration: 1000, - easing: Easing.linear(), - useNativeDriver: true - } - ), {iteration: -1}).start(); - } + handleViewRef = ref => this.view = ref; + + render() { + const {data, network, isSelected} = this.props; + const color = isSelected ? "#F48FB1A0" : "transparent" + const colorSup = isSelected ? "#F06292A0" : "transparent" + const display = isSelected ? "block" : "none"; + if (data.longitude && data.latitude) { + + return ( + { + this.markerRef = re + }} + + onPress={e => { + if (!this.props.isUser) + this.props.onPress(data) + }} + image={this.getImage(data)} + /> + + ); + } + return () + + } + + error(erro) { + console.log("on error render image"); + console.log(erro); + } + + componentDidMount() { + + + } + + componentDidUpdate(prevProps, prevState, snapshot) { + if (this.props.isUser) + if (this.markerRef && this.props.isNeedFocus) { + this.markerRef._component.showCallout() + } + } + + getImage(data) { + const {isUser, network} = this.props; + if (isUser) { + return userposi + } else if (network && data.network === network.name) { + return mnetwork + } + return othernetwork + } + + getIcon(data) { + const {isSelected} = this.props + return isSelected ? ( + + + + ) : (); + + } + + startLoopSelectedAnimation() { + const initialValue = 0 + const finalValue = 1 + this.state.animation.setValue(initialValue); //Step 3 + Animated.loop(Animated.timing( //Step 4 + this.state.subanimation, + { + toValue: finalValue, + duration: 1000, + easing: Easing.linear(), + useNativeDriver: true + } + ), {iteration: -1}).start(); + } } const styles = StyleSheet.create({ - container: { - flex: 1, - width: 52, - height: 52 - }, - ring: {} + container: { + flex: 1, + width: 52, + height: 52 + }, + ring: {} }); -export default IMarker; +export default IMarker; \ No newline at end of file diff --git a/screens/wallet/agent/ExecuterPrescriptionScreen.js b/screens/wallet/agent/ExecuterPrescriptionScreen.js index 459d20b8..bfac2a8c 100644 --- a/screens/wallet/agent/ExecuterPrescriptionScreen.js +++ b/screens/wallet/agent/ExecuterPrescriptionScreen.js @@ -78,7 +78,7 @@ import * as Utils from "../../../utils/UtilsFunction"; import {displayToast, uppercaseFirstLetter} from "../../../utils/UtilsFunction"; import {store} from "../../../redux/store"; import Fontisto from "react-native-vector-icons/Fontisto"; -import {Typography} from "../../../config/typography"; +import {FontWeight, Typography} from "../../../config/typography"; let moment = require('moment-timezone'); @@ -530,6 +530,8 @@ const ExecuterPrescriptionScreen = ({ const PriceModal = Yup.object().shape({ price: Yup.number().required(I18n.t('THIS_FIELD_IS_REQUIRED')), + examen_quantite: Yup.number(), + code_acte: Yup.object() }); const renderDialogQRCodeScanner = () => { @@ -564,7 +566,9 @@ const ExecuterPrescriptionScreen = ({ const renderPriceModal = () => ( { console.log("Value", elementToSetPrice); @@ -664,6 +668,53 @@ const ExecuterPrescriptionScreen = ({ keyboardType='numeric' /> + + {values.code_acte !== '' ? + values.code_acte.billing_type === 'UNIT_PRICE' && () : null} + + + + + + {values.code_acte.code} + + +