Group Detail partiellement OK
This commit is contained in:
parent
2b3d33ef99
commit
1f4f283df8
3
App.js
3
App.js
|
@ -75,6 +75,7 @@ import ModifyIdentificationUser from './screens/identification/ModifyIdentificat
|
||||||
import CreateGroupNanoCredit from './screens/nano-credit/CreateGroupNanoCredit';
|
import CreateGroupNanoCredit from './screens/nano-credit/CreateGroupNanoCredit';
|
||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import DemandValidationGroup from './screens/nano-credit/DemandGroupNanoCredit';
|
import DemandValidationGroup from './screens/nano-credit/DemandGroupNanoCredit';
|
||||||
|
import DemandGroupNanoCreditDetail from './screens/nano-credit/DemandGroupNanoCreditDetail';
|
||||||
|
|
||||||
const instructions = Platform.select({
|
const instructions = Platform.select({
|
||||||
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
|
||||||
|
@ -159,6 +160,7 @@ const AppStack = createDrawerNavigator({
|
||||||
/>)
|
/>)
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
demandeValidationGroupe: DemandGroupNanoCreditDetail
|
||||||
|
|
||||||
})
|
})
|
||||||
}, { contentComponent: OptionsMenu, headerMode: 'none', contentOptions: { activeTintColor: theme.accent } })
|
}, { contentComponent: OptionsMenu, headerMode: 'none', contentOptions: { activeTintColor: theme.accent } })
|
||||||
|
@ -394,6 +396,7 @@ class App extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpened(openResult) {
|
onOpened(openResult) {
|
||||||
|
let data = openResult.notification.payload.additionalData;
|
||||||
console.log('Message: ', openResult.notification.payload.body);
|
console.log('Message: ', openResult.notification.payload.body);
|
||||||
console.log('Data: ', openResult.notification.payload.additionalData);
|
console.log('Data: ', openResult.notification.payload.additionalData);
|
||||||
console.log('isActive: ', openResult.notification.isAppInFocus);
|
console.log('isActive: ', openResult.notification.isAppInFocus);
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -54,5 +54,6 @@
|
||||||
"envoiCashVersCashAgent": "envoiCashVersCashAgent",
|
"envoiCashVersCashAgent": "envoiCashVersCashAgent",
|
||||||
"modifyIdentificationUser": "modifyIdentificationUser",
|
"modifyIdentificationUser": "modifyIdentificationUser",
|
||||||
"createGroupNanoCredit": "createGroupNanoCredit",
|
"createGroupNanoCredit": "createGroupNanoCredit",
|
||||||
"groupNanoCredit": "groupNanoCredit"
|
"groupNanoCredit": "groupNanoCredit",
|
||||||
|
"demandGroupNanoCreditDetail": "demandeValidationGroupe"
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
"DELETE_DEMAND": "Deletion request",
|
"DELETE_DEMAND": "Deletion request",
|
||||||
"GROUP_INFOS": "Fill in the group information",
|
"GROUP_INFOS": "Fill in the group information",
|
||||||
"NOM_GROUP": "Group name",
|
"NOM_GROUP": "Group name",
|
||||||
|
"GROUP": "Group",
|
||||||
"LIMIT_OF_CREDIT": "Credit limit",
|
"LIMIT_OF_CREDIT": "Credit limit",
|
||||||
"CODE_USER_ILINK_SPONSOR_1": "iLink user code sponsor 1",
|
"CODE_USER_ILINK_SPONSOR_1": "iLink user code sponsor 1",
|
||||||
"CODE_USER_ILINK_SPONSOR_2": "iLink user code sponsor 2",
|
"CODE_USER_ILINK_SPONSOR_2": "iLink user code sponsor 2",
|
||||||
|
@ -138,6 +139,7 @@
|
||||||
"NUMERO_ABONNE": "Subscriber number",
|
"NUMERO_ABONNE": "Subscriber number",
|
||||||
"IDENTIFIANT_ETUDIANT": "Student ID",
|
"IDENTIFIANT_ETUDIANT": "Student ID",
|
||||||
"DEMAND_SEND": "Demand send",
|
"DEMAND_SEND": "Demand send",
|
||||||
|
"NO_DEMAND_CREATION_GROUP": "No group creation request",
|
||||||
"WITHDRAWAL_DESCRIPTION": "Make a withdrawal",
|
"WITHDRAWAL_DESCRIPTION": "Make a withdrawal",
|
||||||
"COMMISSION_ACCOUNT_TITLE": "Commission account",
|
"COMMISSION_ACCOUNT_TITLE": "Commission account",
|
||||||
"COMMISSION_TRANSFER_SUCCESS": "Commissions have been transferred to the main account",
|
"COMMISSION_TRANSFER_SUCCESS": "Commissions have been transferred to the main account",
|
||||||
|
@ -167,6 +169,7 @@
|
||||||
"ACTIVATED": "has been activated",
|
"ACTIVATED": "has been activated",
|
||||||
"CREDIT_MANAGE": "Credit Management",
|
"CREDIT_MANAGE": "Credit Management",
|
||||||
"GROUP_MANAGE": "Group Management",
|
"GROUP_MANAGE": "Group Management",
|
||||||
|
"CREATOR": "Creator",
|
||||||
"NOTIFICATIONS": "Notification",
|
"NOTIFICATIONS": "Notification",
|
||||||
"NO_NOTIFICATION": "You haven't any notification",
|
"NO_NOTIFICATION": "You haven't any notification",
|
||||||
"CONFIGURATIONS": "Configuration",
|
"CONFIGURATIONS": "Configuration",
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
"SUCCESS_CREATION_GROUP": "Informations sur la création",
|
"SUCCESS_CREATION_GROUP": "Informations sur la création",
|
||||||
"ERROR_CREATION_GROUP": "Erreur de création",
|
"ERROR_CREATION_GROUP": "Erreur de création",
|
||||||
"NOM_GROUP": "Nom du groupe",
|
"NOM_GROUP": "Nom du groupe",
|
||||||
|
"GROUP": "Groupe",
|
||||||
"LIMIT_OF_CREDIT": "Limite du crédit",
|
"LIMIT_OF_CREDIT": "Limite du crédit",
|
||||||
"CODE_USER_ILINK_SPONSOR_1": "Code utilisateur iLink Sponsor 1",
|
"CODE_USER_ILINK_SPONSOR_1": "Code utilisateur iLink Sponsor 1",
|
||||||
"CODE_USER_ILINK_SPONSOR_2": "Code utilisateur iLink Sponsor 2",
|
"CODE_USER_ILINK_SPONSOR_2": "Code utilisateur iLink Sponsor 2",
|
||||||
|
@ -160,6 +161,7 @@
|
||||||
"DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de",
|
"DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de",
|
||||||
"NO_WALLET_HISTORY": "Aucune transaction à ce jour",
|
"NO_WALLET_HISTORY": "Aucune transaction à ce jour",
|
||||||
"DEMAND_SEND": "Demande envoyé",
|
"DEMAND_SEND": "Demande envoyé",
|
||||||
|
"NO_DEMAND_CREATION_GROUP": "Aucune demande de création de groupe",
|
||||||
"NO_WALLET_ACTIVED": "Aucun wallet n'est activé pour votre compte",
|
"NO_WALLET_ACTIVED": "Aucun wallet n'est activé pour votre compte",
|
||||||
"TRANSFER_TO_PRINCIPAL_ACCOUNT": "Transférer commissions",
|
"TRANSFER_TO_PRINCIPAL_ACCOUNT": "Transférer commissions",
|
||||||
"PRINCIPAL": "Principal",
|
"PRINCIPAL": "Principal",
|
||||||
|
@ -171,6 +173,7 @@
|
||||||
"ACTIVATED": "a été activé",
|
"ACTIVATED": "a été activé",
|
||||||
"CREDIT_MANAGE": "Gestion de credit",
|
"CREDIT_MANAGE": "Gestion de credit",
|
||||||
"GROUP_MANAGE": "Gestion du groupe",
|
"GROUP_MANAGE": "Gestion du groupe",
|
||||||
|
"CREATOR": "Créateur",
|
||||||
"NOTIFICATIONS": "Notification",
|
"NOTIFICATIONS": "Notification",
|
||||||
"NO_NOTIFICATION": "Vous n'avez aucune Fnotification",
|
"NO_NOTIFICATION": "Vous n'avez aucune Fnotification",
|
||||||
"CONFIGURATIONS": "Configuration",
|
"CONFIGURATIONS": "Configuration",
|
||||||
|
@ -331,6 +334,9 @@
|
||||||
"SEND": "Envoyer !",
|
"SEND": "Envoyer !",
|
||||||
"CHANGE_INFORMATION": "Modifier mes informations",
|
"CHANGE_INFORMATION": "Modifier mes informations",
|
||||||
"VALIDATE": "Valider",
|
"VALIDATE": "Valider",
|
||||||
|
"NO_VALIDATE": "Non validé",
|
||||||
|
"VALIDATION": "validation",
|
||||||
|
"VALIDATIONS": "validations",
|
||||||
"SELECT_YOUR_WALLET": "Selectionner un wallet",
|
"SELECT_YOUR_WALLET": "Selectionner un wallet",
|
||||||
"CONNECT": "Connexion",
|
"CONNECT": "Connexion",
|
||||||
"TEXT_BIG_CREATE_1": "Inscrivez vous en tant qu'Utilisateur",
|
"TEXT_BIG_CREATE_1": "Inscrivez vous en tant qu'Utilisateur",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { CREATE_GROUP_PENDING, CREATE_GROUP_SUCCESS, CREATE_GROUP_ERROR, CREATE_GROUP_RESET, GET_DEMAND_GROUP_PENDING, GET_DEMAND_GROUP_SUCCESS, GET_DEMAND_GROUP_ERROR, GET_DEMAND_GROUP_RESET, GET_UNIQUE_DEMAND_GROUP_PENDING, GET_UNIQUE_DEMAND_GROUP_RESET } from "../types/NanoCreditType";
|
import { CREATE_GROUP_PENDING, CREATE_GROUP_SUCCESS, CREATE_GROUP_ERROR, CREATE_GROUP_RESET, GET_DEMAND_GROUP_PENDING, GET_DEMAND_GROUP_SUCCESS, GET_DEMAND_GROUP_ERROR, GET_DEMAND_GROUP_RESET, GET_UNIQUE_DEMAND_GROUP_PENDING, GET_UNIQUE_DEMAND_GROUP_RESET, GET_UNIQUE_DEMAND_GROUP_ERROR, GET_UNIQUE_DEMAND_GROUP_SUCCESS, TREAT_DEMAND_GROUP_PENDING, TREAT_DEMAND_GROUP_SUCCESS, TREAT_DEMAND_GROUP_ERROR, TREAT_DEMAND_GROUP_RESET } from "../types/NanoCreditType";
|
||||||
|
|
||||||
export const fetchCreateGroupPending = () => ({
|
export const fetchCreateGroupPending = () => ({
|
||||||
type: CREATE_GROUP_PENDING
|
type: CREATE_GROUP_PENDING
|
||||||
|
@ -53,3 +53,21 @@ export const fetchGetUniqueDemandsGroupError = (error) => ({
|
||||||
export const fetchGetUniqueDemandsGroupReset = () => ({
|
export const fetchGetUniqueDemandsGroupReset = () => ({
|
||||||
type: GET_UNIQUE_DEMAND_GROUP_RESET
|
type: GET_UNIQUE_DEMAND_GROUP_RESET
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const fetchTreatDemandsGroupPending = () => ({
|
||||||
|
type: TREAT_DEMAND_GROUP_PENDING
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchTreatDemandsGroupSuccess = (res) => ({
|
||||||
|
type: TREAT_DEMAND_GROUP_SUCCESS,
|
||||||
|
result: res,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchTreatDemandsGroupError = (error) => ({
|
||||||
|
type: TREAT_DEMAND_GROUP_ERROR,
|
||||||
|
result: error
|
||||||
|
});
|
||||||
|
|
||||||
|
export const fetchTreatDemandsGroupReset = () => ({
|
||||||
|
type: TREAT_DEMAND_GROUP_RESET
|
||||||
|
});
|
|
@ -0,0 +1,33 @@
|
||||||
|
import { TREAT_DEMAND_GROUP_PENDING, TREAT_DEMAND_GROUP_SUCCESS, TREAT_DEMAND_GROUP_ERROR, TREAT_DEMAND_GROUP_RESET } from "../types/NanoCreditType";
|
||||||
|
|
||||||
|
const initialState = {
|
||||||
|
loading: false,
|
||||||
|
result: null,
|
||||||
|
error: null
|
||||||
|
};
|
||||||
|
|
||||||
|
export default (state = initialState, action) => {
|
||||||
|
switch (action.type) {
|
||||||
|
case TREAT_DEMAND_GROUP_PENDING: return {
|
||||||
|
...state,
|
||||||
|
loading: true
|
||||||
|
}
|
||||||
|
case TREAT_DEMAND_GROUP_SUCCESS: return {
|
||||||
|
...state,
|
||||||
|
loading: false,
|
||||||
|
result: action.result.data,
|
||||||
|
error: null
|
||||||
|
}
|
||||||
|
case TREAT_DEMAND_GROUP_ERROR: return {
|
||||||
|
...state,
|
||||||
|
loading: false,
|
||||||
|
result: null,
|
||||||
|
error: action.result
|
||||||
|
}
|
||||||
|
case TREAT_DEMAND_GROUP_RESET: return initialState;
|
||||||
|
|
||||||
|
default: {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -28,6 +28,7 @@ import CreateGroupReducer from "./CreateGroupReducer";
|
||||||
import SaveOnesignalReducer from "./SaveOnesignalReducer";
|
import SaveOnesignalReducer from "./SaveOnesignalReducer";
|
||||||
import GetDemandsGroupReducer from "./GetDemandsGroupReducer";
|
import GetDemandsGroupReducer from "./GetDemandsGroupReducer";
|
||||||
import GetUniqueDemandsGroupReducer from "./GetUniqueDemandsGroupReducer";
|
import GetUniqueDemandsGroupReducer from "./GetUniqueDemandsGroupReducer";
|
||||||
|
import TreatDemandGroupReducer from "./TreatDemandGroupReducer";
|
||||||
|
|
||||||
const persistConfig = {
|
const persistConfig = {
|
||||||
key: 'root',
|
key: 'root',
|
||||||
|
@ -65,7 +66,9 @@ const rootReducer = persistCombineReducers(persistConfig, {
|
||||||
createGroupReducer: CreateGroupReducer,
|
createGroupReducer: CreateGroupReducer,
|
||||||
saveOnesignalReducer: SaveOnesignalReducer,
|
saveOnesignalReducer: SaveOnesignalReducer,
|
||||||
getDemandsGroupReducer: GetDemandsGroupReducer,
|
getDemandsGroupReducer: GetDemandsGroupReducer,
|
||||||
getUniqueDemandsGroupReducer: GetUniqueDemandsGroupReducer
|
getUniqueDemandsGroupReducer: GetUniqueDemandsGroupReducer,
|
||||||
|
treatDemandGroupReducer: TreatDemandGroupReducer,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default rootReducer;
|
export default rootReducer;
|
|
@ -12,3 +12,8 @@ export const GET_UNIQUE_DEMAND_GROUP_PENDING = 'GET_UNIQUE_DEMAND_GROUP_PENDING'
|
||||||
export const GET_UNIQUE_DEMAND_GROUP_SUCCESS = 'GET_UNIQUE_DEMAND_GROUP_SUCCESS';
|
export const GET_UNIQUE_DEMAND_GROUP_SUCCESS = 'GET_UNIQUE_DEMAND_GROUP_SUCCESS';
|
||||||
export const GET_UNIQUE_DEMAND_GROUP_ERROR = 'GET_UNIQUE_DEMAND_GROUP_ERROR';
|
export const GET_UNIQUE_DEMAND_GROUP_ERROR = 'GET_UNIQUE_DEMAND_GROUP_ERROR';
|
||||||
export const GET_UNIQUE_DEMAND_GROUP_RESET = 'GET_UNIQUE_DEMAND_GROUP_RESET';
|
export const GET_UNIQUE_DEMAND_GROUP_RESET = 'GET_UNIQUE_DEMAND_GROUP_RESET';
|
||||||
|
|
||||||
|
export const TREAT_DEMAND_GROUP_PENDING = 'TREAT_DEMAND_GROUP_PENDING';
|
||||||
|
export const TREAT_DEMAND_GROUP_SUCCESS = 'TREAT_DEMAND_GROUP_SUCCESS';
|
||||||
|
export const TREAT_DEMAND_GROUP_ERROR = 'TREAT_DEMAND_GROUP_ERROR';
|
||||||
|
export const TREAT_DEMAND_GROUP_RESET = 'TREAT_DEMAND_GROUP_RESET';
|
||||||
|
|
|
@ -55,6 +55,5 @@
|
||||||
"modifyIdentificationUser": "modifyIdentificationUser",
|
"modifyIdentificationUser": "modifyIdentificationUser",
|
||||||
"createGroupNanoCredit": "createGroupNanoCredit",
|
"createGroupNanoCredit": "createGroupNanoCredit",
|
||||||
"groupNanoCredit": "groupNanoCredit",
|
"groupNanoCredit": "groupNanoCredit",
|
||||||
"demandGroupNanoCreditDetail": "demandGroupNanoCreditDetail",
|
"demandGroupNanoCreditDetail": "demandeValidationGroupe"
|
||||||
"demandGroupDetail": "demandGroupDetail",
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ import getAuthApiKey from '../../webservice/AuthKeyApi';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import getWalletActivated from '../../webservice/WalletApi';
|
import getWalletActivated from '../../webservice/WalletApi';
|
||||||
import { saveOnesignalIdsAction } from '../../webservice/OnesignalApi';
|
import { saveOnesignalIdsAction } from '../../webservice/OnesignalApi';
|
||||||
|
import OneSignal from 'react-native-onesignal';
|
||||||
|
|
||||||
|
|
||||||
const slideHeight = responsiveHeight(30) > 270 ? 270 : responsiveHeight(30)
|
const slideHeight = responsiveHeight(30) > 270 ? 270 : responsiveHeight(30)
|
||||||
|
@ -655,8 +656,29 @@ class Home extends BaseScreen {
|
||||||
|
|
||||||
//IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
|
//IlinkEmitter.on("langueChange", this.updateLangue.bind(this))
|
||||||
|
|
||||||
|
OneSignal.addEventListener('received', this.onReceived);
|
||||||
|
OneSignal.addEventListener('opened', this.onOpened);
|
||||||
|
OneSignal.addEventListener('ids', this.onIds);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
OneSignal.removeEventListener('received', this.onReceived);
|
||||||
|
OneSignal.removeEventListener('opened', this.onOpened);
|
||||||
|
OneSignal.removeEventListener('ids', this.onIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
onReceived(notification) {
|
||||||
|
console.log("Notification received: ", notification);
|
||||||
|
}
|
||||||
|
|
||||||
|
onOpened(openResult) {
|
||||||
|
let data = openResult.notification.payload.additionalData;
|
||||||
|
this.props.navigation.navigate(data.screen, {
|
||||||
|
id: data.data.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/* updateLangue() {
|
/* updateLangue() {
|
||||||
this.props.navigation.setParams({ name: I18n.t('MAP') })
|
this.props.navigation.setParams({ name: I18n.t('MAP') })
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
@ -1424,7 +1446,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
|
||||||
|
@ -1461,7 +1483,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()}
|
||||||
|
|
|
@ -1,513 +0,0 @@
|
||||||
import React, { Component } from 'react'
|
|
||||||
import { StyleSheet, View, Text, Alert, Platform } from 'react-native'
|
|
||||||
import CardView from 'react-native-cardview'
|
|
||||||
import Button from 'apsl-react-native-button'
|
|
||||||
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'
|
|
||||||
import Icons from 'react-native-vector-icons/Ionicons'
|
|
||||||
import { updateCreditDemand } from "../../webservice/HistoryRequestApi";
|
|
||||||
import { readUser } from "../../webservice/AuthApi";
|
|
||||||
let typesta = 0
|
|
||||||
let moment = require('moment-timezone')
|
|
||||||
var colorback = 'white'
|
|
||||||
import I18n from "react-native-i18n";
|
|
||||||
import { treatCreditDemand, creditDemandResetReducer } from '../../webservice/CreditTreatDemandApi';
|
|
||||||
import { treatCancelDemand, creditCancelResetReducer } from '../../webservice/CreditCancelDemandeApi';
|
|
||||||
import { getAgentNetworksList } from "../../webservice/NetworkApi";
|
|
||||||
import Icon from "./History";
|
|
||||||
import { Header } from "react-native-elements";
|
|
||||||
let theme = require('./../../utils/theme.json');
|
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { bindActionCreators } from 'redux';
|
|
||||||
import Toast from 'react-native-root-toast';
|
|
||||||
import { Color } from '../../config/Color'
|
|
||||||
const route = require("./../../route.json");
|
|
||||||
import Dialog from "react-native-dialog";
|
|
||||||
import { FontWeight } from '../../config/typography'
|
|
||||||
import DeviceInfo from 'react-native-device-info'
|
|
||||||
import { getNanoCreditUniqueDemandsReset, getNanoCreditUniqueDemandsAction } from '../../webservice/user/NanoCreditApi'
|
|
||||||
|
|
||||||
class DemandGroupDetail extends Component {
|
|
||||||
|
|
||||||
static navigatorStyle = {
|
|
||||||
navBarBackgroundColor: theme.accentLight,
|
|
||||||
statusBarColor: theme.accent,
|
|
||||||
navBarTextColor: '#FFFFFF',
|
|
||||||
navBarButtonColor: '#FFFFFF',
|
|
||||||
};
|
|
||||||
static navigationOptions = ({ navigation }) => {
|
|
||||||
return {
|
|
||||||
drawerLabel: () => null,
|
|
||||||
title: "Transaction N°" + navigation.getParam("item", { id: "-" }).id
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.item = this.props.navigation.getParam("item", null);
|
|
||||||
let sta = ''
|
|
||||||
if (this.item.status === '1') {
|
|
||||||
typesta = 1
|
|
||||||
colorback = '#AEAEAE'
|
|
||||||
sta = I18n.t('TREAT_DEMAND')
|
|
||||||
} else if (this.item.status === '0') {
|
|
||||||
colorback = 'green'
|
|
||||||
typesta = 2
|
|
||||||
sta = I18n.t('ACCEPTER_DEMANDE')
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
colorback = '#AEAEAE'
|
|
||||||
typesta = 2
|
|
||||||
sta = I18n.t('REFUSED')
|
|
||||||
}
|
|
||||||
|
|
||||||
this.state = {
|
|
||||||
displayAmountModifyDialog: false,
|
|
||||||
statut: sta,
|
|
||||||
user: null,
|
|
||||||
networks: [],
|
|
||||||
loadingTreat: false,
|
|
||||||
loadingCancel: false,
|
|
||||||
triggerTreatmentClick: false,
|
|
||||||
triggerCancelClick: false,
|
|
||||||
color: colorback,
|
|
||||||
montant: null,
|
|
||||||
isBtnModifyAmountEnabled: false,
|
|
||||||
id: this.props.navigation.getParam("id", null)
|
|
||||||
}
|
|
||||||
|
|
||||||
this.props.getNanoCreditUniqueDemandsReset();
|
|
||||||
this.props.getNanoCreditUniqueDemandsAction(this.state.id);
|
|
||||||
|
|
||||||
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
|
|
||||||
moment.locale(this.currentLocale);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
displayToast = (message) => {
|
|
||||||
Toast.show(message, {
|
|
||||||
duration: Toast.durations.SHORT,
|
|
||||||
position: Toast.positions.BOTTOM,
|
|
||||||
backgroundColor: Color.primaryColor,
|
|
||||||
shadow: true,
|
|
||||||
animation: true,
|
|
||||||
hideOnPress: true,
|
|
||||||
delay: 0,
|
|
||||||
onShow: () => {
|
|
||||||
// calls on toast\`s appear animation start
|
|
||||||
},
|
|
||||||
onShown: () => {
|
|
||||||
// calls on toast\`s appear animation end.
|
|
||||||
},
|
|
||||||
onHide: () => {
|
|
||||||
// calls on toast\`s hide animation start.
|
|
||||||
},
|
|
||||||
onHidden: () => {
|
|
||||||
// calls on toast\`s hide animation end.
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
onTreatDemand() {
|
|
||||||
if (this.item !== "1") {
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
this.props.treatCreditDemand(this.item.id);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onCancelDemand = () => {
|
|
||||||
if (this.item !== "1") {
|
|
||||||
this.props.treatCancelDemand(this.item.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
renderAlertErrorTreatOrCancelDemand = () => {
|
|
||||||
const { errorTreatDemand, resultTreatDemand, resultCancelDemand, errorCancelDemand } = this.props;
|
|
||||||
|
|
||||||
if (errorTreatDemand !== null) {
|
|
||||||
if (typeof errorTreatDemand.data !== 'undefined') {
|
|
||||||
if (errorTreatDemand.status === 426) {
|
|
||||||
Alert.alert(
|
|
||||||
I18n.t("ERROR_TREATMENT_DEMAND"),
|
|
||||||
errorTreatDemand.data.error,
|
|
||||||
[{
|
|
||||||
text: I18n.t('CANCEL_LABEL'),
|
|
||||||
onPress: () => { },
|
|
||||||
style: 'cancel'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: I18n.t("OK"), onPress: () => {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.setState({
|
|
||||||
displayAmountModifyDialog: true
|
|
||||||
});
|
|
||||||
}, 10);
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
this.props.creditCancelResetReducer();
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
{ cancelable: false }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Alert.alert(
|
|
||||||
I18n.t("ERROR_TREATMENT_DEMAND"),
|
|
||||||
errorTreatDemand.data.error,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
text: I18n.t("OK"), onPress: () => {
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
this.props.creditCancelResetReducer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
{ cancelable: false }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errorCancelDemand !== null) {
|
|
||||||
if (typeof errorCancelDemand.data !== 'undefined') {
|
|
||||||
Alert.alert(
|
|
||||||
I18n.t("ERROR_TREATMENT_DEMAND"),
|
|
||||||
errorCancelDemand.data.error,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
text: I18n.t("OK"), onPress: () => {
|
|
||||||
this.props.creditCancelResetReducer();
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
{ cancelable: false }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resultTreatDemand !== null) {
|
|
||||||
console.log("resultTreatDemand", resultTreatDemand);
|
|
||||||
if (resultTreatDemand.status === 200) {
|
|
||||||
this.displayToast(resultTreatDemand.response);
|
|
||||||
this.props.navigation.goBack();
|
|
||||||
this.props.navigation.state.params.onGoBack();
|
|
||||||
this.props.creditCancelResetReducer();
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resultCancelDemand !== null) {
|
|
||||||
console.log("resultCancelDemand", resultCancelDemand);
|
|
||||||
if (resultCancelDemand.status === 200) {
|
|
||||||
|
|
||||||
this.displayToast(resultCancelDemand.response);
|
|
||||||
this.props.navigation.goBack();
|
|
||||||
this.props.navigation.state.params.onGoBack();
|
|
||||||
this.props.creditCancelResetReducer();
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
renderBtn() {
|
|
||||||
const { user } = this.state
|
|
||||||
console.warn("ITEM ITEM", this.item);
|
|
||||||
if (user) {
|
|
||||||
if (this.item.code_parrain === user.code_membre) {
|
|
||||||
if (this.item.status === '1') {
|
|
||||||
return (<Button
|
|
||||||
style={{
|
|
||||||
borderColor: 'transparent',
|
|
||||||
borderRadius: 6,
|
|
||||||
marginLeft: 5,
|
|
||||||
marginRight: 5,
|
|
||||||
backgroundColor: this.state.color
|
|
||||||
}}
|
|
||||||
isLoading={this.props.loadingTreatDemand}
|
|
||||||
onPress={() => {
|
|
||||||
}}
|
|
||||||
disabled={true}
|
|
||||||
textStyle={styles.textbtnstyle}
|
|
||||||
>
|
|
||||||
{this.state.statut}
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
else if (this.item.status === '2') {
|
|
||||||
return (<Button
|
|
||||||
style={{
|
|
||||||
borderColor: 'transparent',
|
|
||||||
borderRadius: 6,
|
|
||||||
marginLeft: 5,
|
|
||||||
marginRight: 5,
|
|
||||||
backgroundColor: this.state.color
|
|
||||||
}}
|
|
||||||
onPress={() => {
|
|
||||||
}}
|
|
||||||
disabled={true}
|
|
||||||
textStyle={styles.textbtnstyle}
|
|
||||||
>
|
|
||||||
{this.state.statut}
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
return (<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
paddingTop: 10
|
|
||||||
}}>
|
|
||||||
|
|
||||||
<View style={{
|
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center'
|
|
||||||
}}>
|
|
||||||
<Button
|
|
||||||
style={{
|
|
||||||
borderColor: 'transparent',
|
|
||||||
borderRadius: 6,
|
|
||||||
marginLeft: 5,
|
|
||||||
marginRight: 5,
|
|
||||||
backgroundColor: this.state.color
|
|
||||||
}}
|
|
||||||
isLoading={this.props.loadingTreatDemand}
|
|
||||||
onPress={() => {
|
|
||||||
this.setState({
|
|
||||||
triggerTreatmentClick: true
|
|
||||||
});
|
|
||||||
this.onTreatDemand()
|
|
||||||
}}
|
|
||||||
textStyle={styles.textbtnstyle}
|
|
||||||
>
|
|
||||||
{this.state.statut}
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<View style={{
|
|
||||||
flex: 1,
|
|
||||||
alignItems: 'center'
|
|
||||||
}}>
|
|
||||||
<Button
|
|
||||||
style={{
|
|
||||||
borderColor: 'transparent',
|
|
||||||
borderRadius: 6,
|
|
||||||
marginLeft: 5,
|
|
||||||
marginRight: 5,
|
|
||||||
backgroundColor: Color.redColor
|
|
||||||
}}
|
|
||||||
isLoading={this.props.loadingCancelDemand}
|
|
||||||
onPress={() => {
|
|
||||||
this.setState({
|
|
||||||
triggerCancelClick: true
|
|
||||||
});
|
|
||||||
this.onCancelDemand();
|
|
||||||
}}
|
|
||||||
textStyle={styles.textbtnstyle}
|
|
||||||
>
|
|
||||||
{I18n.t('REFUSER_DEMANDE')}
|
|
||||||
</Button>
|
|
||||||
</View>
|
|
||||||
</View>)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
console.log("DEMAND GROUP PROPS", this.props);
|
|
||||||
let ago = moment.tz(this.item.date_creation, 'Etc/GMT+0').format();
|
|
||||||
ago = moment(ago)
|
|
||||||
return (
|
|
||||||
<View style={styles.container}>
|
|
||||||
{this.renderPromptModifyAmountToSend()}
|
|
||||||
{(this.state.triggerTreatmentClick || this.state.triggerCancelClick) && this.renderAlertErrorTreatOrCancelDemand()}
|
|
||||||
<CardView
|
|
||||||
style={styles.cardcontainer1}
|
|
||||||
><Text style={{
|
|
||||||
fontSize: 17,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: 'black',
|
|
||||||
marginLeft: responsiveWidth(5)
|
|
||||||
}}>{I18n.t('MEMBER_INFO')}</Text>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-call'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{this.item.phone}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-person'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{this.item.code_membre}</Text>
|
|
||||||
</View>
|
|
||||||
</CardView>
|
|
||||||
<CardView
|
|
||||||
style={styles.cardcontainer}
|
|
||||||
>
|
|
||||||
<Text style={{
|
|
||||||
fontSize: 17,
|
|
||||||
fontWeight: 'bold',
|
|
||||||
color: 'black',
|
|
||||||
marginLeft: responsiveWidth(5)
|
|
||||||
}}>{I18n.t('DEMAND_INFO')}</Text>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-git-branch'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{this.item.code_parrain}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-code-working'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{this.item.reseau}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-wallet'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{this.item.montant}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-calendar'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
style={{
|
|
||||||
marginLeft: 20
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Text style={styles.simpleuser}>{ago.format(" Do MMMM YYYY à HH:mm")}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignSelf: 'flex-end',
|
|
||||||
marginRight: 20,
|
|
||||||
justifyContent: 'flex-start'
|
|
||||||
}}>
|
|
||||||
<Icons name='md-time'
|
|
||||||
size={28}
|
|
||||||
color={theme.accent}
|
|
||||||
/>
|
|
||||||
<Text style={{
|
|
||||||
marginLeft: responsiveWidth(2),
|
|
||||||
fontSize: 16,
|
|
||||||
color: theme.accent
|
|
||||||
|
|
||||||
}}>{ago.fromNow()}</Text>
|
|
||||||
</View>
|
|
||||||
</CardView>
|
|
||||||
{this.state.user ? this.renderBtn() : null}
|
|
||||||
</View>)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
|
||||||
loadingGetUniqueDemand: state.getUniqueDemandsGroupReducer.loading,
|
|
||||||
resultGetUniqueDemand: state.getUniqueDemandsGroupReducer.result,
|
|
||||||
errorGetUniqueDemand: state.getUniqueDemandsGroupReducer.error,
|
|
||||||
|
|
||||||
loadingTreatDemand: state.creditTreatDemandReducer.loadingTreatDemand,
|
|
||||||
resultTreatDemand: state.creditTreatDemandReducer.resultTreatDemand,
|
|
||||||
errorTreatDemand: state.creditTreatDemandReducer.errorTreatDemand,
|
|
||||||
|
|
||||||
loadingCancelDemand: state.creditCancelDemandReducer.loadingCancelDemand,
|
|
||||||
resultCancelDemand: state.creditCancelDemandReducer.resultCancelDemand,
|
|
||||||
errorCancelDemand: state.creditCancelDemandReducer.errorCancelDemand
|
|
||||||
});
|
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => bindActionCreators({
|
|
||||||
getNanoCreditUniqueDemandsAction: getNanoCreditUniqueDemandsAction,
|
|
||||||
getNanoCreditUniqueDemandsReset: getNanoCreditUniqueDemandsReset,
|
|
||||||
treatCreditDemand: treatCreditDemand,
|
|
||||||
creditDemandResetReducer: creditDemandResetReducer,
|
|
||||||
|
|
||||||
treatCancelDemand: treatCancelDemand,
|
|
||||||
creditCancelResetReducer: creditCancelResetReducer
|
|
||||||
}, dispatch);
|
|
||||||
|
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(DemandGroupDetail);
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
flex: 1,
|
|
||||||
},
|
|
||||||
btnstyle: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
inputAmountText: {
|
|
||||||
...Platform.select({
|
|
||||||
android: {
|
|
||||||
borderBottomColor: Color.borderColor,
|
|
||||||
borderBottomWidth: 0.5,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
simpleuser: {
|
|
||||||
marginLeft: responsiveWidth(2),
|
|
||||||
fontSize: 16,
|
|
||||||
color: '#3E3E3E'
|
|
||||||
},
|
|
||||||
textbtnstyle: {
|
|
||||||
color: "white",
|
|
||||||
fontWeight: "bold",
|
|
||||||
fontSize: 18
|
|
||||||
},
|
|
||||||
cardcontainer1: {
|
|
||||||
justifyContent: 'space-evenly',
|
|
||||||
flex: 2,
|
|
||||||
marginRight: 3,
|
|
||||||
marginLeft: 3,
|
|
||||||
|
|
||||||
},
|
|
||||||
cardcontainer: {
|
|
||||||
justifyContent: 'space-evenly',
|
|
||||||
|
|
||||||
flex: 3,
|
|
||||||
margin: 3,
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -173,7 +173,7 @@ class DemandValidationGroup extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TouchableOpacity onPress={() => {
|
<TouchableOpacity onPress={() => {
|
||||||
this.props.navigation.push(route.demandGroupDetail, {
|
this.props.navigation.push(route.demandGroupNanoCreditDetail, {
|
||||||
id: item.id
|
id: item.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -333,6 +333,7 @@ class DemandValidationGroup extends React.Component {
|
||||||
this.renderLoader() :
|
this.renderLoader() :
|
||||||
this.rendeGetDemandsGroupResponse()
|
this.rendeGetDemandsGroupResponse()
|
||||||
: null}
|
: null}
|
||||||
|
{this.state.position === 0 && this.printOptions()}
|
||||||
</View>
|
</View>
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { StyleSheet, View, Text, Alert, Platform } from 'react-native'
|
import { StyleSheet, View, Text, Alert, Platform, ProgressBarAndroid } from 'react-native'
|
||||||
import CardView from 'react-native-cardview'
|
import CardView from 'react-native-cardview'
|
||||||
import Button from 'apsl-react-native-button'
|
import Button from 'apsl-react-native-button'
|
||||||
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'
|
import { responsiveHeight, responsiveWidth } from 'react-native-responsive-dimensions'
|
||||||
import Icons from 'react-native-vector-icons/Ionicons'
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import { updateCreditDemand } from "../../webservice/HistoryRequestApi";
|
import { updateCreditDemand } from "../../webservice/HistoryRequestApi";
|
||||||
import { readUser } from "../../webservice/AuthApi";
|
import { readUser } from "../../webservice/AuthApi";
|
||||||
let typesta = 0
|
let typesta = 0
|
||||||
|
@ -13,7 +13,6 @@ import I18n from "react-native-i18n";
|
||||||
import { treatCreditDemand, creditDemandResetReducer } from '../../webservice/CreditTreatDemandApi';
|
import { treatCreditDemand, creditDemandResetReducer } from '../../webservice/CreditTreatDemandApi';
|
||||||
import { treatCancelDemand, creditCancelResetReducer } from '../../webservice/CreditCancelDemandeApi';
|
import { treatCancelDemand, creditCancelResetReducer } from '../../webservice/CreditCancelDemandeApi';
|
||||||
import { getAgentNetworksList } from "../../webservice/NetworkApi";
|
import { getAgentNetworksList } from "../../webservice/NetworkApi";
|
||||||
import Icon from "./History";
|
|
||||||
import { Header } from "react-native-elements";
|
import { Header } from "react-native-elements";
|
||||||
let theme = require('./../../utils/theme.json');
|
let theme = require('./../../utils/theme.json');
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
@ -24,6 +23,7 @@ const route = require("./../../route.json");
|
||||||
import Dialog from "react-native-dialog";
|
import Dialog from "react-native-dialog";
|
||||||
import { FontWeight } from '../../config/typography'
|
import { FontWeight } from '../../config/typography'
|
||||||
import DeviceInfo from 'react-native-device-info'
|
import DeviceInfo from 'react-native-device-info'
|
||||||
|
import { getNanoCreditUniqueDemandsAction, getNanoCreditUniqueDemandsReset } from '../../webservice/user/NanoCreditApi'
|
||||||
|
|
||||||
class DemandGroupNanoCreditDetail extends Component {
|
class DemandGroupNanoCreditDetail extends Component {
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
static navigationOptions = ({ navigation }) => {
|
static navigationOptions = ({ navigation }) => {
|
||||||
return {
|
return {
|
||||||
drawerLabel: () => null,
|
drawerLabel: () => null,
|
||||||
title: "Transaction N°" + navigation.getParam("item", { id: "-" }).id
|
title: I18n.t('GROUP') + ' N°' + navigation.getParam("id", "-")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.item = this.props.navigation.getParam("item", null);
|
/* this.item = this.props.navigation.getParam("item", null);
|
||||||
let sta = ''
|
let sta = ''
|
||||||
if (this.item.status === '1') {
|
if (this.item.status === '1') {
|
||||||
typesta = 1
|
typesta = 1
|
||||||
|
@ -57,11 +57,11 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
colorback = '#AEAEAE'
|
colorback = '#AEAEAE'
|
||||||
typesta = 2
|
typesta = 2
|
||||||
sta = I18n.t('REFUSED')
|
sta = I18n.t('REFUSED')
|
||||||
}
|
} */
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
displayAmountModifyDialog: false,
|
displayAmountModifyDialog: false,
|
||||||
statut: sta,
|
/* statut: sta, */
|
||||||
user: null,
|
user: null,
|
||||||
networks: [],
|
networks: [],
|
||||||
loadingTreat: false,
|
loadingTreat: false,
|
||||||
|
@ -70,38 +70,27 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
triggerCancelClick: false,
|
triggerCancelClick: false,
|
||||||
color: colorback,
|
color: colorback,
|
||||||
montant: null,
|
montant: null,
|
||||||
isBtnModifyAmountEnabled: false
|
isBtnModifyAmountEnabled: false,
|
||||||
|
id: this.props.navigation.getParam("id", null)
|
||||||
}
|
}
|
||||||
readUser().then(async (user) => {
|
|
||||||
let networks = []
|
|
||||||
networks = await getAgentNetworksList(user.agentId);
|
|
||||||
this.setState({ user: user, networks: networks.networks })
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
|
this.currentLocale = DeviceInfo.getDeviceLocale().includes("fr") ? "fr" : "en-gb";
|
||||||
moment.locale(this.currentLocale);
|
moment.locale(this.currentLocale);
|
||||||
|
|
||||||
}
|
this.props.getNanoCreditUniqueDemandsReset();
|
||||||
|
this.props.getNanoCreditUniqueDemandsAction(this.state.id);
|
||||||
isNormalInteger = (str) => {
|
|
||||||
return (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(str)) ? false : true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isMontantValid = () => {
|
componentDidMount() {
|
||||||
const { montant } = this.state;
|
|
||||||
if ((parseInt(montant) == 0 || montant < 0))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
else if (!this.isNormalInteger(montant))
|
readUser().then((user) => {
|
||||||
return false;
|
if (user) {
|
||||||
|
if (user !== undefined) {
|
||||||
|
this.setState({ user });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
else if (parseInt(montant) > parseInt(this.item.montant))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
displayToast = (message) => {
|
displayToast = (message) => {
|
||||||
|
@ -132,16 +121,6 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
if (this.item !== "1") {
|
if (this.item !== "1") {
|
||||||
this.props.creditDemandResetReducer();
|
this.props.creditDemandResetReducer();
|
||||||
this.props.treatCreditDemand(this.item.id);
|
this.props.treatCreditDemand(this.item.id);
|
||||||
/* updateCreditDemand(this.item.phone, this.item.id).then((data) => {
|
|
||||||
this.setState({ loadingTreat: false })
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
if (data.success === 1) {
|
|
||||||
this.setState({ statut: I18n.t('TREAT_DEMAND'), color: "#AEAEAE" })
|
|
||||||
} else {
|
|
||||||
console.log(data);
|
|
||||||
}
|
|
||||||
}) */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,46 +130,6 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderPromptModifyAmountToSend = () => {
|
|
||||||
return (
|
|
||||||
<Dialog.Container useNativeDriver={true} visible={this.state.displayAmountModifyDialog}>
|
|
||||||
|
|
||||||
<Dialog.Title>{I18n.t('MODIFY_AMOUNT')}</Dialog.Title>
|
|
||||||
|
|
||||||
<Dialog.Description style={[FontWeight.bold]}>
|
|
||||||
{I18n.t('ENTER_NEW_AMOUNT_TO_SEND')}
|
|
||||||
</Dialog.Description>
|
|
||||||
|
|
||||||
<Dialog.Input style={styles.inputAmountText}
|
|
||||||
value={this.state.montant}
|
|
||||||
keyboardType="numeric"
|
|
||||||
onChangeText={(montant) => {
|
|
||||||
|
|
||||||
this.setState({ montant }, () => {
|
|
||||||
if (this.isMontantValid(montant)) {
|
|
||||||
this.setState({
|
|
||||||
isBtnModifyAmountEnabled: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
else
|
|
||||||
this.setState({
|
|
||||||
isBtnModifyAmountEnabled: false
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("this.isMontantValid().isValid", this.isMontantValid());
|
|
||||||
console.log("isBtnModifyAmountEnabled", this.state.isBtnModifyAmountEnabled);
|
|
||||||
});
|
|
||||||
|
|
||||||
}} />
|
|
||||||
|
|
||||||
<Dialog.Button bold={true} label={I18n.t('CANCEL_LABEL')} onPress={() => this.setState({ displayAmountModifyDialog: false })} />
|
|
||||||
<Dialog.Button bold={true} label={I18n.t('SEND')} disable={this.state.isBtnModifyAmountEnabled} onPress={() => {
|
|
||||||
this.props.creditDemandResetReducer();
|
|
||||||
this.props.treatCreditDemand(this.item.id, this.state.montant);
|
|
||||||
}} />
|
|
||||||
</Dialog.Container>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
renderAlertErrorTreatOrCancelDemand = () => {
|
renderAlertErrorTreatOrCancelDemand = () => {
|
||||||
const { errorTreatDemand, resultTreatDemand, resultCancelDemand, errorCancelDemand } = this.props;
|
const { errorTreatDemand, resultTreatDemand, resultCancelDemand, errorCancelDemand } = this.props;
|
||||||
|
@ -282,19 +221,26 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderLabelState = (state) => {
|
||||||
|
if (state === 0)
|
||||||
|
return I18n.t('NO_TREAT')
|
||||||
|
else if (statut === 1)
|
||||||
|
return I18n.t('TREAT')
|
||||||
|
else
|
||||||
|
return I18n.t('REFUSED')
|
||||||
|
}
|
||||||
|
|
||||||
renderBtn() {
|
renderBtn() {
|
||||||
const { user } = this.state
|
const { resultGetUniqueDemand } = this.props
|
||||||
console.warn("ITEM ITEM", this.item);
|
|
||||||
if (user) {
|
if (resultGetUniqueDemand.response.statut === 1) {
|
||||||
if (this.item.code_parrain === user.code_membre) {
|
|
||||||
if (this.item.status === '1') {
|
|
||||||
return (<Button
|
return (<Button
|
||||||
style={{
|
style={{
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
marginLeft: 5,
|
marginLeft: 5,
|
||||||
marginRight: 5,
|
marginRight: 5,
|
||||||
backgroundColor: this.state.color
|
backgroundColor: 'gray'
|
||||||
}}
|
}}
|
||||||
isLoading={this.props.loadingTreatDemand}
|
isLoading={this.props.loadingTreatDemand}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
@ -302,25 +248,25 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
disabled={true}
|
disabled={true}
|
||||||
textStyle={styles.textbtnstyle}
|
textStyle={styles.textbtnstyle}
|
||||||
>
|
>
|
||||||
{this.state.statut}
|
{this.renderLabelState(resultGetUniqueDemand.response.statut)}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else if (this.item.status === '2') {
|
else if (resultGetUniqueDemand.response.statut === 2) {
|
||||||
return (<Button
|
return (<Button
|
||||||
style={{
|
style={{
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
marginLeft: 5,
|
marginLeft: 5,
|
||||||
marginRight: 5,
|
marginRight: 5,
|
||||||
backgroundColor: this.state.color
|
backgroundColor: 'gray'
|
||||||
}}
|
}}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
}}
|
}}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
textStyle={styles.textbtnstyle}
|
textStyle={styles.textbtnstyle}
|
||||||
>
|
>
|
||||||
{this.state.statut}
|
{this.renderLabelState(resultGetUniqueDemand.response.statut)}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -341,18 +287,18 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
borderRadius: 6,
|
borderRadius: 6,
|
||||||
marginLeft: 5,
|
marginLeft: 5,
|
||||||
marginRight: 5,
|
marginRight: 5,
|
||||||
backgroundColor: this.state.color
|
backgroundColor: 'green'
|
||||||
}}
|
}}
|
||||||
isLoading={this.props.loadingTreatDemand}
|
isLoading={this.props.loadingTreatDemand}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
this.setState({
|
/* this.setState({
|
||||||
triggerTreatmentClick: true
|
triggerTreatmentClick: true
|
||||||
});
|
});
|
||||||
this.onTreatDemand()
|
this.onTreatDemand() */
|
||||||
}}
|
}}
|
||||||
textStyle={styles.textbtnstyle}
|
textStyle={styles.textbtnstyle}
|
||||||
>
|
>
|
||||||
{this.state.statut}
|
{I18n.t('ACTION_TREAT_DEMAND')}
|
||||||
</Button>
|
</Button>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
@ -370,10 +316,10 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
}}
|
}}
|
||||||
isLoading={this.props.loadingCancelDemand}
|
isLoading={this.props.loadingCancelDemand}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
this.setState({
|
/* this.setState({
|
||||||
triggerCancelClick: true
|
triggerCancelClick: true
|
||||||
});
|
});
|
||||||
this.onCancelDemand();
|
this.onCancelDemand(); */
|
||||||
}}
|
}}
|
||||||
textStyle={styles.textbtnstyle}
|
textStyle={styles.textbtnstyle}
|
||||||
>
|
>
|
||||||
|
@ -383,55 +329,72 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
</View>)
|
</View>)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderLoader = () => {
|
||||||
|
return (
|
||||||
|
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||||
|
{Platform.OS === 'android'
|
||||||
|
?
|
||||||
|
(
|
||||||
|
<>
|
||||||
|
<ProgressBarAndroid />
|
||||||
|
<Text>{I18n.t('LOADING_DOTS')}</Text>
|
||||||
|
|
||||||
|
</>
|
||||||
|
) :
|
||||||
|
<>
|
||||||
|
<ActivityIndicator size="large" color={'#ccc'} />
|
||||||
|
<Text>{I18n.t('LOADING_DOTS')}</Text>
|
||||||
|
</>
|
||||||
}
|
}
|
||||||
|
</View>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
renderDetail = () => {
|
||||||
console.log("CREDIT MANAGE PROPS", this.props);
|
|
||||||
let ago = moment.tz(this.item.date_creation, 'Etc/GMT+0').format();
|
const resultGetUniqueDemand = this.props.resultGetUniqueDemand;
|
||||||
ago = moment(ago)
|
console.log("resultGetUniqueDemand", resultGetUniqueDemand);
|
||||||
return (
|
return (<View style={styles.container}>
|
||||||
<View style={styles.container}>
|
|
||||||
{this.renderPromptModifyAmountToSend()}
|
|
||||||
{(this.state.triggerTreatmentClick || this.state.triggerCancelClick) && this.renderAlertErrorTreatOrCancelDemand()}
|
|
||||||
<CardView
|
<CardView
|
||||||
style={styles.cardcontainer1}
|
style={styles.cardcontainer1}
|
||||||
><Text style={{
|
>
|
||||||
|
<Text style={{
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
marginLeft: responsiveWidth(5)
|
marginLeft: responsiveWidth(5)
|
||||||
}}>{I18n.t('MEMBER_INFO')}</Text>
|
}}>
|
||||||
|
{I18n.t('DEMAND_INFO')}
|
||||||
|
</Text>
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-call'
|
<Icon name='account'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 20
|
marginLeft: 20
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.simpleuser}>{this.item.phone}</Text>
|
<Text style={styles.simpleuser}>{`${I18n.t('CREATOR')} ${resultGetUniqueDemand.response.createur}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={{
|
<View style={{
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-person'
|
<Icon name='map-marker'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 20
|
marginLeft: 20
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.simpleuser}>{this.item.code_membre}</Text>
|
<Text style={styles.simpleuser}>{`${I18n.t('COUNTRY')} ${resultGetUniqueDemand.response.country}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
</CardView>
|
</CardView>
|
||||||
<CardView
|
{/* <CardView style={styles.cardcontainer}>
|
||||||
style={styles.cardcontainer}
|
|
||||||
>
|
|
||||||
<Text style={{
|
<Text style={{
|
||||||
fontSize: 17,
|
fontSize: 17,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
|
@ -442,7 +405,7 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-git-branch'
|
<Icon name='md-git-branch'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
|
@ -455,7 +418,7 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-code-working'
|
<Icon name='md-code-working'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
|
@ -468,7 +431,7 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-wallet'
|
<Icon name='md-wallet'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
|
@ -481,7 +444,7 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-calendar'
|
<Icon name='md-calendar'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
style={{
|
style={{
|
||||||
|
@ -496,7 +459,7 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
marginRight: 20,
|
marginRight: 20,
|
||||||
justifyContent: 'flex-start'
|
justifyContent: 'flex-start'
|
||||||
}}>
|
}}>
|
||||||
<Icons name='md-time'
|
<Icon name='md-time'
|
||||||
size={28}
|
size={28}
|
||||||
color={theme.accent}
|
color={theme.accent}
|
||||||
/>
|
/>
|
||||||
|
@ -507,25 +470,43 @@ class DemandGroupNanoCreditDetail extends Component {
|
||||||
|
|
||||||
}}>{ago.fromNow()}</Text>
|
}}>{ago.fromNow()}</Text>
|
||||||
</View>
|
</View>
|
||||||
</CardView>
|
</CardView> */}
|
||||||
{this.state.user ? this.renderBtn() : null}
|
{this.renderBtn()}
|
||||||
</View>)
|
</View>);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
console.log("DEMAND GROUP PROPS", this.props);
|
||||||
|
//let ago = moment.tz(this.item.date_creation, 'Etc/GMT+0').format();
|
||||||
|
//ago = moment(ago)
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{
|
||||||
|
this.props.loadingGetUniqueDemand ?
|
||||||
|
this.renderLoader() :
|
||||||
|
this.renderDetail()
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
loadingTreatDemand: state.creditTreatDemandReducer.loadingTreatDemand,
|
loadingGetUniqueDemand: state.getUniqueDemandsGroupReducer.loading,
|
||||||
resultTreatDemand: state.creditTreatDemandReducer.resultTreatDemand,
|
resultGetUniqueDemand: state.getUniqueDemandsGroupReducer.result,
|
||||||
errorTreatDemand: state.creditTreatDemandReducer.errorTreatDemand,
|
errorGetUniqueDemand: state.getUniqueDemandsGroupReducer.error,
|
||||||
|
|
||||||
loadingCancelDemand: state.creditCancelDemandReducer.loadingCancelDemand,
|
loadingTreatDemand: state.treatDemandGroupReducer.loading,
|
||||||
resultCancelDemand: state.creditCancelDemandReducer.resultCancelDemand,
|
resultTreatDemand: state.treatDemandGroupReducer.result,
|
||||||
errorCancelDemand: state.creditCancelDemandReducer.errorCancelDemand
|
errorTreatDemand: state.treatDemandGroupReducer.error,
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapDispatchToProps = dispatch => bindActionCreators({
|
const mapDispatchToProps = dispatch => bindActionCreators({
|
||||||
|
getNanoCreditUniqueDemandsAction: getNanoCreditUniqueDemandsAction,
|
||||||
|
getNanoCreditUniqueDemandsReset: getNanoCreditUniqueDemandsReset,
|
||||||
|
|
||||||
treatCreditDemand: treatCreditDemand,
|
treatCreditDemand: treatCreditDemand,
|
||||||
creditDemandResetReducer: creditDemandResetReducer,
|
creditDemandResetReducer: creditDemandResetReducer,
|
||||||
|
|
||||||
|
|
|
@ -258,7 +258,7 @@ export default class OptionsMenu extends Component {
|
||||||
|| item === 'envoieWalletToCashUser' || item === 'linkCard' || item === 'envoieWalletToCardUser' || item === 'envoieWalletToBankUser' || item === 'retraitWalletVersCashUser'
|
|| item === 'envoieWalletToCashUser' || item === 'linkCard' || item === 'envoieWalletToCardUser' || item === 'envoieWalletToBankUser' || item === 'retraitWalletVersCashUser'
|
||||||
|| item === 'retraitCarteVersWalletUser' || item === 'retraitEnCashAgent' || item === 'retraitCarteVersCashAgent' || item === 'envoieCashVersWalletAgent'
|
|| item === 'retraitCarteVersWalletUser' || item === 'retraitEnCashAgent' || item === 'retraitCarteVersCashAgent' || item === 'envoieCashVersWalletAgent'
|
||||||
|| item === 'envoieCashVersAutreWalletAgent' || item === 'retraitCarteVersCashUser' || item === 'envoiCashVersCashAgent' || item === 'envoieCashVersCashAgent'
|
|| item === 'envoieCashVersAutreWalletAgent' || item === 'retraitCarteVersCashUser' || item === 'envoiCashVersCashAgent' || item === 'envoieCashVersCashAgent'
|
||||||
|| item === 'envoieCashVersCarteAgent' || item === 'modifyIdentificationUser' || item === 'createGroupNanoCredit' || item === 'groupNanoCredit' || item === 'demandGroupNanoCreditDetail') {
|
|| item === 'envoieCashVersCarteAgent' || item === 'modifyIdentificationUser' || item === 'createGroupNanoCredit' || item === 'groupNanoCredit' || item === 'demandeValidationGroupe') {
|
||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
const color = this.state.currentId === item.id ? theme.accent : "grey"
|
const color = this.state.currentId === item.id ? theme.accent : "grey"
|
||||||
|
|
|
@ -429,12 +429,13 @@ export const optionNanoCreditScreen = {
|
||||||
screen: "",
|
screen: "",
|
||||||
icon: 'account-multiple-plus',
|
icon: 'account-multiple-plus',
|
||||||
title: I18n.t('JOIN_GROUP'),
|
title: I18n.t('JOIN_GROUP'),
|
||||||
}, */
|
},
|
||||||
{
|
{
|
||||||
screen: "",
|
screen: "",
|
||||||
icon: 'account-card-details',
|
icon: 'account-card-details',
|
||||||
title: I18n.t('OPEN_ACCOUNT'),
|
title: I18n.t('OPEN_ACCOUNT'),
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
screen: "",
|
screen: "",
|
||||||
icon: 'cash',
|
icon: 'cash',
|
||||||
|
|
|
@ -109,6 +109,7 @@
|
||||||
"DELETE_DEMAND": "Deletion request",
|
"DELETE_DEMAND": "Deletion request",
|
||||||
"GROUP_INFOS": "Fill in the group information",
|
"GROUP_INFOS": "Fill in the group information",
|
||||||
"NOM_GROUP": "Group name",
|
"NOM_GROUP": "Group name",
|
||||||
|
"GROUP": "Group",
|
||||||
"LIMIT_OF_CREDIT": "Credit limit",
|
"LIMIT_OF_CREDIT": "Credit limit",
|
||||||
"CODE_USER_ILINK_SPONSOR_1": "iLink user code sponsor 1",
|
"CODE_USER_ILINK_SPONSOR_1": "iLink user code sponsor 1",
|
||||||
"CODE_USER_ILINK_SPONSOR_2": "iLink user code sponsor 2",
|
"CODE_USER_ILINK_SPONSOR_2": "iLink user code sponsor 2",
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
"SUCCESS_CREATION_GROUP": "Informations sur la création",
|
"SUCCESS_CREATION_GROUP": "Informations sur la création",
|
||||||
"ERROR_CREATION_GROUP": "Erreur de création",
|
"ERROR_CREATION_GROUP": "Erreur de création",
|
||||||
"NOM_GROUP": "Nom du groupe",
|
"NOM_GROUP": "Nom du groupe",
|
||||||
|
"GROUP": "Groupe",
|
||||||
"LIMIT_OF_CREDIT": "Limite du crédit",
|
"LIMIT_OF_CREDIT": "Limite du crédit",
|
||||||
"CODE_USER_ILINK_SPONSOR_1": "Code utilisateur iLink Sponsor 1",
|
"CODE_USER_ILINK_SPONSOR_1": "Code utilisateur iLink Sponsor 1",
|
||||||
"CODE_USER_ILINK_SPONSOR_2": "Code utilisateur iLink Sponsor 2",
|
"CODE_USER_ILINK_SPONSOR_2": "Code utilisateur iLink Sponsor 2",
|
||||||
|
|
|
@ -4,7 +4,7 @@ import I18n from 'react-native-i18n';
|
||||||
import { store } from "../../redux/store";
|
import { store } from "../../redux/store";
|
||||||
import { idVerificationUrl, getCreditDemand } from "../IlinkConstants";
|
import { idVerificationUrl, getCreditDemand } from "../IlinkConstants";
|
||||||
import { fetchRetraitCashAgentIdVerificationPending, fetchRetraitCashAgentIdVerificationSuccess, fetchRetraitCashAgentIdVerificationError, fetchRetraitCashAgentIdVerificationReset } from "../../redux/actions/EnvoieAgentAction";
|
import { fetchRetraitCashAgentIdVerificationPending, fetchRetraitCashAgentIdVerificationSuccess, fetchRetraitCashAgentIdVerificationError, fetchRetraitCashAgentIdVerificationReset } from "../../redux/actions/EnvoieAgentAction";
|
||||||
import { fetchGetDemandsGroupSuccess, fetchGetDemandsGroupPending, fetchGetDemandsGroupError, fetchGetDemandsGroupReset, fetchGetUniqueDemandsGroupPending, fetchGetUniqueDemandsGroupSuccess } from "../../redux/actions/NanoCreditAction";
|
import { fetchGetDemandsGroupSuccess, fetchGetDemandsGroupPending, fetchGetDemandsGroupError, fetchGetDemandsGroupReset, fetchGetUniqueDemandsGroupPending, fetchGetUniqueDemandsGroupSuccess, fetchGetUniqueDemandsGroupReset, fetchGetUniqueDemandsGroupError } from "../../redux/actions/NanoCreditAction";
|
||||||
|
|
||||||
export const getNanoCreditDemandsAction = (id) => {
|
export const getNanoCreditDemandsAction = (id) => {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue