Skip to content

Commit

Permalink
Merge pull request #64 from softeerbootcamp4th/develop
Browse files Browse the repository at this point in the history
[Deploy] version 0.1.0
  • Loading branch information
Dunkkkk authored Aug 23, 2024
2 parents 0ce15fb + 011fea8 commit f4ab340
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 13 deletions.
20 changes: 10 additions & 10 deletions Caecae/src/features/FindingGameLanding/EventPeriod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const EventPeriod = () => {
<SmileBadge width={150} badgeType="blue" />
</div>
<p className="text-[white] text-center text-[22px] line-[140%]">
참여 기간: 7.15 (월) - 7.21 (일){" "}
참여 기간: 8.26 (월) - 9.1 (일){" "}
<span className="text-[#00AAD2]">오후 3시 15분</span>
<br />
지급 날짜: 7.29 (월)부터 주말・공휴일 제외 순차적으로 발송
지급 날짜: 9.9 (월)부터 주말・공휴일 제외 순차적으로 발송
</p>
<div className="flex flex-col justify-center items-center gap-[80px] mt-[60px]">
<div className="flex">
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.15
8.26
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -35,7 +35,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.16
8.27
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -45,7 +45,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.17
8.28
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -55,7 +55,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.18
8,29
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -66,7 +66,7 @@ const EventPeriod = () => {
<div className="flex">
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.19
8.30
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -76,7 +76,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.20
8.31
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -86,7 +86,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.21
9.1
</div>
<p className="text-[white] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 ">
315명
Expand All @@ -96,7 +96,7 @@ const EventPeriod = () => {
<img src="/assets/arrow.svg" alt="arrow" />
<div className="relative">
<div className="text-[white] text-[18px] font-bold absolute left-[60px] transform -translate-x-1/2 -translate-y-1/2 bg-[blue] px-[8px] py-[2px] rounded-2xl">
7.29
9.9
</div>
<p className="text-[black] text-[18px] font-bold absolute left-[60px] top-[60px] transform -translate-x-1/2 -translate-y-1/2 whitespace-nowrap">
쿠폰 지급
Expand Down
48 changes: 45 additions & 3 deletions Caecae/src/pages/Admin/AdminPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ const AdminPage = () => {
const [answer, setAnswer] = useState<FindMeAnswer>(defaultFindMeAnswer);
const [mode, setMode] = useState("findme");
const [winnders, setWinnders] = useState<WinnerDTO[]>([]);
const [eventStartDay, setEventStartDay] = useState("");
const [eventEndtDay, setEventEndtDay] = useState("");
const [eventWinnderCount, setEventWinnerCount] = useState(0);

function changeQuestionURL(url: string) {
const newFindme = [...findmes];
Expand Down Expand Up @@ -378,16 +381,55 @@ const AdminPage = () => {
<p className="text-[14px]">이벤트 기간</p>
<div className="w-[30px]"></div>
<input
type="text"
type="datetime-local"
className="border border-black p-1"
value={eventStartDay}
onChange={(date) => {
console.log(date.target.value);
setEventStartDay(date.target.value);
}}
placeholder="Enter text here"
/>
<div className="w-[30px]"></div>
<input
type="text"
type="datetime-local"
className="border border-black p-1"
value={eventEndtDay}
onChange={(date) => {
setEventEndtDay(date.target.value);
}}
placeholder="Enter text here"
/>
<input
type="number"
className="border border-black mx-[20px]"
value={eventWinnderCount}
onChange={(date) => {
setEventWinnerCount(Number(date.target.value));
}}
placeholder="Enter text here"
/>
<div
className="w-[100px] h-[50px] bg-slate-200 flex justify-center items-center"
onClick={async () => {
if (mode == "findme") {
const dateOnly = eventStartDay.split("T")[0];
await huynxios.post("/api/admin/finding/period", {
startDate: dateOnly,
});
} else {
const start = eventStartDay + ":00";
const end = eventEndtDay + ":00";
await huynxios.post("/api/admin/racing/period", {
startTime: start,
endTime: end,
numberOfWinners: eventWinnderCount,
});
}
}}
>
<p>저장하기</p>
</div>
</div>
<p className="text-[20px] font-semibold">상세 이벤트 설정</p>
<div className="flex">
Expand All @@ -403,7 +445,7 @@ const AdminPage = () => {
<p
className="text-[14px]"
onClick={() => {
changeMode("");
changeMode("racinggame");
}}
>
전력으로 513km
Expand Down

0 comments on commit f4ab340

Please sign in to comment.