) => {
+ const value = e.target.value;
+ setLocation(value);
+ setValue("location", value);
+ };
+
const save = async (data: TaskSchema) => {
const requestData: {
id?: number;
@@ -123,19 +131,18 @@ export default function FormUpdatePressConference() {
address: data.location,
speakerTitle: data.level,
speakerName: data.name,
- startTime, // Start time from state
- endTime, // End time from state
- addressLat: "0.0", // Replace with actual latitude
- addressLong: "0.0", // Replace with actual longitude
+ startTime,
+ endTime,
+ addressLat: "0.0",
+ addressLong: "0.0",
startDate: date?.from ? format(date.from, "yyyy-MM-dd") : null,
endDate: date?.to ? format(date.to, "yyyy-MM-dd") : null,
isYoutube: isLiveStreamingEnabled,
scheduleTypeId: 1,
};
- // Add id property if it exists
if (id) {
- requestData.id = parseInt(id, 10); // Ensure id is a number
+ requestData.id = parseInt(id, 10);
}
console.log("Form Data Submitted:", requestData);
@@ -309,10 +316,12 @@ export default function FormUpdatePressConference() {
- {/* Kirim setValue ke MapHome */}
setValue("location", location)}
+ setLocation={(location) => {
+ setLocation(location);
+ setValue("location", location);
+ }}
/>
@@ -322,8 +331,8 @@ export default function FormUpdatePressConference() {
render={({ field }) => (
)}
diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx
index 90419abf..e0fdcb0e 100644
--- a/components/landing-page/navbar.tsx
+++ b/components/landing-page/navbar.tsx
@@ -6,11 +6,42 @@ import { FiFile, FiImage, FiMusic, FiYoutube } from "react-icons/fi";
import { useParams, usePathname, useRouter } from "next/navigation";
import { generateLocalizedPath } from "@/utils/globals";
import { Link } from "@/i18n/routing";
-import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, navigationMenuTriggerStyle } from "@/components/ui/navigation-menu";
-import { getCookiesDecrypt } from "@/lib/utils";
-import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
+import {
+ NavigationMenu,
+ NavigationMenuContent,
+ NavigationMenuItem,
+ NavigationMenuLink,
+ NavigationMenuList,
+ NavigationMenuTrigger,
+ navigationMenuTriggerStyle,
+} from "@/components/ui/navigation-menu";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "../ui/dropdown-menu";
import Image from "next/image";
-import { Icon } from "@iconify/react/dist/iconify.js";
+import { Icon } from "../ui/icon";
+import { getCookiesDecrypt } from "@/lib/utils";
+import Cookies from "js-cookie";
+import { getInfoProfile } from "@/service/auth";
+
+type Detail = {
+ id: number;
+ userId: any;
+ firstName: string;
+ username: string;
+ fullname: string;
+ memberIdentity: any;
+ email: string;
+ address: string;
+ phoneNumber: any;
+ message: string;
+};
+const roleName = getCookiesDecrypt("urne");
const Navbar = () => {
const [menuOpen, setMenuOpen] = useState(false);
@@ -20,6 +51,18 @@ const Navbar = () => {
const locale = params?.locale;
const [language, setLanguage] = useState<"id" | "en">("id");
const [isOpen, setIsOpen] = useState(false);
+ const fullname = getCookiesDecrypt("ufne");
+ const levelName = getCookiesDecrypt("ulnae");
+ const roleId = getCookiesDecrypt("urie");
+ const [detail, setDetail] = useState
();
+
+ const onLogout = () => {
+ Object.keys(Cookies.get()).forEach((cookieName) => {
+ Cookies.remove(cookieName);
+ });
+
+ router.push("/");
+ };
// const profilePicture = Cookies.get("profile_picture");
const fullName = getCookiesDecrypt("ufne");
@@ -38,24 +81,58 @@ const Navbar = () => {
// Render
if (!hasMounted) return null;
+ useEffect(() => {
+ async function initState() {
+ const response = await getInfoProfile();
+ const details = response.data?.data;
+
+ setDetail(details);
+ console.log("data", details);
+ }
+
+ initState();
+ }, []);
return (
{/* Logo */}
-

+

{/* Mobile Menu Toggle */}
-
@@ -248,7 +589,14 @@ const Navbar = () => {
-
+
{
- router.push(generateLocalizedPath("/video/filter", String(locale)))} className="flex items-start gap-1.5 p-2 hover:bg-white">
+
+ router.push(
+ generateLocalizedPath("/video/filter", String(locale))
+ )
+ }
+ className="flex items-start gap-1.5 p-2 hover:bg-white"
+ >
Video
- router.push(generateLocalizedPath("/audio/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white">
+
+ router.push(
+ generateLocalizedPath("/audio/filter", String(locale))
+ )
+ }
+ className="flex place-items-start gap-1.5 p-2 hover:bg-white"
+ >
Audio
- router.push(generateLocalizedPath("/image/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white">
+
+ router.push(
+ generateLocalizedPath("/image/filter", String(locale))
+ )
+ }
+ className="flex place-items-start gap-1.5 p-2 hover:bg-white"
+ >
Foto
- router.push(generateLocalizedPath("/document/filter", String(locale)))} className="flex place-items-start gap-1.5 p-2 hover:bg-white">
+
+ router.push(
+ generateLocalizedPath(
+ "/document/filter",
+ String(locale)
+ )
+ )
+ }
+ className="flex place-items-start gap-1.5 p-2 hover:bg-white"
+ >
Teks
@@ -288,7 +667,14 @@ const Navbar = () => {
-
+
{
-
+
{
{/* Tombol Utama Bahasa */}
-
setIsOpen(!isOpen)} className="flex items-center space-x-2 p-2 text-gray-700 bg-slate-200 rounded-lg">
+ setIsOpen(!isOpen)}
+ className="flex items-center space-x-2 p-2 text-gray-700 bg-slate-200 rounded-lg"
+ >
{language === "id" ? "Ind" : "Eng"}
-
-
+
+
@@ -347,12 +758,30 @@ const Navbar = () => {
{/* Dropdown Menu */}
{isOpen && (
@@ -361,7 +790,11 @@ const Navbar = () => {
-
+
{fullName ? (
@@ -376,6 +809,18 @@ const Navbar = () => {
{" "}
>
)}
+
+ Masuk
+
+
+ Daftar
+
)}
diff --git a/components/partials/header/index.tsx b/components/partials/header/index.tsx
index 7ad108a1..f63ec322 100644
--- a/components/partials/header/index.tsx
+++ b/components/partials/header/index.tsx
@@ -1,4 +1,4 @@
-"use client"
+"use client";
import React from "react";
import HeaderContent from "./header-content";
@@ -26,8 +26,8 @@ const DashCodeHeader = () => {
-
-
+ {/*
+
*/}
diff --git a/components/partials/header/notifications.tsx b/components/partials/header/notifications.tsx
index d7463054..7252b574 100644
--- a/components/partials/header/notifications.tsx
+++ b/components/partials/header/notifications.tsx
@@ -1,90 +1,168 @@
-
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { ScrollArea } from "@/components/ui/scroll-area";
-import { Link } from '@/i18n/routing';
+import { Link } from "@/i18n/routing";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { cn } from "@/lib/utils";
-import { notifications, type Notification } from "./data";
import shortImage from "@/public/images/all-img/short-image-2.png";
import { Icon } from "@/components/ui/icon";
+import { useEffect, useState } from "react";
+import { getNotifications } from "@/service/notifications/notifications";
+import { format, formatDate } from "date-fns";
+import {
+ CalendarCheck,
+ CheckCheck,
+ CircleAlert,
+ Clock7,
+ MessageCircle,
+ SquareCheck,
+ UploadIcon,
+} from "lucide-react";
+import { useRouter } from "next/navigation";
+
+export type Notification = {
+ id: number;
+ notificationTypeId: number;
+ message: string;
+ createdAt: string;
+ isActive: boolean;
+ isPublic: boolean;
+ isRead: boolean;
+ redirectUrl: string;
+ userGroupIdDst: string | null;
+ userIdDst: string | null;
+ userLevelIdDst: string;
+ userLevelNumberDst: string | null;
+ userRoleIdDst: string;
+};
+
+const getNotificationIcon = (notificationTypeId: number) => {
+ const router = useRouter();
+ switch (notificationTypeId) {
+ case 2:
+ return
;
+ case 3:
+ return
;
+ case 4:
+ return
;
+ case 5:
+ return
;
+ case 6:
+ return
;
+ case 7:
+ return
;
+ case 8:
+ return
;
+ default:
+ return
;
+ }
+};
const Notifications = () => {
- return (
-
-
-
-
-
- 2
-
-
-
-
- ([]);
+ const [notificationTotal, setNotificationTotal] = useState(0);
+ useEffect(() => {
+ async function initState() {
+ const response = await getNotifications();
+ setNotifications(response.data?.data?.content);
+ setNotificationTotal(response.data?.data?.totalElements);
+ console.log("notif", response.data?.data?.content);
+ }
+ initState();
+ }, []);
- >
-
-
- Notifications
-
-
-
- View all
-
-
+ const formatDate = (dateString: string) => {
+ const date = new Date(dateString);
+ return format(date, "dd/MM/yyyy HH:mm");
+ };
+
+ const handleNotificationClick = (redirectUrl: string) => {
+ router.push(redirectUrl);
+ };
+
+ return (
+
+
+
+
+
+ {notificationTotal > 99 ? "99+" : notificationTotal}
+
+
+
+
+
+
+
+ you have {notificationTotal > 99 ? "99+" : notificationTotal}{" "}
+ notifications
+
+
+
+ View all
+
+
+
+
+
+
+ {notifications.map((item: Notification, index: number) => (
+ handleNotificationClick(item?.redirectUrl)}
+ >
+
+
+ {getNotificationIcon(item.notificationTypeId)}
+
+
+
+ {item?.message}
-
-
-
- {notifications.map((item: Notification, index: number) => (
-
-
-
-
-
- {item.title.charAt(0)}
-
-
-
-
- {item.title}
-
-
- {item.desc}
-
-
{item.date}
-
-
- {item.unreadmessage && (
-
-
-
- )}
-
-
- ))}
-
+ {/*
+ {item?.desc}
+
*/}
+
+ {" "}
+ {formatDate(item?.createdAt)}
+
+
-
-
-
- );
+ {/* {item?.unreadmessage && (
+
+
+
+ )} */}
+
+ ))}
+
+
+
+
+ );
};
export default Notifications;
diff --git a/components/partials/header/profile-info.tsx b/components/partials/header/profile-info.tsx
index df1f1108..3c505c78 100644
--- a/components/partials/header/profile-info.tsx
+++ b/components/partials/header/profile-info.tsx
@@ -17,38 +17,82 @@ import Image from "next/image";
import { Link } from "@/i18n/routing";
import { Button } from "@/components/ui/button";
import Cookies from "js-cookie";
-import { useEffect } from "react";
+import { useEffect, useState } from "react";
+import { useRouter } from "@/components/navigation";
+import { getInfoProfile } from "@/service/auth";
+
+type Detail = {
+ id: number;
+ userId: any;
+ firstName: string;
+ username: string;
+ fullname: string;
+ memberIdentity: any;
+ email: string;
+ address: string;
+ phoneNumber: any;
+ message: string;
+};
const ProfileInfo = () => {
const username = Cookies.get("state");
const picture = Cookies.get("profile_picture");
+ const router = useRouter();
+ const [detail, setDetail] = useState();
+
+ const onLogout = () => {
+ Object.keys(Cookies.get()).forEach((cookieName) => {
+ Cookies.remove(cookieName);
+ });
+
+ router.push("/");
+ };
+
useEffect(() => {
console.log("us", username);
}, [username]);
+ useEffect(() => {
+ async function initState() {
+ const response = await getInfoProfile();
+ const details = response.data?.data;
+
+ setDetail(details);
+ console.log("data", details);
+ }
+
+ initState();
+ }, []);
+
return (
-
-
-
-
- {username}
+ {detail !== undefined ? (
+
+
+
+
+ {detail?.fullname}
+
+
({detail?.fullname})
+
+
+
+
-
-
-
-
+ ) : (
+ ""
+ )}
-
+ {/*
{
{username}
-
+ */}
{[
{
- name: "profile",
+ name: "profile & Settings",
icon: "heroicons:user",
- href: "/user-profile",
- },
- {
- name: "Billing",
- icon: "heroicons:megaphone",
- href: "/dashboard",
- },
- {
- name: "Settings",
- icon: "heroicons:paper-airplane",
- href: "/dashboard",
- },
- {
- name: "Keyboard shortcuts",
- icon: "heroicons:language",
- href: "/dashboard",
+ href: "/profile",
},
+ // {
+ // name: "Billing",
+ // icon: "heroicons:megaphone",
+ // href: "/dashboard",
+ // },
+ // {
+ // name: "Settings",
+ // icon: "heroicons:paper-airplane",
+ // href: "/dashboard",
+ // },
+ // {
+ // name: "Keyboard shortcuts",
+ // icon: "heroicons:language",
+ // href: "/dashboard",
+ // },
].map((item, index) => (
{
-
+ {/*
team
@@ -176,25 +220,20 @@ const ProfileInfo = () => {
))}
-
+ */}
-
-
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5a0d0d46..cc6f4b51 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -155,6 +155,9 @@ importers:
'@types/js-cookie':
specifier: ^3.0.6
version: 3.0.6
+ '@types/next':
+ specifier: ^9.0.0
+ version: 9.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@types/qs':
specifier: ^6.9.17
version: 6.9.17
@@ -249,7 +252,7 @@ importers:
specifier: ^2.30.1
version: 2.30.1
next:
- specifier: 14.2.3
+ specifier: ^14.2.3
version: 14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next-intl:
specifier: ^3.19.1
@@ -1848,6 +1851,10 @@ packages:
'@types/ms@0.7.34':
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
+ '@types/next@9.0.0':
+ resolution: {integrity: sha512-gnBXM8rP1mnCgT1uE2z8SnpFTKRWReJlhbZLZkOLq/CH1ifvTNwjIVtXvsywTy1dwVklf+y/MB0Eh6FOa94yrg==}
+ deprecated: This is a stub types definition. next provides its own type definitions, so you do not need this installed.
+
'@types/node@20.17.10':
resolution: {integrity: sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==}
@@ -6656,6 +6663,18 @@ snapshots:
'@types/ms@0.7.34': {}
+ '@types/next@9.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ dependencies:
+ next: 14.2.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ transitivePeerDependencies:
+ - '@babel/core'
+ - '@opentelemetry/api'
+ - '@playwright/test'
+ - babel-plugin-macros
+ - react
+ - react-dom
+ - sass
+
'@types/node@20.17.10':
dependencies:
undici-types: 6.19.8
diff --git a/service/auth.ts b/service/auth.ts
index 56bb84c7..2c01c2e7 100644
--- a/service/auth.ts
+++ b/service/auth.ts
@@ -1,4 +1,10 @@
-import { getAPI, postAPI, postAPIWithJson } from "../config/api";
+import {
+ getAPI,
+ getAPIInterceptor,
+ postAPI,
+ postAPIInterceptor,
+ postAPIWithJson,
+} from "../config/api";
import { getAPIDummy } from "./http-config/axiosCustom";
import {
@@ -16,13 +22,20 @@ export async function getProfile(token: any) {
return getAPI(url, token);
}
-// export async function setLogin(data: any) {
-// const pathUrl = `signin`;
-// const headers = {
-// "content-type": "application/json",
-// };
-// return await httpPost(pathUrl, headers, data);
-// }
+export async function getInfoProfile() {
+ const url = "users/info";
+ return getAPIInterceptor(url);
+}
+
+export async function setupPassword(data: any) {
+ const url = "setup-password";
+ return postAPIInterceptor(url, data);
+}
+
+export async function saveUser(data: any) {
+ const url = "users/save";
+ return postAPIInterceptor(url, data);
+}
export async function userInfo(token: any) {
const pathUrl = `users/info`;
diff --git a/service/content/ai.ts b/service/content/ai.ts
new file mode 100644
index 00000000..f8f8185c
--- /dev/null
+++ b/service/content/ai.ts
@@ -0,0 +1,111 @@
+import { getAPIInterceptor } from "@/config/api";
+import { httpGet, httpPost } from "../http-config/nulisAIApi";
+
+export async function generateDataArticle(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/save-article", headers, data);
+}
+
+export async function getGenerateTitle(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/generate-title", headers, data);
+}
+
+export async function getGenerateKeywords(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/generate-keywords", headers, data);
+}
+
+export async function getDetailArticle(id: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpGet(`ai-writer/article/findArticleById/${id}`, headers);
+}
+
+export async function getSeoScore(id: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpGet(`ai-writer/article/checkSEOScore/${id}`, headers);
+}
+
+export async function updateManualArticle(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/update-article", headers, data);
+}
+
+export async function getGenerateTopicKeywords(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/generate-topic-keywords", headers, data);
+}
+
+export async function saveBulkArticle(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/save-bulk-article", headers, data);
+}
+
+export async function getGenerateRewriter(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/create-rewriter", headers, data);
+}
+
+export async function generateSpeechToText(data: any) {
+ const headers = {
+ "content-type": "multipart/form-data",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/speech-to-text", headers, data);
+}
+
+export async function generateDataBulkArticle(data: any) {
+ const headers = {
+ "content-type": "application/json",
+ Authorization:
+ "Basic bmdETFBQaW9ycGx6bncyalRxVmUzWUZDejV4cUtmVUo6UHJEaERXUmNvdkJSNlc1Sg==",
+ };
+ return await httpPost("ai-writer/save-bulk-article", headers, data);
+}
+
+export async function listNulisAI(page: any, limit: any) {
+ const url = `media/nulis-ai/pagination?enablePage=1&page=${page}&size=${limit}`;
+ return getAPIInterceptor(url);
+}
+
+export async function detailMediaNulis(id: any) {
+ const url = `media/nulis-ai?id=${id}`;
+ return getAPIInterceptor({ url });
+}
diff --git a/service/http-config/axiosNulisAIInstance.ts b/service/http-config/axiosNulisAIInstance.ts
new file mode 100644
index 00000000..a7cf62db
--- /dev/null
+++ b/service/http-config/axiosNulisAIInstance.ts
@@ -0,0 +1,12 @@
+import axios from "axios";
+
+const baseURL = "https://disestages.com/api";
+
+const axiosNulisAIInstance = axios.create({
+ baseURL,
+ headers: {
+ "content-type": "application/json",
+ },
+});
+
+export default axiosNulisAIInstance;
diff --git a/service/http-config/nulisAIApi.ts b/service/http-config/nulisAIApi.ts
new file mode 100644
index 00000000..7963ed61
--- /dev/null
+++ b/service/http-config/nulisAIApi.ts
@@ -0,0 +1,47 @@
+import axiosNulisAIInstance from "./axiosNulisAIInstance";
+
+export async function httpPost(pathUrl: any, headers: any, data: any) {
+ const response = await axiosNulisAIInstance
+ .post(pathUrl, data, { headers })
+ .catch(function (error: any) {
+ console.log(error);
+ return error.response;
+ });
+ console.log("Response base svc : ", response);
+ if (response?.status == 200 || response?.status == 201) {
+ return {
+ error: false,
+ message: "success",
+ data: response?.data,
+ };
+ } else {
+ return {
+ error: true,
+ message: response?.data?.message || response?.data || null,
+ data: null,
+ };
+ }
+}
+
+export async function httpGet(pathUrl: any, headers: any) {
+ const response = await axiosNulisAIInstance
+ .get(pathUrl, { headers })
+ .catch(function (error: any) {
+ console.log(error);
+ return error.response;
+ });
+ console.log("Response base svc : ", response);
+ if (response?.status == 200 || response?.status == 201) {
+ return {
+ error: false,
+ message: "success",
+ data: response?.data,
+ };
+ } else {
+ return {
+ error: true,
+ message: response?.data?.message || response?.data || null,
+ data: null,
+ };
+ }
+}
diff --git a/service/notifications/notifications.ts b/service/notifications/notifications.ts
new file mode 100644
index 00000000..83ad0c9b
--- /dev/null
+++ b/service/notifications/notifications.ts
@@ -0,0 +1,6 @@
+import { getAPIInterceptor } from "@/config/api";
+
+export async function getNotifications(page = 0, pageSize = 10) {
+ const url = `notification/list?enablePage=1&page=${page}&pageSize=${pageSize}`;
+ return getAPIInterceptor(url);
+}