# Voting
## feat - Voting user - Halaman kontribusi - Halaman riwayat ### No issuue
This commit is contained in:
19
src/app/dev/vote/detail/draft/[id]/layout.tsx
Normal file
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
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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { LayoutVote_DetailDraft } from "@/app_modules/voting";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailDraft>{children}</LayoutVote_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Vote_DetailDraft } from "@/app_modules/voting";
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailDraft />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailKontribusi } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailKontribusi } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
19
src/app/dev/vote/detail/kontribusi/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Vote_DetailKontribusi } from "@/app_modules/voting";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailKontribusi />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_MainDetail } from "@/app_modules/voting";
|
||||
import { LayoutVote_MainDetail } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
29
src/app/dev/vote/detail/main/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Vote_MainDetail } from "@/app_modules/voting";
|
||||
|
||||
export default async function Page(){
|
||||
return<>
|
||||
<Vote_MainDetail/>
|
||||
</>
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
18
src/app/dev/vote/detail/publish/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Vote_DetailPublish } from "@/app_modules/voting";
|
||||
|
||||
export default function Page(){
|
||||
return <>
|
||||
<Vote_DetailPublish/>
|
||||
</>
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailReject } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailReject } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||
13
src/app/dev/vote/detail/reject/[id]/page.tsx
Normal file
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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Vote_DetailReject } from "@/app_modules/voting";
|
||||
|
||||
export default async function Page() {
|
||||
return <>
|
||||
<Vote_DetailReject/>
|
||||
</>
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailReview } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailReview } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Vote_DetailReview } from "@/app_modules/voting";
|
||||
import { Vote_getOnebyId } from "@/app_modules/voting/fun/get/get_one_by_id";
|
||||
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;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailRiwayatSaya } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailRiwayatSaya } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
19
src/app/dev/vote/detail/riwayat_saya/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Vote_DetailRiwayatSaya } from "@/app_modules/voting";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailRiwayatSaya />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/voting";
|
||||
import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
19
src/app/dev/vote/detail/semua_riwayat/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Vote_DetailSemuaRiwayat } from "@/app_modules/voting";
|
||||
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_DetailSemuaRiwayat />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user