upd: kataloh

Deskripsi:
- api di katalog

No Issues
This commit is contained in:
amel
2024-12-06 11:44:48 +08:00
parent 8429b0c704
commit ea491231a8
6 changed files with 187 additions and 30 deletions

View File

@@ -1,31 +1,24 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { KatalogLayout } from "@/app_modules/katalog/main";
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
import { LayoutKatalogNew } from "@/app_modules/katalog/main";
export default async function Layout({
children,
params,
}: {
children: any;
params: { id: string };
}) {
const profileId = params.id;
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
const authorId = dataProfile?.userId;
export default async function Layout({ children, params, }: { children: any; params: { id: string } }) {
// const profileId = params.id;
// const dataProfile = await Profile_getOneProfileAndUserById(profileId);
// const authorId = dataProfile?.userId;
const userLoginId = await funGetUserIdByToken();
const userRoleId = dataProfile?.User?.masterUserRoleId;
// const userLoginId = await funGetUserIdByToken();
// const userRoleId = dataProfile?.User?.masterUserRoleId;
return (
<>
<KatalogLayout
{/* <KatalogLayout
profileId={profileId}
userLoginId={userLoginId as string}
authorId={authorId as any}
userRoleId={userRoleId as string}
>
{children}
</KatalogLayout>
</KatalogLayout> */}
<LayoutKatalogNew>{children}</LayoutKatalogNew>
</>
);
}

View File

@@ -1,14 +1,11 @@
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
import { Katalog_MainView, ViewKatalogNew } from "@/app_modules/katalog";
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio";
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
import { ViewKatalogNew } from "@/app_modules/katalog";
export default async function Page({ params }: { params: { id: string } }) {
let profileId = params.id;
const userLoginId = await funGetUserIdByToken();
// let profileId = params.id;
// const userLoginId = await funGetUserIdByToken();
const listPorto = await funGetListPortofolio(profileId);
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
// const listPorto = await funGetListPortofolio(profileId);
// const dataProfile = await Profile_getOneProfileAndUserById(profileId);
return (
<>