wallet user
This commit is contained in:
parent
a95339a81b
commit
215d20ecc5
File diff suppressed because one or more lines are too long
|
@ -1,35 +1,36 @@
|
|||
{
|
||||
"discover": "ILink",
|
||||
"stackRoot": "stackcenter",
|
||||
"historiques": "Historique",
|
||||
"options": "menu",
|
||||
"drawer": "drawer",
|
||||
"credrequester": "creditrequest",
|
||||
"login": "Login",
|
||||
"first": "Home",
|
||||
"typeaccountcreate": "typeaccountcreate",
|
||||
"simpleusercreate": "simpleusercreate",
|
||||
"splashscreen": "spashscreen",
|
||||
"useraccount": "useraccount",
|
||||
"configurations": "configuration",
|
||||
"notification": "notification",
|
||||
"modalhistoryfilter": "filterhistory",
|
||||
"superviseurgroup": "superviseurgroup",
|
||||
"historyItemDetails": "historyItemDetails",
|
||||
"forgotpass": "forgottenpass",
|
||||
"confirmcode": "confirmcode",
|
||||
"creationstep2": "step2",
|
||||
"help": "help",
|
||||
"modaloading": "modaloading",
|
||||
"activateaccount": "activateaccout",
|
||||
"addNetwork": "addNetwork",
|
||||
"notificationView": "notificationview",
|
||||
"generateNetwork": "generateNetwork",
|
||||
"helpmenu": "helpMenu",
|
||||
"updateinfo": "updateinformation",
|
||||
"intersticielAds": "intersticielAds",
|
||||
"walletDetail": "walletDetail",
|
||||
"walletDepot": "walletDepot",
|
||||
"walletRetrait": "walletRetrait",
|
||||
"walletSelect": "walletSelect"
|
||||
"discover": "ILink",
|
||||
"stackRoot": "stackcenter",
|
||||
"historiques": "Historique",
|
||||
"options": "menu",
|
||||
"drawer": "drawer",
|
||||
"credrequester": "creditrequest",
|
||||
"login": "Login",
|
||||
"first": "Home",
|
||||
"typeaccountcreate": "typeaccountcreate",
|
||||
"simpleusercreate": "simpleusercreate",
|
||||
"splashscreen": "spashscreen",
|
||||
"useraccount": "useraccount",
|
||||
"configurations": "configuration",
|
||||
"notification": "notification",
|
||||
"modalhistoryfilter": "filterhistory",
|
||||
"superviseurgroup": "superviseurgroup",
|
||||
"historyItemDetails": "historyItemDetails",
|
||||
"forgotpass": "forgottenpass",
|
||||
"confirmcode": "confirmcode",
|
||||
"creationstep2": "step2",
|
||||
"help": "help",
|
||||
"modaloading": "modaloading",
|
||||
"activateaccount": "activateaccout",
|
||||
"addNetwork": "addNetwork",
|
||||
"notificationView": "notificationview",
|
||||
"generateNetwork": "generateNetwork",
|
||||
"helpmenu": "helpMenu",
|
||||
"updateinfo": "updateinformation",
|
||||
"intersticielAds": "intersticielAds",
|
||||
"walletDetail": "walletDetail",
|
||||
"walletDepot": "walletDepot",
|
||||
"walletRetrait": "walletRetrait",
|
||||
"walletSelect": "walletSelect",
|
||||
"walletOptionSelect": "walletOptionSelect"
|
||||
}
|
|
@ -50,10 +50,23 @@
|
|||
"CVC_CARD_ERROR": "CVC card error format",
|
||||
"THIS_FIELD_IS_REQUIRED": "This field is required",
|
||||
"PLEASE_ENTER_THE_AMOUNT": "Please enter the amount",
|
||||
"CHOOSE_OPTION": "Please choose an option",
|
||||
"EXPIRY_CARD_ERROR": "Date incorrect",
|
||||
"CARD_NUMBER_ERROR": "Card number incorrect",
|
||||
"AMOUNT_LABEL": "Amount",
|
||||
"WITHDRAWAL": "Withdrawal",
|
||||
"WITHDRAWAL_IN_CASH": "Withdrawal in cash",
|
||||
"WITHDRAWAL_WALLET_TO_CASH": "Withdrawal wallet to cash",
|
||||
"WITHDRAWAL_CARD_TO_WALLET": "Withdrawal card to wallet",
|
||||
"WITHDRAWAL_CARD_TO_CASH": "Withdrawal card to cash",
|
||||
"DEPOSIT_CASH_TO_WALLET": "Cash to wallet",
|
||||
"DEPOSIT_CASH_TO_OTHER_WALLET": "Cash to another wallet",
|
||||
"DEPOSIT_CASH_TO_VISA": "Cash to visa card",
|
||||
"DEPOSIT_CASH_TO_BANK": "Cash to bank",
|
||||
"DEPOSIT_WALLET_TO_WALLET": "Wallet to wallet",
|
||||
"DEPOSIT_TO_CASH": "Deposit to cash",
|
||||
"DEPOSIT_TO_CARD": "Deposit to card",
|
||||
"DEPOSIT_TO_BANK": "Deposit to bank",
|
||||
"NANO_CREDIT": "Nano credit",
|
||||
"NANO_SANTE": "Nano health",
|
||||
"PAIEMENT_FACTURE": "Bill payment",
|
||||
|
|
|
@ -56,8 +56,21 @@
|
|||
"CARD_NUMBER_ERROR": "Numéro de carte incorrect",
|
||||
"THIS_FIELD_IS_REQUIRED": "Ce champ est requis",
|
||||
"PLEASE_ENTER_THE_AMOUNT": "Veuillez renseigne le montant",
|
||||
"CHOOSE_OPTION": "Veuillez sélectionner une option",
|
||||
"DEPOSIT_DESCRIPTION": "Effectuer un dépôt",
|
||||
"WITHDRAWAL": "Retrait",
|
||||
"WITHDRAWAL_IN_CASH": "Retrait en cash",
|
||||
"WITHDRAWAL_WALLET_TO_CASH": "Retrait wallet vers cash",
|
||||
"WITHDRAWAL_CARD_TO_WALLET": "Retrait carte vers wallet",
|
||||
"WITHDRAWAL_CARD_TO_CASH": "Retrait carte vers cash",
|
||||
"DEPOSIT_CASH_TO_WALLET": "Cash vers wallet",
|
||||
"DEPOSIT_CASH_TO_OTHER_WALLET": "Cash vers autre wallet",
|
||||
"DEPOSIT_CASH_TO_VISA": "Cash vers carte visa",
|
||||
"DEPOSIT_CASH_TO_BANK": "Cash vers banque",
|
||||
"DEPOSIT_WALLET_TO_WALLET": "Wallet vers wallet",
|
||||
"DEPOSIT_TO_CASH": "Dépôt vers cash",
|
||||
"DEPOSIT_TO_CARD": "Dépôt vers carte",
|
||||
"DEPOSIT_TO_BANK": "Dépôt vers banque",
|
||||
"NANO_CREDIT": "Nano crédit",
|
||||
"NANO_SANTE": "Nano santé",
|
||||
"PAIEMENT_FACTURE": "Paiement de facture",
|
||||
|
|
|
@ -1389,7 +1389,7 @@ class Home extends BaseScreen {
|
|||
barStyle="light-content"
|
||||
translucent={true}
|
||||
/>
|
||||
{/* {
|
||||
{
|
||||
(this.state.loadingDialog || this.props.loading) ?
|
||||
<View
|
||||
style={{ position: "absolute", zIndex: 1, backgroundColor: "#00000050", width: this.state.loadingDialog ? responsiveWidth(100) : 0, height: this.state.loadingDialog ? responsiveHeight(100) : 0, flex: 1, justifyContent: 'center', alignItems: 'center' }}
|
||||
|
@ -1426,7 +1426,6 @@ class Home extends BaseScreen {
|
|||
Alert.alert(I18n.t("PROBLEM_OCCUR"), I18n.t("PROBLEM_OCCUR_DIRECTION"), [{ text: "Ok", onPress: () => { } }])
|
||||
}}
|
||||
/>
|
||||
*/}
|
||||
{this.makeCardSearch()}
|
||||
{this.makeSlidingUp()}
|
||||
{this.makeDialogLoader()}
|
||||
|
|
|
@ -30,8 +30,8 @@ import 'moment/locale/en-nz'
|
|||
import 'moment/locale/en-gb'
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { thousandsSeparators, isEmptyObject, isIlinkWorldWallet, optionDepotScreen, optionRetraitScreen } from '../../utils/UtilsFunction';
|
||||
import DeviceInfo from 'react-native-device-info'
|
||||
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionDepotScreen, optionRetraitScreen, optionRetraitUserScreen, transactionHistoryLabel, isIlinkWorldWallet } from '../../utils/UtilsFunction';
|
||||
import DeviceInfo from 'react-native-device-info';
|
||||
|
||||
let route = require('./../../route.json');
|
||||
let slugify = require('slugify');
|
||||
|
@ -613,7 +613,7 @@ class WalletDetail extends Component {
|
|||
<View style={[styles.containerTouch]}>
|
||||
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => { this.props.navigation.push(route.walletOptionSelect) }}
|
||||
onPress={() => { }}
|
||||
activeOpacity={0.9}>
|
||||
|
||||
<Icon name='cash-multiple'
|
||||
|
@ -641,7 +641,7 @@ class WalletDetail extends Component {
|
|||
|
||||
<View style={[styles.containerTouch]}>
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => { this.props.navigation.push(route.walletOptionSelect) }}
|
||||
onPress={() => { }}
|
||||
activeOpacity={0.9}>
|
||||
<Icon name='heart-multiple'
|
||||
color={Color.primaryColor}
|
||||
|
@ -672,7 +672,7 @@ class WalletDetail extends Component {
|
|||
<View style={[styles.containerTouch]}>
|
||||
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => { this.props.navigation.push(route.walletOptionSelect) }}
|
||||
onPress={() => { }}
|
||||
activeOpacity={0.9}>
|
||||
|
||||
<Icon name='file-document'
|
||||
|
@ -816,78 +816,46 @@ class WalletDetail extends Component {
|
|||
)
|
||||
}
|
||||
|
||||
renderHistoryTransactionItem = (item) => {
|
||||
let re = moment.tz(item.date, 'Etc/GMT+0').format();
|
||||
let date = moment(re).fromNow();
|
||||
renderHistoryTransactionItem = (item, index) => {
|
||||
|
||||
return (
|
||||
<View
|
||||
key={item.id}
|
||||
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={styles.iconContent}>
|
||||
<Icon name={item.type === 'debit' ? 'arrow-top-left' : 'arrow-bottom-right'}
|
||||
color={Color.primaryColor} size={20} />
|
||||
</View>
|
||||
<View>
|
||||
{item.type === 'debit' ? (
|
||||
<Text style={Typography.body1}>{I18n.t('WITHDRAWAL_TRANSACTION_HISTORY_DESCRIPTION')} {item.montant}</Text>
|
||||
) :
|
||||
(
|
||||
<Text style={Typography.body1}>{I18n.t('DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION')} {item.montant}</Text>
|
||||
)
|
||||
}
|
||||
<Text style={[Typography.footnote, Color.grayColor]} style={{ marginTop: 5 }}>
|
||||
{date}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}>
|
||||
{
|
||||
Object.keys(item).map((element, i) => (
|
||||
<View style={{ alignItems: 'center' }} key={i}>
|
||||
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
||||
{isEqual(element, 'date')
|
||||
? this.getCreationDateToHumanFormat(item[element])
|
||||
:
|
||||
item[element]
|
||||
}
|
||||
</Text>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
);
|
||||
|
||||
/* <View
|
||||
key={item.id}
|
||||
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={styles.iconContent}>
|
||||
<Icon name='arrow-bottom-right'
|
||||
color={Color.primaryColor} size={20} />
|
||||
</View>
|
||||
<View>
|
||||
<Text style={Typography.subhead}>{item.description}</Text>
|
||||
<Text style={[Typography.caption1, Color.grayColor]} style={{ marginTop: 5 }}>
|
||||
{date}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View> */
|
||||
|
||||
}
|
||||
|
||||
renderHistoryTransactionList = () => {
|
||||
|
||||
const { resultTransaction, errorTransaction } = this.props;
|
||||
if (errorTransaction !== null) {
|
||||
if (typeof errorTransaction.data !== 'undefined') {
|
||||
return (
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
<Text style={Typography.body1}>{errorTransaction.data.error}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
else {
|
||||
return (
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
<Text style={Typography.body1}>{errorTransaction}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
if (resultTransaction !== null) {
|
||||
if (resultTransaction.response !== null) {
|
||||
return (
|
||||
Array.isArray(resultTransaction.response) && (resultTransaction.response.length) > 0 ?
|
||||
(
|
||||
resultTransaction.response.map((item, ) => (
|
||||
this.renderHistoryTransactionItem(item)
|
||||
))
|
||||
) :
|
||||
(
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
<Text style={Typography.body1}>{I18n.t('NO_WALLET_HISTORY')}</Text>
|
||||
</View>
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
renderHistoryTransaction = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<View style={[styles.checkDefault, { borderBottomColor: Color.borderColor }]}>
|
||||
|
@ -896,30 +864,53 @@ class WalletDetail extends Component {
|
|||
{I18n.t('TRANSACTION_HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
<ScrollView style={styles.transactionContainer}>
|
||||
<View style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}>
|
||||
{
|
||||
this.props.loadingTransaction ?
|
||||
(
|
||||
<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>
|
||||
) : this.renderHistoryTransactionList()
|
||||
transactionHistoryLabel().map((item, index) => (
|
||||
<View style={{ alignItems: 'center' }} key={index}>
|
||||
<Icon name={item.icon} size={24} color={Color.primaryColor} />
|
||||
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
||||
{item.label}
|
||||
</Text>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
</ScrollView>
|
||||
</View>
|
||||
{
|
||||
transactionHistoryUser().map((item, index) => (
|
||||
this.renderHistoryTransactionItem(item, index)
|
||||
))
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
renderHistoryTransaction = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{
|
||||
this.props.loadingTransaction ?
|
||||
(
|
||||
<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>
|
||||
) : this.renderHistoryTransactionList()
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -998,12 +989,6 @@ class WalletDetail extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const isHomeRootView = this.isHomeRootView;
|
||||
/*console.log("WALLET DETAILS PROPS", this.props);
|
||||
console.log("isHomeRootView", isHomeRootView);
|
||||
console.log("this.props.loading || this.props.loadingTransferCommission", this.props.loading || this.props.loadingTransferCommission);
|
||||
console.log(this.state.scrollHeaderY);*/
|
||||
|
||||
return (
|
||||
<>
|
||||
<StatusBar
|
||||
|
@ -1082,6 +1067,17 @@ const styles = StyleSheet.create({
|
|||
height: 250,
|
||||
position: 'absolute',
|
||||
},
|
||||
contentService: {
|
||||
paddingVertical: 10,
|
||||
borderBottomWidth: 0.5,
|
||||
flexDirection: 'row',
|
||||
flexWrap: 'wrap',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
blockView: {
|
||||
paddingVertical: 10,
|
||||
borderBottomWidth: 0.5,
|
||||
},
|
||||
containField: {
|
||||
padding: 10,
|
||||
marginBottom: 20,
|
||||
|
|
|
@ -19,6 +19,7 @@ import { getWalletTransactionHistory, getWalletTransactionHistoryReset } from '.
|
|||
import { transferCommissionAction } from '../../webservice/WalletTransferCommission';
|
||||
import { resetCommissionReducer } from '../../webservice/WalletTransferCommission';
|
||||
import Dialog, { DialogContent, DialogTitle, DialogFooter, DialogButton } from 'react-native-popup-dialog';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import { baseUrl } from '../../webservice/IlinkConstants';
|
||||
let moment = require('moment-timezone');
|
||||
import 'moment/locale/fr'
|
||||
|
@ -31,7 +32,7 @@ import 'moment/locale/en-nz'
|
|||
import 'moment/locale/en-gb'
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen } from '../../utils/UtilsFunction';
|
||||
import { thousandsSeparators, isEmptyObject, transactionHistoryUser, optionDepotUserScreen, optionRetraitUserScreen, transactionHistoryLabel } from '../../utils/UtilsFunction';
|
||||
import DeviceInfo from 'react-native-device-info'
|
||||
|
||||
let route = require('./../../route.json');
|
||||
|
@ -168,14 +169,11 @@ class WalletDetailUser extends Component {
|
|||
}
|
||||
|
||||
refresh = () => {
|
||||
|
||||
let agentId = this.props.navigation.state.params.userId;
|
||||
this.props.getWalletDetailActivated(agentId, null);
|
||||
//this.props.getWalletDetailActivated(agentId, null);
|
||||
let userId = this.props.navigation.state.params.userId;
|
||||
this.props.getWalletDetailActivated(userId, null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
renderHeader = (wallet) => (
|
||||
<View style={[
|
||||
styles.containField,
|
||||
|
@ -426,7 +424,7 @@ class WalletDetailUser extends Component {
|
|||
<View style={[styles.containerTouch]}>
|
||||
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => { this.props.navigation.push(route.createIdentification) }}
|
||||
onPress={() => { }}
|
||||
activeOpacity={0.9}>
|
||||
|
||||
<Icon name='cash-multiple'
|
||||
|
@ -485,7 +483,7 @@ class WalletDetailUser extends Component {
|
|||
<View style={[styles.containerTouch]}>
|
||||
|
||||
<TouchableOpacity style={styles.contain}
|
||||
onPress={() => { this.props.navigation.push(route.createIdentification) }}
|
||||
onPress={() => { }}
|
||||
activeOpacity={0.9}>
|
||||
|
||||
<Icon name='file-document'
|
||||
|
@ -561,35 +559,73 @@ class WalletDetailUser extends Component {
|
|||
|
||||
}
|
||||
|
||||
renderHistoryTransactionItem = (item) => {
|
||||
let re = moment.tz(item.date, 'Etc/GMT+0').format();
|
||||
let date = moment(re).fromNow();
|
||||
|
||||
renderHistoryTransactionItem = (item, index) => {
|
||||
|
||||
return (
|
||||
<View
|
||||
key={item.id}
|
||||
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={styles.iconContent}>
|
||||
<Icon name='arrow-bottom-right'
|
||||
color={Color.primaryColor} size={20} />
|
||||
</View>
|
||||
<View>
|
||||
<Text style={Typography.subhead}>{item.description}</Text>
|
||||
<Text style={[Typography.caption1, Color.grayColor]} style={{ marginTop: 5 }}>
|
||||
{date}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}>
|
||||
{
|
||||
Object.keys(item).map((element, i) => (
|
||||
<View style={{ alignItems: 'center' }} key={i}>
|
||||
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
||||
{isEqual(element, 'date')
|
||||
? this.getCreationDateToHumanFormat(item[element])
|
||||
:
|
||||
item[element]
|
||||
}
|
||||
</Text>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
);
|
||||
|
||||
/* <View
|
||||
key={item.id}
|
||||
style={[styles.paymentItem, { borderBottomColor: Color.borderColor }]}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={styles.iconContent}>
|
||||
<Icon name='arrow-bottom-right'
|
||||
color={Color.primaryColor} size={20} />
|
||||
</View>
|
||||
<View>
|
||||
<Text style={Typography.subhead}>{item.description}</Text>
|
||||
<Text style={[Typography.caption1, Color.grayColor]} style={{ marginTop: 5 }}>
|
||||
{date}
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View> */
|
||||
|
||||
}
|
||||
|
||||
renderHistoryTransactionList = () => {
|
||||
return (
|
||||
transactionHistoryUser().map((item, ) => (
|
||||
this.renderHistoryTransactionItem(item)
|
||||
))
|
||||
<>
|
||||
<View style={[styles.checkDefault, { borderBottomColor: Color.borderColor }]}>
|
||||
<Text
|
||||
style={[Typography.title3, Typography.semibold]}>
|
||||
{I18n.t('TRANSACTION_HISTORY')}
|
||||
</Text>
|
||||
</View>
|
||||
<View style={[styles.contentService, { borderBottomColor: Color.primaryColor }]}>
|
||||
{
|
||||
transactionHistoryLabel().map((item, index) => (
|
||||
<View style={{ alignItems: 'center' }} key={index}>
|
||||
<Icon name={item.icon} size={24} color={Color.primaryColor} />
|
||||
<Text style={[Typography.overline, Color.grayColor], { marginTop: 4 }}>
|
||||
{item.label}
|
||||
</Text>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
</View>
|
||||
{
|
||||
transactionHistoryUser().map((item, index) => (
|
||||
this.renderHistoryTransactionItem(item, index)
|
||||
))
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -598,52 +634,27 @@ class WalletDetailUser extends Component {
|
|||
|
||||
return (
|
||||
<>
|
||||
<View style={[styles.checkDefault, { borderBottomColor: Color.borderColor }]}>
|
||||
<View
|
||||
style={[
|
||||
styles.contentService,
|
||||
{ borderBottomColor: Color.primaryColor },
|
||||
]}>
|
||||
{[
|
||||
{ key: '1', name: 'wifi' },
|
||||
{ key: '2', name: 'coffee' },
|
||||
{ key: '3', name: 'bath' },
|
||||
{ key: '4', name: 'car' },
|
||||
{ key: '5', name: 'paw' },
|
||||
].map((item, index) => (
|
||||
<View style={{ alignItems: 'center' }} key={'service' + index}>
|
||||
<Icon name={item.name} size={24} color={Color.accentColor} />
|
||||
<Text overline grayColor style={{ marginTop: 4 }}>
|
||||
{item.name}
|
||||
</Text>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<ScrollView style={styles.transactionContainer}>
|
||||
{
|
||||
this.props.loadingTransaction ?
|
||||
(
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
{Platform.OS === 'android'
|
||||
?
|
||||
(
|
||||
<>
|
||||
<ProgressBarAndroid />
|
||||
<Text>{I18n.t('LOADING_DOTS')}</Text>
|
||||
|
||||
</>
|
||||
) :
|
||||
{
|
||||
this.props.loadingTransaction ?
|
||||
(
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
{Platform.OS === 'android'
|
||||
?
|
||||
(
|
||||
<>
|
||||
<ActivityIndicator size="large" color={'#ccc'} />
|
||||
<ProgressBarAndroid />
|
||||
<Text>{I18n.t('LOADING_DOTS')}</Text>
|
||||
|
||||
</>
|
||||
}
|
||||
</View>
|
||||
) : this.renderHistoryTransactionList()
|
||||
}
|
||||
</ScrollView>
|
||||
) :
|
||||
<>
|
||||
<ActivityIndicator size="large" color={'#ccc'} />
|
||||
<Text>{I18n.t('LOADING_DOTS')}</Text>
|
||||
</>
|
||||
}
|
||||
</View>
|
||||
) : this.renderHistoryTransactionList()
|
||||
}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -800,6 +811,7 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
transactionContainer: {
|
||||
flexDirection: 'row',
|
||||
flex: 1,
|
||||
paddingTop: 10,
|
||||
paddingTop: 10,
|
||||
paddingLeft: 10,
|
||||
|
|
|
@ -23,15 +23,46 @@ export const identityPieces = () => {
|
|||
]
|
||||
}
|
||||
|
||||
export const transactionHistoryLabel = () => {
|
||||
return [
|
||||
{
|
||||
icon: 'arrow-expand',
|
||||
label: 'Type'
|
||||
},
|
||||
{
|
||||
icon: 'inbox-arrow-up',
|
||||
label: 'Source'
|
||||
},
|
||||
{
|
||||
icon: 'cash',
|
||||
label: 'Montant'
|
||||
},
|
||||
{
|
||||
icon: 'account-arrow-right',
|
||||
label: 'Destinataire'
|
||||
},
|
||||
{
|
||||
icon: 'calendar-clock',
|
||||
label: 'Date'
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
export const transactionHistoryUser = () => {
|
||||
return [
|
||||
{
|
||||
description: `Dépôt de 10 000 dans le wallet UBA Fs iLink à destination de Brice Zele (+237690662238) `,
|
||||
date: '2020-05-15'
|
||||
type: 'depot',
|
||||
source: 'wallet',
|
||||
montant: 10000,
|
||||
destinataire: 'John Doe',
|
||||
date: '2020-05-15',
|
||||
},
|
||||
{
|
||||
description: `Retrait de 10 000 dans le wallet UBA Fs iLink à destination de Brice Zele (+237690662238) `,
|
||||
date: '2020-05-20'
|
||||
type: 'retrait',
|
||||
source: 'wallet',
|
||||
montant: 10000,
|
||||
destinataire: 'John Doe',
|
||||
date: '2020-05-15',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue