bug envoie cash a cash ok
This commit is contained in:
parent
4a539e7c41
commit
f5ca018edb
File diff suppressed because one or more lines are too long
|
@ -427,6 +427,7 @@
|
||||||
"SAVED": "Registered",
|
"SAVED": "Registered",
|
||||||
"CREATE": "Create",
|
"CREATE": "Create",
|
||||||
"JOIN": "Join",
|
"JOIN": "Join",
|
||||||
|
"INVALID_MONTANT": "Invalid amount",
|
||||||
"PROFILE_PICTURE": "Profile picture",
|
"PROFILE_PICTURE": "Profile picture",
|
||||||
"FRONT_FACE_CB": "CB front side",
|
"FRONT_FACE_CB": "CB front side",
|
||||||
"BACK_FACE_CB": "CB back side",
|
"BACK_FACE_CB": "CB back side",
|
||||||
|
|
|
@ -463,6 +463,7 @@
|
||||||
"ASK_REQUEST_HISTORY": "Demander un historique",
|
"ASK_REQUEST_HISTORY": "Demander un historique",
|
||||||
"GIVE_HISTORY_INFO": "Informations sur votre historique",
|
"GIVE_HISTORY_INFO": "Informations sur votre historique",
|
||||||
"HISTORY_TYPE": "Type",
|
"HISTORY_TYPE": "Type",
|
||||||
|
"INVALID_MONTANT": "Montant invalide",
|
||||||
"HISTORY_TYPE_ASK": "Demandes",
|
"HISTORY_TYPE_ASK": "Demandes",
|
||||||
"DEMANDE_RECEIVE": "Demandes reçues",
|
"DEMANDE_RECEIVE": "Demandes reçues",
|
||||||
"MY_DEMANDE": "Mes demandes",
|
"MY_DEMANDE": "Mes demandes",
|
||||||
|
|
|
@ -108,7 +108,7 @@ class Home extends BaseScreen {
|
||||||
|
|
||||||
this.promiseRegion = new Promise(async (resolve, reject) => {
|
this.promiseRegion = new Promise(async (resolve, reject) => {
|
||||||
this.setState({ isNeedLoadMore: false, isLoadingMap: true })
|
this.setState({ isNeedLoadMore: false, isLoadingMap: true })
|
||||||
const camera = await this.mapRef.getCamera()
|
const camera = await this.mapRef.getCamera();//comment this
|
||||||
const zoom = camera.zoom - 10
|
const zoom = camera.zoom - 10
|
||||||
let res = [];
|
let res = [];
|
||||||
|
|
||||||
|
@ -274,6 +274,7 @@ class Home extends BaseScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
//this.onMapReady();//comment thi
|
||||||
readUser().then(async (user) => {
|
readUser().then(async (user) => {
|
||||||
if (user) {
|
if (user) {
|
||||||
if (user !== undefined) {
|
if (user !== undefined) {
|
||||||
|
@ -605,13 +606,14 @@ class Home extends BaseScreen {
|
||||||
}
|
}
|
||||||
this.setState({ myPosition: myPosition, region: reg });
|
this.setState({ myPosition: myPosition, region: reg });
|
||||||
if (this.mapRef && !this.state.myPositionIsAnimated) {
|
if (this.mapRef && !this.state.myPositionIsAnimated) {
|
||||||
this.mapRef.animateCamera({
|
//comment
|
||||||
|
this.mapRef.animateCamera({
|
||||||
center: myPosition,
|
center: myPosition,
|
||||||
pitch: 0,
|
pitch: 0,
|
||||||
heading: 0,
|
heading: 0,
|
||||||
altitude: 5,
|
altitude: 5,
|
||||||
zoom: 12
|
zoom: 12
|
||||||
}, 1000)
|
}, 1000);
|
||||||
this.setState({ myPositionIsAnimated: true })
|
this.setState({ myPositionIsAnimated: true })
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1457,6 +1459,7 @@ class Home extends BaseScreen {
|
||||||
</View>
|
</View>
|
||||||
</React.Fragment>)
|
</React.Fragment>)
|
||||||
}
|
}
|
||||||
|
|
||||||
renderFilterMarker() {
|
renderFilterMarker() {
|
||||||
if (this.state.showFilterDistance)
|
if (this.state.showFilterDistance)
|
||||||
return (<View style={{ height: responsiveHeight(80), justifyContent: 'center', backgroundColor: 'white', margin: 20 }}>
|
return (<View style={{ height: responsiveHeight(80), justifyContent: 'center', backgroundColor: 'white', margin: 20 }}>
|
||||||
|
@ -1579,7 +1582,6 @@ class Home extends BaseScreen {
|
||||||
<Text style={{ fontSize: 20, color: 'white', fontWeight: 'bold' }}>{I18n.t("LOADING_DOTS")}</Text>
|
<Text style={{ fontSize: 20, color: 'white', fontWeight: 'bold' }}>{I18n.t("LOADING_DOTS")}</Text>
|
||||||
</View> : null
|
</View> : null
|
||||||
}
|
}
|
||||||
|
|
||||||
<IMap
|
<IMap
|
||||||
ref={(re) => {
|
ref={(re) => {
|
||||||
this.map = re
|
this.map = re
|
||||||
|
@ -1606,7 +1608,7 @@ class Home extends BaseScreen {
|
||||||
this.setState({ showProgress: false })
|
this.setState({ showProgress: false })
|
||||||
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{ text: "Ok", onPress: () => { } }])
|
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{ text: "Ok", onPress: () => { } }])
|
||||||
}}
|
}}
|
||||||
/> */}
|
/> */}
|
||||||
{this.makeCardSearch()}
|
{this.makeCardSearch()}
|
||||||
{this.makeSlidingUp()}
|
{this.makeSlidingUp()}
|
||||||
{this.makeDialogLoader()}
|
{this.makeDialogLoader()}
|
||||||
|
|
|
@ -545,7 +545,7 @@ export default class OptionsMenu extends Component {
|
||||||
disconnect().then(() => {
|
disconnect().then(() => {
|
||||||
IlinkEmitter.emit("userdisconnect");
|
IlinkEmitter.emit("userdisconnect");
|
||||||
AsyncStorage.clear();
|
AsyncStorage.clear();
|
||||||
this.props.navigation.navigate("Auth")
|
this.props.navigation.navigate("Auth");
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -433,26 +433,20 @@ class WalletOptionSelect extends Component {
|
||||||
</View>
|
</View>
|
||||||
))
|
))
|
||||||
:
|
:
|
||||||
readUser().then((user) => {
|
Object.keys(omit(item, ['id', 'type', 'id_epargne', 'type_historique', 'date_demande', 'date_fin', 'date_remboursement_prevu', 'date_validation', 'date_cassation', 'date_remboursement', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'etat', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'type_caution', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => (
|
||||||
(user !== undefined) &&
|
<View style={{ alignItems: 'center' }} key={i}>
|
||||||
(typeof user.category === 'undefined') &&
|
|
||||||
Object.keys(omit(item, ['id', 'type', 'id_epargne', 'date_demande', 'id_demande', 'duree_mois', 'taxe', '', 'date_fin', 'date_cassation', 'etat', 'id_user', 'id_network', 'user', 'partiellement_rembourse', 'user_phone', 'type_caution', 'interet', 'date_remboursement_prevu', 'date_remboursement', 'id_wallet_agent', 'retrait_cash', 'codeParrain', 'agent', 'montant_rembourse', ''])).map((element, i) => (
|
|
||||||
<View style={{ alignItems: 'center' }} key={i}>
|
|
||||||
|
|
||||||
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
||||||
{
|
{
|
||||||
isEqual(element, 'montant') ?
|
isEqual(element, 'montant') ?
|
||||||
` ${thousands(item[element], ' ')} ${this.state.wallet.currency_code}`
|
` ${thousands(item[element], ' ')} ${this.state.wallet.currency_code}`
|
||||||
: isEqual(element, 'date_creation') ?
|
: isEqual(element, 'date_creation') ?
|
||||||
cutStringWithoutDot(item[element], 16) :
|
cutStringWithoutDot(item[element], 16)
|
||||||
isEqual(element, 'type_historique') ?
|
: item[element]
|
||||||
displayTransactionType(item[element])
|
}
|
||||||
: item[element]
|
</Text>
|
||||||
}
|
</View>
|
||||||
</Text>
|
))
|
||||||
</View>
|
|
||||||
))
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
|
|
@ -194,6 +194,11 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
text: I18n.t("OK"), onPress: () => {
|
text: I18n.t("OK"), onPress: () => {
|
||||||
|
this.setState({
|
||||||
|
isDataSubmit: false,
|
||||||
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
});
|
||||||
this.props.getPayCountryNetworkReset();
|
this.props.getPayCountryNetworkReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,6 +214,11 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
{
|
{
|
||||||
text: I18n.t("OK"), onPress: () => {
|
text: I18n.t("OK"), onPress: () => {
|
||||||
this.props.getPayCountryNetworkReset();
|
this.props.getPayCountryNetworkReset();
|
||||||
|
this.setState({
|
||||||
|
isDataSubmit: false,
|
||||||
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,6 +241,11 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
text: I18n.t("OK"), onPress: () => {
|
text: I18n.t("OK"), onPress: () => {
|
||||||
|
this.setState({
|
||||||
|
isDataSubmit: false,
|
||||||
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
});
|
||||||
this.props.envoieUserWalletToCashReset();
|
this.props.envoieUserWalletToCashReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,7 +266,11 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
this.props.envoieUserWalletToCashReset();
|
this.props.envoieUserWalletToCashReset();
|
||||||
IlinkEmitter.emit("refreshWallet");
|
IlinkEmitter.emit("refreshWallet");
|
||||||
this.props.navigation.pop();
|
this.props.navigation.pop();
|
||||||
}
|
this.setState({
|
||||||
|
isDataSubmit: false,
|
||||||
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
}); }
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -273,6 +292,11 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
text: I18n.t("OK"), onPress: () => {
|
text: I18n.t("OK"), onPress: () => {
|
||||||
|
this.setState({
|
||||||
|
isDataSubmit: false,
|
||||||
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
});
|
||||||
this.props.getCommissionUserWalletToCashReset();
|
this.props.getCommissionUserWalletToCashReset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -386,12 +410,15 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Dialog.Button bold={true} label={I18n.t('CANCEL_LABEL')} onPress={() => {
|
<Dialog.Button bold={true} label={I18n.t('CANCEL_LABEL')} onPress={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
isModalConfirmVisible: false
|
isDataSubmit: false,
|
||||||
});
|
isModalConfirmVisible: false,
|
||||||
|
triggerSubmitClick: false
|
||||||
|
});
|
||||||
}} />
|
}} />
|
||||||
<Dialog.Button bold={true} label={I18n.t('SUBMIT_LABEL')} onPress={() => {
|
<Dialog.Button bold={true} label={I18n.t('SUBMIT_LABEL')} onPress={() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
triggerSubmitClick: false,
|
||||||
isModalConfirmVisible: false,
|
isModalConfirmVisible: false,
|
||||||
isDataSubmit: true
|
isDataSubmit: true
|
||||||
});
|
});
|
||||||
|
@ -474,7 +501,7 @@ class EnvoieWalletToCashUser extends Component {
|
||||||
{(this.state.modalVisible || this.props.loadingEnvoieWalletToCashGetCommission || this.props.loadingEnvoieWalletToCash || this.props.loadingCountryByDialCode || this.props.loadingActiveCountryList || this.props.loadingCountryByDialCode) && this.renderLoader()}
|
{(this.state.modalVisible || this.props.loadingEnvoieWalletToCashGetCommission || this.props.loadingEnvoieWalletToCash || this.props.loadingCountryByDialCode || this.props.loadingActiveCountryList || this.props.loadingCountryByDialCode) && this.renderLoader()}
|
||||||
{this.state.hasLoadActiveCountryList && this.renderGetActionCountryList()}
|
{this.state.hasLoadActiveCountryList && this.renderGetActionCountryList()}
|
||||||
{this.state.hasLoadActivePayCountryNetworkList && this.renderGetPayCountryNetworkResponse()}
|
{this.state.hasLoadActivePayCountryNetworkList && this.renderGetPayCountryNetworkResponse()}
|
||||||
{this.state.isDataSubmit && this.renderEnvoieWalletToWalletResponse()}
|
{(this.state.isDataSubmit && !this.state.triggerSubmitClick) && this.renderEnvoieWalletToWalletResponse()}
|
||||||
{this.state.triggerSubmitClick && this.renderDialogGetCommissionResponse()}
|
{this.state.triggerSubmitClick && this.renderDialogGetCommissionResponse()}
|
||||||
{
|
{
|
||||||
(resultEnvoieWalletToCashGetCommission !== null) &&
|
(resultEnvoieWalletToCashGetCommission !== null) &&
|
||||||
|
|
|
@ -463,6 +463,7 @@
|
||||||
"ASK_REQUEST_HISTORY": "Demander un historique",
|
"ASK_REQUEST_HISTORY": "Demander un historique",
|
||||||
"GIVE_HISTORY_INFO": "Informations sur votre historique",
|
"GIVE_HISTORY_INFO": "Informations sur votre historique",
|
||||||
"HISTORY_TYPE": "Type",
|
"HISTORY_TYPE": "Type",
|
||||||
|
"INVALID_MONTANT": "Montant invalide",
|
||||||
"HISTORY_TYPE_ASK": "Demandes",
|
"HISTORY_TYPE_ASK": "Demandes",
|
||||||
"DEMANDE_RECEIVE": "Demandes reçues",
|
"DEMANDE_RECEIVE": "Demandes reçues",
|
||||||
"MY_DEMANDE": "Mes demandes",
|
"MY_DEMANDE": "Mes demandes",
|
||||||
|
|
|
@ -80,7 +80,8 @@ const queryMap = async (data) => {
|
||||||
let responseText = await response.text()
|
let responseText = await response.text()
|
||||||
//console.log("response= " + responseText)
|
//console.log("response= " + responseText)
|
||||||
try {
|
try {
|
||||||
let responseJson = JSON.parse(responseText)
|
let responseJson = JSON.parse(responseText);
|
||||||
|
console.warn("JSON RESPONSE", responseJson);
|
||||||
return responseJson;
|
return responseJson;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//console.log("erreur=" + responseText)
|
//console.log("erreur=" + responseText)
|
||||||
|
|
Loading…
Reference in New Issue