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
413162cc
Commit
413162cc
authored
Oct 06, 2025
by
Arjun Jhukal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the transaction table for dashboard as well
parent
b8138d45
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
12 deletions
+26
-12
DashboardProvider.tsx
...pp/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
+4
-1
index.tsx
...pages/dashboard/adminDashboard/games/GameDetail/index.tsx
+6
-2
index.tsx
...s/dashboard/adminDashboard/players/playerDetail/index.tsx
+6
-2
TransactionTable.tsx
...dashboard/adminDashboard/transaction/TransactionTable.tsx
+9
-6
index.tsx
...ts/pages/dashboard/userDashboard/depositHistory/index.tsx
+1
-1
No files found.
src/app/(dashboard)/(user)/(outsideAuth)/DashboardProvider.tsx
View file @
413162cc
"use client"
"use client"
import
TransactionTable
from
'@/components/pages/dashboard/adminDashboard/transaction/TransactionTable'
;
import
{
useAppSelector
}
from
'@/hooks/hook'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
React
from
'react'
import
React
from
'react'
export
default
function
DashboardProvider
({
children
}:
{
children
:
React
.
ReactNode
})
{
export
default
function
DashboardProvider
({
children
}:
{
children
:
React
.
ReactNode
})
{
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
user
=
useAppSelector
(
state
=>
state
.
auth
.
user
);
const
user
=
useAppSelector
(
state
=>
state
.
auth
.
user
);
if
(
user
?.
role
&&
user
.
role
.
toUpperCase
()
===
"ADMIN"
)
{
if
(
user
?.
role
&&
user
.
role
.
toUpperCase
()
===
"ADMIN"
)
{
return
<>
return
<>
<
h1
>
Admin Dashboard
</
h1
>
<
h1
className=
"text-[24px] leading-[120%] mb-6"
>
Dashboard
</
h1
>
<
TransactionTable
search=
{
search
}
/>
</>
</>
}
}
return
(
return
(
...
...
src/components/pages/dashboard/adminDashboard/games/GameDetail/index.tsx
View file @
413162cc
...
@@ -10,11 +10,12 @@ import { useGetGameByIdQuery } from '@/services/gameApi';
...
@@ -10,11 +10,12 @@ import { useGetGameByIdQuery } from '@/services/gameApi';
import
{
PATH
}
from
'@/routes/PATH'
;
import
{
PATH
}
from
'@/routes/PATH'
;
import
{
renderHTML
}
from
'@/utils/RenderHTML'
;
import
{
renderHTML
}
from
'@/utils/RenderHTML'
;
import
TransactionTable
from
'../../transaction/TransactionTable'
;
import
TransactionTable
from
'../../transaction/TransactionTable'
;
import
TableHeader
from
'@/components/molecules/TableHeader'
;
export
default
function
GameDetailPage
()
{
export
default
function
GameDetailPage
()
{
const
params
=
useParams
();
const
params
=
useParams
();
const
id
=
params
.
slug
;
const
id
=
params
.
slug
;
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
{
data
,
isLoading
}
=
useGetGameByIdQuery
({
id
:
Number
(
id
)
})
const
{
data
,
isLoading
}
=
useGetGameByIdQuery
({
id
:
Number
(
id
)
})
const
screenshots
=
data
?.
data
?.
screenshots
||
[];
const
screenshots
=
data
?.
data
?.
screenshots
||
[];
...
@@ -118,7 +119,10 @@ export default function GameDetailPage() {
...
@@ -118,7 +119,10 @@ export default function GameDetailPage() {
All Transactions
All Transactions
</
h2
>
</
h2
>
</
div
>
</
div
>
{
data
?.
data
?.
id
?
<
TransactionTable
game_id=
{
data
?.
data
?.
id
}
/>
:
""
}
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
{
data
?.
data
?.
id
?
<
TransactionTable
game_id=
{
data
?.
data
?.
id
}
search=
{
search
}
/>
:
""
}
</
div
>
</>
</>
)
)
...
...
src/components/pages/dashboard/adminDashboard/players/playerDetail/index.tsx
View file @
413162cc
...
@@ -10,6 +10,7 @@ import TransactionTable from '../../transaction/TransactionTable'
...
@@ -10,6 +10,7 @@ import TransactionTable from '../../transaction/TransactionTable'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
{
useAppSelector
}
from
'@/hooks/hook'
import
{
formatDateTime
}
from
'@/utils/formatDateTime'
import
{
formatDateTime
}
from
'@/utils/formatDateTime'
import
{
useGetPlayerBalanceByIdQuery
,
useGetPlayerByIdQuery
}
from
'@/services/playerApi'
import
{
useGetPlayerBalanceByIdQuery
,
useGetPlayerByIdQuery
}
from
'@/services/playerApi'
import
TableHeader
from
'@/components/molecules/TableHeader'
const
games
=
[
const
games
=
[
{
{
...
@@ -39,7 +40,7 @@ const games = [
...
@@ -39,7 +40,7 @@ const games = [
];
];
export
default
function
PlayerDetailPage
({
id
}:
{
id
:
number
})
{
export
default
function
PlayerDetailPage
({
id
}:
{
id
:
number
})
{
const
[
search
,
setSearch
]
=
React
.
useState
(
""
);
const
{
data
,
isLoading
}
=
useGetPlayerByIdQuery
({
id
},
{
const
{
data
,
isLoading
}
=
useGetPlayerByIdQuery
({
id
},
{
skip
:
!
id
skip
:
!
id
})
})
...
@@ -171,8 +172,11 @@ export default function PlayerDetailPage({ id }: { id: number }) {
...
@@ -171,8 +172,11 @@ export default function PlayerDetailPage({ id }: { id: number }) {
All Transactions
All Transactions
</
h2
>
</
h2
>
</
div
>
</
div
>
{
data
?.
data
?.
id
?
<
TransactionTable
user_id=
{
data
?.
data
?.
id
}
/>
:
""
}
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
{
data
?.
data
?.
id
?
<
TransactionTable
search=
{
search
}
user_id=
{
data
?.
data
?.
id
}
/>
:
""
}
{
/* <GameTransactionTable /> */
}
{
/* <GameTransactionTable /> */
}
</
div
>
</>
</>
)
)
}
}
src/components/pages/dashboard/adminDashboard/transaction/TransactionTable.tsx
View file @
413162cc
...
@@ -15,8 +15,8 @@ import {
...
@@ -15,8 +15,8 @@ import {
}
from
'@tanstack/react-table'
;
}
from
'@tanstack/react-table'
;
import
React
,
{
useMemo
,
useState
}
from
'react'
;
import
React
,
{
useMemo
,
useState
}
from
'react'
;
export
default
function
TransactionTable
({
user_id
,
game_id
}:
{
user_id
?:
string
;
game_id
?:
number
})
{
export
default
function
TransactionTable
({
user_id
,
game_id
,
search
}:
{
user_id
?:
string
;
game_id
?:
number
,
search
:
string
})
{
const
[
search
,
setSearch
]
=
useState
(
""
);
const
[
sorting
,
setSorting
]
=
useState
<
{
id
:
string
;
desc
:
boolean
}[]
>
([]);
const
[
sorting
,
setSorting
]
=
useState
<
{
id
:
string
;
desc
:
boolean
}[]
>
([]);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
page
,
setPage
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
...
@@ -83,7 +83,7 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
...
@@ -83,7 +83,7 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
return
(
return
(
<
span
<
span
className=
{
`px-2 py-1 max-w-[
5
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
className=
{
`px-2 py-1 max-w-[
6
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
>
{
display
}
{
display
}
</
span
>
</
span
>
...
@@ -124,8 +124,11 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
...
@@ -124,8 +124,11 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
});
});
return
(
return
(
<
div
className=
"border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]"
>
// <div className="border-gray border-solid border-[1px] rounded-[8px] lg:rounded-[16px]">
<
TableHeader
search=
{
search
}
setSearch=
{
setSearch
}
onDownloadCSV=
{
()
=>
{
}
}
/>
// <TableHeader search={search} setSearch={setSearch} onDownloadCSV={() => { }} />
// </div>
<>
<
CustomTable
<
CustomTable
key=
{
`${page}-${pageSize}-${search}-${game_id}-${user_id}`
}
key=
{
`${page}-${pageSize}-${search}-${game_id}-${user_id}`
}
table=
{
table
}
loading=
{
loadingTransaction
}
/>
table=
{
table
}
loading=
{
loadingTransaction
}
/>
...
@@ -154,6 +157,6 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
...
@@ -154,6 +157,6 @@ export default function TransactionTable({ user_id, game_id }: { user_id?: strin
sx=
{
{
gap
:
"8px"
}
}
sx=
{
{
gap
:
"8px"
}
}
/>
/>
</
div
>
:
""
}
</
div
>
:
""
}
</
div
>
</>
);
);
}
}
src/components/pages/dashboard/userDashboard/depositHistory/index.tsx
View file @
413162cc
...
@@ -44,7 +44,7 @@ export default function DepositHistoryPage() {
...
@@ -44,7 +44,7 @@ export default function DepositHistoryPage() {
const
display
=
status
.
charAt
(
0
).
toUpperCase
()
+
status
.
slice
(
1
);
const
display
=
status
.
charAt
(
0
).
toUpperCase
()
+
status
.
slice
(
1
);
return
(
return
(
<
span
className=
{
`px-2 py-1 max-w-[
5
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
<
span
className=
{
`px-2 py-1 max-w-[
6
0px] block lg:text-[10px] text-white status rounded-[8px] text-center ${status}`
}
>
{
display
}
{
display
}
</
span
>
</
span
>
);
);
...
...
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