## feat
- Tampilan forum
- Tampilan forumku
- Tampilan komentar
- Tampilam posting
- Tampilan Detail posting
- Tampilan Edit postinf
- Tampilan edit komentat
- Tampilan report posting
- Tampilan report komentar
### No issuee
This commit is contained in:
2024-03-07 12:20:22 +08:00
parent a3f507169a
commit 629fd601d4
67 changed files with 2110 additions and 79 deletions

View File

@@ -1,9 +1,9 @@
import ComponentGlobal_LoadingPage from "@/app_modules/component_global/loading_page";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_LoadingPage height="100%"/>
</>
);
}
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -1,9 +1,9 @@
import ComponentGlobal_LoadingPage from "@/app_modules/component_global/loading_page";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_LoadingPage height="100vh"/>
</>
);
}
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -0,0 +1,14 @@
import { LayoutForum_Create } from "@/app_modules/forum";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutForum_Create>{children}</LayoutForum_Create>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Forum_Create } from "@/app_modules/forum";
export default async function Page() {
return (
<>
<Forum_Create />
</>
);
}

View File

@@ -0,0 +1,14 @@
import LayoutForum_Detail from "@/app_modules/forum/detail/layout";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutForum_Detail>{children}</LayoutForum_Detail>
</>
);
}

View File

@@ -0,0 +1,9 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -0,0 +1,11 @@
import Forum_Detail from "@/app_modules/forum/detail";
export default async function Page({params}: {params: {id: string}}) {
let forumId = params.id
return (
<>
<Forum_Detail forumId={forumId} />
</>
);
}

View File

@@ -0,0 +1,14 @@
import { LaoyoutForum_EditKomentar } from "@/app_modules/forum";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LaoyoutForum_EditKomentar>{children}</LaoyoutForum_EditKomentar>
</>
);
}

View File

@@ -0,0 +1,10 @@
import { Forum_EditKomentar } from "@/app_modules/forum";
export default async function Page({ params }: { params: { id: string } }) {
let komentarId = params.id;
return (
<>
<Forum_EditKomentar />
</>
);
}

View File

@@ -0,0 +1,15 @@
import { LayoutForum_EditPosting } from "@/app_modules/forum";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutForum_EditPosting>{children}</LayoutForum_EditPosting>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Forum_EditPosting } from "@/app_modules/forum";
export default async function Page() {
return (
<>
<Forum_EditPosting />
</>
);
}

View File

@@ -0,0 +1,21 @@
import { LayoutForum_Forumku } from "@/app_modules/forum";
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
const authorId = await User_getUserId();
const dataAuthor = await user_getOneById(authorId);
return (
<>
<LayoutForum_Forumku username={dataAuthor?.username as any}>
{children}
</LayoutForum_Forumku>
</>
);
}

View File

@@ -0,0 +1,9 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -0,0 +1,29 @@
import { Forum_Forumku } from "@/app_modules/forum";
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import _ from "lodash";
export default async function Page({ params }: { params: { id: string } }) {
const authorId = params.id;
const dataAuthor = await user_getOneById(authorId);
const auhtorSelectedData = _.omit(dataAuthor, [
"Profile.email",
"Profile.alamat",
"Profile.jenisKelamin",
"Profile.createdAt",
"Profile.updatedAt",
"Profile.imagesBackgroundId",
]);
// console.log(dataAuthor)
// console.log(auhtorSelectedData)
// await new Promise((a, b) => {
// setTimeout(a, 1000);
// });
return (
<>
<Forum_Forumku auhtorSelectedData={auhtorSelectedData as any} />
</>
);
}

View File

@@ -0,0 +1,8 @@
import { LayoutForum_Komentar } from "@/app_modules/forum";
import React from "react";
export default async function Layout({children}: {children: React.ReactNode}) {
return<>
<LayoutForum_Komentar>{children}</LayoutForum_Komentar>
</>
}

View File

@@ -0,0 +1,12 @@
import { Forum_Komentar } from "@/app_modules/forum";
export default async function Page({params}: {params: {id: string}}) {
let forumId = params.id
return (
<>
<Forum_Komentar forumId={forumId} />
</>
);
}

View File

@@ -0,0 +1,19 @@
import { LayoutForum_Main } from "@/app_modules/forum";
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
const authorId = await User_getUserId();
const dataAuthor = await user_getOneById(authorId);
return (
<>
<LayoutForum_Main dataAuthor={dataAuthor as any}>{children}</LayoutForum_Main>
</>
);
}

View File

@@ -0,0 +1,9 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage/>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Forum_Beranda } from "@/app_modules/forum";
export default async function Page() {
return (
<>
<Forum_Beranda />
</>
);
}

View File

@@ -0,0 +1,14 @@
import { LayoutForum_ReportKomentar } from "@/app_modules/forum";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutForum_ReportKomentar>{children}</LayoutForum_ReportKomentar>
</>
);
}

View File

@@ -0,0 +1,9 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -0,0 +1,8 @@
import { Forum_ReportKomentar } from "@/app_modules/forum";
export default async function Page({params}: {params: {id: string}}) {
let komentarId = params.id
return<>
<Forum_ReportKomentar id={komentarId}/>
</>
}

View File

@@ -0,0 +1,15 @@
import { LayoutForum_ReportPosting } from "@/app_modules/forum";
import React from "react";
export default async function Layout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<LayoutForum_ReportPosting>{children}</LayoutForum_ReportPosting>
</>
);
}

View File

@@ -0,0 +1,9 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -0,0 +1,11 @@
import { Forum_ReportPosting } from "@/app_modules/forum";
export default async function Page({ params }: { params: { id: string } }) {
let id = params.id;
return (
<>
<Forum_ReportPosting id={id} />
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Forum_Splash } from "@/app_modules/forum";
export default async function Page() {
return (
<>
<Forum_Splash />
</>
);
}

View File

@@ -1,11 +1,11 @@
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { HomeLayout } from "@/app_modules/home";
import { User_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import { redirect } from "next/navigation";
export default async function Layout({ children }: { children: any }) {
const userId = await User_getUserId();
const dataUser = await User_getOneById(userId);
const dataUser = await user_getOneById(userId);
return (
<>

View File

@@ -1,9 +1,9 @@
import ComponentGlobal_LoadingPage from "@/app_modules/component_global/loading_page";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_LoadingPage height="100%"/>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -3,11 +3,11 @@ import { cookies } from "next/headers";
import { unsealData } from "iron-session";
import _ from "lodash";
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { User_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
export default async function Page() {
const userId = await User_getUserId();
const dataUser = await User_getOneById(userId);
const dataUser = await user_getOneById(userId);
// await new Promise((a, b) => {
// setTimeout(a, 1000);
// });

View File

@@ -1,10 +1,9 @@
import ComponentGlobal_LoadingPage from "@/app_modules/component_global/loading_page";
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_LoadingPage height="100%" />
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -12,13 +12,13 @@ import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/g
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
import { User_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
export default async function Page({ params }: { params: { id: string } }) {
let profileId = params.id;
const authorId = await User_getUserId();
const dataUser = await User_getOneById(authorId)
const dataUser = await user_getOneById(authorId)
const listPorto = await funGetListPortofolio(profileId);
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
// console.log(dataProfile)