## feat
- Voting user
- Halaman kontribusi
- Halaman riwayat
### No issuue
This commit is contained in:
2024-02-16 17:20:06 +08:00
parent 0dd8e287f4
commit e629157960
135 changed files with 3160 additions and 1501 deletions

View 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>
</>
);
}

View 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} />
</>
);
}

View File

@@ -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>
</>
);
}

View File

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

View File

@@ -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({

View 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}
/>
</>
);
}

View File

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

View File

@@ -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({

View 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}
/>
</>
);
}

View File

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

View File

@@ -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 }) {

View 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}
/>
</>
);
}

View File

@@ -1,7 +0,0 @@
import { Vote_DetailPublish } from "@/app_modules/voting";
export default function Page(){
return <>
<Vote_DetailPublish/>
</>
}

View File

@@ -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}) {

View 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} />
</>
);
}

View File

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

View File

@@ -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 }) {

View File

@@ -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;

View File

@@ -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({

View 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}
/>
</>
);
}

View File

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

View File

@@ -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({

View 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}
/>
</>
);
}

View File

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