-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat] 어드민 UI 구현
- Loading branch information
Showing
30 changed files
with
955 additions
and
284 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- main | ||
- dev | ||
paths: | ||
- 'admin/**' | ||
- "admin/**" | ||
|
||
jobs: | ||
build-admin: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Hybrid-JGS Admin</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Hybrid-JGS Admin</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ChangeEvent } from "react"; | ||
|
||
interface DatePickerProps { | ||
date: string; | ||
onChangeDate: (date: string) => void; | ||
} | ||
|
||
export default function DatePicker({ date, onChangeDate }: DatePickerProps) { | ||
const handleChange = (e: ChangeEvent<HTMLInputElement>) => { | ||
onChangeDate(e.target.value); | ||
}; | ||
|
||
return ( | ||
<div className="relative max-w-sm"> | ||
<div className="absolute inset-y-0 start-0 flex items-center ps-3.5 pointer-events-none"> | ||
<img alt="달력 아이콘" src="/assets/icons/calendar.svg" /> | ||
</div> | ||
<input | ||
type="date" | ||
value={date} | ||
onChange={handleChange} | ||
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full ps-10 p-2.5" | ||
placeholder="Select date" | ||
/> | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Outlet } from "react-router-dom"; | ||
import { RushEventContext } from "@/contexts/rushEventContext"; | ||
import Header from "../Header"; | ||
|
||
export default function Layout() { | ||
return ( | ||
<div className="overflow-hidden h-screen"> | ||
<Header /> | ||
<div className="mb-[80px]"> | ||
<RushEventContext> | ||
<Outlet /> | ||
</RushEventContext> | ||
</div> | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { ChangeEvent } from "react"; | ||
|
||
interface TimePickerProps { | ||
time: string; | ||
onChangeTime: (time: string) => void; | ||
} | ||
|
||
export default function TimePicker({ time, onChangeTime }: TimePickerProps) { | ||
const handleChange = (e: ChangeEvent<HTMLInputElement>) => { | ||
/** | ||
* 시간-분 까지만 선택 가능 | ||
* 초는 0초를 디폴트로 넣는다 | ||
*/ | ||
const time = `${e.target.value}:00`; | ||
onChangeTime(time); | ||
}; | ||
|
||
return ( | ||
<div className="max-w-[8rem] mx-auto"> | ||
<div className="relative"> | ||
<div className="absolute inset-y-0 end-0 top-0 flex items-center pe-3.5 pointer-events-none"> | ||
<svg | ||
className="w-4 h-4 text-gray-500" | ||
aria-hidden="true" | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="currentColor" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
fillRule="evenodd" | ||
d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm11-4a1 1 0 1 0-2 0v4a1 1 0 0 0 .293.707l3 3a1 1 0 0 0 1.414-1.414L13 11.586V8Z" | ||
clipRule="evenodd" | ||
/> | ||
</svg> | ||
</div> | ||
<input | ||
type="time" | ||
id="time" | ||
className="bg-gray-50 border leading-none border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5" | ||
min="09:00" | ||
max="18:00" | ||
value={time} | ||
onChange={handleChange} | ||
required | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
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,7 @@ | ||
export const RUSH_SECTION = { | ||
EVENT_LIST: "event_list", | ||
APPLICANT_LIST: "applicant_list", | ||
SELECTION_MANAGE: "selection_manage", | ||
GIFT_MANAGE: "gift_manage", | ||
}; | ||
export type RushSectionType = (typeof RUSH_SECTION)[keyof typeof RUSH_SECTION]; |
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,4 @@ | ||
export const TAB_OPTIONS = [ | ||
{ title: "캐스퍼 일렉트릭 봇 만들기 추첨 이벤트", route: "/lottery" }, | ||
{ title: "선착순 밸런스 게임 이벤트", route: "/rush" }, | ||
]; |
Oops, something went wrong.