Merge pull request #49 from bipproduction/hipmi/checkpoint1
Hipmi/checkpoint1
12
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",
|
||||
|
||||
@@ -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")
|
||||
}
|
||||
|
||||
BIN
public/aset/Hipmi Business Map.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
public/aset/Hipmi Project Collaboration.png
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
public/aset/global/no-file.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/aset/job/logo.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/aset/vote/logo.png
Normal file
|
After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 217 KiB |
|
Before Width: | Height: | Size: 263 KiB |
BIN
public/job/35733aba-3d3c-4353-84c3-ea8fd9a9cc85.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/job/38d9e62f-8364-45d7-a683-0883e56618fe.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/job/497395d9-6986-4d77-9f4d-2272b95e1f6f.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/job/5232ae23-c04c-4140-a1d2-ed3cd1377d13.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
public/job/6ac4c417-2362-4f40-b74e-67cd816f18e7.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
public/job/7d8ff008-d3a8-4039-8236-6ffee93f1a5f.jpg
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
public/job/cab9ad8e-afed-4b3c-953d-f84b67758dc9.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
public/job/f319201f-6ae7-4af9-b8a0-fafb552bcf5d.jpg
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 263 KiB After Width: | Height: | Size: 263 KiB |
BIN
public/profile/foto/92b9d5e1-7370-459f-abc5-bcd07bc3e41e.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
public/profile/foto/ce6f7b64-5356-415e-b44f-03900401e72c.jpeg
Normal file
|
After Width: | Height: | Size: 108 KiB |
@@ -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 <AdminMain_Layout>{children}</AdminMain_Layout>
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import { AdminMain_Dashboard } from "@/app_modules_admin/main";
|
||||
|
||||
export default async function Page() {
|
||||
return <AdminMain_Dashboard/>
|
||||
}
|
||||
32
src/app/api/job/gambar/[id]/route.ts
Normal file
@@ -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",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
13
src/app/dev/admin/job/child/arsip/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminJob_TableArsip dataVote={dataJob} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/job/child/table_publish/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminJob_TablePublish dataVote={listPublish} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/admin/job/child/table_reject/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminJob_TableReject dataVote={listReject} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
11
src/app/dev/admin/job/child/table_review/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminJob_TableReview dataVote={listReview} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
23
src/app/dev/admin/job/main/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminJob_Main
|
||||
countPublish={countPublish as number}
|
||||
countReview={countReview as number}
|
||||
countReject={countReject as number}
|
||||
countArsip={countArsip as number}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/vote/child/riwayat/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminVote_Riwayat dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/vote/child/table_publish/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminVote_TablePublish dataVote={dataVote} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
11
src/app/dev/admin/vote/child/table_reject/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminVote_TableReject dataVote={dataVote as any}/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/admin/vote/child/table_review/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminVote_TableReview listVote={listVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
20
src/app/dev/admin/vote/main/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<AdminVote_Main
|
||||
countPublish={countPublish as number}
|
||||
countReview={countReview as number}
|
||||
countDraft={countDraft as number}
|
||||
countReject={countReject as number}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -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 (
|
||||
<>
|
||||
<HomeLayout dataUser={dataUser as any}>{children}</HomeLayout>
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
<HomeView />
|
||||
<HomeView dataUser={dataUser as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
14
src/app/dev/job/create/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_Create>{children}</LayoutJob_Create>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
src/app/dev/job/create/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Job_Create } from "@/app_modules/job";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Job_Create />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/arsip/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_DetailArsip>{children}</LayoutJob_DetailArsip>
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/job/detail/arsip/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_DetailArsip dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
17
src/app/dev/job/detail/draft/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_DetailDraft jobId={jobId}>{children}</LayoutJob_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/draft/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_DetailDraft dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/main/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_MainDetail>{children}</LayoutJob_MainDetail>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/job/detail/main/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_MainDetail dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/publish/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_DetailPublish>{children}</LayoutJob_DetailPublish>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/job/detail/publish/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_DetailPublish dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/reject/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_DetailReject>{children}</LayoutJob_DetailReject>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/reject/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_DetailReject dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/detail/review/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_DetailReview>{children}</LayoutJob_DetailReview>
|
||||
</>
|
||||
);
|
||||
}
|
||||
18
src/app/dev/job/detail/review/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_DetailReview dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/edit/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_Edit>{children}</LayoutJob_Edit>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/job/edit/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_Edit dataJob={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/job/main/arsip/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_Arsip dataJob={dataJob as any}/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/job/main/beranda/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_Beranda listJob={listJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/main/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_Main>{children}</LayoutJob_Main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
22
src/app/dev/job/main/status/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_Status
|
||||
listDraft={listDraft as any}
|
||||
listPublish={listPublish as any}
|
||||
listReject={listReject as any}
|
||||
listReview={listReview as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/job/non_user_view/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutJob_NonUserView>{children}</LayoutJob_NonUserView>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/job/non_user_view/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Job_NonUserView data={dataJob as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
src/app/dev/job/splash/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Job_Splash } from "@/app_modules/job";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Job_Splash />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/create/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_Create>{children}</LayoutVote_Create>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
src/app/dev/vote/create/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Vote_Create } from "@/app_modules/vote";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_Create />
|
||||
</>
|
||||
);
|
||||
}
|
||||
19
src/app/dev/vote/detail/draft/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_DetailDraft voteId={voteId}>
|
||||
{children}
|
||||
</LayoutVote_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/vote/detail/draft/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailDraft dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/detail/kontribusi/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_DetailKontribusi>{children}</LayoutVote_DetailKontribusi>
|
||||
</>
|
||||
);
|
||||
}
|
||||
19
src/app/dev/vote/detail/kontribusi/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailKontribusi
|
||||
dataVote={dataVote as any}
|
||||
listKontributor={listKontributor as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/detail/main/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_MainDetail>{children}</LayoutVote_MainDetail>
|
||||
</>
|
||||
);
|
||||
}
|
||||
29
src/app/dev/vote/detail/main/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_MainDetail
|
||||
dataVote={dataVote as any}
|
||||
hasilVoting={hasilVoting}
|
||||
isKontributor={isKontributor}
|
||||
pilihanKontributor={pilihanKontributor as any}
|
||||
listKontributor={listKontributor as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
src/app/dev/vote/detail/publish/[id]/layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailPublish>{children}</LayoutVote_DetailPublish>
|
||||
</>
|
||||
);
|
||||
}
|
||||
18
src/app/dev/vote/detail/publish/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailPublish
|
||||
dataVote={dataVote as any}
|
||||
listKontributor={listKontributor as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
8
src/app/dev/vote/detail/reject/[id]/layout.tsx
Normal file
@@ -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<>
|
||||
<LayoutVote_DetailReject>{children}</LayoutVote_DetailReject>
|
||||
</>
|
||||
}
|
||||
13
src/app/dev/vote/detail/reject/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailReject dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
src/app/dev/vote/detail/review/[id]/layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { LayoutVote_DetailReview } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailReview>{children}</LayoutVote_DetailReview>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/vote/detail/review/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailReview dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/detail/riwayat_saya/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_DetailRiwayatSaya>{children}</LayoutVote_DetailRiwayatSaya>
|
||||
</>
|
||||
);
|
||||
}
|
||||
19
src/app/dev/vote/detail/riwayat_saya/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailRiwayatSaya
|
||||
dataVote={dataVote as any}
|
||||
listKontributor={listKontributor}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/detail/semua_riwayat/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_DetailSemuaRiwayat>{children}</LayoutVote_DetailSemuaRiwayat>
|
||||
</>
|
||||
);
|
||||
}
|
||||
19
src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_DetailSemuaRiwayat
|
||||
dataVote={dataVote as any}
|
||||
listKontributor={listKontributor as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/edit/[id]/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_Edit>{children}</LayoutVote_Edit>
|
||||
</>
|
||||
);
|
||||
}
|
||||
20
src/app/dev/vote/edit/[id]/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_Edit
|
||||
dataVote={data as any}
|
||||
listDaftarVote={listDaftarVote as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/vote/main/beranda/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_Beranda dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/vote/main/kontribusi/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_Kontribusi dataKontribusi={dataKontribusi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
14
src/app/dev/vote/main/layout.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<LayoutVote_Main>{children}</LayoutVote_Main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
17
src/app/dev/vote/main/riwayat/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_Riwayat
|
||||
listRiwayat={listRiwayat as any}
|
||||
listRiwayatSaya={listRiwayatSaya as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
21
src/app/dev/vote/main/status/page.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Vote_Status
|
||||
listPublish={listPublish as any}
|
||||
listReview={listReview as any}
|
||||
listDraft={listDraft as any}
|
||||
listReject={listReject as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
src/app/dev/vote/splash/page.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Vote_Splash } from "@/app_modules/vote";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_Splash />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -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 (
|
||||
<html lang="en" data-theme="light">
|
||||
<head>
|
||||
<title>HIPMI</title>
|
||||
</head>
|
||||
<body suppressHydrationWarning={true}>
|
||||
<CacheProvider value={cache}>
|
||||
<MantineProvider withGlobalStyles withNormalizeCSS>
|
||||
<Notifications position="top-center" containerWidth="250px" />
|
||||
<Notifications position="top-center" containerWidth="250px" />
|
||||
{children}
|
||||
{/* <ToastContainer position="bottom-center" />
|
||||
<AppNotif /> */}
|
||||
|
||||
7
src/app/lib/router_admin/router_admin_job.ts
Normal file
@@ -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",
|
||||
};
|
||||
8
src/app/lib/router_admin/router_admin_vote.ts
Normal file
@@ -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",
|
||||
};
|
||||
27
src/app/lib/router_hipmi/router_job.ts
Normal file
@@ -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/",
|
||||
};
|
||||
24
src/app/lib/router_hipmi/router_vote.ts
Normal file
@@ -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/",
|
||||
};
|
||||
@@ -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<any[]>([
|
||||
{
|
||||
name: "Voting",
|
||||
value: "",
|
||||
},
|
||||
{ name: "Voting", value: "" },
|
||||
]);
|
||||
|
||||
return <>
|
||||
return (
|
||||
<>
|
||||
<Stack p={24}>
|
||||
{listnya.map((e, k) => (
|
||||
<Box key={k}>
|
||||
<TextInput
|
||||
onChange={(v) => {
|
||||
const val = _.clone(listnya);
|
||||
val[k].value = v.currentTarget.value;
|
||||
setListnya([...val]);
|
||||
}}
|
||||
label={e.name}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
<Button
|
||||
onClick={() => makuro_test()}
|
||||
>Tekan Aja</Button>
|
||||
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
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
console.log(JSON.stringify(listnya, null, 4));
|
||||
}}
|
||||
>
|
||||
Hasilnya
|
||||
</Button>
|
||||
</Stack>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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<MODEL_DEFAULT_MASTER | null>(null);
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [hapusTipe, setHapusTipe] = useState({
|
||||
id: "",
|
||||
name: "",
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal opened={opened} onClose={close} centered withCloseButton={false}>
|
||||
<Stack>
|
||||
<Title order={6}>
|
||||
Anda yakin akan menghapus{" "}
|
||||
<Text span c={"red"} inherit>
|
||||
{hapusTipe.name}
|
||||
</Text>{" "}
|
||||
?
|
||||
</Title>
|
||||
<Group position="center">
|
||||
<Button onClick={() => close()}>Batal</Button>
|
||||
<Button
|
||||
onClick={() => onDelete(hapusTipe as any, close, setTipe)}
|
||||
color="red"
|
||||
>
|
||||
Hapus
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Modal>
|
||||
|
||||
<SimpleGrid
|
||||
cols={3}
|
||||
spacing="lg"
|
||||
@@ -86,15 +117,30 @@ function DetailTipeAcara({ listTipe }: { listTipe: MODEL_DEFAULT_MASTER[] }) {
|
||||
<Stack key={e.id} spacing={"xs"}>
|
||||
<Group position="apart">
|
||||
<Text>{e.name}</Text>
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => {
|
||||
setOpenEditor(true);
|
||||
setEdit(e);
|
||||
}}
|
||||
>
|
||||
<IconEditCircle color="green" />
|
||||
</ActionIcon>
|
||||
<Group>
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => {
|
||||
setOpenEditor(true);
|
||||
setEdit(e);
|
||||
}}
|
||||
>
|
||||
<IconEditCircle color="green" />
|
||||
</ActionIcon>{" "}
|
||||
<ActionIcon
|
||||
variant="transparent"
|
||||
onClick={() => {
|
||||
open();
|
||||
setHapusTipe({
|
||||
...hapusTipe,
|
||||
id: e.id,
|
||||
name: e.name,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<IconTrash color="red" />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
</Group>
|
||||
<Divider />
|
||||
</Stack>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,9 @@ export async function AdminEvent_getListTipeAcara(){
|
||||
const data = await prisma.eventMaster_TipeAcara.findMany({
|
||||
orderBy:{
|
||||
id: "asc"
|
||||
},
|
||||
where: {
|
||||
active: true
|
||||
}
|
||||
})
|
||||
return data
|
||||
|
||||
200
src/app_modules/admin/job/child/arsip/index.tsx
Normal file
@@ -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 (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Job Vacancy: Table Arsip" />
|
||||
<TableStatus listArsip={dataVote} />
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
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) => (
|
||||
<tr key={i}>
|
||||
<td>
|
||||
<Spoiler
|
||||
w={200}
|
||||
maxHeight={50}
|
||||
hideLabel="sembunyikan"
|
||||
showLabel="tampilkan"
|
||||
>
|
||||
{e.title}
|
||||
</Spoiler>
|
||||
</td>
|
||||
<td>
|
||||
<Center w={150}>
|
||||
{e.imagesId ? (
|
||||
<Button
|
||||
color="green"
|
||||
radius={"xl"}
|
||||
leftIcon={<IconEyeCheck />}
|
||||
onClick={() => {
|
||||
setImg(e.imagesId);
|
||||
open();
|
||||
}}
|
||||
>
|
||||
Lihat
|
||||
</Button>
|
||||
) : (
|
||||
<Center w={150}>
|
||||
<Text fw={"bold"} fz={"xs"} fs={"italic"}>
|
||||
Tidak ada poster
|
||||
</Text>
|
||||
</Center>
|
||||
)}
|
||||
</Center>
|
||||
</td>
|
||||
<td>
|
||||
<Spoiler
|
||||
hideLabel="sembunyikan"
|
||||
w={400}
|
||||
maxHeight={50}
|
||||
showLabel="tampilkan"
|
||||
>
|
||||
<div dangerouslySetInnerHTML={{ __html: e.content }} />
|
||||
</Spoiler>
|
||||
</td>
|
||||
<td>
|
||||
<Spoiler
|
||||
hideLabel="sembunyikan"
|
||||
w={400}
|
||||
maxHeight={50}
|
||||
showLabel="tampilkan"
|
||||
>
|
||||
<div dangerouslySetInnerHTML={{ __html: e.deskripsi }} />
|
||||
</Spoiler>
|
||||
</td>
|
||||
</tr>
|
||||
));
|
||||
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
opened={opened}
|
||||
onClose={close}
|
||||
size={"xl"}
|
||||
withCloseButton={false}
|
||||
>
|
||||
{/* <ComponentAdminVote_DetailHasil
|
||||
hasil={hasil}
|
||||
kontributor={kontributor}
|
||||
/> */}
|
||||
</Modal>
|
||||
<Box>
|
||||
<Box bg={"gray.1"} p={"xs"}>
|
||||
<Title order={6} c={"gray"}>
|
||||
ARSIP
|
||||
</Title>
|
||||
</Box>
|
||||
<ScrollArea w={"100%"}>
|
||||
<Table
|
||||
withBorder
|
||||
verticalSpacing={"md"}
|
||||
horizontalSpacing={"xl"}
|
||||
p={"md"}
|
||||
striped
|
||||
highlightOnHover
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<Center>Judul</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center>Poster</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center>Syarat Ketentuan</Center>
|
||||
</th>
|
||||
<th>
|
||||
<Center>Deskripsi</Center>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>{TableRows}</tbody>
|
||||
</Table>
|
||||
</ScrollArea>
|
||||
<Center>
|
||||
{_.isEmpty(TableRows) ? (
|
||||
<Center h={"50vh"}>
|
||||
<Title order={6}>Tidak Ada Data</Title>
|
||||
</Center>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</Center>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||