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
af2d9222
Commit
af2d9222
authored
Feb 02, 2026
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the card expiration date format
parent
a7b4c8f6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
renderFields.tsx
.../pages/dashboard/userDashboard/withdrawl/renderFields.tsx
+22
-2
transaction.ts
src/types/transaction.ts
+2
-1
No files found.
src/components/pages/dashboard/userDashboard/withdrawl/renderFields.tsx
View file @
af2d9222
...
...
@@ -12,7 +12,6 @@ interface RenderFieldsProps {
}
export
const
RenderFields
=
({
field
,
formik
}:
RenderFieldsProps
)
=>
{
// Get the actual field object from payment_fields array
const
fieldIndex
=
formik
.
values
.
payment_fields
?.
findIndex
(
(
f
:
MasspayPaymentFields
)
=>
f
.
token
===
field
.
token
);
...
...
@@ -32,7 +31,6 @@ export const RenderFields = ({ field, formik }: RenderFieldsProps) => {
formattedValue
=
dayjs
(
value
as
Dayjs
).
format
(
"YYYY-MM-DD"
);
}
// Update the value in the payment_fields array
if
(
fieldIndex
!==
-
1
)
{
const
updatedFields
=
[...
formik
.
values
.
payment_fields
];
updatedFields
[
fieldIndex
]
=
{
...
...
@@ -127,6 +125,27 @@ export const RenderFields = ({ field, formik }: RenderFieldsProps) => {
);
case
"date"
:
if
(
field
.
type
===
"CardExpiration"
)
{
return
(
<
div
className=
"input__field text-left"
>
<
InputLabel
>
{
field
.
label
}
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
<
OutlinedInput
fullWidth
id=
{
field
.
token
}
name=
{
`payment_fields.${field.token}`
}
value=
{
fieldValue
}
onChange=
{
(
e
)
=>
handleChange
(
e
.
target
.
value
)
}
onBlur=
{
handleBlur
}
error=
{
Boolean
(
fieldError
)
}
placeholder=
{
field
.
expected_value
}
/>
{
fieldError
&&
(
<
FormHelperText
error
>
{
fieldError
}
</
FormHelperText
>
)
}
</
div
>
)
}
else
{
return
(
<
div
className=
"input__field text-left"
>
<
InputLabel
>
{
field
.
label
}
<
span
className=
"text-red-500"
>
*
</
span
></
InputLabel
>
...
...
@@ -223,6 +242,7 @@ export const RenderFields = ({ field, formik }: RenderFieldsProps) => {
</
LocalizationProvider
>
</
div
>
);
}
default
:
return
(
...
...
src/types/transaction.ts
View file @
af2d9222
...
...
@@ -65,7 +65,7 @@ export interface MasspayPaymentFields {
is_required
:
boolean
;
label
:
string
;
validation
:
string
;
type
:
"BillReferenceNumber"
|
"BankAccountType"
|
"BankAccountNumber"
|
"BankRoutingNumber"
|
"SocialSecurity"
|
"DateOfBirth"
|
"Address1"
|
"IDSelfieCollection"
;
type
:
"BillReferenceNumber"
|
"BankAccountType"
|
"BankAccountNumber"
|
"BankRoutingNumber"
|
"SocialSecurity"
|
"DateOfBirth"
|
"Address1"
|
"IDSelfieCollection"
|
"CardExpiration"
;
expected_value
:
string
;
value
:
string
;
}
\ No newline at end of file
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