diff --git a/package.json b/package.json index 64834c2b..9a4824a7 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,18 @@ "@mantine/hooks": "^6.0.17", "@mantine/next": "^6.0.17", "@mantine/notifications": "^6.0.17", + "@mantine/tiptap": "^7.5.3", "@prisma/client": "^5.0.0", "@tabler/icons-react": "^2.38.0", + "@tiptap/extension-highlight": "^2.2.3", + "@tiptap/extension-link": "^2.2.3", + "@tiptap/extension-subscript": "^2.2.3", + "@tiptap/extension-superscript": "^2.2.3", + "@tiptap/extension-text-align": "^2.2.3", + "@tiptap/extension-underline": "^2.2.3", + "@tiptap/pm": "^2.2.3", + "@tiptap/react": "^2.2.3", + "@tiptap/starter-kit": "^2.2.3", "@types/lodash": "^4.14.199", "@types/node": "20.4.5", "@types/react": "18.2.17", @@ -42,6 +52,8 @@ "react": "18.2.0", "react-countdown": "^2.3.5", "react-dom": "18.2.0", + "react-fast-marquee": "^1.6.4", + "react-quill": "^2.0.0", "react-responsive-carousel": "^3.2.23", "react-simple-toasts": "^5.10.0", "react-toastify": "^9.1.3", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ae572e78..cff18aa3 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -2,7 +2,8 @@ // learn more about it in the docs: https://pris.ly/d/prisma-schema generator client { - provider = "prisma-client-js" + provider = "prisma-client-js" + engineType = "binary" } datasource db { @@ -28,6 +29,9 @@ model User { Donasi_Notif Donasi_Notif[] Event Event[] Event_Peserta Event_Peserta[] + Voting Voting[] + Voting_Kontributor Voting_Kontributor[] + Job Job[] } model MasterUserRole { @@ -85,6 +89,7 @@ model Images { Donasi_PencairanDana Donasi_PencairanDana[] Donasi_Invoice Donasi_Invoice[] Portofolio Portofolio[] + Job Job[] } model ImagesBackground { @@ -138,6 +143,15 @@ model MasterBidangBisnis { Portofolio Portofolio[] } +model MasterStatus { + id String @id @default(cuid()) + name String + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Job Job[] +} + // -------------------- INVESTASI --------------------- // // Table investasi / saham model Investasi { @@ -532,3 +546,82 @@ model Event_Peserta { User User? @relation(fields: [userId], references: [id]) userId String? } + +// ========================================= VOTING ========================================= // + +model Voting { + id String @id @default(cuid()) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + title String + deskripsi String + awalVote DateTime + akhirVote DateTime + catatan String? + + Author User @relation(fields: [authorId], references: [id]) + authorId String + Voting_Status Voting_Status? @relation(fields: [voting_StatusId], references: [id]) + voting_StatusId String? @default("2") + Voting_DaftarNamaVote Voting_DaftarNamaVote[] + Voting_Kontributor Voting_Kontributor[] +} + +model Voting_Status { + id String @id @default(cuid()) + name String + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Voting Voting[] +} + +model Voting_DaftarNamaVote { + id String @id @default(cuid()) + value String + jumlah Int @default(0) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + Voting Voting? @relation(fields: [votingId], references: [id]) + votingId String? + Voting_Kontributor Voting_Kontributor[] +} + +model Voting_Kontributor { + id String @id @default(cuid()) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + Voting Voting? @relation(fields: [votingId], references: [id]) + votingId String? + Author User? @relation(fields: [authorId], references: [id]) + authorId String? + Voting_DaftarNamaVote Voting_DaftarNamaVote? @relation(fields: [voting_DaftarNamaVoteId], references: [id]) + voting_DaftarNamaVoteId String? +} + +// ========================================= JOB ========================================= // + +model Job { + id String @id @default(cuid()) + isActive Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + isArsip Boolean @default(false) + catatan String? + + title String + content String @db.Text + deskripsi String @db.Text + Images Images? @relation(fields: [imagesId], references: [id]) + imagesId String? + Author User? @relation(fields: [authorId], references: [id]) + authorId String? + MasterStatus MasterStatus? @relation(fields: [masterStatusId], references: [id]) + masterStatusId String? @default("2") +} diff --git a/public/aset/Hipmi Business Map.png b/public/aset/Hipmi Business Map.png new file mode 100644 index 00000000..9e61fee7 Binary files /dev/null and b/public/aset/Hipmi Business Map.png differ diff --git a/public/aset/Hipmi Project Collaboration.png b/public/aset/Hipmi Project Collaboration.png new file mode 100644 index 00000000..90c4f0f6 Binary files /dev/null and b/public/aset/Hipmi Project Collaboration.png differ diff --git a/public/aset/global/no-file.png b/public/aset/global/no-file.png new file mode 100644 index 00000000..da332135 Binary files /dev/null and b/public/aset/global/no-file.png differ diff --git a/public/aset/job/logo.png b/public/aset/job/logo.png new file mode 100644 index 00000000..e42c374b Binary files /dev/null and b/public/aset/job/logo.png differ diff --git a/public/aset/vote/logo.png b/public/aset/vote/logo.png new file mode 100644 index 00000000..a5e7f056 Binary files /dev/null and b/public/aset/vote/logo.png differ diff --git a/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf b/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf deleted file mode 100644 index 92b2f709..00000000 Binary files a/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf and /dev/null differ diff --git a/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf b/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf deleted file mode 100644 index 326da9f2..00000000 Binary files a/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf and /dev/null differ diff --git a/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf b/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf deleted file mode 100644 index ab4bd256..00000000 Binary files a/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf and /dev/null differ diff --git a/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf b/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf deleted file mode 100644 index 24d01eeb..00000000 Binary files a/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf and /dev/null differ diff --git a/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf b/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf deleted file mode 100644 index 92b2f709..00000000 Binary files a/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf and /dev/null differ diff --git a/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf b/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf deleted file mode 100644 index 92b2f709..00000000 Binary files a/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf and /dev/null differ diff --git a/public/job/35733aba-3d3c-4353-84c3-ea8fd9a9cc85.png b/public/job/35733aba-3d3c-4353-84c3-ea8fd9a9cc85.png new file mode 100644 index 00000000..40c04cfd Binary files /dev/null and b/public/job/35733aba-3d3c-4353-84c3-ea8fd9a9cc85.png differ diff --git a/public/job/38d9e62f-8364-45d7-a683-0883e56618fe.png b/public/job/38d9e62f-8364-45d7-a683-0883e56618fe.png new file mode 100644 index 00000000..40c04cfd Binary files /dev/null and b/public/job/38d9e62f-8364-45d7-a683-0883e56618fe.png differ diff --git a/public/job/497395d9-6986-4d77-9f4d-2272b95e1f6f.png b/public/job/497395d9-6986-4d77-9f4d-2272b95e1f6f.png new file mode 100644 index 00000000..40c04cfd Binary files /dev/null and b/public/job/497395d9-6986-4d77-9f4d-2272b95e1f6f.png differ diff --git a/public/job/5232ae23-c04c-4140-a1d2-ed3cd1377d13.jpg b/public/job/5232ae23-c04c-4140-a1d2-ed3cd1377d13.jpg new file mode 100644 index 00000000..4204a23e Binary files /dev/null and b/public/job/5232ae23-c04c-4140-a1d2-ed3cd1377d13.jpg differ diff --git a/public/job/6ac4c417-2362-4f40-b74e-67cd816f18e7.jpg b/public/job/6ac4c417-2362-4f40-b74e-67cd816f18e7.jpg new file mode 100644 index 00000000..f1447727 Binary files /dev/null and b/public/job/6ac4c417-2362-4f40-b74e-67cd816f18e7.jpg differ diff --git a/public/job/7d8ff008-d3a8-4039-8236-6ffee93f1a5f.jpg b/public/job/7d8ff008-d3a8-4039-8236-6ffee93f1a5f.jpg new file mode 100644 index 00000000..88fc39a9 Binary files /dev/null and b/public/job/7d8ff008-d3a8-4039-8236-6ffee93f1a5f.jpg differ diff --git a/public/job/cab9ad8e-afed-4b3c-953d-f84b67758dc9.png b/public/job/cab9ad8e-afed-4b3c-953d-f84b67758dc9.png new file mode 100644 index 00000000..f1aa5b43 Binary files /dev/null and b/public/job/cab9ad8e-afed-4b3c-953d-f84b67758dc9.png differ diff --git a/public/job/f319201f-6ae7-4af9-b8a0-fafb552bcf5d.jpg b/public/job/f319201f-6ae7-4af9-b8a0-fafb552bcf5d.jpg new file mode 100644 index 00000000..bad7a539 Binary files /dev/null and b/public/job/f319201f-6ae7-4af9-b8a0-fafb552bcf5d.jpg differ diff --git a/public/profile/background/540f0aa4-faf4-48b6-bec8-0661b0826d22.png b/public/profile/background/540f0aa4-faf4-48b6-bec8-0661b0826d22.png new file mode 100644 index 00000000..d0c9754c Binary files /dev/null and b/public/profile/background/540f0aa4-faf4-48b6-bec8-0661b0826d22.png differ diff --git a/public/file/0bfd9239-0853-42d9-bb7f-681adbec25ae.pdf b/public/profile/background/a60d5d34-b231-4221-93d1-c6936724e212.png similarity index 100% rename from public/file/0bfd9239-0853-42d9-bb7f-681adbec25ae.pdf rename to public/profile/background/a60d5d34-b231-4221-93d1-c6936724e212.png diff --git a/public/profile/foto/92b9d5e1-7370-459f-abc5-bcd07bc3e41e.png b/public/profile/foto/92b9d5e1-7370-459f-abc5-bcd07bc3e41e.png new file mode 100644 index 00000000..b4ef2a39 Binary files /dev/null and b/public/profile/foto/92b9d5e1-7370-459f-abc5-bcd07bc3e41e.png differ diff --git a/public/profile/foto/ce6f7b64-5356-415e-b44f-03900401e72c.jpeg b/public/profile/foto/ce6f7b64-5356-415e-b44f-03900401e72c.jpeg new file mode 100644 index 00000000..5beff2fd Binary files /dev/null and b/public/profile/foto/ce6f7b64-5356-415e-b44f-03900401e72c.jpeg differ diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx deleted file mode 100644 index a6abadfa..00000000 --- a/src/app/admin/layout.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import { AdminMain_Layout } from "@/app_modules_admin/main"; -import React from "react"; - -export default async function Layout({children}: {children: React.ReactNode}) { - return {children} -} \ No newline at end of file diff --git a/src/app/admin/main/page.tsx b/src/app/admin/main/page.tsx deleted file mode 100644 index 87e54c35..00000000 --- a/src/app/admin/main/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { AdminMain_Dashboard } from "@/app_modules_admin/main"; - -export default async function Page() { - return -} \ No newline at end of file diff --git a/src/app/api/job/gambar/[id]/route.ts b/src/app/api/job/gambar/[id]/route.ts new file mode 100644 index 00000000..63757e43 --- /dev/null +++ b/src/app/api/job/gambar/[id]/route.ts @@ -0,0 +1,32 @@ +import prisma from "@/app/lib/prisma"; +import fs from "fs"; +import { NextRequest, NextResponse } from "next/server"; + +export async function GET( + req: NextRequest, + { params }: { params: { id: string } } +) { + const get = await prisma.images.findUnique({ + where: { + id: params.id, + }, + select: { + url: true, + }, + }); + + if (!fs.existsSync(`./public/job/${get?.url}`)) { + const notFile = fs.readFileSync("./public/aset/global/no-file.png"); + return new NextResponse(notFile, { + headers: { + "Content-Type": "image/png", + }, + }); + } + const file = fs.readFileSync(`./public/job/${get?.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "image/png", + }, + }); +} diff --git a/src/app/api/seeder/route.ts b/src/app/api/seeder/route.ts index 2fa636a9..ee22733d 100644 --- a/src/app/api/seeder/route.ts +++ b/src/app/api/seeder/route.ts @@ -17,6 +17,8 @@ import donasi_namaBank from "../../../bin/seeder/donasi/master_bank.json"; import donasi_status_invoice from "../../../bin/seeder/donasi/master_status_invoice.json"; import event_status from "../../../bin/seeder/event/master_status.json"; import event_tipe_acara from "../../../bin/seeder/event/master_tipe_acara.json"; +import voting_status from "../../../bin/seeder/voting/master_status.json"; +import master_status from "../../../bin/seeder/master_status.json"; export async function GET(req: Request) { const dev = new URL(req.url).searchParams.get("dev"); @@ -296,6 +298,36 @@ export async function GET(req: Request) { }); } + for (let v of voting_status) { + await prisma.voting_Status.upsert({ + where: { + id: v.id, + }, + create: { + id: v.id, + name: v.name, + }, + update: { + name: v.name, + }, + }); + } + + for (let m of master_status) { + await prisma.masterStatus.upsert({ + where: { + id: m.id, + }, + create: { + id: m.id, + name: m.name, + }, + update: { + name: m.name, + }, + }); + } + return NextResponse.json({ success: true }); } diff --git a/src/app/dev/admin/job/child/arsip/page.tsx b/src/app/dev/admin/job/child/arsip/page.tsx new file mode 100644 index 00000000..89341e1d --- /dev/null +++ b/src/app/dev/admin/job/child/arsip/page.tsx @@ -0,0 +1,13 @@ +import AdminJob_TableArsip from "@/app_modules/admin/job/child/arsip"; +import { AdminJob_getListTableByStatusId } from "@/app_modules/admin/job/fun/get/get_list_table_by_status_id"; + + +export default async function Page() { + const dataJob = await AdminJob_getListTableByStatusId("0") + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/job/child/table_publish/page.tsx b/src/app/dev/admin/job/child/table_publish/page.tsx new file mode 100644 index 00000000..aac17371 --- /dev/null +++ b/src/app/dev/admin/job/child/table_publish/page.tsx @@ -0,0 +1,12 @@ +import { AdminJob_TablePublish } from "@/app_modules/admin/job"; +import { AdminJob_getListTableByStatusId } from "@/app_modules/admin/job/fun/get/get_list_table_by_status_id"; + +export default async function Page() { + const listPublish = await AdminJob_getListTableByStatusId("1") + // console.log(listPublish) + return ( + <> + + + ); +} \ No newline at end of file diff --git a/src/app/dev/admin/job/child/table_reject/page.tsx b/src/app/dev/admin/job/child/table_reject/page.tsx new file mode 100644 index 00000000..5c64b2e5 --- /dev/null +++ b/src/app/dev/admin/job/child/table_reject/page.tsx @@ -0,0 +1,13 @@ +import { AdminJob_TableReject } from "@/app_modules/admin/job"; +import { AdminJob_getListTableByStatusId } from "@/app_modules/admin/job/fun/get/get_list_table_by_status_id"; + + +export default async function Page() { + const listReject = await AdminJob_getListTableByStatusId("4"); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/job/child/table_review/page.tsx b/src/app/dev/admin/job/child/table_review/page.tsx new file mode 100644 index 00000000..75450adc --- /dev/null +++ b/src/app/dev/admin/job/child/table_review/page.tsx @@ -0,0 +1,11 @@ +import { AdminJob_TableReview } from "@/app_modules/admin/job"; +import { AdminJob_getListTableByStatusId } from "@/app_modules/admin/job/fun/get/get_list_table_by_status_id"; + +export default async function Page() { + const listReview = await AdminJob_getListTableByStatusId("2"); + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/job/main/page.tsx b/src/app/dev/admin/job/main/page.tsx new file mode 100644 index 00000000..140eb795 --- /dev/null +++ b/src/app/dev/admin/job/main/page.tsx @@ -0,0 +1,23 @@ +import { AdminJob_Main } from "@/app_modules/admin/job"; +import { AdminJob_funCountStatusByStatusId } from "@/app_modules/admin/job/fun/count/fun_count_job_by_status_id"; + +export default async function Page() { + const countPublish = await AdminJob_funCountStatusByStatusId("1") + const countReview = await AdminJob_funCountStatusByStatusId("2"); + const countReject = await AdminJob_funCountStatusByStatusId("4"); + const countArsip = await AdminJob_funCountStatusByStatusId("0") + + + + + return ( + <> + + + ); +} \ No newline at end of file diff --git a/src/app/dev/admin/vote/child/riwayat/page.tsx b/src/app/dev/admin/vote/child/riwayat/page.tsx new file mode 100644 index 00000000..5e340dc1 --- /dev/null +++ b/src/app/dev/admin/vote/child/riwayat/page.tsx @@ -0,0 +1,12 @@ +import { AdminVote_Riwayat } from "@/app_modules/admin/vote"; +import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id"; + +export default async function Page() { + const dataVote = await AdminVote_getListTableByStatusId("0"); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/vote/child/table_publish/page.tsx b/src/app/dev/admin/vote/child/table_publish/page.tsx new file mode 100644 index 00000000..05f09fd9 --- /dev/null +++ b/src/app/dev/admin/vote/child/table_publish/page.tsx @@ -0,0 +1,12 @@ +import { AdminVote_TablePublish } from "@/app_modules/admin/vote"; +import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id"; + +export default async function Page() { + const dataVote = await AdminVote_getListTableByStatusId("1") + + return ( + <> + + + ); +} \ No newline at end of file diff --git a/src/app/dev/admin/vote/child/table_reject/page.tsx b/src/app/dev/admin/vote/child/table_reject/page.tsx new file mode 100644 index 00000000..2eb2d72b --- /dev/null +++ b/src/app/dev/admin/vote/child/table_reject/page.tsx @@ -0,0 +1,11 @@ +import { AdminVote_TableReject } from "@/app_modules/admin/vote"; +import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id"; + +export default async function Page() { + const dataVote = await AdminVote_getListTableByStatusId("4"); + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/vote/child/table_review/page.tsx b/src/app/dev/admin/vote/child/table_review/page.tsx new file mode 100644 index 00000000..25ff7f2e --- /dev/null +++ b/src/app/dev/admin/vote/child/table_review/page.tsx @@ -0,0 +1,13 @@ +import { AdminVote_TableReview } from "@/app_modules/admin/vote"; +import { AdminVote_getListTableByStatusId } from "@/app_modules/admin/vote/fun/get/get_list_table_by_status_id"; + + +export default async function Page() { + const listVote = await AdminVote_getListTableByStatusId("2") + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/vote/main/page.tsx b/src/app/dev/admin/vote/main/page.tsx new file mode 100644 index 00000000..6fefc7ff --- /dev/null +++ b/src/app/dev/admin/vote/main/page.tsx @@ -0,0 +1,20 @@ +import { AdminVote_Main } from "@/app_modules/admin/vote"; +import AdminVote_funCountByStatusId from "@/app_modules/admin/vote/fun/count/fun_count_vote_by_status_id"; + +export default async function Page() { + const countPublish = await AdminVote_funCountByStatusId("1"); + const countReview = await AdminVote_funCountByStatusId("2"); + const countDraft = await AdminVote_funCountByStatusId("0"); + const countReject = await AdminVote_funCountByStatusId("4"); + + return ( + <> + + + ); +} diff --git a/src/app/dev/home/layout.tsx b/src/app/dev/home/layout.tsx index 31c26585..e2cf3dee 100644 --- a/src/app/dev/home/layout.tsx +++ b/src/app/dev/home/layout.tsx @@ -1,10 +1,12 @@ 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 { redirect } from "next/navigation"; export default async function Layout({ children }: { children: any }) { const userId = await User_getUserId(); const dataUser = await User_getOneById(userId); + return ( <> {children} diff --git a/src/app/dev/home/page.tsx b/src/app/dev/home/page.tsx index 94ddaadf..6238bb7f 100644 --- a/src/app/dev/home/page.tsx +++ b/src/app/dev/home/page.tsx @@ -2,19 +2,16 @@ import { HomeView } from "@/app_modules/home"; import { cookies } from "next/headers"; import { unsealData } from "iron-session"; import _ from "lodash"; -import { redirect } from "next/navigation"; - -import yaml from "yaml"; -import fs from "fs"; -import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile"; 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"; -const config = yaml.parse(fs.readFileSync("config.yaml").toString()); export default async function Page() { + const userId = await User_getUserId(); + const dataUser = await User_getOneById(userId); + return ( <> - + ); } diff --git a/src/app/dev/job/create/layout.tsx b/src/app/dev/job/create/layout.tsx new file mode 100644 index 00000000..e8e52d98 --- /dev/null +++ b/src/app/dev/job/create/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_Create } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/create/page.tsx b/src/app/dev/job/create/page.tsx new file mode 100644 index 00000000..94c001b8 --- /dev/null +++ b/src/app/dev/job/create/page.tsx @@ -0,0 +1,9 @@ +import { Job_Create } from "@/app_modules/job"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/arsip/[id]/layout.tsx b/src/app/dev/job/detail/arsip/[id]/layout.tsx new file mode 100644 index 00000000..835b852d --- /dev/null +++ b/src/app/dev/job/detail/arsip/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_DetailArsip } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/arsip/[id]/page.tsx b/src/app/dev/job/detail/arsip/[id]/page.tsx new file mode 100644 index 00000000..e8fd9290 --- /dev/null +++ b/src/app/dev/job/detail/arsip/[id]/page.tsx @@ -0,0 +1,12 @@ +import { Job_DetailArsip } from "@/app_modules/job"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({params}:{params: {id: string}}) { + let jobId = params.id + const dataJob = await Job_getOneById(jobId) + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/draft/[id]/layout.tsx b/src/app/dev/job/detail/draft/[id]/layout.tsx new file mode 100644 index 00000000..27205e01 --- /dev/null +++ b/src/app/dev/job/detail/draft/[id]/layout.tsx @@ -0,0 +1,17 @@ +import { LayoutJob_DetailDraft } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, + params +}: { + children: React.ReactNode; + params: {id: string} +}) { + let jobId = params.id + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/draft/[id]/page.tsx b/src/app/dev/job/detail/draft/[id]/page.tsx new file mode 100644 index 00000000..eaff874d --- /dev/null +++ b/src/app/dev/job/detail/draft/[id]/page.tsx @@ -0,0 +1,14 @@ +import Job_DetailDraft from "@/app_modules/job/detail/draft/view"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + + +export default async function Page({params}: {params: {id: string}}) { + let jobId = params.id + const dataJob = await Job_getOneById(jobId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/main/[id]/layout.tsx b/src/app/dev/job/detail/main/[id]/layout.tsx new file mode 100644 index 00000000..4e757aed --- /dev/null +++ b/src/app/dev/job/detail/main/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_MainDetail } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/main/[id]/page.tsx b/src/app/dev/job/detail/main/[id]/page.tsx new file mode 100644 index 00000000..0daa0da6 --- /dev/null +++ b/src/app/dev/job/detail/main/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Job_MainDetail } from "@/app_modules/job"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const jobId = params.id; + const dataJob = await Job_getOneById(jobId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/publish/[id]/layout.tsx b/src/app/dev/job/detail/publish/[id]/layout.tsx new file mode 100644 index 00000000..204d05d8 --- /dev/null +++ b/src/app/dev/job/detail/publish/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_DetailPublish } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/publish/[id]/page.tsx b/src/app/dev/job/detail/publish/[id]/page.tsx new file mode 100644 index 00000000..1558f947 --- /dev/null +++ b/src/app/dev/job/detail/publish/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Job_DetailPublish } from "@/app_modules/job"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + let jobId = params.id + const dataJob = await Job_getOneById(jobId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/reject/[id]/layout.tsx b/src/app/dev/job/detail/reject/[id]/layout.tsx new file mode 100644 index 00000000..f7ed9999 --- /dev/null +++ b/src/app/dev/job/detail/reject/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_DetailReject } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/reject/[id]/page.tsx b/src/app/dev/job/detail/reject/[id]/page.tsx new file mode 100644 index 00000000..0645612e --- /dev/null +++ b/src/app/dev/job/detail/reject/[id]/page.tsx @@ -0,0 +1,14 @@ + +import Job_DetailReject from "@/app_modules/job/detail/reject/view"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + let jobId = params.id + const dataJob = await Job_getOneById(jobId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/detail/review/[id]/layout.tsx b/src/app/dev/job/detail/review/[id]/layout.tsx new file mode 100644 index 00000000..ad8216c2 --- /dev/null +++ b/src/app/dev/job/detail/review/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_DetailReview } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/detail/review/[id]/page.tsx b/src/app/dev/job/detail/review/[id]/page.tsx new file mode 100644 index 00000000..67463ad7 --- /dev/null +++ b/src/app/dev/job/detail/review/[id]/page.tsx @@ -0,0 +1,18 @@ +import Job_DetailReview from "@/app_modules/job/detail/review/view"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; +import React from "react"; + +export default async function Page({ + params, +}: { + params: { id: React.ReactNode }; +}) { + let jobId = params.id; + const dataJob = await Job_getOneById(jobId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/edit/[id]/layout.tsx b/src/app/dev/job/edit/[id]/layout.tsx new file mode 100644 index 00000000..f2024656 --- /dev/null +++ b/src/app/dev/job/edit/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_Edit } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/edit/[id]/page.tsx b/src/app/dev/job/edit/[id]/page.tsx new file mode 100644 index 00000000..76da710e --- /dev/null +++ b/src/app/dev/job/edit/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Job_Edit } from "@/app_modules/job"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let jobId = params.id; + const dataJob = await Job_getOneById(jobId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/main/arsip/page.tsx b/src/app/dev/job/main/arsip/page.tsx new file mode 100644 index 00000000..fcd2d063 --- /dev/null +++ b/src/app/dev/job/main/arsip/page.tsx @@ -0,0 +1,12 @@ +import { Job_Arsip } from "@/app_modules/job"; +import { Job_getListAllArsipById } from "@/app_modules/job/fun/get/get_list_all_arsip"; + +export default async function Page() { + const dataJob = await Job_getListAllArsipById() + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/main/beranda/page.tsx b/src/app/dev/job/main/beranda/page.tsx new file mode 100644 index 00000000..c16c9453 --- /dev/null +++ b/src/app/dev/job/main/beranda/page.tsx @@ -0,0 +1,12 @@ +import { Job_Beranda } from "@/app_modules/job"; +import { Job_getAllListPublish } from "@/app_modules/job/fun/get/get_list_all_publish"; + +export default async function Page() { + const listJob = await Job_getAllListPublish(); + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/main/layout.tsx b/src/app/dev/job/main/layout.tsx new file mode 100644 index 00000000..337a18bc --- /dev/null +++ b/src/app/dev/job/main/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_Main } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/main/status/page.tsx b/src/app/dev/job/main/status/page.tsx new file mode 100644 index 00000000..3ce708be --- /dev/null +++ b/src/app/dev/job/main/status/page.tsx @@ -0,0 +1,22 @@ +import { Job_Status } from "@/app_modules/job"; +import { Job_getListStatusByStatusId } from "@/app_modules/job/fun/get/get_list_status_by_status_id"; + +export default async function Page() { + const listPublish = await Job_getListStatusByStatusId("1"); + const listReview = await Job_getListStatusByStatusId("2"); + const listDraft = await Job_getListStatusByStatusId("3"); + const listReject = await Job_getListStatusByStatusId("4"); + + + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/non_user_view/[id]/layout.tsx b/src/app/dev/job/non_user_view/[id]/layout.tsx new file mode 100644 index 00000000..74cd4a16 --- /dev/null +++ b/src/app/dev/job/non_user_view/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutJob_NonUserView } from "@/app_modules/job"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/job/non_user_view/[id]/page.tsx b/src/app/dev/job/non_user_view/[id]/page.tsx new file mode 100644 index 00000000..8953554d --- /dev/null +++ b/src/app/dev/job/non_user_view/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Job_NonUserView } from "@/app_modules/job"; +import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let jobId = params.id; + const dataJob = await Job_getOneById(jobId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/job/splash/page.tsx b/src/app/dev/job/splash/page.tsx new file mode 100644 index 00000000..5286f7dc --- /dev/null +++ b/src/app/dev/job/splash/page.tsx @@ -0,0 +1,9 @@ +import { Job_Splash } from "@/app_modules/job"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/create/layout.tsx b/src/app/dev/vote/create/layout.tsx new file mode 100644 index 00000000..3152ab64 --- /dev/null +++ b/src/app/dev/vote/create/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_Create } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/create/page.tsx b/src/app/dev/vote/create/page.tsx new file mode 100644 index 00000000..a1d28226 --- /dev/null +++ b/src/app/dev/vote/create/page.tsx @@ -0,0 +1,9 @@ +import { Vote_Create } from "@/app_modules/vote"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/draft/[id]/layout.tsx b/src/app/dev/vote/detail/draft/[id]/layout.tsx new file mode 100644 index 00000000..ba62a6ef --- /dev/null +++ b/src/app/dev/vote/detail/draft/[id]/layout.tsx @@ -0,0 +1,19 @@ +import { LayoutVote_DetailDraft } from "@/app_modules/vote"; +import React from "react"; + +export default function Layout({ + children, + params, +}: { + children: React.ReactNode; + params: { id: string }; +}) { + let voteId = params.id; + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/vote/detail/draft/[id]/page.tsx b/src/app/dev/vote/detail/draft/[id]/page.tsx new file mode 100644 index 00000000..850cb121 --- /dev/null +++ b/src/app/dev/vote/detail/draft/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Vote_DetailDraft } from "@/app_modules/vote"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/kontribusi/[id]/layout.tsx b/src/app/dev/vote/detail/kontribusi/[id]/layout.tsx new file mode 100644 index 00000000..ca76dac8 --- /dev/null +++ b/src/app/dev/vote/detail/kontribusi/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_DetailKontribusi } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/kontribusi/[id]/page.tsx b/src/app/dev/vote/detail/kontribusi/[id]/page.tsx new file mode 100644 index 00000000..75dd7eb3 --- /dev/null +++ b/src/app/dev/vote/detail/kontribusi/[id]/page.tsx @@ -0,0 +1,19 @@ +import { Vote_DetailKontribusi } from "@/app_modules/vote"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId) + const listKontributor = await Vote_getListKontributorById(voteId) + + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/main/[id]/layout.tsx b/src/app/dev/vote/detail/main/[id]/layout.tsx new file mode 100644 index 00000000..6e978bef --- /dev/null +++ b/src/app/dev/vote/detail/main/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_MainDetail } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/main/[id]/page.tsx b/src/app/dev/vote/detail/main/[id]/page.tsx new file mode 100644 index 00000000..197f4b7e --- /dev/null +++ b/src/app/dev/vote/detail/main/[id]/page.tsx @@ -0,0 +1,29 @@ +import prisma from "@/app/lib/prisma"; +import { Vote_MainDetail } from "@/app_modules/vote"; +import { Vote_getHasilVoteById } from "@/app_modules/vote/fun/get/get_list_hasil_by_id"; +import { Vote_cekKontributorById } from "@/app_modules/vote/fun/get/cek_kontributor_by_id"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; +import { Vote_getOnePilihanVotingByUserId } from "@/app_modules/vote/fun/get/get_one_pilihan_voting_by_user_id"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + const hasilVoting = await Vote_getHasilVoteById(voteId as any); + const isKontributor = await Vote_cekKontributorById(voteId); + const pilihanKontributor = await Vote_getOnePilihanVotingByUserId(voteId); + const listKontributor = await Vote_getListKontributorById(voteId); + + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/publish/[id]/layout.tsx b/src/app/dev/vote/detail/publish/[id]/layout.tsx new file mode 100644 index 00000000..6730430a --- /dev/null +++ b/src/app/dev/vote/detail/publish/[id]/layout.tsx @@ -0,0 +1,10 @@ +import { LayoutVote_DetailPublish } from "@/app_modules/vote"; +import React from "react"; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/publish/[id]/page.tsx b/src/app/dev/vote/detail/publish/[id]/page.tsx new file mode 100644 index 00000000..a0db9358 --- /dev/null +++ b/src/app/dev/vote/detail/publish/[id]/page.tsx @@ -0,0 +1,18 @@ +import { Vote_DetailPublish } from "@/app_modules/vote"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + const listKontributor = await Vote_getListKontributorById(voteId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/reject/[id]/layout.tsx b/src/app/dev/vote/detail/reject/[id]/layout.tsx new file mode 100644 index 00000000..469f132a --- /dev/null +++ b/src/app/dev/vote/detail/reject/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutVote_DetailReject } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/vote/detail/reject/[id]/page.tsx b/src/app/dev/vote/detail/reject/[id]/page.tsx new file mode 100644 index 00000000..3f4c1b5f --- /dev/null +++ b/src/app/dev/vote/detail/reject/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Vote_DetailReject } from "@/app_modules/vote"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/review/[id]/layout.tsx b/src/app/dev/vote/detail/review/[id]/layout.tsx new file mode 100644 index 00000000..b749c3df --- /dev/null +++ b/src/app/dev/vote/detail/review/[id]/layout.tsx @@ -0,0 +1,10 @@ +import { LayoutVote_DetailReview } from "@/app_modules/vote"; +import React from "react"; + +export default function Layout({ children }: { children: React.ReactNode }) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/review/[id]/page.tsx b/src/app/dev/vote/detail/review/[id]/page.tsx new file mode 100644 index 00000000..a9dbd486 --- /dev/null +++ b/src/app/dev/vote/detail/review/[id]/page.tsx @@ -0,0 +1,13 @@ +import { Vote_DetailReview } from "@/app_modules/vote"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + let voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/riwayat_saya/[id]/layout.tsx b/src/app/dev/vote/detail/riwayat_saya/[id]/layout.tsx new file mode 100644 index 00000000..4d17c867 --- /dev/null +++ b/src/app/dev/vote/detail/riwayat_saya/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_DetailRiwayatSaya } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/riwayat_saya/[id]/page.tsx b/src/app/dev/vote/detail/riwayat_saya/[id]/page.tsx new file mode 100644 index 00000000..f4542ad0 --- /dev/null +++ b/src/app/dev/vote/detail/riwayat_saya/[id]/page.tsx @@ -0,0 +1,19 @@ +import { Vote_DetailRiwayatSaya } from "@/app_modules/vote"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; +import { Vote_getOnePublishbyId } from "@/app_modules/vote/fun/get/get_one_publish_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + let voteId = params.id; + const dataVote = await Vote_getOnePublishbyId(voteId); + const listKontributor = await Vote_getListKontributorById(voteId); + + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/detail/semua_riwayat/[id]/layout.tsx b/src/app/dev/vote/detail/semua_riwayat/[id]/layout.tsx new file mode 100644 index 00000000..4723aa9d --- /dev/null +++ b/src/app/dev/vote/detail/semua_riwayat/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx b/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx new file mode 100644 index 00000000..6d943acd --- /dev/null +++ b/src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx @@ -0,0 +1,19 @@ +import { Vote_DetailSemuaRiwayat } from "@/app_modules/vote"; +import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id"; +import { Vote_getOnePublishbyId } from "@/app_modules/vote/fun/get/get_one_publish_by_id"; + + +export default async function Page({params}: {params: {id: string}}) { + let voteId = params.id + const dataVote = await Vote_getOnePublishbyId(voteId) + const listKontributor = await Vote_getListKontributorById(voteId) + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/edit/[id]/layout.tsx b/src/app/dev/vote/edit/[id]/layout.tsx new file mode 100644 index 00000000..c84da67c --- /dev/null +++ b/src/app/dev/vote/edit/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_Edit } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/edit/[id]/page.tsx b/src/app/dev/vote/edit/[id]/page.tsx new file mode 100644 index 00000000..d43d25e6 --- /dev/null +++ b/src/app/dev/vote/edit/[id]/page.tsx @@ -0,0 +1,20 @@ +import { Vote_Edit } from "@/app_modules/vote"; +import { Vote_getListDaftarNamaById } from "@/app_modules/vote/fun/get/get_list_daftar_vote_by_id"; +import { Vote_getOnebyId } from "@/app_modules/vote/fun/get/get_one_by_id"; +import _ from "lodash"; + +export default async function Page({ params }: { params: { id: string } }) { + let voteId = params.id; + const dataVote = await Vote_getOnebyId(voteId); + const data = _.omit(dataVote, ["Voting_DaftarNamaVote"]); + const listDaftarVote = await Vote_getListDaftarNamaById(voteId); + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/main/beranda/page.tsx b/src/app/dev/vote/main/beranda/page.tsx new file mode 100644 index 00000000..25623b91 --- /dev/null +++ b/src/app/dev/vote/main/beranda/page.tsx @@ -0,0 +1,12 @@ +import { Vote_Beranda } from "@/app_modules/vote"; +import { Vote_getAllListPublish } from "@/app_modules/vote/fun/get/get_all_list_publish"; + +export default async function Page() { + const dataVote = await Vote_getAllListPublish() + + return ( + <> + + + ); +} \ No newline at end of file diff --git a/src/app/dev/vote/main/kontribusi/page.tsx b/src/app/dev/vote/main/kontribusi/page.tsx new file mode 100644 index 00000000..fa11c1b2 --- /dev/null +++ b/src/app/dev/vote/main/kontribusi/page.tsx @@ -0,0 +1,12 @@ +import { Vote_Kontribusi } from "@/app_modules/vote"; +import { Vote_getAllListKontribusiByAuthorId } from "@/app_modules/vote/fun/get/get_list_kontribusi_by_author_id"; + + +export default async function Page() { + const dataKontribusi = await Vote_getAllListKontribusiByAuthorId() + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/main/layout.tsx b/src/app/dev/vote/main/layout.tsx new file mode 100644 index 00000000..6c2e5673 --- /dev/null +++ b/src/app/dev/vote/main/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutVote_Main } from "@/app_modules/vote"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/vote/main/riwayat/page.tsx b/src/app/dev/vote/main/riwayat/page.tsx new file mode 100644 index 00000000..76593fd8 --- /dev/null +++ b/src/app/dev/vote/main/riwayat/page.tsx @@ -0,0 +1,17 @@ +import { Vote_Riwayat } from "@/app_modules/vote"; +import { Vote_getAllListRiwayat } from "@/app_modules/vote/fun/get/get_all_list_riwayat"; +import { Vote_getAllListRiwayatSaya } from "@/app_modules/vote/fun/get/get_all_list_riwayat_saya"; + +export default async function Page() { + const listRiwayat = await Vote_getAllListRiwayat(); + const listRiwayatSaya = await Vote_getAllListRiwayatSaya() + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/main/status/page.tsx b/src/app/dev/vote/main/status/page.tsx new file mode 100644 index 00000000..8c612930 --- /dev/null +++ b/src/app/dev/vote/main/status/page.tsx @@ -0,0 +1,21 @@ +import { Vote_Status } from "@/app_modules/vote"; +import { Vote_getListByStatusId } from "@/app_modules/vote/fun/get/get_list_status_by_status_id"; + +export default async function Page() { + const listPublish = await Vote_getListByStatusId("1"); + const listReview = await Vote_getListByStatusId("2"); + const listDraft = await Vote_getListByStatusId("3"); + const listReject = await Vote_getListByStatusId("4"); + + + return ( + <> + + + ); +} diff --git a/src/app/dev/vote/splash/page.tsx b/src/app/dev/vote/splash/page.tsx new file mode 100644 index 00000000..9d5976a3 --- /dev/null +++ b/src/app/dev/vote/splash/page.tsx @@ -0,0 +1,9 @@ +import { Vote_Splash } from "@/app_modules/vote"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/emotion.tsx b/src/app/emotion.tsx index cb3adb61..1215b3ed 100644 --- a/src/app/emotion.tsx +++ b/src/app/emotion.tsx @@ -2,7 +2,7 @@ import AppNotif from "@/app_modules/notif"; // import './globals.css' import { CacheProvider } from "@emotion/react"; -import { MantineProvider, useEmotionCache } from "@mantine/core"; +import { Image, MantineProvider, useEmotionCache } from "@mantine/core"; import { Notifications } from "@mantine/notifications"; import { useServerInsertedHTML } from "next/navigation"; import { ToastContainer, toast } from "react-toastify"; @@ -27,10 +27,13 @@ export default function RootStyleRegistry({ return ( + + HIPMI + - + {children} {/* */} diff --git a/src/app/lib/router_admin/router_admin_job.ts b/src/app/lib/router_admin/router_admin_job.ts new file mode 100644 index 00000000..0062d6a2 --- /dev/null +++ b/src/app/lib/router_admin/router_admin_job.ts @@ -0,0 +1,7 @@ +export const RouterAdminJob = { + main: "/dev/admin/job/main", + table_publish: "/dev/admin/job/child/table_publish", + table_review: "/dev/admin/job/child/table_review", + table_reject: "/dev/admin/job/child/table_reject", + arsip: "/dev/admin/job/child/arsip", +}; diff --git a/src/app/lib/router_admin/router_admin_vote.ts b/src/app/lib/router_admin/router_admin_vote.ts new file mode 100644 index 00000000..7b90c33f --- /dev/null +++ b/src/app/lib/router_admin/router_admin_vote.ts @@ -0,0 +1,8 @@ +export const RouterAdminVote = { + // main + main: "/dev/admin/vote/main", + table_publish: "/dev/admin/vote/child/table_publish", + table_review: "/dev/admin/vote/child/table_review", + table_reject: "/dev/admin/vote/child/table_reject", + riwayat: "/dev/admin/vote/child/riwayat", +}; diff --git a/src/app/lib/router_hipmi/router_job.ts b/src/app/lib/router_hipmi/router_job.ts new file mode 100644 index 00000000..9cbc9baf --- /dev/null +++ b/src/app/lib/router_hipmi/router_job.ts @@ -0,0 +1,27 @@ +export const RouterJob = { + //api + api_gambar: "/api/job/gambar/", + + //spalsh + spalsh: "/dev/job/splash", + + // main + beranda: "/dev/job/main/beranda", + status: "/dev/job/main/status", + arsip: "/dev/job/main/arsip", + + // create & edit + create: "/dev/job/create", + edit: "/dev/job/edit/", + + // detail + main_detail: "/dev/job/detail/main/", + detail_publish: "/dev/job/detail/publish/", + detail_review: "/dev/job/detail/review/", + detail_draft: "/dev/job/detail/draft/", + detail_reject: "/dev/job/detail/reject/", + detail_arsip: "/dev/job/detail/arsip/", + + // non user + non_user_view: "/dev/job/non_user_view/", +}; diff --git a/src/app/lib/router_hipmi/router_vote.ts b/src/app/lib/router_hipmi/router_vote.ts new file mode 100644 index 00000000..9b1e1635 --- /dev/null +++ b/src/app/lib/router_hipmi/router_vote.ts @@ -0,0 +1,24 @@ +export const RouterVote = { + // main + splash: "/dev/vote/splash", + beranda: "/dev/vote/main/beranda", + status: "/dev/vote/main/status", + kontribusi: "/dev/vote/main/kontribusi", + riwayat: "/dev/vote/main/riwayat", + + // create + create: "/dev/vote/create", + + // + edit: "/dev/vote/edit/", + + //detail + main_detail: "/dev/vote/detail/main/", + detail_publish: "/dev/vote/detail/publish/", + detail_review: "/dev/vote/detail/review/", + detail_draft: "/dev/vote/detail/draft/", + detail_reject: "/dev/vote/detail/reject/", + detail_kontribusi: "/dev/vote/detail/kontribusi/", + detail_semua_riwayat: "/dev/vote/detail/semua_riwayat/", + detail_riwayat_saya: "/dev/vote/detail/riwayat_saya/", +}; diff --git a/src/app/makuro/_server/makuro_view.tsx b/src/app/makuro/_server/makuro_view.tsx index 7e222d27..4ff96721 100644 --- a/src/app/makuro/_server/makuro_view.tsx +++ b/src/app/makuro/_server/makuro_view.tsx @@ -1,13 +1,54 @@ -'use client' +"use client"; -import { Button } from "@mantine/core"; +import { Box, Button, Stack, TextInput } from "@mantine/core"; import makuro_test from "./makuro_test"; +import { useState } from "react"; +import _, { forIn } from "lodash"; export default function ViewMakuro() { + const [listnya, setListnya] = useState([ + { + name: "Voting", + value: "", + }, + { name: "Voting", value: "" }, + ]); - return <> + return ( + <> + + {listnya.map((e, k) => ( + + { + const val = _.clone(listnya); + val[k].value = v.currentTarget.value; + setListnya([...val]); + }} + label={e.name} + /> + + ))} + onClick={() => { + // const cek = listnya[listnya.length - 1] + // console.log(cek.id + 1); + + if (listnya.length > 4) return console.log("ga bisa lebih"); + setListnya([...listnya, { name: "Voting", value: "" }]); + }} + > + {" "} + Tambah + + + -} \ No newline at end of file + ); +} diff --git a/src/app_modules/admin/event/child/tipe_acara.tsx b/src/app_modules/admin/event/child/tipe_acara.tsx index f55ba6c4..78479e1d 100644 --- a/src/app_modules/admin/event/child/tipe_acara.tsx +++ b/src/app_modules/admin/event/child/tipe_acara.tsx @@ -7,6 +7,7 @@ import { Divider, Group, List, + Modal, Paper, SimpleGrid, Stack, @@ -23,8 +24,11 @@ import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_gl import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal"; import { AdminEvent_getListTipeAcara } from "../fun/get/get_list_tipe_acara"; -import { IconEditCircle } from "@tabler/icons-react"; +import { IconEditCircle, IconTrash } from "@tabler/icons-react"; import { AdminEvent_funEditTipeAcara } from "../fun/edit/fun_edit_tipe_acara"; +import { useDisclosure } from "@mantine/hooks"; +import { AdminEvent_funEditActivationTipeAcaraById } from "../fun/edit/fun_edit_activation_tipe_acara"; +import { number } from "echarts"; export default function AdminEvent_DetailTipeAcara({ listTipe, @@ -46,8 +50,35 @@ function DetailTipeAcara({ listTipe }: { listTipe: MODEL_DEFAULT_MASTER[] }) { const [name, setName] = useState(""); const [openEditor, setOpenEditor] = useState(false); const [edit, setEdit] = useState(null); + const [opened, { open, close }] = useDisclosure(false); + const [hapusTipe, setHapusTipe] = useState({ + id: "", + name: "", + }); + return ( <> + + + + Anda yakin akan menghapus{" "} + <Text span c={"red"} inherit> + {hapusTipe.name} + </Text>{" "} + ? + + + + + + + + {e.name} - { - setOpenEditor(true); - setEdit(e); - }} - > - - + + { + setOpenEditor(true); + setEdit(e); + }} + > + + {" "} + { + open(); + setHapusTipe({ + ...hapusTipe, + id: e.id, + name: e.name, + }); + }} + > + + + @@ -175,3 +221,18 @@ async function onUpdate(id: any, edit: any, setTipe: any, setOpenEditor: any) { } }); } + +async function onDelete(data: MODEL_DEFAULT_MASTER, close: any, setTipe: any) { + await AdminEvent_funEditActivationTipeAcaraById(data.id as any).then( + async (res) => { + if (res.status === 200) { + const data = await AdminEvent_getListTipeAcara(); + setTipe(data); + ComponentGlobal_NotifikasiBerhasil(res.message); + close(); + } else { + ComponentGlobal_NotifikasiGagal(res.message); + } + } + ); +} diff --git a/src/app_modules/admin/event/fun/edit/fun_edit_activation_tipe_acara.ts b/src/app_modules/admin/event/fun/edit/fun_edit_activation_tipe_acara.ts new file mode 100644 index 00000000..86980a97 --- /dev/null +++ b/src/app_modules/admin/event/fun/edit/fun_edit_activation_tipe_acara.ts @@ -0,0 +1,22 @@ +"use server"; + +import prisma from "@/app/lib/prisma"; +import { revalidatePath } from "next/cache"; + +export async function AdminEvent_funEditActivationTipeAcaraById(id: number) { + const updt = await prisma.eventMaster_TipeAcara.update({ + where: { + id: id, + }, + data: { + active: false, + }, + }); + + if(!updt) return {status: 400, message: "Gagal Update"} + revalidatePath("/dev/admin/event/child/tipe_acara"); + return { + status: 200, + message: "Update Berhasil" + } +} diff --git a/src/app_modules/admin/event/fun/get/get_list_tipe_acara.ts b/src/app_modules/admin/event/fun/get/get_list_tipe_acara.ts index 8df30f90..9f2ead65 100644 --- a/src/app_modules/admin/event/fun/get/get_list_tipe_acara.ts +++ b/src/app_modules/admin/event/fun/get/get_list_tipe_acara.ts @@ -6,6 +6,9 @@ export async function AdminEvent_getListTipeAcara(){ const data = await prisma.eventMaster_TipeAcara.findMany({ orderBy:{ id: "asc" + }, + where: { + active: true } }) return data diff --git a/src/app_modules/admin/job/child/arsip/index.tsx b/src/app_modules/admin/job/child/arsip/index.tsx new file mode 100644 index 00000000..af1cd6c1 --- /dev/null +++ b/src/app_modules/admin/job/child/arsip/index.tsx @@ -0,0 +1,200 @@ +"use client"; + +import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component/header_tamplate"; +import { AdminEvent_getListPesertaById } from "@/app_modules/admin/event/fun/get/get_list_peserta_by_id"; +import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan"; +import { + MODEL_EVENT, + MODEL_EVENT_PESERTA, +} from "@/app_modules/event/model/interface"; +import { MODEL_JOB } from "@/app_modules/job/model/interface"; +import { + MODEL_VOTE_KONTRIBUTOR, + MODEL_VOTING, + MODEL_VOTING_DAFTAR_NAMA_VOTE, +} from "@/app_modules/vote/model/interface"; +import { + Avatar, + Badge, + Box, + Button, + Card, + Center, + Divider, + Grid, + Group, + Modal, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + Title, +} from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconEyeCheck, IconEyeShare } from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export default function AdminJob_TableArsip({ + dataVote, +}: { + dataVote?: any; +}) { + return ( + <> + + + + + + ); +} + +function TableStatus({ listArsip }: { listArsip: MODEL_JOB[] }) { + const router = useRouter(); + const [opened, { open, close }] = useDisclosure(false); + const [data, setData] = useState(listArsip); + const [img, setImg] = useState(""); + + const TableRows = data?.map((e, i) => ( + + + + {e.title} + + + +
+ {e.imagesId ? ( + + ) : ( +
+ + Tidak ada poster + +
+ )} +
+ + + +
+ + + + +
+ + + + )); + + return ( + <> + + {/* */} + + + + + ARSIP + + + + + + + + + + + + + {TableRows} +
+
Judul
+
+
Poster
+
+
Syarat Ketentuan
+
+
Deskripsi
+
+
+
+ {_.isEmpty(TableRows) ? ( +
+ Tidak Ada Data +
+ ) : ( + "" + )} +
+
+ + ); +} + +async function onList( + voteId: string, + setHasil: any, + setKontributor: any, + setLoading: any, + open: any +) { + // await AdminVote_getHasilById(voteId).then((res) => { + // setHasil(res); + // setLoading(false); + // }); + + // await AdminVote_getListKontributorById(voteId).then((res) => { + // setKontributor(res); + // setLoading(false); + // }); + + open(); +} diff --git a/src/app_modules/admin/job/child/table_publish/index.tsx b/src/app_modules/admin/job/child/table_publish/index.tsx new file mode 100644 index 00000000..5ed128dd --- /dev/null +++ b/src/app_modules/admin/job/child/table_publish/index.tsx @@ -0,0 +1,171 @@ +"use client"; + +import { RouterJob } from "@/app/lib/router_hipmi/router_job"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component/header_tamplate"; +import { MODEL_JOB } from "@/app_modules/job/model/interface"; +import { + Avatar, + Badge, + Box, + Button, + Card, + Center, + Divider, + Grid, + Group, + Image, + Modal, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + Title, +} from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconBan, IconEyeCheck, IconEyeShare } from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; + +export default function AdminJob_TablePublish({ + dataVote, +}: { + dataVote?: any; +}) { + return ( + <> + + + + + + ); +} + +function TableStatus({ listReview }: { listReview: MODEL_JOB[] }) { + const router = useRouter(); + const [opened, { open, close }] = useDisclosure(false); + const [data, setData] = useState(listReview); + const [img, setImg] = useState(""); + + const TableRows = data?.map((e, i) => ( + + + + {e.title} + + + +
+ {e.imagesId ? ( + + ) : ( +
+ + Tidak ada poster + +
+ )} +
+ + + +
+ + + + +
+ + + + )); + + return ( + <> + +
+ Foto +
+
+ + + + + PUBLISH + + + + + + + + + + + + + {TableRows} +
+
Judul
+
+
Poster
+
+
Syarat Ketentuan
+
+
Deskripsi
+
+
+
+ {_.isEmpty(TableRows) ? ( +
+ Tidak Ada Data +
+ ) : ( + "" + )} +
+
+ {/*
{JSON.stringify(data, null, 2)}
*/} + + ); +} diff --git a/src/app_modules/admin/job/child/table_reject/index.tsx b/src/app_modules/admin/job/child/table_reject/index.tsx new file mode 100644 index 00000000..2016b06f --- /dev/null +++ b/src/app_modules/admin/job/child/table_reject/index.tsx @@ -0,0 +1,251 @@ +"use client"; + +import { RouterJob } from "@/app/lib/router_hipmi/router_job"; +import ComponentAdminGlobal_HeaderTamplate from "@/app_modules/admin/component/header_tamplate"; +import { MODEL_JOB } from "@/app_modules/job/model/interface"; +import { + Avatar, + Badge, + Box, + Button, + Card, + Center, + Divider, + Grid, + Group, + Image, + Modal, + Paper, + ScrollArea, + Spoiler, + Stack, + Table, + Text, + Textarea, + Title, +} from "@mantine/core"; +import { useDisclosure } from "@mantine/hooks"; +import { IconBan, IconEyeCheck, IconEyeShare } from "@tabler/icons-react"; +import _ from "lodash"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { AdminJob_funEditCatatanById } from "../../fun/edit/fun_edit_catatan_by_id"; +import { AdminJob_getListTableByStatusId } from "../../fun/get/get_list_table_by_status_id"; +import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil"; +import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal"; + +export default function AdminJob_TableReject({ dataVote }: { dataVote?: any }) { + return ( + <> + + + + + + ); +} + +function TableStatus({ listReject }: { listReject: MODEL_JOB[] }) { + const [opened, { open, close }] = useDisclosure(false); + const [data, setData] = useState(listReject); + const [reject, setReject] = useState(false); + const [img, setImg] = useState(""); + const [jobId, setJobId] = useState(""); + const [catatan, setCatatan] = useState(""); + + const TableRows = data?.map((e, i) => ( + + + + {e.title} + + + +
+ {e.imagesId ? ( + + ) : ( +
+ + Tidak ada poster + +
+ )} +
+ + + +
+ + + + +
+ + + + + {e.catatan} + + + + + + + )); + + return ( + <> + +
+ Foto +
+
+ + { + setReject(false); + }} + withCloseButton={false} + size={"lg"} + centered + > + +