Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VCCI-News
Project
Project
Details
Activity
Releases
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
Văn Hoàng
VCCI-News
Commits
baedc93a
Commit
baedc93a
authored
May 21, 2026
by
Lê Đức Huy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: implement base configuration management page for site information, banners, and logos
parent
e7743761
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
page.tsx
src/app/admin/base-config/page.tsx
+4
-0
No files found.
src/app/admin/base-config/page.tsx
View file @
baedc93a
"use client"
;
"use client"
;
import
*
as
React
from
"react"
;
import
*
as
React
from
"react"
;
import
{
useQueryClient
}
from
"@tanstack/react-query"
;
import
{
import
{
ChevronLeft
,
ChevronLeft
,
ChevronRight
,
ChevronRight
,
...
@@ -531,6 +532,7 @@ function BranchCard({
...
@@ -531,6 +532,7 @@ function BranchCard({
}
}
export default function AdminBaseConfigPage()
{
export default function AdminBaseConfigPage()
{
const
queryClient
=
useQueryClient
();
const
[
config
,
setConfig
]
=
React
.
useState
<
BaseConfigData
|
null
>
(
null
);
const
[
config
,
setConfig
]
=
React
.
useState
<
BaseConfigData
|
null
>
(
null
);
const
[
mediaItems
,
setMediaItems
]
=
React
.
useState
<
AdminMediaItem
[]
>
([]);
const
[
mediaItems
,
setMediaItems
]
=
React
.
useState
<
AdminMediaItem
[]
>
([]);
const
[
currentBannerIndex
,
setCurrentBannerIndex
]
=
React
.
useState
(
0
);
const
[
currentBannerIndex
,
setCurrentBannerIndex
]
=
React
.
useState
(
0
);
...
@@ -797,6 +799,7 @@ export default function AdminBaseConfigPage() {
...
@@ -797,6 +799,7 @@ export default function AdminBaseConfigPage() {
saveConfig
(
nextConfig
);
saveConfig
(
nextConfig
);
setSavingItem
(
false
);
setSavingItem
(
false
);
setItemDialogOpen
(
false
);
setItemDialogOpen
(
false
);
queryClient
.
invalidateQueries
({
queryKey
:
[
"/logo"
]
});
toast
.
success
(
"Đã lưu cấu hình logo"
);
toast
.
success
(
"Đã lưu cấu hình logo"
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
...
@@ -888,6 +891,7 @@ export default function AdminBaseConfigPage() {
...
@@ -888,6 +891,7 @@ export default function AdminBaseConfigPage() {
try
{
try
{
await
deleteLogoId
(
deleteTarget
.
id
);
await
deleteLogoId
(
deleteTarget
.
id
);
nextConfig
.
logo
=
null
;
nextConfig
.
logo
=
null
;
queryClient
.
invalidateQueries
({
queryKey
:
[
"/logo"
]
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
"Không thể xóa cấu hình logo"
);
toast
.
error
(
"Không thể xóa cấu hình logo"
);
...
...
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