diff --git a/api.ts b/api.ts
index 9e169e2..4ab55ed 100644
--- a/api.ts
+++ b/api.ts
@@ -12,6 +12,8 @@ export const API = {
Media:{
PRESIGNED: `${API_URL_ROOT}/media/presigned`,
GET_MEDIA_BY_ID: (Id: number | string) => `${API_URL_ROOT}/media/${Id}`,
+ DELETE_MEDIA_BY_ID: (Id: number | string) => `${API_URL_ROOT}/media/${Id}`,
+ DELETE_MEDIA: `${API_URL_ROOT}/media`,
},
Auth : {
LOGOUT: `${API_URL_ROOT}/auth/logout`,
diff --git a/constant.ts b/constant.ts
index d2e48b1..191828f 100644
--- a/constant.ts
+++ b/constant.ts
@@ -1 +1,2 @@
-export const LIMIT_ITEM_TABLE = 5;
\ No newline at end of file
+export const LIMIT_ITEM_TABLE = 5;
+export const INITIAL_LIMIT = 16;
\ No newline at end of file
diff --git a/src/app/(admin)/(others-pages)/(forms)/role-upgrade/page.tsx b/src/app/(admin)/(others-pages)/(forms)/role-upgrade/page.tsx
index f299f93..17d360e 100644
--- a/src/app/(admin)/(others-pages)/(forms)/role-upgrade/page.tsx
+++ b/src/app/(admin)/(others-pages)/(forms)/role-upgrade/page.tsx
@@ -198,7 +198,7 @@ export default function RoleUpgrade() {
return (
-
+
diff --git a/src/app/(admin)/(others-pages)/(tables)/applications-tables/page.tsx b/src/app/(admin)/(others-pages)/(management)/applications/page.tsx
similarity index 99%
rename from src/app/(admin)/(others-pages)/(tables)/applications-tables/page.tsx
rename to src/app/(admin)/(others-pages)/(management)/applications/page.tsx
index 38a2d8e..8111d2d 100644
--- a/src/app/(admin)/(others-pages)/(tables)/applications-tables/page.tsx
+++ b/src/app/(admin)/(others-pages)/(management)/applications/page.tsx
@@ -218,7 +218,6 @@ export default function HistorianApplicationPage() {
}
>
- {/* Cập nhật Grid để chứa đủ các ô filter */}
diff --git a/src/app/(admin)/(others-pages)/(tables)/basic-tables/page.tsx b/src/app/(admin)/(others-pages)/(management)/basic-tables/page.tsx
similarity index 100%
rename from src/app/(admin)/(others-pages)/(tables)/basic-tables/page.tsx
rename to src/app/(admin)/(others-pages)/(management)/basic-tables/page.tsx
diff --git a/src/app/(admin)/(others-pages)/(tables)/user-table/page.tsx b/src/app/(admin)/(others-pages)/(management)/user-information/page.tsx
similarity index 100%
rename from src/app/(admin)/(others-pages)/(tables)/user-table/page.tsx
rename to src/app/(admin)/(others-pages)/(management)/user-information/page.tsx
diff --git a/src/app/(admin)/(others-pages)/profile/applications/page.tsx b/src/app/(admin)/(others-pages)/account/applications/page.tsx
similarity index 100%
rename from src/app/(admin)/(others-pages)/profile/applications/page.tsx
rename to src/app/(admin)/(others-pages)/account/applications/page.tsx
diff --git a/src/app/(admin)/(others-pages)/profile/page.tsx b/src/app/(admin)/(others-pages)/account/page.tsx
similarity index 63%
rename from src/app/(admin)/(others-pages)/profile/page.tsx
rename to src/app/(admin)/(others-pages)/account/page.tsx
index 55896f9..8b2c08a 100644
--- a/src/app/(admin)/(others-pages)/profile/page.tsx
+++ b/src/app/(admin)/(others-pages)/account/page.tsx
@@ -1,22 +1,16 @@
"use client";
import AccountDetails from "@/components/user-profile/AccountDetails";
-import ApplicationList from "@/components/user-profile/ApplicationList";
-import MediaCard from "@/components/user-profile/Media";
import UserInfoCard from "@/components/user-profile/UserInfoCard";
import UserMetaCard from "@/components/user-profile/UserMetaCard";
-import { MediaDto } from "@/interface/media";
import { UserMetaCardProps } from "@/interface/user";
import { apiGetCurrentUser } from "@/service/auth";
-import { apiGetCurrentUserApplications, apiGetCurrentUserMedia } from "@/service/userService";
import { setUserData } from "@/store/features/userSlice";
import { useEffect, useState } from "react";
import { useDispatch } from "react-redux";
export default function Profile() {
const [user, setUser] = useState(null);
- const [mediaData, setMediaData] = useState(null);
- const [applications, setApplications] = useState([]);
const [loading, setLoading] = useState(true);
const dispatch = useDispatch();
@@ -24,17 +18,7 @@ export default function Profile() {
const fetchUser = async () => {
try {
const userData = await apiGetCurrentUser();
- const mediaResponse = await apiGetCurrentUserMedia();
- const userApplications = await apiGetCurrentUserApplications();
-
- console.log("user", userData);
-
- if (userApplications?.data) {
- setApplications(userApplications.data);
- }
dispatch(setUserData(userData.data));
-
- setMediaData(mediaResponse);
setUser(userData);
} catch (err) {
console.error("Lỗi:", err);
@@ -54,8 +38,6 @@ export default function Profile() {
- {(mediaData?.data?.length ?? 0) > 0 && }
-
diff --git a/src/app/(admin)/(others-pages)/assets/page.tsx b/src/app/(admin)/(others-pages)/assets/page.tsx
new file mode 100644
index 0000000..db41437
--- /dev/null
+++ b/src/app/(admin)/(others-pages)/assets/page.tsx
@@ -0,0 +1,5 @@
+export default function Page() {
+ return (
+