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
a7f86fcb
Commit
a7f86fcb
authored
Nov 04, 2025
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a
parent
e83b5a22
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1032 additions
and
63 deletions
+1032
-63
orval.config.ts
orval.config.ts
+2
-1
news-page-config.ts
src/api/endpoints/news-page-config.ts
+930
-0
index.ts
src/api/models/index.ts
+1
-0
putNewsPageConfigCategoryIdBody.ts
src/api/models/putNewsPageConfigCategoryIdBody.ts
+11
-0
header.tsx
src/app/(main)/_lib/layout/header.tsx
+4
-1
page.tsx
src/app/(main)/hoat-dong/dao-tao/page.tsx
+4
-4
page.tsx
src/app/(main)/hoat-dong/page.tsx
+1
-1
page.tsx
src/app/(main)/hoat-dong/su-kien/page.tsx
+4
-4
page.tsx
src/app/(main)/hoi-vien/ket-noi-hoi-vien/page.tsx
+19
-19
page.tsx
src/app/(main)/hoi-vien/tin-hoi-vien/page.tsx
+1
-1
page.tsx
src/app/(main)/thong-tin-truyen-thong/an-pham/page.tsx
+3
-3
page.tsx
src/app/(main)/thong-tin-truyen-thong/chuyen-de/page.tsx
+3
-3
page.tsx
...n-truyen-thong/thong-tin-chinh-sach-va-phap-luat/page.tsx
+3
-3
page.tsx
.../(main)/thong-tin-truyen-thong/thu-vien-tai-lieu/page.tsx
+3
-3
page.tsx
...p/(main)/thong-tin-truyen-thong/tin-doanh-nghiep/page.tsx
+3
-3
page.tsx
src/app/(main)/thong-tin-truyen-thong/tin-kinh-te/page.tsx
+3
-3
AppEditorContent.tsx
src/components/shared/editor-content/AppEditorContent.tsx
+37
-14
No files found.
orval.config.ts
View file @
a7f86fcb
...
@@ -79,7 +79,8 @@ const orvalConfig = async () => {
...
@@ -79,7 +79,8 @@ const orvalConfig = async () => {
'UserHistory'
,
'UserHistory'
,
'Approvals'
,
'Approvals'
,
'News'
,
'News'
,
'Category'
'Category'
,
'NewsPageConfig'
,
]
]
}
}
}
}
...
...
src/api/endpoints/news-page-config.ts
0 → 100644
View file @
a7f86fcb
This diff is collapsed.
Click to expand it.
src/api/models/index.ts
View file @
a7f86fcb
...
@@ -140,6 +140,7 @@ export * from './putEventsLinkParams';
...
@@ -140,6 +140,7 @@ export * from './putEventsLinkParams';
export
*
from
'./putEventsParams'
;
export
*
from
'./putEventsParams'
;
export
*
from
'./putFooterParams'
;
export
*
from
'./putFooterParams'
;
export
*
from
'./putMembershipFeeParams'
;
export
*
from
'./putMembershipFeeParams'
;
export
*
from
'./putNewsPageConfigCategoryIdBody'
;
export
*
from
'./putNotificationsMarkAsReadParams'
;
export
*
from
'./putNotificationsMarkAsReadParams'
;
export
*
from
'./putNotificationsParams'
;
export
*
from
'./putNotificationsParams'
;
export
*
from
'./putOrderPaymentParams'
;
export
*
from
'./putOrderPaymentParams'
;
...
...
src/api/models/putNewsPageConfigCategoryIdBody.ts
0 → 100644
View file @
a7f86fcb
/**
* Generated by orval v8.0.0-rc.0 🍺
* Do not edit manually.
* VCCI
* Coded by Meu TEAM
* OpenAPI spec version: 1.0.0
*/
export
type
PutNewsPageConfigCategoryIdBody
=
{
category_ids
?:
string
[];
};
src/app/(main)/_lib/layout/header.tsx
View file @
a7f86fcb
...
@@ -91,7 +91,10 @@ function Header() {
...
@@ -91,7 +91,10 @@ function Header() {
"Tin Hội Viên"
,
"Tin Hội Viên"
,
]
}
]
}
/>
/>
<
MenuItem
title=
"Hoạt động"
items=
{
[
"Sự Kiện"
,
"Đào Tạo"
]
}
/>
<
MenuItem
title=
"Hoạt động"
link=
"hoat-dong"
items=
{
[
"Sự Kiện"
,
"Đào Tạo"
]
}
/>
<
MenuItem
<
MenuItem
title=
"Xuất Xứ Hàng Hóa"
title=
"Xuất Xứ Hàng Hóa"
link=
"xuat-xu-hang-hoa"
link=
"xuat-xu-hang-hoa"
...
...
src/app/(main)/hoat-dong/dao-tao/page.tsx
View file @
a7f86fcb
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
EVENT_CATEGORIES
}
from
"@constants/categories"
;
import
{
EVENT_CATEGORIES
}
from
"@constants/categories"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -17,19 +17,19 @@ export default function Page() {
...
@@ -17,19 +17,19 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Đào tạo'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
<
main
className=
"lg:col-span-2 bg-background "
>
<
main
className=
"lg:col-span-2 bg-background "
>
<
div
className=
"pb-5 overflow-hidden"
>
<
div
className=
"pb-5 overflow-hidden"
>
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/dao-tao/${news.id}`
}
/>
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/dao-tao/${news.id}`
}
/>
))
}
))
}
<
div
className=
"w-full flex justify-center mt-4"
>
<
div
className=
"w-full flex justify-center mt-4"
>
...
...
src/app/(main)/hoat-dong/page.tsx
View file @
a7f86fcb
...
@@ -15,7 +15,7 @@ export default function Page() {
...
@@ -15,7 +15,7 @@ export default function Page() {
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
src/app/(main)/hoat-dong/su-kien/page.tsx
View file @
a7f86fcb
...
@@ -5,7 +5,7 @@ import { EVENT_CATEGORIES } from "@constants/categories";
...
@@ -5,7 +5,7 @@ import { EVENT_CATEGORIES } from "@constants/categories";
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
// ...existing code...
// ...existing code...
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -18,19 +18,19 @@ export default function Page() {
...
@@ -18,19 +18,19 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Sự kiện'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
<
ListCategory
categories=
{
EVENT_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
<
main
className=
"lg:col-span-2 bg-background "
>
<
main
className=
"lg:col-span-2 bg-background "
>
<
div
className=
"pb-5 overflow-hidden"
>
<
div
className=
"pb-5 overflow-hidden"
>
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
{
allData
?.
responseData
.
rows
.
map
((
news
)
=>
(
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/su-kien/${news.id}`
}
/>
<
NewsContent
key=
{
news
.
id
}
news=
{
news
}
link=
{
`${PATHS.event}/su-kien/${news.id}`
}
/>
))
}
))
}
<
div
className=
"w-full flex justify-center mt-4"
>
<
div
className=
"w-full flex justify-center mt-4"
>
...
...
src/app/(main)/hoi-vien/ket-noi-hoi-vien/page.tsx
View file @
a7f86fcb
...
@@ -16,7 +16,7 @@ export default function Page() {
...
@@ -16,7 +16,7 @@ export default function Page() {
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
`category @=Kết nối hội viên`
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto pb-4"
>
<
div
className=
"min-h-screen container mx-auto pb-4"
>
...
@@ -30,24 +30,24 @@ export default function Page() {
...
@@ -30,24 +30,24 @@ export default function Page() {
<
CardNews
key=
{
news
.
id
}
news=
{
news
}
/>
<
CardNews
key=
{
news
.
id
}
news=
{
news
}
/>
))
}
))
}
<
div
className=
'w-full flex justify-center mt-4'
>
<
div
className=
'w-full flex justify-center mt-4'
>
<
Pagination
<
Pagination
pageCount=
{
Number
(
allData
?.
responseData
.
totalPages
??
1
)
}
pageCount=
{
Number
(
allData
?.
responseData
.
totalPages
??
1
)
}
page=
{
Number
(
allData
?.
responseData
.
currentPage
??
page
)
}
page=
{
Number
(
allData
?.
responseData
.
currentPage
??
page
)
}
onChangePage=
{
(
p
)
=>
setPage
(
p
)
}
onChangePage=
{
(
p
)
=>
setPage
(
p
)
}
onGoToPreviousPage=
{
()
=>
setPage
(
Math
.
max
(
1
,
page
-
1
))
}
onGoToPreviousPage=
{
()
=>
setPage
(
Math
.
max
(
1
,
page
-
1
))
}
onGoToNextPage=
{
()
=>
onGoToNextPage=
{
()
=>
setPage
(
setPage
(
Math
.
min
(
Math
.
min
(
Number
(
allData
?.
responseData
.
totalPages
??
1
),
Number
(
allData
?.
responseData
.
totalPages
??
1
),
page
+
1
page
+
1
)
)
)
)
}
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
main
>
</
main
>
{
/* Sidebar */
}
{
/* Sidebar */
}
<
aside
className=
"space-y-6"
>
<
aside
className=
"space-y-6"
>
...
...
src/app/(main)/hoi-vien/tin-hoi-vien/page.tsx
View file @
a7f86fcb
...
@@ -16,7 +16,7 @@ export default function Page() {
...
@@ -16,7 +16,7 @@ export default function Page() {
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
,
isLoading
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin hội viên'
,
})
})
return
(
return
(
<
div
className=
"min-h-screen container mx-auto pb-4"
>
<
div
className=
"min-h-screen container mx-auto pb-4"
>
...
...
src/app/(main)/thong-tin-truyen-thong/an-pham/page.tsx
View file @
a7f86fcb
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
EventFilter
from
"@app/dai-dien-gioi-chu/components/event-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -16,12 +16,12 @@ export default function Page() {
...
@@ -16,12 +16,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Ấn phẩm'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/app/(main)/thong-tin-truyen-thong/chuyen-de/page.tsx
View file @
a7f86fcb
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -17,12 +17,12 @@ export default function Page() {
...
@@ -17,12 +17,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Chuyên đề'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/app/(main)/thong-tin-truyen-thong/thong-tin-chinh-sach-va-phap-luat/page.tsx
View file @
a7f86fcb
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -18,12 +18,12 @@ export default function Page() {
...
@@ -18,12 +18,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Thông tin chính sách và pháp luật'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/app/(main)/thong-tin-truyen-thong/thu-vien-tai-lieu/page.tsx
View file @
a7f86fcb
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
// ...existing code...
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
...
@@ -18,12 +18,12 @@ export default function Page() {
...
@@ -18,12 +18,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Thư viện tài liệu'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/app/(main)/thong-tin-truyen-thong/tin-doanh-nghiep/page.tsx
View file @
a7f86fcb
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
...
@@ -5,7 +5,7 @@ import { MEDIA_INFORMATION_CATEGORIES } from "@constants/categories";
// ...existing code...
// ...existing code...
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
ListFilter
from
"@app/dai-dien-gioi-chu/components/list-filter"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -18,12 +18,12 @@ export default function Page() {
...
@@ -18,12 +18,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin doanh nghiệp'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/app/(main)/thong-tin-truyen-thong/tin-kinh-te/page.tsx
View file @
a7f86fcb
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
...
@@ -4,7 +4,7 @@ import ListCategory from "@app/dai-dien-gioi-chu/components/list-category";
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
import
{
MEDIA_INFORMATION_CATEGORIES
}
from
"@constants/categories"
;
// ...existing code...
// ...existing code...
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
NewsContent
from
"@app/dai-dien-gioi-chu/components/card-news"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
{
Pagination
}
from
"@components/base/pagination"
;
import
Image
from
"next/image"
;
import
Image
from
"next/image"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
useGetNews
}
from
"@api/endpoints/news"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
import
{
GetNewsResponseType
}
from
"@api/types/NewsPage.type"
;
...
@@ -17,12 +17,12 @@ export default function Page() {
...
@@ -17,12 +17,12 @@ export default function Page() {
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
const
{
data
:
allData
}
=
useGetNews
<
GetNewsResponseType
>
({
pageSize
:
String
(
pageSize
),
pageSize
:
String
(
pageSize
),
currentPage
:
String
(
page
),
currentPage
:
String
(
page
),
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
undefined
,
filters
:
submitSearch
?
`title @=
${
submitSearch
}
`
:
'category @=Tin kinh tế'
,
});
});
return
(
return
(
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"min-h-screen container mx-auto p-4"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
div
className=
"w-full flex flex-col gap-5"
>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
ListCategory
categories=
{
MEDIA_INFORMATION_CATEGORIES
}
/>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
<
div
className=
"grid grid-cols-1 lg:grid-cols-3 gap-6"
>
{
/* Main content */
}
{
/* Main content */
}
...
...
src/components/shared/editor-content/AppEditorContent.tsx
View file @
a7f86fcb
...
@@ -4,24 +4,47 @@ import { AppEditorContentProps } from './AppEditorContent.type';
...
@@ -4,24 +4,47 @@ import { AppEditorContentProps } from './AppEditorContent.type';
import
'./AppEditorContent.css'
;
import
'./AppEditorContent.css'
;
const
AppEditorContent
:
FC
<
AppEditorContentProps
>
=
({
value
=
''
,
className
=
''
})
=>
{
const
AppEditorContent
:
FC
<
AppEditorContentProps
>
=
({
value
=
''
,
className
=
''
})
=>
{
const
transform
=
(
node
:
DOMNode
):
JSX
.
Element
|
null
=>
{
const
transform
=
(
node
:
DOMNode
):
JSX
.
Element
|
string
|
undefined
|
null
=>
{
if
(
node
instanceof
Element
&&
node
.
tagName
===
'strong'
)
{
// 1. Xử lý Text Node
if
(
node
instanceof
Text
)
{
return
node
.
data
;
}
if
(
!
(
node
instanceof
Element
))
return
undefined
;
const
tagName
=
node
.
tagName
.
toLowerCase
();
// ✅ FIX LỖI: Ép kiểu (as DOMNode) để Type 'ChildNode' khớp với 'DOMNode'
const
children
=
node
.
children
?
node
.
children
.
map
(
child
=>
transform
(
child
as
DOMNode
))
:
[];
// --- LOGIC XỬ LÝ THEO YÊU CẦU ---
// 2. ✅ Xóa thẻ <img>
if
(
tagName
===
'img'
)
{
return
<></>;
}
// 3. ✅ Xóa thẻ <a> nhưng giữ lại nội dung
if
(
tagName
===
'a'
)
{
// Trả về children đã được xử lý (làm phẳng thẻ <a>)
return
<>
{
children
}
</>;
}
// 4. ✅ Xử lý thẻ <strong>
if
(
tagName
===
'strong'
)
{
return
(
return
(
<
strong
className=
"custom-strong"
>
<
strong
className=
"custom-strong"
>
{
node
.
children
&&
Array
.
isArray
(
node
.
children
)
{
children
}
?
node
.
children
.
map
((
child
,
index
)
=>
{
if
(
typeof
child
===
'string'
)
{
return
child
;
}
else
if
(
child
instanceof
Text
)
{
return
child
.
data
;
}
return
null
;
})
:
null
}
</
strong
>
</
strong
>
);
);
}
}
return
null
;
// 5. ✅ Render các thẻ HTML khác (Fallback)
// Trả về undefined để thư viện tự động render các thẻ còn lại (p, div, br,...)
return
undefined
;
};
};
return
(
return
(
...
@@ -31,4 +54,4 @@ const AppEditorContent: FC<AppEditorContentProps> = ({ value = '', className = '
...
@@ -31,4 +54,4 @@ const AppEditorContent: FC<AppEditorContentProps> = ({ value = '', className = '
);
);
};
};
export
default
AppEditorContent
;
export
default
AppEditorContent
;
\ 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