correction envoie d'argen vers autre carte et envoie walette vers wallet

This commit is contained in:
Novic-Djef 2023-10-05 11:22:10 +01:00
parent c7f4769f57
commit 8f36797b00
10 changed files with 206 additions and 19915 deletions

View File

@ -516,7 +516,7 @@ class Home extends BaseScreen {
if (c.length > 0 && pays) { if (c.length > 0 && pays) {
this.setState({filternetwork: c[0], myNetwork: c[0], filternetworkTemp: c[0]}) this.setState({filternetwork: c[0], myNetwork: c[0], filternetworkTemp: c[0]})
this.retrieveAllPoint(pays) // this.retrieveAllPoint(pays)
} else { } else {
if (this.state.user) { if (this.state.user) {
@ -1739,7 +1739,7 @@ class Home extends BaseScreen {
translucent={true} translucent={true}
/> />
{/* Start here to comment */} {/* Start here to comment */}
{ {/* {
(this.state.loadingDialog || this.props.loading) ? (this.state.loadingDialog || this.props.loading) ?
<View <View
style={{ style={{
@ -1760,7 +1760,7 @@ class Home extends BaseScreen {
fontWeight: 'bold' fontWeight: 'bold'
}}>{I18n.t("LOADING_DOTS")}</Text> }}>{I18n.t("LOADING_DOTS")}</Text>
</View> : null </View> : null
} } */}
<IMap <IMap
ref={(re) => { ref={(re) => {
this.map = re this.map = re
@ -2468,98 +2468,98 @@ class Home extends BaseScreen {
</TouchableOpacity>) </TouchableOpacity>)
} }
retrieveAllPoint(dial_code) { // retrieveAllPoint(dial_code) {
/* let markers= this.markerManager.getLocalMarkers() // /* let markers= this.markerManager.getLocalMarkers()
console.log( markers.length) // console.log( markers.length)
if(markers.length>0){ // if(markers.length>0){
console.debug("load from local") // console.debug("load from local")
for (let p of markers) { // for (let p of markers) {
console.log(` ${p.lastname}`); // console.log(` ${p.lastname}`);
} // }
this.markerManager.close(); // this.markerManager.close();
this.setState({allpoint: [], loadingDialog: false}) // this.setState({allpoint: [], loadingDialog: false})
}else*/ // }else*/
getMakersFrom(dial_code).then((data) => { // getMakersFrom(dial_code).then((data) => {
new Promise((resolve, reject) => { // new Promise((resolve, reject) => {
try { // try {
const ds = data.datas // const ds = data.datas
this.setState({allpoint: ds, loadingDialog: false}) // this.setState({allpoint: ds, loadingDialog: false})
resolve(ds) // resolve(ds)
} catch (e) { // } catch (e) {
//Crashlytics.log(e.message) // //Crashlytics.log(e.message)
console.warn(e.message) // console.warn(e.message)
reject(new Error(e.message)) // reject(new Error(e.message))
} // }
}).then((ds) => { // }).then((ds) => {
// this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)}) // // this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)})
this.onLoadMore() // this.onLoadMore()
}).catch((e) => { // }).catch((e) => {
this.setState({loadingDialog: false}) // this.setState({loadingDialog: false})
//Crashlytics.log(e.message) // //Crashlytics.log(e.message)
console.log("on get marker") // console.log("on get marker")
Alert.alert( // Alert.alert(
I18n.t("UNABLE_TO_CONNECT_TITLE"), // I18n.t("UNABLE_TO_CONNECT_TITLE"),
I18n.t('TEXT_NETWORK_UNABLE') // I18n.t('TEXT_NETWORK_UNABLE')
, // ,
[ // [
{ // {
text: I18n.t("NO"), onPress: () => { // text: I18n.t("NO"), onPress: () => {
BackHandler.exitApp() // BackHandler.exitApp()
} // }
}, // },
{ // {
text: I18n.t("YES"), onPress: () => { // text: I18n.t("YES"), onPress: () => {
this.setState({loadingDialog: true}) // this.setState({loadingDialog: true})
if (dial_code !== null && dial_code !== undefined) // if (dial_code !== null && dial_code !== undefined)
this.retrieveAllPoint(dial_code) // this.retrieveAllPoint(dial_code)
else // else
this.requestCameraPermission() // this.requestCameraPermission()
} // }
} // }
], // ],
{cancelable: false} // {cancelable: false}
) // )
}) // })
}).catch((e) => { // }).catch((e) => {
console.log("on retreive>getmarkers", e.message) // console.log("on retreive>getmarkers", e.message)
this.setState({loadingDialog: false}) // this.setState({loadingDialog: false})
if (this.state.allpoint.length <= 0) { // if (this.state.allpoint.length <= 0) {
console.log("no point") // console.log("no point")
Alert.alert( // Alert.alert(
I18n.t("UNABLE_TO_CONNECT_TITLE"), // I18n.t("UNABLE_TO_CONNECT_TITLE"),
I18n.t('TEXT_NETWORK_UNABLE') // I18n.t('TEXT_NETWORK_UNABLE')
, // ,
[ // [
{ // {
text: I18n.t("NO"), onPress: () => { // text: I18n.t("NO"), onPress: () => {
BackHandler.exitApp() // BackHandler.exitApp()
} // }
}, // },
{ // {
text: I18n.t("YES"), onPress: () => { // text: I18n.t("YES"), onPress: () => {
if (this.state.allpoint.length <= 0) { // if (this.state.allpoint.length <= 0) {
this.setState({loadingDialog: true}) // this.setState({loadingDialog: true})
if (dial_code !== null && dial_code !== undefined) // if (dial_code !== null && dial_code !== undefined)
this.retrieveAllPoint(dial_code) // this.retrieveAllPoint(dial_code)
else // else
this.requestCameraPermission() // this.requestCameraPermission()
} // }
} // }
} // }
], // ],
{cancelable: false} // {cancelable: false}
) // )
} // }
}) // })
} // }
showLoadMoreView() { showLoadMoreView() {
if (this.state.isNeedLoadMore) if (this.state.isNeedLoadMore)

View File

@ -371,6 +371,7 @@ class AskNanoCredit extends Component {
}} }}
/> />
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text> <Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text>
{/* <Text style={[Typography.body1, FontWeight.bold]}>{this.state.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text> */}
</View> </View>
</Animatable.View> </Animatable.View>

View File

@ -660,34 +660,14 @@ class AutreCarteN extends Component {
: this.state.paysCarteSelect : this.state.paysCarteSelect
} }
onChangeText={(value, index, data) => { onChangeText={(value, index, data) => {
// this.props.getPayCountryNetworkReset(); this.props.getPayCountryNetworkReset();
// let countrySelect = data.filter(element => element.name === value); let countrySelect = data.filter(element => element.name === value);
// this.setState({ this.setState({
// paysCarteSelect: value, paysCarteSelect: value,
// hasLoadActivePayCountryNetworkList: true,
// isDataSubmit: false })
// }, () => { }}
// this.props.getPayCountryNetworkAction({
// id_wallet_user: this.state.wallet.id,
// id_country: countrySelect[0].id
// });
// });
// this.props.getCommissionUserWalletToCashReset();
}}
// this.props.getPayCountryNetworkReset();
// let countrySelect = data.filter(element => element.name === value);
// this.setState({
// paysCarteSelect: value,
// hasLoadActivePayCountryNetworkList: true
// }, () => {
// this.props.getPayCountryNetworkAction({
// id_wallet_user: this.state.wallet.id,
// id_country: countrySelect[0].id
// });
// });
// this.props.getCommissionUserWalletToWalletReset();
// }}
valueExtractor={value => { valueExtractor={value => {
return value.name; return value.name;
}} }}
@ -771,9 +751,10 @@ class AutreCarteN extends Component {
borderLeftWidth: 1, borderLeftWidth: 1,
}} }}
/> />
<Text style={[Typography.body1, FontWeight.bold]}> {/* <Text style={[Typography.body1, FontWeight.bold]}>
{this.state.wallet.currency_code} {this.state.wallet.currency_code}
</Text> </Text> */}
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text>
</View> </View>
</Animatable.View> </Animatable.View>

View File

@ -863,6 +863,7 @@ onCreditCardChange = (form) => {
}} }}
/> />
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text> <Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text>
{/* <Text style={[Typography.body1, FontWeight.bold]}>{this.state.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text> */}
</View> </View>
</Animatable.View> </Animatable.View>

View File

@ -57,18 +57,20 @@ class PaymentCard extends Component {
this.scrollHeaderY = new Animated.Value(0); this.scrollHeaderY = new Animated.Value(0);
this.deltaY = new Animated.Value(0); this.deltaY = new Animated.Value(0);
this.bgBannerY = new Animated.Value(0); this.bgBannerY = new Animated.Value(0);
IlinkEmitter.on("refreshWallet", this.refresh); IlinkEmitter.on("refreshWallet",
// this.refresh
);
} }
refresh = () => { // refresh = () => {
readUser().then((user) => { // readUser().then((user) => {
if (user) { // if (user) {
if (user !== undefined) { // if (user !== undefined) {
this.props.getWalletDetailActivated(user.id, null); // this.props.getWalletDetailActivated(user.id, null);
} // }
} // }
}); // });
} // }
render() { render() {
return ( return (

View File

@ -37,6 +37,7 @@ import {
import {FontWeight, Typography} from '../../../config/typography'; import {FontWeight, Typography} from '../../../config/typography';
import thousands from 'thousands'; import thousands from 'thousands';
import {IlinkEmitter} from '../../../utils/events'; import {IlinkEmitter} from '../../../utils/events';
import { element } from 'prop-types';
let theme = require('../../../utils/theme.json'); let theme = require('../../../utils/theme.json');
let route = require('../../../route.json'); let route = require('../../../route.json');
@ -943,40 +944,15 @@ onCreditCardChange = (form) => {
<Dropdown <Dropdown
label={I18n.t('CARD_COUNTRY')} label={I18n.t('CARD_COUNTRY')}
data={this.state.countryCustomer} data={this.state.countryCustomer}
useNativeDriver={true} useNativeDriver={true}
value={this.state.paysCarteSelect === null ? '' : this.state.paysCarteSelect} value={this.state.paysCarteSelect === null ? '' : this.state.paysCarteSelect}
onChangeText={(value, index, data) => { onChangeText={(value, index, data) => {
// this.props.getPayCountryNetworkReset(); // let paysCarteSelect = paysCarteSelect.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code
this.setState({
// let countrySelect = data.filter(element => element.name === value); paysCarteSelect: value,
// this.setState({ });
// paysCarteSelect: value,
// hasLoadActivePayCountryNetworkList: true,
// isDataSubmit: false
// }, () => {
// this.props.getPayCountryNetworkAction({
// id_wallet_user: this.state.wallet.id,
// id_country: countrySelect[0].id
// });
// });
// this.props.getCommissionUserWalletToCashReset();
}} }}
// this.props.getPayCountryNetworkReset();
// let countrySelect = data.filter(element => element.name === value);
// this.setState({
// paysCarteSelect: value,
// hasLoadActivePayCountryNetworkList: true
// }, () => {
// this.props.getPayCountryNetworkAction({
// id_wallet_user: this.state.wallet.id,
// id_country: countrySelect[0].id
// });
// });
// this.props.getCommissionUserWalletToWalletReset();
// }}
valueExtractor={(value) => { valueExtractor={(value) => {
return value.name return value.name
}} }}
@ -1006,6 +982,7 @@ onCreditCardChange = (form) => {
data={this.state.paysDestination} data={this.state.paysDestination}
useNativeDriver={true} useNativeDriver={true}
value={this.state.paysDestinationSelect === null ? '' : this.state.paysDestinationSelect} value={this.state.paysDestinationSelect === null ? '' : this.state.paysDestinationSelect}
onChangeText={(value, index, data) => { onChangeText={(value, index, data) => {
this.props.getPayCountryNetworkReset(); this.props.getPayCountryNetworkReset();
@ -1267,7 +1244,7 @@ onCreditCardChange = (form) => {
}} }}
/> />
<Text style={[Typography.body1, FontWeight.bold]}>{this.state.wallet.currency_code}</Text> <Text style={[Typography.body1, FontWeight.bold]}>{this.state.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text>
</View> </View>
</Animatable.View> </Animatable.View>

View File

@ -483,6 +483,7 @@ class EnvoieWalletToCashUser extends Component {
id_wallet_user: this.state.wallet.id, id_wallet_user: this.state.wallet.id,
final_country: (this.state.paysDestination.filter(element => element.name === this.state.paysDestinationSelect))[0].id, final_country: (this.state.paysDestination.filter(element => element.name === this.state.paysDestinationSelect))[0].id,
montant: this.state.montant, montant: this.state.montant,
network_destinataire: (this.state.walletActifs.filter(element => element.name === this.state.walletActifSelect))[0].id,
}); });
} }

View File

@ -18,6 +18,7 @@ import 'moment/locale/en-nz'
import 'moment/locale/en-gb' import 'moment/locale/en-gb'
let slugify = require('slugify'); let slugify = require('slugify');
import {IlinkEmitter} from "../../../utils/events"; import {IlinkEmitter} from "../../../utils/events";
import { readUser } from "../../../webservice/AuthApi";
class Modal extends Component { class Modal extends Component {
static navigatorStyle = { static navigatorStyle = {

19842
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -36,9 +36,8 @@
"react-native-best-viewpager": "^1.0.4", "react-native-best-viewpager": "^1.0.4",
"react-native-blob-util": "^0.14.0", "react-native-blob-util": "^0.14.0",
"react-native-blur-overlay": "^1.0.6", "react-native-blur-overlay": "^1.0.6",
"react-native-bottom-sheet-behavior": "^2.0.0",
"react-native-calendario": "^0.2.10", "react-native-calendario": "^0.2.10",
"react-native-camera": "^3.30.0", "react-native-camera": "^3.44.3",
"react-native-cardview": "^2.0.2", "react-native-cardview": "^2.0.2",
"react-native-copilot": "^2.4.3", "react-native-copilot": "^2.4.3",
"react-native-credit-card-input": "^0.4.1", "react-native-credit-card-input": "^0.4.1",