be-components 3.5.9 → 3.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Components/Pagination.js +37 -0
- package/lib/commonjs/Components/Pagination.js.map +1 -0
- package/lib/commonjs/ProfileManager/Components/VouchCard.js +3 -35
- package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountCard.js +27 -28
- package/lib/commonjs/Wallet/components/AccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountLimitManager.js +60 -95
- package/lib/commonjs/Wallet/components/AccountLimitManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountManager.js +209 -158
- package/lib/commonjs/Wallet/components/AccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js +53 -66
- package/lib/commonjs/Wallet/components/AccountSnoozeManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/DepositCard.js +93 -99
- package/lib/commonjs/Wallet/components/DepositCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ItemOrderCard.js +26 -29
- package/lib/commonjs/Wallet/components/ItemOrderCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js +43 -46
- package/lib/commonjs/Wallet/components/ItemOrderDetailCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManageAccountCard.js +85 -60
- package/lib/commonjs/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/OrderManager.js +61 -58
- package/lib/commonjs/Wallet/components/OrderManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/RemoveAccount.js +22 -23
- package/lib/commonjs/Wallet/components/RemoveAccount.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletActionSelector.js +130 -133
- package/lib/commonjs/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSettings.js +382 -547
- package/lib/commonjs/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js +85 -107
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/components/WithdrawCard.js +91 -111
- package/lib/commonjs/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +22 -24
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/commonjs/constants/styles.js +1 -1
- package/lib/commonjs/constants/styles.js.map +1 -1
- package/lib/commonjs/constants/useColors.js +1 -1
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/module/Components/Pagination.js +30 -0
- package/lib/module/Components/Pagination.js.map +1 -0
- package/lib/module/ProfileManager/Components/VouchCard.js +3 -35
- package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
- package/lib/module/Wallet/components/AccountCard.js +23 -24
- package/lib/module/Wallet/components/AccountCard.js.map +1 -1
- package/lib/module/Wallet/components/AccountLimitManager.js +43 -77
- package/lib/module/Wallet/components/AccountLimitManager.js.map +1 -1
- package/lib/module/Wallet/components/AccountManager.js +206 -155
- package/lib/module/Wallet/components/AccountManager.js.map +1 -1
- package/lib/module/Wallet/components/AccountSnoozeManager.js +35 -48
- package/lib/module/Wallet/components/AccountSnoozeManager.js.map +1 -1
- package/lib/module/Wallet/components/DepositCard.js +62 -67
- package/lib/module/Wallet/components/DepositCard.js.map +1 -1
- package/lib/module/Wallet/components/ItemOrderCard.js +17 -20
- package/lib/module/Wallet/components/ItemOrderCard.js.map +1 -1
- package/lib/module/Wallet/components/ItemOrderDetailCard.js +28 -31
- package/lib/module/Wallet/components/ItemOrderDetailCard.js.map +1 -1
- package/lib/module/Wallet/components/ManageAccountCard.js +80 -55
- package/lib/module/Wallet/components/ManageAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/OrderManager.js +59 -56
- package/lib/module/Wallet/components/OrderManager.js.map +1 -1
- package/lib/module/Wallet/components/RemoveAccount.js +16 -16
- package/lib/module/Wallet/components/RemoveAccount.js.map +1 -1
- package/lib/module/Wallet/components/WalletActionSelector.js +102 -104
- package/lib/module/Wallet/components/WalletActionSelector.js.map +1 -1
- package/lib/module/Wallet/components/WalletSettings.js +381 -545
- package/lib/module/Wallet/components/WalletSettings.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js +42 -64
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/components/WithdrawCard.js +52 -71
- package/lib/module/Wallet/components/WithdrawCard.js.map +1 -1
- package/lib/module/Wallet/index.js +15 -17
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/module/constants/styles.js +1 -1
- package/lib/module/constants/styles.js.map +1 -1
- package/lib/module/constants/useColors.js +1 -1
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Pagination.d.ts +11 -0
- package/lib/typescript/lib/commonjs/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts +1 -2
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/constants/styles.d.ts +1 -1
- package/lib/typescript/lib/module/Components/Pagination.d.ts +11 -0
- package/lib/typescript/lib/module/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts +3 -1
- package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts +2 -2
- package/lib/typescript/lib/module/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts +2 -4
- package/lib/typescript/lib/module/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +2 -2
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts +2 -2
- package/lib/typescript/lib/module/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/index.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Pagination.d.ts +12 -0
- package/lib/typescript/src/Components/Pagination.d.ts.map +1 -0
- package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountLimitManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AccountSnoozeManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/DepositCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ItemOrderCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ItemOrderDetailCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManageAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/OrderManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/RemoveAccount.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletActionSelector.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts +1 -1
- package/lib/typescript/src/Wallet/components/WalletSettings.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WithdrawCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/index.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/Components/Pagination.tsx +33 -0
- package/src/ProfileManager/Components/VouchCard.tsx +3 -27
- package/src/Wallet/components/AccountCard.tsx +22 -21
- package/src/Wallet/components/AccountLimitManager.tsx +36 -54
- package/src/Wallet/components/AccountManager.tsx +95 -61
- package/src/Wallet/components/AccountSnoozeManager.tsx +39 -37
- package/src/Wallet/components/DepositCard.tsx +55 -53
- package/src/Wallet/components/ItemOrderCard.tsx +13 -12
- package/src/Wallet/components/ItemOrderDetailCard.tsx +23 -22
- package/src/Wallet/components/ManageAccountCard.tsx +78 -47
- package/src/Wallet/components/OrderManager.tsx +47 -37
- package/src/Wallet/components/RemoveAccount.tsx +12 -15
- package/src/Wallet/components/WalletActionSelector.tsx +70 -69
- package/src/Wallet/components/WalletSettings.tsx +137 -139
- package/src/Wallet/components/WalletSetup.tsx +41 -51
- package/src/Wallet/components/WithdrawCard.tsx +56 -56
- package/src/Wallet/index.tsx +16 -15
- package/src/constants/styles.ts +1 -1
- package/src/constants/useColors.tsx +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { FlatList
|
|
2
|
+
import { FlatList } from 'react-native';
|
|
3
3
|
import type { AccountProps, AccountSnoozeProps } from '../../types';
|
|
4
4
|
import { WalletApi } from '../api';
|
|
5
|
-
import {
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
5
|
+
import { Icons } from '../../Components';
|
|
7
6
|
import moment from 'moment-mini';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
8
9
|
|
|
9
10
|
const duration_options = [1,7,14,30]
|
|
10
11
|
|
|
@@ -15,6 +16,7 @@ type AccountSnoozeManagerProps = {
|
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeManagerProps) => {
|
|
19
|
+
const Colors = useColors();
|
|
18
20
|
const [ loading, setLoading ] = useState(false);
|
|
19
21
|
const [ dropdown_visible, setDropdownVisible ] = useState(false);
|
|
20
22
|
const [ disclaimer, setDisclaimer ] = useState(false);
|
|
@@ -66,58 +68,56 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
|
|
|
66
68
|
|
|
67
69
|
const renderOptions = (data: { item:number, index:number }) => {
|
|
68
70
|
return (
|
|
69
|
-
<
|
|
71
|
+
<Button style={{ padding:10, borderBottomWidth:1, borderColor:Colors.borders.light }} onPress={() => {
|
|
70
72
|
setActiveDuration(data.item);
|
|
71
73
|
setDropdownVisible(false);
|
|
72
74
|
}}>
|
|
73
|
-
<Text
|
|
74
|
-
</
|
|
75
|
+
<Text theme='h2' size={14}>{data.item} days</Text>
|
|
76
|
+
</Button>
|
|
75
77
|
)
|
|
76
78
|
}
|
|
77
79
|
const valid = active_duration ? true : false;
|
|
78
80
|
return (
|
|
79
81
|
<View style={{ flex:1 }}>
|
|
80
82
|
<View style={{ padding:20 }}>
|
|
81
|
-
<Text size={30}
|
|
82
|
-
<Text style={{ marginTop:15 }} size={16}
|
|
83
|
+
<Text size={30} theme='h2'>Snooze Account</Text>
|
|
84
|
+
<Text style={{ marginTop:15 }} size={16} theme='description'>Take a break from the real money features of BettorEdge using this account.</Text>
|
|
83
85
|
</View>
|
|
84
|
-
<
|
|
85
|
-
<Text size={16}
|
|
86
|
-
<
|
|
86
|
+
<View style={{ flex:1, padding:16}}>
|
|
87
|
+
<Text size={16} theme='h2'>Amount</Text>
|
|
88
|
+
<Button
|
|
89
|
+
float
|
|
87
90
|
onPress={() => setDropdownVisible(!dropdown_visible)}
|
|
88
|
-
style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15
|
|
89
|
-
<Text
|
|
90
|
-
<Icons.ChevronIcon direction='down' color={Colors.
|
|
91
|
-
</
|
|
91
|
+
style={{marginTop:8, flexDirection:'row', alignItems:'center', justifyContent:'space-between', padding:15 }}>
|
|
92
|
+
<Text theme='h2'>{active_duration?`${active_duration} Days`:'Select Duration'}</Text>
|
|
93
|
+
<Icons.ChevronIcon direction='down' color={Colors.text.h1} size={8} />
|
|
94
|
+
</Button>
|
|
92
95
|
{dropdown_visible ?
|
|
93
|
-
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.
|
|
96
|
+
<View style={{ borderBottomRightRadius:8, borderBottomLeftRadius:8, padding:10, borderWidth:1, borderTopWidth:1, borderColor:Colors.borders.light }}>
|
|
94
97
|
<FlatList
|
|
95
98
|
data={duration_options}
|
|
96
99
|
renderItem={renderOptions}
|
|
97
100
|
/>
|
|
98
101
|
</View>
|
|
99
102
|
:<></>}
|
|
100
|
-
</
|
|
103
|
+
</View>
|
|
101
104
|
{ valid ?
|
|
102
105
|
<View nativeID='snooze_disclaimer' style={{ margin:10 }}>
|
|
103
|
-
<
|
|
104
|
-
<View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.
|
|
106
|
+
<Button style={{ flexDirection:'row', padding:5 }} onPress={() => setDisclaimer(!disclaimer)}>
|
|
107
|
+
<View style={{ justifyContent:'center', marginRight:10, alignItems:'center', height:25, width:25, borderRadius:4, backgroundColor: disclaimer ? Colors.text.h1 : 'transparent', borderWidth:1, borderColor:Colors.text.h1 }}>
|
|
105
108
|
{disclaimer ?
|
|
106
|
-
<Icons.CheckIcon color={Colors.
|
|
109
|
+
<Icons.CheckIcon color={Colors.text.h1} size={14} />
|
|
107
110
|
:<></>}
|
|
108
111
|
</View>
|
|
109
|
-
<Text size={14}
|
|
110
|
-
</
|
|
112
|
+
<Text size={14} theme='description'>I confirm I wwould like to snooze my account for {active_duration} days. This cannot be undone!</Text>
|
|
113
|
+
</Button>
|
|
111
114
|
</View>
|
|
112
115
|
:<></>}
|
|
113
116
|
<View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
|
|
114
117
|
<Button
|
|
115
118
|
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
116
119
|
title={'CLOSE'}
|
|
117
|
-
|
|
118
|
-
borderColor={Colors.brand.electric}
|
|
119
|
-
borderWidth={1}
|
|
120
|
-
padding={15}
|
|
120
|
+
type='close'
|
|
121
121
|
onPress={() => onCancel()}
|
|
122
122
|
/>
|
|
123
123
|
<Button
|
|
@@ -125,24 +125,26 @@ const AccountSnoozeManager = ({ account, onCancel, onSnooze } : AccountSnoozeMan
|
|
|
125
125
|
title={'SAVE SNOOZE'}
|
|
126
126
|
disabled={!valid||!disclaimer}
|
|
127
127
|
loading={loading}
|
|
128
|
-
|
|
129
|
-
backgroundColor={Colors.brand.electric}
|
|
130
|
-
padding={15}
|
|
128
|
+
type='success'
|
|
131
129
|
onPress={() => handleSetSnooze()}
|
|
132
130
|
/>
|
|
133
131
|
</View>
|
|
134
132
|
|
|
135
133
|
{account_snooze ?
|
|
136
|
-
<View style={{ position:'absolute', top:0, right:0, left:0, bottom:0,
|
|
137
|
-
<View style={{
|
|
138
|
-
<View style={{ padding:10,
|
|
139
|
-
<Icons.SnoozeIcon size={24} color={Colors.
|
|
134
|
+
<View type='blur' style={{ position:'absolute', top:0, right:0, left:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
|
|
135
|
+
<View style={{ borderRadius:8, padding:20}}>
|
|
136
|
+
<View float style={{ padding:10, borderRadius:8, alignSelf:'center' }}>
|
|
137
|
+
<Icons.SnoozeIcon size={24} color={Colors.text.h1} />
|
|
140
138
|
</View>
|
|
141
139
|
<Text style={{ padding:10 }} size={18} weight='bold' textAlign='center'>Account is Snoozing</Text>
|
|
142
|
-
<Text size={14}
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
140
|
+
<Text size={14} theme='h1' textAlign='center'>Snooze ends {moment(account_snooze.end_datetime).fromNow()}</Text>
|
|
141
|
+
<Button
|
|
142
|
+
type='close'
|
|
143
|
+
style={{ marginTop:10 }}
|
|
144
|
+
onPress={() => onCancel()}
|
|
145
|
+
>
|
|
146
|
+
<Text size={14} theme='action' textAlign='center'>Go Back</Text>
|
|
147
|
+
</Button>
|
|
146
148
|
</View>
|
|
147
149
|
</View>
|
|
148
150
|
:<></>}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ActivityIndicator, Image, Keyboard, KeyboardAvoidingView, Platform, TouchableWithoutFeedback } from "react-native";
|
|
3
3
|
import type { AccountProps, AccountSnoozeProps, CodeRequestProps, ItemOrderProps, MyPlayerProps, PlayerDepositLimitProps, PlayerReferralProps, PromoProps, PublicPlayerProps, RewardOptionProps, WalletSettingsProps } from '../../types';
|
|
4
4
|
import { ItemOrderApi, ItemOrderHelpers, WalletApi } from '../api';
|
|
5
|
-
import
|
|
6
|
-
import { Button,
|
|
7
|
-
import {
|
|
5
|
+
import { Icons } from '../../Components';
|
|
6
|
+
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
8
|
|
|
9
9
|
type DepositCardProps = {
|
|
10
10
|
player:MyPlayerProps,
|
|
@@ -23,6 +23,7 @@ type DepositCardProps = {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, onTransact, onCancel }:DepositCardProps) => {
|
|
26
|
+
const Colors = useColors();
|
|
26
27
|
const [ draft_order, setDraftOrder ] = useState<ItemOrderProps>();
|
|
27
28
|
const [ account_snooze, setAccountSnooze ] = useState<AccountSnoozeProps>();
|
|
28
29
|
|
|
@@ -48,7 +49,7 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
|
|
|
48
49
|
if(!draft_order){
|
|
49
50
|
return (
|
|
50
51
|
<View style={{ padding:20 }}>
|
|
51
|
-
<ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.
|
|
52
|
+
<ActivityIndicator style={{ alignSelf:'center' }} size='large' color={Colors.text.h1} />
|
|
52
53
|
</View>
|
|
53
54
|
)
|
|
54
55
|
}
|
|
@@ -56,62 +57,65 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
|
|
|
56
57
|
let order_amount = parseFloat(draft_order.amount as string);
|
|
57
58
|
|
|
58
59
|
return (
|
|
60
|
+
<TouchableWithoutFeedback style={{ flex:1 }} onPress={() => Keyboard.dismiss()}>
|
|
59
61
|
<View style={{ flex:1 }}>
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
62
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:15 }}>
|
|
63
|
+
<View transparent style={{flex:1}}>
|
|
64
|
+
<Text size={20} theme='h1'>MAKE A DEPOSIT</Text>
|
|
65
|
+
<Text style={{ marginTop:5}} theme='description'>In order to participate in real-money activities, you will need to fund your BettorEdge Wallet. Please enter the amount you wish to deposit below</Text>
|
|
66
|
+
</View>
|
|
63
67
|
</View>
|
|
64
|
-
<
|
|
68
|
+
<View style={{ flex:1 }}>
|
|
65
69
|
<View nativeID='deposit_amount' style={{ justifyContent:'center', alignItems:'center', padding:20 }}>
|
|
66
|
-
<Text style={{ marginBottom:
|
|
70
|
+
<Text style={{ marginBottom:15 }} size={14} theme='description'>Minumum $25 / Maximum ${ItemOrderHelpers.getDepositAvailable(deposit_limit, account).toFixed(2)}</Text>
|
|
67
71
|
<TextInput
|
|
68
|
-
style={{
|
|
72
|
+
style={{ flexGrow:1, width:200, textAlign:'center', color:Colors.text.success, fontSize:28 }}
|
|
69
73
|
placeholder='25'
|
|
70
|
-
|
|
74
|
+
keyboardType='decimal-pad'
|
|
71
75
|
value={draft_order.amount as string}
|
|
72
76
|
onChangeText={(text) => setDraftOrder({ ...draft_order, amount:text })}
|
|
73
77
|
/>
|
|
74
|
-
<Text style={{ marginTop:
|
|
78
|
+
<Text style={{ marginTop:15 }} size={14} theme='warning' textAlign='center'>*All deposits are held for {deposit_limit.hold_days} days before they are eligible for withdraw</Text>
|
|
75
79
|
|
|
76
80
|
</View>
|
|
77
81
|
{errors.length == 0 && order_amount > deposit_limit.instant_available ?
|
|
78
|
-
<View nativeID='instant_available' style={{
|
|
79
|
-
<View style={{ padding:10, borderBottomWidth:1
|
|
82
|
+
<View nativeID='instant_available' style={{ padding:5, borderRadius:8, margin:10 }}>
|
|
83
|
+
<View style={{ padding:10, borderBottomWidth:1 }}>
|
|
80
84
|
<View style={{flexDirection:'row', marginBottom:5 }}>
|
|
81
|
-
<Icons.AlertIcon color={Colors.
|
|
82
|
-
<Text style={{ marginLeft:10 }} size={14} color={Colors.
|
|
85
|
+
<Icons.AlertIcon color={Colors.text.warning} size={16}/>
|
|
86
|
+
<Text style={{ marginLeft:10 }} size={14} color={Colors.text.warning} weight='bold'>INSTANT DEPOSIT NOTICE</Text>
|
|
83
87
|
</View>
|
|
84
|
-
<Text size={14}
|
|
88
|
+
<Text size={14} theme='description'>Transactions take time to leave your account and settle in ours. In order to get you started before they arrive, we allow for some to be instantly available. The remainder is available after settlement.</Text>
|
|
85
89
|
</View>
|
|
86
90
|
<View style={{ padding:5 }}>
|
|
87
91
|
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
88
|
-
<Text style={{ flex:1 }} size={14}
|
|
89
|
-
<Text size={14}
|
|
92
|
+
<Text style={{ flex:1 }} size={14} theme='h2'>Available Instantly</Text>
|
|
93
|
+
<Text size={14} theme='h1'>${deposit_limit.instant_available.toFixed(2)}</Text>
|
|
90
94
|
</View>
|
|
91
95
|
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
92
|
-
<Text style={{ flex:1 }}
|
|
93
|
-
<Text size={14}
|
|
96
|
+
<Text style={{ flex:1 }} theme='h2'>Available after settlement ({deposit_limit.hold_days} days)</Text>
|
|
97
|
+
<Text size={14} theme='h1'>${(order_amount - deposit_limit.instant_available).toFixed(2)}</Text>
|
|
94
98
|
</View>
|
|
95
99
|
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
96
|
-
<Text style={{ flex:1 }}
|
|
97
|
-
<Text size={14}
|
|
100
|
+
<Text style={{ flex:1 }} theme='h2'>Total Deposit</Text>
|
|
101
|
+
<Text size={14} theme='h1'>${order_amount.toFixed(2)}</Text>
|
|
98
102
|
</View>
|
|
99
103
|
</View>
|
|
100
104
|
</View>
|
|
101
105
|
:<></>}
|
|
102
106
|
{errors.length > 0 ?
|
|
103
|
-
<View style={{ margin:20, borderRadius:8, padding:20
|
|
104
|
-
<Text style={{ marginBottom:10 }}
|
|
107
|
+
<View float style={{ margin:20, borderRadius:8, padding:20 }}>
|
|
108
|
+
<Text style={{ marginBottom:10 }} theme='h2'>Please fix the following before continuing</Text>
|
|
105
109
|
{errors.map(e => {
|
|
106
110
|
return (
|
|
107
|
-
<Text size={14} color={Colors.
|
|
111
|
+
<Text size={14} color={Colors.text.warning}>{e}</Text>
|
|
108
112
|
)
|
|
109
113
|
})}
|
|
110
114
|
</View>
|
|
111
115
|
:<></>}
|
|
112
|
-
</
|
|
116
|
+
</View>
|
|
113
117
|
{code_details && code_details.code_request?.pending_deposit && code_details.promo && code_details.referrer && ['referral_code','referral_sweepstakes'].includes(code_details.promo.type) ?
|
|
114
|
-
<View style={{ margin:15, flexDirection:'row'
|
|
118
|
+
<View style={{ margin:15, flexDirection:'row' }}>
|
|
115
119
|
<View style={{ justifyContent:'center' }}>
|
|
116
120
|
{code_details.referrer?.profile_pic?
|
|
117
121
|
<Image
|
|
@@ -120,36 +124,34 @@ const DepositCard = ({ wallet_settings, code_details, account, deposit_limit, on
|
|
|
120
124
|
resizeMode='cover'
|
|
121
125
|
/>
|
|
122
126
|
:
|
|
123
|
-
<Icons.GiftIcon size={40} color={Colors.
|
|
127
|
+
<Icons.GiftIcon size={40} color={Colors.text.gold} />
|
|
124
128
|
}
|
|
125
129
|
</View>
|
|
126
|
-
<View style={{flex:1, backgroundColor:Colors.incentive.gold_faded, padding:10 }}>
|
|
127
|
-
<Text style={{ paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.
|
|
128
|
-
<Text style={{ paddingTop:5 }} size={12}
|
|
130
|
+
<View style={{flex:1, backgroundColor:Colors.absolutes.incentive.gold_faded, padding:10 }}>
|
|
131
|
+
<Text style={{ paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.borders.light }} theme='h1'>Give back to {code_details.referrer?.username}</Text>
|
|
132
|
+
<Text style={{ paddingTop:5 }} size={12} theme='h2'>Make a qualifying deposit and {code_details.referrer.username} will receive a reward!</Text>
|
|
129
133
|
</View>
|
|
130
134
|
</View>
|
|
131
135
|
:<></>}
|
|
132
|
-
<
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
onPress={() => handleTransact()}
|
|
150
|
-
/>
|
|
151
|
-
</View>
|
|
136
|
+
<KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding':'height'}>
|
|
137
|
+
<View nativeID='action_row' style={{ flexDirection:'row', padding:20 }}>
|
|
138
|
+
<Button
|
|
139
|
+
style={{ flex:1, marginRight:5, opacity: 1 }}
|
|
140
|
+
title={'CANCEL'}
|
|
141
|
+
type='close'
|
|
142
|
+
onPress={() => onCancel()}
|
|
143
|
+
/>
|
|
144
|
+
<Button
|
|
145
|
+
style={{ flex:3, opacity: errors.length > 0 ? 0.5: 1 }}
|
|
146
|
+
disabled={errors.length > 0 ? true : false}
|
|
147
|
+
title={'REVIEW DEPOSIT'}
|
|
148
|
+
type='success'
|
|
149
|
+
onPress={() => handleTransact()}
|
|
150
|
+
/>
|
|
151
|
+
</View>
|
|
152
|
+
</KeyboardAvoidingView>
|
|
152
153
|
</View>
|
|
154
|
+
</TouchableWithoutFeedback>
|
|
153
155
|
)
|
|
154
156
|
}
|
|
155
157
|
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { Icons, Text } from '../../Components';
|
|
4
|
-
import Colors from '../../constants/colors';
|
|
2
|
+
import { Icons } from '../../Components';
|
|
5
3
|
import moment from 'moment-mini';
|
|
6
4
|
import { ItemOrderHelpers } from '../api';
|
|
7
5
|
import type { ItemOrderProps } from '../../types';
|
|
8
6
|
import ItemOrderDetails from './ItemOrderDetailCard';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import { Button, View, Text } from '../../Components/Themed';
|
|
9
9
|
|
|
10
10
|
type ItemOrderCardProps = {
|
|
11
11
|
item_order:ItemOrderProps
|
|
12
12
|
}
|
|
13
13
|
const ItemOrderCard = ({ item_order }:ItemOrderCardProps) => {
|
|
14
|
+
const Colors = useColors();
|
|
14
15
|
const [ expanded, setExpanded ] = useState(false);
|
|
15
16
|
|
|
16
17
|
const status_label = ItemOrderHelpers.getStatusLabel(item_order);
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
|
-
<View style={{
|
|
20
|
-
<
|
|
21
|
-
<View nativeID='item_order_info' style={{ flex:3, borderRightWidth:1, borderColor:Colors.
|
|
22
|
-
<Text
|
|
23
|
-
<Text style={{ marginTop:4 }}
|
|
20
|
+
<View float style={{ borderRadius:0 }}>
|
|
21
|
+
<Button style={{ flex:1, flexDirection:'row', alignItems:'center', padding:10, borderRadius:0, borderBottomWidth:1, borderBottomColor:Colors.borders.light }} onPress={() => setExpanded(!expanded)}>
|
|
22
|
+
<View nativeID='item_order_info' style={{ flex:3, borderRightWidth:1, borderColor:Colors.borders.light }}>
|
|
23
|
+
<Text theme='h2'>{item_order.description}</Text>
|
|
24
|
+
<Text style={{ marginTop:4 }} theme='light'>Created at {moment(item_order.create_datetime).format('YYYY-MM-DD hh:mm a')}</Text>
|
|
24
25
|
</View>
|
|
25
26
|
<View nativeID='item_order_amount' style={{ flex:1, padding:5 }}>
|
|
26
|
-
<Text size={14}
|
|
27
|
+
<Text size={14} theme='h1' textAlign='center'>${item_order.total_amount.toFixed(2)}</Text>
|
|
27
28
|
<View style={{ marginTop:3, padding:3, paddingRight:10, paddingLeft:10, backgroundColor:status_label.color, borderRadius:8}}>
|
|
28
|
-
<Text color={Colors.
|
|
29
|
+
<Text theme='description' color={Colors.text.white} textAlign='center'>{status_label.text}</Text>
|
|
29
30
|
</View>
|
|
30
31
|
</View>
|
|
31
32
|
<View style={{ padding:10 }}>
|
|
32
|
-
<Icons.ChevronIcon direction={expanded?'up':'down'} size={
|
|
33
|
+
<Icons.ChevronIcon direction={expanded?'up':'down'} size={8} color={Colors.text.h1}/>
|
|
33
34
|
</View>
|
|
34
|
-
</
|
|
35
|
+
</Button>
|
|
35
36
|
{expanded ?
|
|
36
37
|
<View style={{ padding:20 }}>
|
|
37
38
|
<ItemOrderDetails
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react"
|
|
2
|
-
import { FlatList,
|
|
3
|
-
import { Text } from '../../Components';
|
|
2
|
+
import { FlatList, ActivityIndicator} from "react-native"
|
|
4
3
|
import { ItemOrderApi, WalletApi } from '../api';
|
|
5
4
|
import type { AccountProps, ItemOrderProps, TransactionDetailProps, TransactionProps } from '../../types';
|
|
6
|
-
import Colors from '../../constants/colors';
|
|
7
5
|
import moment from 'moment-mini';
|
|
6
|
+
import { useColors } from "../../constants/useColors";
|
|
7
|
+
import { Text, View } from "../../Components/Themed";
|
|
8
8
|
|
|
9
9
|
type ItemOrderDetailsProps = {
|
|
10
10
|
item_order: ItemOrderProps,
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
|
|
14
|
+
const Colors = useColors();
|
|
14
15
|
const [ loading, setLoading ] = useState(false);
|
|
15
16
|
const [ data, setData ] = useState<{
|
|
16
17
|
account?:AccountProps,
|
|
@@ -43,8 +44,8 @@ const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
|
|
|
43
44
|
const renderTransactionDetails = (data : { item:TransactionDetailProps, index:number }) => {
|
|
44
45
|
return (
|
|
45
46
|
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
46
|
-
<Text style={{ flex:1 }}
|
|
47
|
-
<Text size={14}
|
|
47
|
+
<Text style={{ flex:1 }} theme="description">{data.item.description}</Text>
|
|
48
|
+
<Text size={14} theme="h1">${data.item.amount.toFixed(2)}</Text>
|
|
48
49
|
</View>
|
|
49
50
|
)
|
|
50
51
|
}
|
|
@@ -58,40 +59,40 @@ const ItemOrderDetails = ({ item_order }:ItemOrderDetailsProps) => {
|
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
return (
|
|
61
|
-
<View
|
|
62
|
+
<View float style={{ padding:5 }}>
|
|
62
63
|
{account ?
|
|
63
|
-
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
64
|
-
<Text style={{ flex:1 }}
|
|
65
|
-
<Text size={14}
|
|
64
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
65
|
+
<Text style={{ flex:1 }} theme="description">Account</Text>
|
|
66
|
+
<Text size={14} theme="h1">{account.account_label}</Text>
|
|
66
67
|
</View>
|
|
67
68
|
:<></>}
|
|
68
69
|
{loading ?
|
|
69
|
-
<ActivityIndicator size='small' color={Colors.
|
|
70
|
+
<ActivityIndicator size='small' color={Colors.text.h1} />
|
|
70
71
|
:<></>}
|
|
71
72
|
<FlatList
|
|
72
73
|
data={transaction_details}
|
|
73
74
|
renderItem={renderTransactionDetails}
|
|
74
75
|
/>
|
|
75
76
|
{transaction?.status == 'posted' && transaction?.estimated_settle_datetime && moment().isBefore(moment(transaction.estimated_settle_datetime)) ?
|
|
76
|
-
<View>
|
|
77
|
-
<View style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
78
|
-
<Text style={{ flex:1 }} size={14}
|
|
79
|
-
<Text size={14}
|
|
77
|
+
<View transparent>
|
|
78
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center', padding:5 }}>
|
|
79
|
+
<Text style={{ flex:1 }} size={14} theme="h2">Estimated Settle Time</Text>
|
|
80
|
+
<Text size={14} theme="h1">{moment(transaction.estimated_settle_datetime).format('MM/DD @ h a')}</Text>
|
|
80
81
|
</View>
|
|
81
82
|
{unsettled > 0 ?
|
|
82
|
-
<View style={{ padding:10,
|
|
83
|
-
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
84
|
-
<Text style={{ flex:1 }}
|
|
85
|
-
<Text size={14} color={Colors.
|
|
83
|
+
<View transparent style={{ padding:10, borderRadius:8, marginTop:10 }}>
|
|
84
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center' }}>
|
|
85
|
+
<Text style={{ flex:1 }} theme="h2">Awaiting Settlement</Text>
|
|
86
|
+
<Text size={14} color={Colors.text.warning} weight="bold">${unsettled.toFixed(2)}</Text>
|
|
86
87
|
</View>
|
|
87
|
-
<Text style={{ marginTop:10 }}
|
|
88
|
+
<Text style={{ marginTop:10 }} theme="description">This amount exceeded your <Text size={12} weight='bold'>Instant Deposit Limit</Text> and will be added to your wallet after the transaction settles based on the date noted above.</Text>
|
|
88
89
|
</View>
|
|
89
90
|
:<></>}
|
|
90
91
|
</View>
|
|
91
92
|
:<></>}
|
|
92
|
-
{
|
|
93
|
-
<View style={{ borderRadius:8, backgroundColor:Colors.
|
|
94
|
-
<Text size={14} color={Colors.
|
|
93
|
+
{item_order.type == 'wallet' && transaction?.status == 'posted' ?
|
|
94
|
+
<View style={{ borderRadius:8, backgroundColor:Colors.text.warning, padding:10, marginTop:10 }}>
|
|
95
|
+
<Text size={14} color={Colors.text.white} weight='semibold' textAlign="center">Deposits in posted status are not eligible for withdraw until they settle.</Text>
|
|
95
96
|
</View>
|
|
96
97
|
:<></>}
|
|
97
98
|
</View>
|