Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sweepstake
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arjun Jhukal
sweepstake
Commits
3294a2f4
Commit
3294a2f4
authored
Apr 03, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reformed the user creations and registraion process
parent
ed0ed73d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
128 additions
and
38 deletions
+128
-38
index.tsx
src/components/pages/auth/register/index.tsx
+79
-11
AddPlayerForm.tsx
...rd/adminDashboard/players/addPlayerForm/AddPlayerForm.tsx
+0
-0
index.tsx
.../dashboard/adminDashboard/players/addPlayerForm/index.tsx
+13
-8
TransactionTable.tsx
...dashboard/adminDashboard/transaction/TransactionTable.tsx
+8
-4
index.tsx
...board/userDashboard/account/profile/editProfile/index.tsx
+13
-3
FortPay.tsx
...Dashboard/buyCoins/buyCoinSinlgeGame/checkout/FortPay.tsx
+1
-1
index.tsx
...ponents/pages/dashboard/userDashboard/withdrawl/index.tsx
+1
-1
auth.ts
src/types/auth.ts
+6
-5
player.ts
src/types/player.ts
+6
-5
transaction.ts
src/types/transaction.ts
+1
-0
No files found.
src/components/pages/auth/register/index.tsx
View file @
3294a2f4
...
...
@@ -96,7 +96,10 @@ const validationSchema = Yup.object().shape({
last_name
:
Yup
.
string
().
required
(
'Last name is required'
),
city
:
Yup
.
string
().
required
(
"City is Required"
),
state
:
Yup
.
string
().
required
(
"State is Required"
),
// zip_code: Yup.string().required("Zip Code is Required"),
// postal_code: Yup.string().required("Zip Code is Required"),
address
:
Yup
.
string
().
required
(
"Address is Required"
),
address_line_two
:
Yup
.
string
(),
gender
:
Yup
.
string
().
required
(
"Gender is Required"
),
postal_code
:
Yup
.
string
().
required
(
"Postal Code is Required"
),
ssn
:
Yup
.
string
()
.
matches
(
/^
\d{4}
$/
,
"SSN must be exactly 4 digits no characters"
)
...
...
@@ -122,12 +125,13 @@ export default function RegisterPage() {
photoid_number
:
''
,
dob
:
null
as
Dayjs
|
null
,
city
:
''
,
pob
:
''
,
agree
:
true
,
state
:
""
,
zip_code
:
""
,
postal_code
:
""
,
ssn
:
""
ssn
:
""
,
address
:
""
,
address_line_two
:
""
,
gender
:
""
}
const
{
handleSubmit
,
handleBlur
,
handleChange
,
errors
,
dirty
,
values
,
touched
,
setFieldValue
,
setFieldTouched
}
=
useFormik
(
{
...
...
@@ -149,11 +153,12 @@ export default function RegisterPage() {
dob
:
formattedDob
,
city
:
values
.
city
,
state
:
values
.
state
,
zip_code
:
values
.
zip_code
,
pob
:
values
.
pob
,
agree
:
values
.
agree
,
postal_code
:
values
.
postal_code
,
ssn
:
values
.
ssn
agree
:
values
.
agree
,
ssn
:
values
.
ssn
,
address
:
values
.
address
,
address_line_two
:
values
.
address_line_two
,
gender
:
values
.
gender
}).
unwrap
();
dispatch
(
...
...
@@ -185,7 +190,6 @@ export default function RegisterPage() {
}
)
console
.
log
(
errors
)
return
(
<>
<
AuthMessageBlock
...
...
@@ -276,6 +280,38 @@ export default function RegisterPage() {
</
div
>
</
div
>
<
div
className=
"input__field lg:col-span-3"
>
<
InputLabel
htmlFor=
"address"
>
Address Line 1
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
"address"
name=
"address"
placeholder=
"Enter address"
value=
{
values
.
address
}
onChange=
{
handleChange
}
onBlur=
{
handleBlur
}
/>
<
span
className=
"error"
>
{
touched
.
address
&&
errors
.
address
?
errors
.
address
:
""
}
</
span
>
</
div
>
<
div
className=
"input__field lg:col-span-3"
>
<
InputLabel
htmlFor=
"address_line_two"
>
Address Line 2
</
InputLabel
>
<
OutlinedInput
fullWidth
id=
"address_line_two"
name=
"address_line_two"
placeholder=
"Enter address line 2"
value=
{
values
.
address_line_two
}
onChange=
{
handleChange
}
onBlur=
{
handleBlur
}
/>
<
span
className=
"error"
>
{
touched
.
address_line_two
&&
errors
.
address_line_two
?
errors
.
address_line_two
:
""
}
</
span
>
</
div
>
{
/* City */
}
<
div
className=
"lg:col-span-3"
>
<
div
className=
"input__field"
>
...
...
@@ -325,6 +361,37 @@ export default function RegisterPage() {
</
div
>
</
div
>
<
div
className=
"input__field lg:col-span-3"
>
<
InputLabel
htmlFor=
"gender"
>
Gender
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
Select
fullWidth
id=
"gender"
name=
"gender"
displayEmpty
value=
{
values
.
gender
}
onChange=
{
handleChange
}
onBlur=
{
handleBlur
}
renderValue=
{
(
selected
)
=>
selected
===
""
?
"Select a Gender"
:
selected
}
>
<
MenuItem
value=
""
>
<
em
>
Select a Gender
</
em
>
</
MenuItem
>
{
[
{
label
:
"Male"
,
value
:
"M"
},
{
label
:
"Female"
,
value
:
"F"
},
{
label
:
"Other"
,
value
:
"O"
},
].
map
((
state
)
=>
(
<
MenuItem
key=
{
state
.
value
}
value=
{
state
.
value
}
>
{
state
.
label
}
</
MenuItem
>
))
}
</
Select
>
<
span
className=
"error"
>
{
touched
.
gender
&&
errors
.
gender
}
</
span
>
</
div
>
<
div
className=
"lg:col-span-3"
>
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"postal_code"
>
Postal Code
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
...
...
@@ -363,7 +430,7 @@ export default function RegisterPage() {
<
div
className=
"lg:col-span-3"
>
<
InputLabel
htmlFor=
"phone"
>
Phone
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
div
className=
"grid grid-cols-12 gap-1 items-
end
"
>
<
div
className=
"grid grid-cols-12 gap-1 items-
start
"
>
<
div
className=
"col-span-4 lg:col-span-3"
>
<
OutlinedInput
fullWidth
...
...
@@ -392,7 +459,8 @@ export default function RegisterPage() {
</
div
>
</
div
>
</
div
>
<
div
className=
"lg:col-span-6"
>
<
div
className=
"lg:col-span-3"
>
<
div
className=
"input__field"
>
<
InputLabel
htmlFor=
"dob"
>
Date of Birth
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
LocalizationProvider
dateAdapter=
{
AdapterDayjs
}
>
...
...
src/components/pages/dashboard/adminDashboard/players/addPlayerForm/AddPlayerForm.tsx
View file @
3294a2f4
This diff is collapsed.
Click to expand it.
src/components/pages/dashboard/adminDashboard/players/addPlayerForm/index.tsx
View file @
3294a2f4
...
...
@@ -20,16 +20,17 @@ export const PlayerValidationSchema = (isEdit: boolean) => Yup.object().shape({
wallet_address
:
Yup
.
string
().
nullable
(),
address
:
Yup
.
string
().
required
(
"Address is required"
),
city
:
Yup
.
string
().
required
(
"City is required"
),
zip_code
:
Yup
.
string
().
required
(
"Zip code is required"
),
pob
:
Yup
.
string
().
required
(
"State is required"
),
postal_code
:
Yup
.
string
().
required
(
"Zip code is required"
),
state
:
Yup
.
string
().
required
(
"State is required"
),
gender
:
Yup
.
string
().
required
(
"Gender is required"
),
phone
:
Yup
.
string
()
.
matches
(
/^
\+?\d{7,15}
$/
,
"Invalid phone number"
)
.
required
(
"Phone is required"
),
password
:
isEdit
?
Yup
.
string
().
nullable
()
// not required in edit mode
:
Yup
.
string
().
min
(
6
,
"Password must be at least 6 characters"
).
required
(
"Password is required"
),
password_confirmation
:
Yup
.
string
().
when
(
"password"
,
{
is
:
(
val
:
string
)
=>
!!
val
,
// required only if password is filled
password_confirmation
:
isEdit
?
Yup
.
string
().
nullable
()
:
Yup
.
string
().
when
(
"password"
,
{
is
:
(
val
:
string
)
=>
!!
val
,
then
:
(
schema
)
=>
schema
.
oneOf
([
Yup
.
ref
(
"password"
)],
"Passwords must match"
).
required
(
"Password confirmation is required"
),
otherwise
:
(
schema
)
=>
schema
.
nullable
(),
}),
...
...
@@ -69,8 +70,10 @@ export default function AddPlayerPage({ id }: { id?: string }) {
password_confirmation
:
data
?.
data
.
password_confirmation
,
profile_image
:
null
,
dob
:
data
?.
data
.
dob
||
null
as
Dayjs
|
null
,
zip_code
:
data
?.
data
.
zip_code
||
""
,
pob
:
data
?.
data
.
pob
||
""
,
postal_code
:
data
?.
data
.
postal_code
||
""
,
state
:
data
?.
data
.
state
||
""
,
gender
:
data
?.
data
.
gender
||
""
,
address_line_two
:
data
?.
data
.
address_line_two
||
""
,
}
:
initialPlayerValues
,
validationSchema
:
PlayerValidationSchema
(
!!
id
),
enableReinitialize
:
true
,
...
...
@@ -87,8 +90,10 @@ export default function AddPlayerPage({ id }: { id?: string }) {
if
(
values
.
city
)
formData
.
append
(
"city"
,
values
.
city
);
if
(
values
.
phone
)
formData
.
append
(
"phone"
,
values
.
phone
);
if
(
values
.
dob
)
formData
.
append
(
"dob"
,
values
.
dob
.
toString
());
if
(
values
.
zip_code
)
formData
.
append
(
"zip_code"
,
values
.
zip_code
);
if
(
values
.
pob
)
formData
.
append
(
"pob"
,
values
.
pob
);
if
(
values
.
postal_code
)
formData
.
append
(
"postal_code"
,
values
.
postal_code
);
if
(
values
.
state
)
formData
.
append
(
"state"
,
values
.
state
);
if
(
values
.
gender
)
formData
.
append
(
"gender"
,
values
.
gender
);
if
(
values
.
address_line_two
)
formData
.
append
(
"address_line_two"
,
values
.
address_line_two
);
if
(
values
.
profile_image
)
{
if
(
Array
.
isArray
(
values
.
profile_image
))
{
values
.
profile_image
.
forEach
((
file
)
=>
formData
.
append
(
"profile_image"
,
file
));
...
...
src/components/pages/dashboard/adminDashboard/transaction/TransactionTable.tsx
View file @
3294a2f4
...
...
@@ -103,8 +103,8 @@ export default function TransactionTable({ user_id, game_id, search, setSearch }
accessorKey
:
"status"
,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"Status"
/>,
cell
:
({
row
})
=>
{
const
status
=
row
.
original
.
status
.
toLowerCase
()
;
const
display
=
status
.
charAt
(
0
).
toUpperCase
()
+
status
.
slice
(
1
);
const
status
=
row
?.
original
?.
status
?
row
.
original
?.
status
?.
toLowerCase
()
:
""
;
const
display
=
status
?.
charAt
(
0
)?.
toUpperCase
()
+
status
?
.
slice
(
1
);
return
(
<
span
className=
{
`px-2 py-1 max-w-[60px] block lg: text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
{
display
}
</
span
>
);
...
...
@@ -112,11 +112,15 @@ export default function TransactionTable({ user_id, game_id, search, setSearch }
},
{
accessorKey
:
"amount"
,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"Amount USD"
/>,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"Deposit Amount"
/>,
},
{
accessorKey
:
"gc"
,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"GC Awarded"
/>,
},
{
accessorKey
:
"sweepcoins"
,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"S
weepcoin
s"
/>,
header
:
({
column
})
=>
<
SortableHeader
column=
{
column
}
label=
"S
C Bonu
s"
/>,
},
{
accessorKey
:
"transaction_date"
,
...
...
src/components/pages/dashboard/userDashboard/account/profile/editProfile/index.tsx
View file @
3294a2f4
...
...
@@ -30,7 +30,10 @@ export default function EditUserProfile({ id, buttonLabel }: { id: string, butto
password_confirmation
:
''
,
profile_image
:
null
,
dob
:
user
.
dob
||
null
as
Dayjs
|
null
,
zip_code
:
user
.
zip_code
||
""
,
postal_code
:
user
.
postal_code
||
""
,
gender
:
user
.
gender
||
""
,
state
:
user
.
state
||
""
,
address_line_two
:
user
.
address_line_two
||
""
,
}
:
initialPlayerValues
,
validationSchema
:
PlayerValidationSchema
(
user
?.
id
?
true
:
false
),
enableReinitialize
:
true
,
...
...
@@ -49,8 +52,11 @@ export default function EditUserProfile({ id, buttonLabel }: { id: string, butto
if
(
values
.
city
)
formData
.
append
(
"city"
,
values
.
city
);
if
(
values
.
phone
)
formData
.
append
(
"phone"
,
values
.
phone
);
if
(
values
.
dob
)
formData
.
append
(
"dob"
,
formattedDob
);
if
(
values
.
zip_code
)
formData
.
append
(
"zip_code"
,
values
.
zip_code
);
if
(
values
.
pob
)
formData
.
append
(
"pob"
,
values
.
pob
);
if
(
values
.
postal_code
)
formData
.
append
(
"postal_code"
,
values
.
postal_code
);
if
(
values
.
state
)
formData
.
append
(
"state"
,
values
.
state
);
if
(
values
.
gender
)
formData
.
append
(
"gender"
,
values
.
gender
);
if
(
values
.
address_line_two
)
formData
.
append
(
"address_line_two"
,
values
.
address_line_two
);
if
(
values
.
profile_image
)
{
if
(
Array
.
isArray
(
values
.
profile_image
))
{
...
...
@@ -110,6 +116,10 @@ export default function EditUserProfile({ id, buttonLabel }: { id: string, butto
total_deposited
:
user
.
total_deposited
??
undefined
,
profile_image_file
:
user
.
profile_image_file
??
undefined
,
dob
:
user
.
dob
?
dayjs
(
user
.
dob
).
format
(
'YYYY-MM-DD'
)
:
undefined
,
postal_code
:
user
?.
postal_code
||
""
,
gender
:
user
?.
gender
||
""
,
address_line_two
:
user
?.
address_line_two
||
""
,
state
:
user
?.
state
||
""
,
}
as
PlayerItem
,
}
:
undefined
;
...
...
src/components/pages/dashboard/userDashboard/buyCoins/buyCoinSinlgeGame/checkout/FortPay.tsx
View file @
3294a2f4
...
...
@@ -61,7 +61,7 @@ export default function PaymentForm({ id, amount, type }: DepositProps & { type:
address1
:
user
?.
address
||
''
,
city
:
user
?.
city
||
''
,
state
:
user
?.
state
||
''
,
zip
:
''
,
zip
:
user
?.
postal_code
||
''
,
},
validationSchema
:
billingSchema
,
onSubmit
:
()
=>
{
...
...
src/components/pages/dashboard/userDashboard/withdrawl/index.tsx
View file @
3294a2f4
...
...
@@ -155,7 +155,7 @@ export default function WithdrawlPage({
};
const
handleWithdrawClick
=
(
balance
:
number
,
provider
:
string
)
=>
{
if
(
balance
<
1
0
||
balance
>
400
)
{
if
(
balance
<
4
0
||
balance
>
400
)
{
dispatch
(
showToast
({
message
:
"Withdraw Amount must be at least $40 and below $400"
,
...
...
src/types/auth.ts
View file @
3294a2f4
...
...
@@ -17,9 +17,8 @@ export interface User {
address
:
string
;
city
:
string
role
:
RoleProps
;
zip
_code
?:
string
;
postal
_code
?:
string
;
state
?:
string
;
postal_code
:
string
;
ssn
:
string
;
}
...
...
@@ -43,11 +42,12 @@ export interface RegisterProps extends LoginProps {
photoid_number
:
string
;
dob
:
string
;
city
:
string
;
pob
:
string
;
agree
:
boolean
;
device_id
?:
string
;
zip
_code
?:
string
;
postal
_code
?:
string
;
state
?:
string
;
postal_code
:
string
;
ssn
:
string
;
address
:
string
;
address_line_two
?:
string
;
gender
:
string
;
}
\ No newline at end of file
src/types/player.ts
View file @
3294a2f4
...
...
@@ -16,10 +16,10 @@ export interface CommonPlayerProps {
role
?:
string
;
state
?:
string
;
dob
?:
string
|
Dayjs
|
null
;
zip_code
?:
string
;
pob
?:
string
;
postal_code
?:
string
;
is_acuity_verified
?:
boolean
gender
:
string
;
address_line_two
?:
string
;
}
export
interface
PlayerProps
extends
CommonPlayerProps
{
id
?:
string
;
...
...
@@ -44,8 +44,9 @@ export const initialPlayerValues: PlayerProps = {
password_confirmation
:
""
,
profile_image
:
null
,
dob
:
null
as
Dayjs
|
null
,
zip_code
:
""
,
pob
:
""
postal_code
:
""
,
gender
:
""
,
address_line_two
:
""
,
};
type
GameInformation
=
{
...
...
src/types/transaction.ts
View file @
3294a2f4
...
...
@@ -41,6 +41,7 @@ export interface SingleDepositProps {
type
:
string
;
amount
:
number
;
sweepcoins
:
number
;
gc
?:
number
;
transaction_date
:
string
;
available_balance
?:
string
;
status
:
TransactionStatus
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment