be-components 3.6.1 → 3.6.2
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/Checkout/components/AccountSummaryCard.js +52 -57
- package/lib/commonjs/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js +8 -11
- package/lib/commonjs/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js +21 -25
- package/lib/commonjs/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/components/PayPalHtml.js +32 -0
- package/lib/commonjs/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js +125 -0
- package/lib/commonjs/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js +11 -15
- package/lib/commonjs/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/commonjs/Checkout/index.js +92 -146
- package/lib/commonjs/Checkout/index.js.map +1 -1
- package/lib/commonjs/Components/Checkbox.js +7 -5
- package/lib/commonjs/Components/Checkbox.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +9 -9
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Wallet/components/ACHAddCard.js +233 -194
- package/lib/commonjs/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressCard.js +19 -17
- package/lib/commonjs/Wallet/components/AddressCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/AddressManager.js +64 -92
- package/lib/commonjs/Wallet/components/AddressManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/FundAccountCard.js +106 -95
- package/lib/commonjs/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/commonjs/Wallet/components/LinkAccountManager.js +80 -106
- package/lib/commonjs/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualACHAdd.js +155 -151
- package/lib/commonjs/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/ManualCardAdd.js +207 -204
- package/lib/commonjs/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/commonjs/Wallet/components/MyBalance.js +73 -66
- package/lib/commonjs/Wallet/components/MyBalance.js.map +1 -1
- package/lib/commonjs/Wallet/components/WalletSetup.js +286 -246
- package/lib/commonjs/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/commonjs/Wallet/index.js +1 -0
- package/lib/commonjs/Wallet/index.js.map +1 -1
- package/lib/module/Checkout/components/AccountSummaryCard.js +25 -30
- package/lib/module/Checkout/components/AccountSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/ItemSummaryCard.js +4 -7
- package/lib/module/Checkout/components/ItemSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/OrderSummaryCard.js +9 -13
- package/lib/module/Checkout/components/OrderSummaryCard.js.map +1 -1
- package/lib/module/Checkout/components/PayPalHtml.js +25 -0
- package/lib/module/Checkout/components/PayPalHtml.js.map +1 -0
- package/lib/module/Checkout/components/PayPalWebview.js +118 -0
- package/lib/module/Checkout/components/PayPalWebview.js.map +1 -0
- package/lib/module/Checkout/components/ShippingSummaryCard.js +5 -9
- package/lib/module/Checkout/components/ShippingSummaryCard.js.map +1 -1
- package/lib/module/Checkout/index.js +58 -112
- package/lib/module/Checkout/index.js.map +1 -1
- package/lib/module/Components/Checkbox.js +6 -4
- package/lib/module/Components/Checkbox.js.map +1 -1
- package/lib/module/Components/Icons.js +10 -10
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Wallet/components/ACHAddCard.js +233 -194
- package/lib/module/Wallet/components/ACHAddCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressCard.js +14 -12
- package/lib/module/Wallet/components/AddressCard.js.map +1 -1
- package/lib/module/Wallet/components/AddressManager.js +29 -57
- package/lib/module/Wallet/components/AddressManager.js.map +1 -1
- package/lib/module/Wallet/components/FundAccountCard.js +71 -60
- package/lib/module/Wallet/components/FundAccountCard.js.map +1 -1
- package/lib/module/Wallet/components/LinkAccountManager.js +55 -81
- package/lib/module/Wallet/components/LinkAccountManager.js.map +1 -1
- package/lib/module/Wallet/components/ManualACHAdd.js +146 -141
- package/lib/module/Wallet/components/ManualACHAdd.js.map +1 -1
- package/lib/module/Wallet/components/ManualCardAdd.js +204 -201
- package/lib/module/Wallet/components/ManualCardAdd.js.map +1 -1
- package/lib/module/Wallet/components/MyBalance.js +45 -38
- package/lib/module/Wallet/components/MyBalance.js.map +1 -1
- package/lib/module/Wallet/components/WalletSetup.js +287 -247
- package/lib/module/Wallet/components/WalletSetup.js.map +1 -1
- package/lib/module/Wallet/index.js +1 -0
- package/lib/module/Wallet/index.js.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts +3 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/lib/commonjs/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts +5 -0
- package/lib/typescript/lib/module/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Checkout/index.d.ts +1 -2
- package/lib/typescript/lib/module/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Checkbox.d.ts +1 -2
- package/lib/typescript/lib/module/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts +1 -2
- package/lib/typescript/lib/module/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/lib/typescript/lib/module/Wallet/index.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/AccountSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/ItemSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/OrderSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts +2 -0
- package/lib/typescript/src/Checkout/components/PayPalHtml.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts +4 -0
- package/lib/typescript/src/Checkout/components/PayPalWebview.d.ts.map +1 -0
- package/lib/typescript/src/Checkout/components/ShippingSummaryCard.d.ts.map +1 -1
- package/lib/typescript/src/Checkout/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ACHAddCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/AddressManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/FundAccountCard.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/LinkAccountManager.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualACHAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/ManualCardAdd.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/MyBalance.d.ts.map +1 -1
- package/lib/typescript/src/Wallet/components/WalletSetup.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/Checkout/components/AccountSummaryCard.tsx +25 -27
- package/src/Checkout/components/ItemSummaryCard.tsx +4 -6
- package/src/Checkout/components/OrderSummaryCard.tsx +9 -11
- package/src/Checkout/components/PayPalHtml.ts +26 -0
- package/src/Checkout/components/PayPalOrderCapture.tsx +1 -1
- package/src/Checkout/components/PayPalWebview.tsx +118 -0
- package/src/Checkout/components/ShippingSummaryCard.tsx +5 -8
- package/src/Checkout/index.tsx +68 -96
- package/src/Components/Checkbox.tsx +7 -6
- package/src/Components/Icons.tsx +10 -10
- package/src/Wallet/components/ACHAddCard.tsx +90 -60
- package/src/Wallet/components/AddressCard.tsx +11 -11
- package/src/Wallet/components/AddressManager.tsx +33 -44
- package/src/Wallet/components/FundAccountCard.tsx +52 -51
- package/src/Wallet/components/LinkAccountManager.tsx +49 -59
- package/src/Wallet/components/ManualACHAdd.tsx +99 -79
- package/src/Wallet/components/ManualCardAdd.tsx +119 -95
- package/src/Wallet/components/MyBalance.tsx +38 -40
- package/src/Wallet/components/WalletSetup.tsx +138 -113
- package/src/Wallet/index.tsx +7 -7
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { View, StyleSheet, ScrollView } from "react-native";
|
|
3
2
|
import { WalletApi, WalletHelpers } from '../api';
|
|
4
|
-
import {
|
|
5
|
-
import Colors from '../../constants/colors';
|
|
3
|
+
import { Icons } from '../../Components';
|
|
6
4
|
import type { AccountProps, MyPlayerProps } from '../../types';
|
|
7
5
|
import moment from 'moment-mini';
|
|
6
|
+
import { Button, Text, TextInput, View } from '../../Components/Themed';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import { FlatList } from 'react-native';
|
|
8
9
|
|
|
9
10
|
type ManualCardAddProps = {
|
|
10
11
|
player:MyPlayerProps,
|
|
11
12
|
onAddAccount:(acct:AccountProps) => void,
|
|
12
13
|
onCancel:() => void
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
const card_sections = ['header','card_number','first_name','last_name','expire_date']
|
|
15
16
|
const ManualCardAdd = ({ player, onAddAccount, onCancel }:ManualCardAddProps) => {
|
|
17
|
+
const Colors = useColors();
|
|
16
18
|
const [ loading, setLoading ] = useState(false);
|
|
17
19
|
const [ error, setError ] = useState<string>();
|
|
18
20
|
const [ card_account, setCardAccount ] = useState({
|
|
@@ -20,7 +22,6 @@ const ManualCardAdd = ({ player, onAddAccount, onCancel }:ManualCardAddProps) =>
|
|
|
20
22
|
card_detail: { ...WalletHelpers.getEmptyCardDetails(), first_name: player.first_name, last_name: player.last_name }
|
|
21
23
|
})
|
|
22
24
|
|
|
23
|
-
|
|
24
25
|
const { account, card_detail } = card_account;
|
|
25
26
|
const { valid, card_number, first_name, last_name, expiration_date } = WalletHelpers.isCardValid(card_detail);
|
|
26
27
|
|
|
@@ -58,107 +59,135 @@ const ManualCardAdd = ({ player, onAddAccount, onCancel }:ManualCardAddProps) =>
|
|
|
58
59
|
case 'DISCOVER':
|
|
59
60
|
return <Icons.DiscoverCardIcon size={30} />
|
|
60
61
|
default:
|
|
61
|
-
return <Icons.CreditCardIcon size={22} color={Colors.
|
|
62
|
+
return <Icons.CreditCardIcon size={22} color={Colors.text.h1}/>
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</
|
|
80
|
-
<View style={
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
66
|
+
const renderSections = (data:{item:string, index:number}) => {
|
|
67
|
+
switch(data.item){
|
|
68
|
+
case 'header':
|
|
69
|
+
return (
|
|
70
|
+
<View type='header' style={{ padding:20 }}>
|
|
71
|
+
<Text theme='h1'>NEW CARD ACCOUNT</Text>
|
|
72
|
+
<Text style={{ marginTop:5 }} theme='description'>Complete the form below to add a new card account. Once successfully added, you can transact immediately.</Text>
|
|
73
|
+
</View>
|
|
74
|
+
)
|
|
75
|
+
case 'card_number':
|
|
76
|
+
return (
|
|
77
|
+
<View style={{padding:10}}>
|
|
78
|
+
<View nativeID='card_number' style={{ padding:5 }}>
|
|
79
|
+
<View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
80
|
+
<Text style={{flex:1}} size={14} theme='h2'>Card Number</Text>
|
|
81
|
+
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
82
|
+
<View>
|
|
83
|
+
<Icons.CreditCardIcon size={24} color={Colors.text.h1}/>
|
|
84
|
+
</View>
|
|
85
|
+
<View style={card_detail.card_brand == 'VISA' ? {} : {}}>
|
|
86
|
+
<Icons.VisaCardIcon size={30} />
|
|
87
|
+
</View>
|
|
88
|
+
<View style={card_detail.card_brand == 'MASTERCARD' ? {} : {}}>
|
|
89
|
+
<Icons.MasterCardIcon size={30} />
|
|
90
|
+
</View>
|
|
91
|
+
<View style={card_detail.card_brand == 'AMEX' ? {} : {}}>
|
|
92
|
+
<Icons.AmexCardIcon size={30} />
|
|
93
|
+
</View>
|
|
94
|
+
<View style={card_detail.card_brand == 'DISCOVER' ? {} : {}}>
|
|
95
|
+
<Icons.DiscoverCardIcon size={30} />
|
|
96
|
+
</View>
|
|
97
|
+
|
|
85
98
|
</View>
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
</View>
|
|
100
|
+
<View type='input' style={{ flexDirection:'row' }}>
|
|
101
|
+
<View style={{ justifyContent:'center', alignItems:'center', paddingLeft:10, paddingRight:10 }}>
|
|
102
|
+
{renderCardIcon(card_detail.card_brand)}
|
|
88
103
|
</View>
|
|
89
|
-
<
|
|
90
|
-
|
|
104
|
+
<TextInput
|
|
105
|
+
style={{ borderWidth:0, padding:15, flex:1 }}
|
|
106
|
+
placeholder='1234 5678 9876 5432'
|
|
107
|
+
keyboardType='decimal-pad'
|
|
108
|
+
value={WalletHelpers.formatCardNumber(card_detail.card_number)}
|
|
109
|
+
onChangeText={(e) => handleCardNumber(e)}
|
|
110
|
+
/>
|
|
91
111
|
</View>
|
|
92
|
-
|
|
93
|
-
</View>
|
|
94
|
-
</View>
|
|
95
|
-
<View style={{ flexDirection:'row', borderRadius:22, backgroundColor:Colors.shades.white }}>
|
|
96
|
-
<View style={{ justifyContent:'center', alignItems:'center', paddingLeft:10, paddingRight:10 }}>
|
|
97
|
-
{renderCardIcon(card_detail.card_brand)}
|
|
98
112
|
</View>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
113
|
+
{card_detail.card_number && !card_number ?
|
|
114
|
+
<Text size={14} color={Colors.text.warning} weight='semibold'>Card number is not valid</Text>
|
|
115
|
+
:<></>}
|
|
116
|
+
</View>
|
|
117
|
+
|
|
118
|
+
)
|
|
119
|
+
case 'first_name':
|
|
120
|
+
return (
|
|
121
|
+
<View style={{padding:10}}>
|
|
122
|
+
<View nativeID='first_name' style={{ padding:5 }}>
|
|
123
|
+
<Text style={{ padding:10 }} size={14} theme='h2'>First Name</Text>
|
|
124
|
+
<TextInput
|
|
125
|
+
placeholder='Jonathan'
|
|
126
|
+
value={card_detail.first_name}
|
|
127
|
+
onChangeText={(e) => setCardAccount({ ...card_account, card_detail: { ...card_detail, first_name: e } })}
|
|
128
|
+
/>
|
|
106
129
|
</View>
|
|
130
|
+
{!first_name ?
|
|
131
|
+
<Text size={14} color={Colors.text.warning} weight='semibold'>First name is not valid</Text>
|
|
132
|
+
:<></>}
|
|
107
133
|
</View>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<View
|
|
112
|
-
<
|
|
134
|
+
)
|
|
135
|
+
case 'last_name':
|
|
136
|
+
return (
|
|
137
|
+
<View style={{padding:10}}>
|
|
138
|
+
<View nativeID='last_name' style={{ padding:5 }}>
|
|
139
|
+
<Text size={14} theme='h2' style={{ padding:10 }}>Last Name</Text>
|
|
113
140
|
<TextInput
|
|
114
|
-
placeholder='
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
onChangeText={(e) => setCardAccount({ ...card_account, card_detail: { ...card_detail, first_name: e } })}
|
|
141
|
+
placeholder='Smith'
|
|
142
|
+
value={card_detail.last_name}
|
|
143
|
+
onChangeText={(e) => setCardAccount({ ...card_account, card_detail: { ...card_detail, last_name: e } })}
|
|
118
144
|
/>
|
|
145
|
+
</View>
|
|
146
|
+
{!last_name ?
|
|
147
|
+
<Text size={14} color={Colors.text.warning} weight='semibold'>Last name is not valid</Text>
|
|
148
|
+
:<></>}
|
|
119
149
|
</View>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<View
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
placeholderTextColor={Colors.shades.shade600}
|
|
141
|
-
onChangeText={(e) => handleExpiry(e)}
|
|
142
|
-
/>
|
|
150
|
+
)
|
|
151
|
+
case 'expire_date':
|
|
152
|
+
return (
|
|
153
|
+
<View style={{padding:10, paddingBottom:300}}>
|
|
154
|
+
<View nativeID='expiration_date' style={{ padding:5 }}>
|
|
155
|
+
<Text size={14} theme='h2' style={{ padding:10 }}>Expiration Date (MM/YYYY)</Text>
|
|
156
|
+
<TextInput
|
|
157
|
+
value={card_detail.expiration_date}
|
|
158
|
+
placeholder={'MM/YYYY'}
|
|
159
|
+
onChangeText={(e) => handleExpiry(e)}
|
|
160
|
+
/>
|
|
161
|
+
</View>
|
|
162
|
+
{card_detail.expiration_date && !expiration_date ?
|
|
163
|
+
<Text size={14} color={Colors.text.warning} weight='semibold'>Expiration date is not valid</Text>
|
|
164
|
+
:<></>}
|
|
165
|
+
{error ?
|
|
166
|
+
<View style={{ padding:10 }}>
|
|
167
|
+
<Text size={16} color={Colors.text.warning} weight='bold' textAlign='center'>{error}</Text>
|
|
168
|
+
</View>
|
|
169
|
+
:<></>}
|
|
143
170
|
</View>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
171
|
+
)
|
|
172
|
+
default: return <></>
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return (
|
|
177
|
+
<View style={{ flex:1 }}>
|
|
178
|
+
<View style={{ flex:1 }}>
|
|
179
|
+
<FlatList
|
|
180
|
+
data={card_sections}
|
|
181
|
+
key={'card_sections'}
|
|
182
|
+
keyExtractor={(item) => item}
|
|
183
|
+
renderItem={renderSections}
|
|
184
|
+
/>
|
|
152
185
|
</View>
|
|
153
|
-
:<></>}
|
|
154
186
|
<View style={{ flexDirection:'row', padding:20 }}>
|
|
155
187
|
<Button
|
|
156
188
|
title='CANCEL'
|
|
157
189
|
style={{ flex:1, marginRight:5 }}
|
|
158
|
-
|
|
159
|
-
padding={15}
|
|
160
|
-
borderWidth={1}
|
|
161
|
-
borderColor={Colors.brand.electric}
|
|
190
|
+
type='error'
|
|
162
191
|
onPress={() => onCancel()}
|
|
163
192
|
/>
|
|
164
193
|
<Button
|
|
@@ -166,9 +195,7 @@ const ManualCardAdd = ({ player, onAddAccount, onCancel }:ManualCardAddProps) =>
|
|
|
166
195
|
style={{ flex:3, opacity:valid&&!loading?1:0.5 }}
|
|
167
196
|
disabled={!valid||loading}
|
|
168
197
|
loading={loading}
|
|
169
|
-
|
|
170
|
-
padding={15}
|
|
171
|
-
backgroundColor={Colors.utility.success}
|
|
198
|
+
type='success'
|
|
172
199
|
onPress={() => handleSaveCard()}
|
|
173
200
|
/>
|
|
174
201
|
</View>
|
|
@@ -176,9 +203,6 @@ const ManualCardAdd = ({ player, onAddAccount, onCancel }:ManualCardAddProps) =>
|
|
|
176
203
|
)
|
|
177
204
|
}
|
|
178
205
|
|
|
179
|
-
|
|
180
|
-
active_brand: { borderRadius:4, padding:3, borderWidth:2, borderColor:Colors.brand.midnight },
|
|
181
|
-
inactive_brand: { padding:3, borderWidth:2, borderColor:'transparent' }
|
|
182
|
-
})
|
|
206
|
+
|
|
183
207
|
|
|
184
208
|
export default ManualCardAdd
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View, TouchableOpacity, ScrollView } from "react-native"
|
|
3
2
|
import type { AccountProps, MyPlayerProps, PlayerBalanceProps } from '../../types';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
3
|
+
import { Icons } from '../../Components';
|
|
4
|
+
import { useColors } from '../../constants/useColors';
|
|
5
|
+
import { Button, Text, View } from '../../Components/Themed';
|
|
7
6
|
|
|
8
7
|
type MyBalanceProps = {
|
|
9
8
|
player:MyPlayerProps,
|
|
@@ -15,67 +14,66 @@ type MyBalanceProps = {
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
const MyBalance = ({ player_balance, onClose, onNext }:MyBalanceProps) => {
|
|
18
|
-
|
|
17
|
+
const Colors = useColors();
|
|
19
18
|
|
|
20
19
|
return (
|
|
21
20
|
<View style={{ flex:1 }}>
|
|
22
21
|
<View style={{ padding:20 }}>
|
|
23
|
-
<Text size={26}
|
|
24
|
-
<Text style={{ marginTop:10 }} size={16}
|
|
22
|
+
<Text size={26} theme='h1'>BETTOREDGE BALANCES</Text>
|
|
23
|
+
<Text style={{ marginTop:10 }} size={16} theme='description'>All order and competition activity goes in and out of your BettorEdge balances. The specific balance depends on which app-mode you are in.</Text>
|
|
25
24
|
</View>
|
|
26
|
-
<
|
|
25
|
+
<View style={{ flex:1, padding:10 }}>
|
|
27
26
|
<View style={{ padding:10, paddingBottom:0 }}>
|
|
28
|
-
<Text size={18}
|
|
27
|
+
<Text size={18} theme='h1' textAlign='left'>APP MODES</Text>
|
|
29
28
|
</View>
|
|
30
|
-
<View style={{
|
|
31
|
-
<View style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
32
|
-
<Text style={{ flex:1 }} size={26}
|
|
33
|
-
<Icons.USDIcon size={30} color={Colors.
|
|
29
|
+
<View float style={{ padding:10, borderRadius:8, margin:10 }}>
|
|
30
|
+
<View transparent style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
31
|
+
<Text style={{ flex:1 }} size={26} theme='h2'>Real-Money Mode</Text>
|
|
32
|
+
<Icons.USDIcon size={30} color={Colors.text.h1} />
|
|
34
33
|
</View>
|
|
35
|
-
<View style={{ padding:5, paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.
|
|
36
|
-
<Text size={14} weight='regular' color={Colors.
|
|
34
|
+
<View transparent style={{ padding:5, paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
|
|
35
|
+
<Text size={14} weight='regular' color={Colors.text.h1}>When in real-money mode. The app header will show as this dark blue color. All activity when in this mode will use your real-money (USD) balance.</Text>
|
|
37
36
|
</View>
|
|
38
|
-
<View style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
39
|
-
<Text style={{ flex:1 }} size={14}
|
|
40
|
-
<Text size={16} weight='bold'
|
|
37
|
+
<View transparent style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
38
|
+
<Text style={{ flex:1 }} size={14} theme='description'>Real-Money / USD ($)</Text>
|
|
39
|
+
<Text size={16} weight='bold' theme='h1'>${player_balance.balance.toFixed(2)}</Text>
|
|
41
40
|
</View>
|
|
42
|
-
<View style={{ padding:10 }}>
|
|
43
|
-
<View style={{ flexDirection:'row', alignItems:'center' }}>
|
|
44
|
-
<Text style={{ flex:1 }} size={14}
|
|
45
|
-
<Text size={16} weight='bold'
|
|
41
|
+
<View transparent style={{ padding:10 }}>
|
|
42
|
+
<View transparent style={{ flexDirection:'row', alignItems:'center' }}>
|
|
43
|
+
<Text style={{ flex:1 }} size={14} theme='description'>Promo (P)</Text>
|
|
44
|
+
<Text size={16} weight='bold' theme='h1'>P{player_balance.promo_balance.toFixed(2)}</Text>
|
|
46
45
|
</View>
|
|
47
|
-
<Text style={{ marginTop:3 }} size={12} color={Colors.
|
|
46
|
+
<Text style={{ marginTop:3 }} size={12} color={Colors.text.warning} weight='semibold'>Promo balance can be used for all real-money activities. Winnings will be returned as Real-Money/USD ($).</Text>
|
|
48
47
|
</View>
|
|
49
48
|
</View>
|
|
50
49
|
|
|
51
|
-
<View style={{
|
|
52
|
-
<View style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
53
|
-
<Text style={{ flex:1 }} size={26}
|
|
54
|
-
<Icons.EdgeCoinIcon size={30} color={Colors.
|
|
50
|
+
<View float style={{ padding:10, borderRadius:8, margin:10 }}>
|
|
51
|
+
<View transparent style={{ padding:5, flexDirection:'row', alignItems:'center' }}>
|
|
52
|
+
<Text style={{ flex:1 }} size={26} theme='h2'>Demo Mode</Text>
|
|
53
|
+
<Icons.EdgeCoinIcon size={30} color={Colors.text.h1} />
|
|
55
54
|
</View>
|
|
56
|
-
<View style={{ padding:5, paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.
|
|
57
|
-
<Text size={14}
|
|
55
|
+
<View transparent style={{ padding:5, paddingBottom:10, borderBottomWidth:1, borderBottomColor:Colors.borders.light }}>
|
|
56
|
+
<Text size={14} theme='description'>When in demo mode. The app header will show as this light blue color. All activity when in this mode will use your Edge Coin (E) balance.</Text>
|
|
58
57
|
</View>
|
|
59
|
-
<View style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
60
|
-
<Text style={{ flex:1 }} size={14}
|
|
61
|
-
<Text size={16} weight='bold'
|
|
58
|
+
<View transparent style={{ padding:10, flexDirection:'row', alignItems:'center' }}>
|
|
59
|
+
<Text style={{ flex:1 }} size={14} theme='description'>Edge Coins (E)</Text>
|
|
60
|
+
<Text size={16} weight='bold' theme='h1'>E{player_balance.free_market_balance.toFixed(2)}</Text>
|
|
62
61
|
</View>
|
|
63
62
|
</View>
|
|
64
|
-
</
|
|
63
|
+
</View>
|
|
65
64
|
<View nativeID='action_row' style={{ flexDirection:'row', justifyContent:'space-between', padding:10 }}>
|
|
66
65
|
<Button
|
|
67
66
|
title='EXIT SETUP'
|
|
68
|
-
|
|
69
|
-
backgroundColor='transparent'
|
|
67
|
+
type='error'
|
|
70
68
|
onPress={() => onClose()}
|
|
71
69
|
/>
|
|
72
|
-
<
|
|
73
|
-
|
|
70
|
+
<Button
|
|
71
|
+
float
|
|
72
|
+
style={{ borderRadius:100, height:50, width:50, justifyContent:'center', alignItems:'center' }}
|
|
74
73
|
onPress={() => onNext()}
|
|
75
|
-
//disabled={loading}
|
|
76
74
|
>
|
|
77
|
-
<Icons.ChevronIcon size={
|
|
78
|
-
</
|
|
75
|
+
<Icons.ChevronIcon size={18} direction='right' color={Colors.text.h1}/>
|
|
76
|
+
</Button>
|
|
79
77
|
</View>
|
|
80
78
|
</View>
|
|
81
79
|
)
|