This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implements survey-unsubmit-list page
- Loading branch information
1 parent
dc4754f
commit e1188f7
Showing
11 changed files
with
160 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/src/app/console/survey/[id]/unsubmit/_components/SurveyUnsubmitListTable.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { DataTable } from '@/components/DataTable' | ||
import type { UnsubmitRosterListItem } from '@/lib/types/roster' | ||
import type { ColumnDef } from '@tanstack/react-table' | ||
|
||
export default function SurveyUnsubmitListTable({ | ||
rosters | ||
}: { | ||
rosters: UnsubmitRosterListItem[] | ||
}) { | ||
const columns: ColumnDef<UnsubmitRosterListItem>[] = [ | ||
{ | ||
accessorKey: 'name', | ||
header: '이름' | ||
}, | ||
{ | ||
accessorKey: 'admissionYear', | ||
header: '학번' | ||
} | ||
] | ||
|
||
return <DataTable columns={columns} data={rosters} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Button } from '@/components/ui/button' | ||
import { getSurveyUnsubmits } from '@/lib/actions' | ||
import Link from 'next/link' | ||
import SurveyUnsubmitListTable from './_components/SurveyUnsubmitListTable' | ||
|
||
export default async function SurveyUnsubmitPage({ | ||
params | ||
}: { | ||
params: { | ||
id: number | ||
} | ||
}) { | ||
const surveyUnsubmitList = await getSurveyUnsubmits(params.id) | ||
|
||
return ( | ||
<main className="mx-auto flex w-full flex-grow flex-col items-center justify-start"> | ||
<div className="mt-4 flex w-full items-center justify-between px-4 text-left sm:px-6"> | ||
<h1 className="text-base font-bold sm:text-xl">미응답자 명단</h1> | ||
<Link href="/console/survey"> | ||
<Button variant="outline">목록으로</Button> | ||
</Link> | ||
</div> | ||
<div className="flex w-full flex-grow flex-col gap-5 py-4 sm:px-6"> | ||
<SurveyUnsubmitListTable rosters={surveyUnsubmitList.rosters} /> | ||
</div> | ||
</main> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters