feat: update menus, add welcome menu, fix login

This commit is contained in:
hanif salafi 2025-01-01 23:18:40 +07:00
parent e6adcd13a4
commit ef8f37a7e0
6 changed files with 2034 additions and 1283 deletions

View File

@ -0,0 +1,9 @@
export const metadata = {
title: "Welcome to Media Hub",
};
const Layout = ({ children }: { children: React.ReactNode }) => {
return <>{children}</>;
};
export default Layout;

View File

@ -0,0 +1,17 @@
import SiteBreadcrumb from "@/components/site-breadcrumb";
import ContentProductionVisualization from "@/components/visualization/content-production";
import Image from "next/image";
export default function ContentProduction() {
return (
<div className="flex justify-center items-center">
<Image
className="w-auto h-[400px]"
width={500}
height={300}
src="/assets/img/welcome.png"
alt="mail"
/>
</div>
);
}

View File

@ -53,7 +53,7 @@ const Login = ({ params: { locale } }: { params: { locale: string } }) => {
</div> </div>
<div className="text-left 2xl:mb-10 mb-4 mt-10"> <div className="text-left 2xl:mb-10 mb-4 mt-10">
<h4 className="font-semibold text-3xl text-left"> <h4 className="font-semibold text-3xl text-left">
Silahkan Masuk Ke akun anda terlebih dahulu Silahkan masuk ke akun Anda terlebih dahulu
</h4> </h4>
<div className="text-default-500 text-base"> <div className="text-default-500 text-base">
Belum punya akun?{" "} Belum punya akun?{" "}

View File

@ -107,7 +107,7 @@ const LoginForm = () => {
setCookiesEncrypt("ulie", profile.data.data?.userLevel?.id, { setCookiesEncrypt("ulie", profile.data.data?.userLevel?.id, {
expires: 1, expires: 1,
}); });
setCookiesEncrypt("ulplie", profile.data.data?.userLevel?.parentLevelId, { setCookiesEncrypt("uplie", profile.data.data?.userLevel?.parentLevelId, {
expires: 1, expires: 1,
}); });
setCookiesEncrypt("ulne", profile.data.data?.userLevel?.levelNumber, { setCookiesEncrypt("ulne", profile.data.data?.userLevel?.levelNumber, {
@ -133,13 +133,13 @@ const LoginForm = () => {
Number(profile.data.data?.roleId) == 12 Number(profile.data.data?.roleId) == 12
) { ) {
if (profile.data.data?.userLevel?.id == 761 || profile.data.data?.userLevel?.parentLevelId == 761) { if (profile.data.data?.userLevel?.id == 761 || profile.data.data?.userLevel?.parentLevelId == 761) {
window.location.href = "/admin/welcome"; window.location.href = "/in/welcome";
// router.push('/admin/dashboard'); // router.push('/admin/dashboard');
Cookies.set("status", "login", { Cookies.set("status", "login", {
expires: 1, expires: 1,
}); });
} else { } else {
window.location.href = "/en/dashboard"; window.location.href = "/in/dashboard";
// router.push('/admin/dashboard'); // router.push('/admin/dashboard');
Cookies.set("status", "login", { Cookies.set("status", "login", {
expires: 1, expires: 1,

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB