correction envoie d'argen vers autre carte et envoie walette vers wallet
This commit is contained in:
parent
c7f4769f57
commit
8f36797b00
|
@ -516,7 +516,7 @@ class Home extends BaseScreen {
|
|||
if (c.length > 0 && pays) {
|
||||
|
||||
this.setState({filternetwork: c[0], myNetwork: c[0], filternetworkTemp: c[0]})
|
||||
this.retrieveAllPoint(pays)
|
||||
// this.retrieveAllPoint(pays)
|
||||
|
||||
} else {
|
||||
if (this.state.user) {
|
||||
|
@ -1739,7 +1739,7 @@ class Home extends BaseScreen {
|
|||
translucent={true}
|
||||
/>
|
||||
{/* Start here to comment */}
|
||||
{
|
||||
{/* {
|
||||
(this.state.loadingDialog || this.props.loading) ?
|
||||
<View
|
||||
style={{
|
||||
|
@ -1760,7 +1760,7 @@ class Home extends BaseScreen {
|
|||
fontWeight: 'bold'
|
||||
}}>{I18n.t("LOADING_DOTS")}</Text>
|
||||
</View> : null
|
||||
}
|
||||
} */}
|
||||
<IMap
|
||||
ref={(re) => {
|
||||
this.map = re
|
||||
|
@ -2468,98 +2468,98 @@ class Home extends BaseScreen {
|
|||
</TouchableOpacity>)
|
||||
}
|
||||
|
||||
retrieveAllPoint(dial_code) {
|
||||
/* let markers= this.markerManager.getLocalMarkers()
|
||||
console.log( markers.length)
|
||||
if(markers.length>0){
|
||||
console.debug("load from local")
|
||||
for (let p of markers) {
|
||||
console.log(` ${p.lastname}`);
|
||||
}
|
||||
this.markerManager.close();
|
||||
// retrieveAllPoint(dial_code) {
|
||||
// /* let markers= this.markerManager.getLocalMarkers()
|
||||
// console.log( markers.length)
|
||||
// if(markers.length>0){
|
||||
// console.debug("load from local")
|
||||
// for (let p of markers) {
|
||||
// console.log(` ${p.lastname}`);
|
||||
// }
|
||||
// this.markerManager.close();
|
||||
|
||||
this.setState({allpoint: [], loadingDialog: false})
|
||||
}else*/
|
||||
getMakersFrom(dial_code).then((data) => {
|
||||
new Promise((resolve, reject) => {
|
||||
try {
|
||||
const ds = data.datas
|
||||
this.setState({allpoint: ds, loadingDialog: false})
|
||||
// this.setState({allpoint: [], loadingDialog: false})
|
||||
// }else*/
|
||||
// getMakersFrom(dial_code).then((data) => {
|
||||
// new Promise((resolve, reject) => {
|
||||
// try {
|
||||
// const ds = data.datas
|
||||
// this.setState({allpoint: ds, loadingDialog: false})
|
||||
|
||||
resolve(ds)
|
||||
} catch (e) {
|
||||
//Crashlytics.log(e.message)
|
||||
console.warn(e.message)
|
||||
reject(new Error(e.message))
|
||||
}
|
||||
}).then((ds) => {
|
||||
// this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)})
|
||||
this.onLoadMore()
|
||||
}).catch((e) => {
|
||||
this.setState({loadingDialog: false})
|
||||
//Crashlytics.log(e.message)
|
||||
console.log("on get marker")
|
||||
// resolve(ds)
|
||||
// } catch (e) {
|
||||
// //Crashlytics.log(e.message)
|
||||
// console.warn(e.message)
|
||||
// reject(new Error(e.message))
|
||||
// }
|
||||
// }).then((ds) => {
|
||||
// // this.markerManager.insertMarkers(ds).then((res)=>{console.warn(res)})
|
||||
// this.onLoadMore()
|
||||
// }).catch((e) => {
|
||||
// this.setState({loadingDialog: false})
|
||||
// //Crashlytics.log(e.message)
|
||||
// console.log("on get marker")
|
||||
|
||||
Alert.alert(
|
||||
I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
I18n.t('TEXT_NETWORK_UNABLE')
|
||||
,
|
||||
[
|
||||
{
|
||||
text: I18n.t("NO"), onPress: () => {
|
||||
BackHandler.exitApp()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: I18n.t("YES"), onPress: () => {
|
||||
this.setState({loadingDialog: true})
|
||||
if (dial_code !== null && dial_code !== undefined)
|
||||
this.retrieveAllPoint(dial_code)
|
||||
else
|
||||
this.requestCameraPermission()
|
||||
}
|
||||
}
|
||||
// Alert.alert(
|
||||
// I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
// I18n.t('TEXT_NETWORK_UNABLE')
|
||||
// ,
|
||||
// [
|
||||
// {
|
||||
// text: I18n.t("NO"), onPress: () => {
|
||||
// BackHandler.exitApp()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// text: I18n.t("YES"), onPress: () => {
|
||||
// this.setState({loadingDialog: true})
|
||||
// if (dial_code !== null && dial_code !== undefined)
|
||||
// this.retrieveAllPoint(dial_code)
|
||||
// else
|
||||
// this.requestCameraPermission()
|
||||
// }
|
||||
// }
|
||||
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
})
|
||||
// ],
|
||||
// {cancelable: false}
|
||||
// )
|
||||
// })
|
||||
|
||||
}).catch((e) => {
|
||||
console.log("on retreive>getmarkers", e.message)
|
||||
// }).catch((e) => {
|
||||
// console.log("on retreive>getmarkers", e.message)
|
||||
|
||||
this.setState({loadingDialog: false})
|
||||
if (this.state.allpoint.length <= 0) {
|
||||
console.log("no point")
|
||||
Alert.alert(
|
||||
I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
I18n.t('TEXT_NETWORK_UNABLE')
|
||||
,
|
||||
[
|
||||
{
|
||||
text: I18n.t("NO"), onPress: () => {
|
||||
BackHandler.exitApp()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: I18n.t("YES"), onPress: () => {
|
||||
if (this.state.allpoint.length <= 0) {
|
||||
this.setState({loadingDialog: true})
|
||||
if (dial_code !== null && dial_code !== undefined)
|
||||
this.retrieveAllPoint(dial_code)
|
||||
else
|
||||
this.requestCameraPermission()
|
||||
}
|
||||
}
|
||||
}
|
||||
// this.setState({loadingDialog: false})
|
||||
// if (this.state.allpoint.length <= 0) {
|
||||
// console.log("no point")
|
||||
// Alert.alert(
|
||||
// I18n.t("UNABLE_TO_CONNECT_TITLE"),
|
||||
// I18n.t('TEXT_NETWORK_UNABLE')
|
||||
// ,
|
||||
// [
|
||||
// {
|
||||
// text: I18n.t("NO"), onPress: () => {
|
||||
// BackHandler.exitApp()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// text: I18n.t("YES"), onPress: () => {
|
||||
// if (this.state.allpoint.length <= 0) {
|
||||
// this.setState({loadingDialog: true})
|
||||
// if (dial_code !== null && dial_code !== undefined)
|
||||
// this.retrieveAllPoint(dial_code)
|
||||
// else
|
||||
// this.requestCameraPermission()
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
],
|
||||
{cancelable: false}
|
||||
)
|
||||
}
|
||||
})
|
||||
// ],
|
||||
// {cancelable: false}
|
||||
// )
|
||||
// }
|
||||
// })
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
showLoadMoreView() {
|
||||
if (this.state.isNeedLoadMore)
|
||||
|
|
|
@ -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.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text> */}
|
||||
</View>
|
||||
</Animatable.View>
|
||||
|
||||
|
|
|
@ -660,34 +660,14 @@ class AutreCarteN extends Component {
|
|||
: this.state.paysCarteSelect
|
||||
}
|
||||
onChangeText={(value, index, data) => {
|
||||
// this.props.getPayCountryNetworkReset();
|
||||
// let countrySelect = data.filter(element => element.name === 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,
|
||||
|
||||
})
|
||||
}}
|
||||
// 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 => {
|
||||
return value.name;
|
||||
}}
|
||||
|
@ -771,9 +751,10 @@ class AutreCarteN extends Component {
|
|||
borderLeftWidth: 1,
|
||||
}}
|
||||
/>
|
||||
<Text style={[Typography.body1, FontWeight.bold]}>
|
||||
{/* <Text style={[Typography.body1, FontWeight.bold]}>
|
||||
{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>
|
||||
</Animatable.View>
|
||||
|
||||
|
|
|
@ -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.countryCustomer.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code}</Text> */}
|
||||
</View>
|
||||
</Animatable.View>
|
||||
|
||||
|
|
|
@ -57,18 +57,20 @@ class PaymentCard extends Component {
|
|||
this.scrollHeaderY = new Animated.Value(0);
|
||||
this.deltaY = new Animated.Value(0);
|
||||
this.bgBannerY = new Animated.Value(0);
|
||||
IlinkEmitter.on("refreshWallet", this.refresh);
|
||||
IlinkEmitter.on("refreshWallet",
|
||||
// this.refresh
|
||||
);
|
||||
|
||||
}
|
||||
refresh = () => {
|
||||
readUser().then((user) => {
|
||||
if (user) {
|
||||
if (user !== undefined) {
|
||||
this.props.getWalletDetailActivated(user.id, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// refresh = () => {
|
||||
// readUser().then((user) => {
|
||||
// if (user) {
|
||||
// if (user !== undefined) {
|
||||
// this.props.getWalletDetailActivated(user.id, null);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
|
|
@ -37,6 +37,7 @@ import {
|
|||
import {FontWeight, Typography} from '../../../config/typography';
|
||||
import thousands from 'thousands';
|
||||
import {IlinkEmitter} from '../../../utils/events';
|
||||
import { element } from 'prop-types';
|
||||
|
||||
let theme = require('../../../utils/theme.json');
|
||||
let route = require('../../../route.json');
|
||||
|
@ -943,40 +944,15 @@ onCreditCardChange = (form) => {
|
|||
<Dropdown
|
||||
label={I18n.t('CARD_COUNTRY')}
|
||||
data={this.state.countryCustomer}
|
||||
|
||||
useNativeDriver={true}
|
||||
value={this.state.paysCarteSelect === null ? '' : this.state.paysCarteSelect}
|
||||
onChangeText={(value, index, data) => {
|
||||
// this.props.getPayCountryNetworkReset();
|
||||
|
||||
// let countrySelect = data.filter(element => element.name === 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();
|
||||
// let paysCarteSelect = paysCarteSelect.filter(element => element.name === this.state.paysCarteSelect)[0]?.currency_code
|
||||
this.setState({
|
||||
paysCarteSelect: value,
|
||||
});
|
||||
}}
|
||||
|
||||
// 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) => {
|
||||
return value.name
|
||||
}}
|
||||
|
@ -1006,6 +982,7 @@ onCreditCardChange = (form) => {
|
|||
data={this.state.paysDestination}
|
||||
useNativeDriver={true}
|
||||
value={this.state.paysDestinationSelect === null ? '' : this.state.paysDestinationSelect}
|
||||
|
||||
onChangeText={(value, index, data) => {
|
||||
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>
|
||||
</Animatable.View>
|
||||
|
||||
|
|
|
@ -483,6 +483,7 @@ class EnvoieWalletToCashUser extends Component {
|
|||
id_wallet_user: this.state.wallet.id,
|
||||
final_country: (this.state.paysDestination.filter(element => element.name === this.state.paysDestinationSelect))[0].id,
|
||||
montant: this.state.montant,
|
||||
network_destinataire: (this.state.walletActifs.filter(element => element.name === this.state.walletActifSelect))[0].id,
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import 'moment/locale/en-nz'
|
|||
import 'moment/locale/en-gb'
|
||||
let slugify = require('slugify');
|
||||
import {IlinkEmitter} from "../../../utils/events";
|
||||
import { readUser } from "../../../webservice/AuthApi";
|
||||
|
||||
class Modal extends Component {
|
||||
static navigatorStyle = {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -36,9 +36,8 @@
|
|||
"react-native-best-viewpager": "^1.0.4",
|
||||
"react-native-blob-util": "^0.14.0",
|
||||
"react-native-blur-overlay": "^1.0.6",
|
||||
"react-native-bottom-sheet-behavior": "^2.0.0",
|
||||
"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-copilot": "^2.4.3",
|
||||
"react-native-credit-card-input": "^0.4.1",
|
||||
|
|
Loading…
Reference in New Issue