# Voting
## feat - Voting user - Halaman kontribusi - Halaman riwayat ### No issuue
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { AdminVote_Riwayat } from "@/app_modules/admin/voting";
|
||||
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 />
|
||||
<AdminVote_Riwayat dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
import { AdminVote_TablePublish } from "@/app_modules/admin/voting";
|
||||
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() {
|
||||
return<>
|
||||
<AdminVote_TablePublish/>
|
||||
</>
|
||||
const dataVote = await AdminVote_getListTableByStatusId("1")
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminVote_TablePublish dataVote={dataVote} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
import { AdminVote_TableReject } from "@/app_modules/admin/voting";
|
||||
|
||||
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() {
|
||||
return<>
|
||||
<AdminVote_TableReject/>
|
||||
const dataVote = await AdminVote_getListTableByStatusId("4");
|
||||
return (
|
||||
<>
|
||||
<AdminVote_TableReject dataVote={dataVote as any}/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { AdminVote_TableReview } from "@/app_modules/admin/voting";
|
||||
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 />
|
||||
<AdminVote_TableReview listVote={listVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,20 @@
|
||||
import { AdminVote_Main } from "@/app_modules/admin/voting";
|
||||
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 />
|
||||
<AdminVote_Main
|
||||
countPublish={countPublish as number}
|
||||
countReview={countReview as number}
|
||||
countDraft={countDraft as number}
|
||||
countReject={countReject as number}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_Create } from "@/app_modules/voting";
|
||||
import { LayoutVote_Create } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Vote_Create } from "@/app_modules/voting";
|
||||
import { Vote_Create } from "@/app_modules/vote";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
|
||||
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 />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_Edit } from "@/app_modules/voting";
|
||||
import { LayoutVote_Edit } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
20
src/app/dev/vote/edit/[id]/page.tsx
Normal file
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}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Vote_Edit } from "@/app_modules/voting";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Vote_Edit />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
import { Vote_Beranda } from "@/app_modules/voting";
|
||||
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() {
|
||||
return<>
|
||||
<Vote_Beranda/>
|
||||
</>
|
||||
const dataVote = await Vote_getAllListPublish()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Vote_Beranda dataVote={dataVote as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Vote_Kontribusi } from "@/app_modules/voting";
|
||||
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 />
|
||||
<Vote_Kontribusi dataKontribusi={dataKontribusi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LayoutVote_Main } from "@/app_modules/voting";
|
||||
import { LayoutVote_Main } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
import { Vote_Riwayat } from "@/app_modules/voting";
|
||||
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 />
|
||||
<Vote_Riwayat
|
||||
listRiwayat={listRiwayat as any}
|
||||
listRiwayatSaya={listRiwayatSaya as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Vote_Status } from "@/app_modules/voting";
|
||||
import { Vote_getListByStatusId } from "@/app_modules/voting/fun/get/get_list_status_by_status_id";
|
||||
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");
|
||||
@@ -7,6 +7,7 @@ export default async function Page() {
|
||||
const listDraft = await Vote_getListByStatusId("3");
|
||||
const listReject = await Vote_getListByStatusId("4");
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Vote_Status
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Vote_Splash } from "@/app_modules/voting";
|
||||
import { Vote_Splash } from "@/app_modules/vote";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user