Skip to content

Commit 13bf747

Browse files
committed
feat: qr checkIn 페이지 추가
1 parent 0c0e4c0 commit 13bf747

6 files changed

Lines changed: 35 additions & 11 deletions

File tree

Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Loading

src/features/ticket/ui/QrScanner.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const QrScannerComponent = () => {
5353
};
5454

5555
const checkInApiCall = async (qrData: string) => {
56-
console.log("스캔된 QR 데이터:", qrData);
5756
try {
5857
const params = new URLSearchParams(qrData.replace(/-/g, '='));
5958
const orderIdStr = params.get('orderId');
@@ -88,7 +87,7 @@ const QrScannerComponent = () => {
8887
)}
8988
{scanResult && (
9089
<p className="mt-4 text-green-700 font-semibold">
91-
스캔 결과: {scanResult}
90+
스캔 완료
9291
</p>
9392
)}
9493
</div>

src/shared/types/dashboardType.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import participants from '../../../public/assets/dashboard/menu/Participants(bla
1818
import clickedParticipants from '../../../public/assets/dashboard/menu/Participants(pink).svg';
1919
import response from '../../../public/assets/dashboard/menu/Response(black).svg';
2020
import clickedResponse from '../../../public/assets/dashboard/menu/Response(pink).svg';
21+
import qr from '../../../public/assets/dashboard/menu/QR(black).svg';
22+
import clickedQr from '../../../public/assets/dashboard/menu/QR(pink).svg';
2123

2224
export const getMenuLists = (id: string | number) => [
2325
{ text: '대시보드', icon: dashboard, clickedIcon: clickedDashboard, path: `/dashboard/${id}` },
@@ -34,10 +36,6 @@ export const getMenuLists = (id: string | number) => [
3436
{ text: '사용자 응답 관리', icon: response, clickedIcon: clickedResponse, path: `/dashboard/${id}/responses-management`},
3537
{ text: '이메일 예약 발송', icon: email, clickedIcon: clickedEmail, path: `/dashboard/${id}/email` },
3638
{ text: '보낸 이메일', icon: sentEmail, clickedIcon: clickedSentEmail, path: `/dashboard/${id}/mailBox` },
37-
{
38-
text: '구매/참가자 관리',
39-
icon: participants,
40-
clickedIcon: clickedParticipants,
41-
path: `/dashboard/${id}/participants-management`,
42-
},
39+
{ text: '구매/참가자 관리', icon: participants, clickedIcon: clickedParticipants, path: `/dashboard/${id}/participants-management` },
40+
{ text: 'QR코드로 체크인', icon: qr, clickedIcon: clickedQr, path: `/dashboard/${id}/check-in` },
4341
];

src/shared/ui/backgrounds/DashboardLayout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useState } from 'react';
2-
import { useLocation, useNavigate } from 'react-router-dom';
2+
import { useLocation, useNavigate, useParams } from 'react-router-dom';
33
import Header from '../../../../design-system/ui/Header';
44
import dashboardMenu from '../../../../public/assets/dashboard/DashboardMenu.svg';
55
import SideBar from '../../../widgets/dashboard/ui/main/SideBar';
@@ -17,12 +17,13 @@ const DashboardLayout = ({ pinkBg = false, children, centerContent }: DashboardL
1717
const [modalOpen, setModalOpen] = useState(false);
1818

1919
const home = /^\/dashboard\/[^/]+$/.test(location.pathname);
20+
const { id } = useParams();
2021

2122
const handleBackClick = () => {
2223
if (home) {
2324
navigate('/');
2425
} else {
25-
navigate(-1);
26+
navigate(`/dashboard/${id}`, { relative: 'path' });
2627
}
2728
};
2829

src/widgets/dashboard/ui/main/SideBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const SideBar = ({ onClose }: { onClose: () => void }) => {
3131
};
3232

3333
return (
34-
<div className="flex flex-col mx-auto w-full h-full max-w-lg fixed z-40 bg-white border-[0.5px] border-black py-3">
34+
<div className="flex flex-col mx-auto w-full h-full max-w-lg fixed z-40 bg-white border-[0.5px] border-black py-3 overflow-y-auto">
3535
<Header
3636
centerContent="대시보드"
3737
rightContent={<img src={menuBar} onClick={onClose} className="cursor-pointer z-80 relative" />}

0 commit comments

Comments
 (0)