Skip to content

Commit 6ed5831

Browse files
committed
2 parents bd34852 + 7f186d7 commit 6ed5831

7 files changed

Lines changed: 28 additions & 45 deletions

File tree

apps/ticket-admin/src/app/events/[eventId]/edit/coupon/_clientBoundary/CouponManagementClient/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ export const CouponManagementClient = ({ eventId }: Props) => {
281281
used: coupon.usable,
282282
})}
283283
>
284-
{coupon.usable ? "Used ticket" : "Usable"}
284+
{coupon.usable ? "Used" : "Usable"}
285285
</span>
286286
</td>
287287
</tr>

apps/ticket-admin/src/app/users/_clientBoundary/UserManagementClient/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export const UserManagementClient = () => {
5454
return (
5555
<div className={cx("container")}>
5656
<header className={cx("header")}>
57-
<Typography type="title32">User Management</Typography>
57+
<Typography type="title32">Staff Management</Typography>
5858
<Typography type="body14" color="gray300">
59-
* 권한을 바꾼 후 적용하려면 로그인을 다시 해주세요.
59+
* 권한을 바꾼 후 적용하려면 해당 스태프가 다시 로그인하게 해주세요.
6060
</Typography>
6161
</header>
6262
<main>

apps/ticket-admin/src/data/admin/getTimeTables/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const timeTableOptions = (
1919
params: TimeTableParams,
2020
): PermitQueryOptions<TimeTableResponse | null> => {
2121
return {
22-
queryKey: [ADMIN_QUERY_KEYS.TICEKTS, params.eventId],
22+
queryKey: [ADMIN_QUERY_KEYS.TIMETABLE, params.eventId],
2323
queryFn: () => {
2424
const url = getPathUrl(API_URL.ADMIN.TIME_TABLE, { eventId: params.eventId });
2525

apps/ticket-admin/src/data/admin/queryKeys.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export const ADMIN_QUERY_KEYS = {
55
EVENTS: `${queryKeyPrefix}events`,
66
EVENT_DETAIL: `${queryKeyPrefix}event_detail`,
77
TICEKTS: `${queryKeyPrefix}tickets`,
8+
TIMETABLE: `${queryKeyPrefix}timetable`,
89
TICEKTS_DETAIL: `${queryKeyPrefix}tickets_detail`,
910
COUPONS: `${queryKeyPrefix}coupons`,
1011
USER: `${queryKeyPrefix}user`,

apps/ticket-admin/src/shared/components/Header/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const Header = () => {
6262
type="body16"
6363
color="gray400"
6464
>
65-
Users
65+
Staff
6666
</Typography>
6767
</Link>
6868

apps/ticket/src/app/(pages)/event/[eventId]/time-table/_clientBoundary/TimeTableClient/index.tsx

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -294,59 +294,33 @@ function calcBlockPosition(
294294
const start = parseCustomDate(block.blockStartDate);
295295
const end = parseCustomDate(block.blockEndDate);
296296

297-
const durationInHours = (end.getTime() - start.getTime()) / (1000 * 60 * 60);
298-
299-
// 타임테이블 시작 시간을 기준으로 계산
300297
if (timeSlots.length === 0) {
301-
const DISABLE_DISPLAY_HEIGHT = -200;
302-
303-
return { top: DISABLE_DISPLAY_HEIGHT, height: durationInHours * hourHeight, left: 0 };
298+
return { top: -9999, height: 0, left: 0 };
304299
}
305300

306301
const tableStartTime = timeSlots[0].datetime.getTime();
307302
const tableEndTime = timeSlots[timeSlots.length - 1].datetime.getTime();
308303
const blockStartTime = start.getTime();
304+
const blockEndTime = end.getTime();
309305

310-
// 블록이 타임테이블 범위 내에 있는지 확인
311-
if (blockStartTime < tableStartTime) {
312-
const DISABLE_DISPLAY_HEIGHT = 0;
313-
const stage = stages.find((a) => a.stageNotionId === block.blockStageNotionId);
314-
const stageSequence = stage ? stage.sequence : 0;
315-
316-
return {
317-
top: DISABLE_DISPLAY_HEIGHT,
318-
height: durationInHours * hourHeight,
319-
left: stageSequence * columnWidth,
320-
};
321-
}
322-
323-
if (tableEndTime < blockStartTime) {
324-
return {
325-
top: -200,
326-
height: 0,
327-
left: 0,
328-
};
306+
// 완전히 범위 밖이면 숨김 처리
307+
if (blockEndTime <= tableStartTime || blockStartTime >= tableEndTime) {
308+
return { top: -9999, height: 0, left: 0 };
329309
}
330310

331-
// 타임테이블 시작 시간부터 블록 시작/종료 시간까지의 차이를 시간 단위로 계산
332-
const blockEndTime = end.getTime();
311+
// 일부만 겹치는 경우는 클리핑
312+
const displayStart = Math.max(blockStartTime, tableStartTime);
313+
const displayEnd = Math.min(blockEndTime, tableEndTime);
333314

334-
const timeDiffStartMs = blockStartTime - tableStartTime;
335-
const timeDiffEndMs = blockEndTime - tableStartTime;
336-
const timeDiffStartInHours = timeDiffStartMs / (1000 * 60 * 60);
337-
const timeDiffEndInHours = timeDiffEndMs / (1000 * 60 * 60);
338-
const startMinutes = start.getMinutes();
339-
const endMinutes = end.getMinutes();
315+
const timeDiffStartInHours = (displayStart - tableStartTime) / (1000 * 60 * 60);
316+
const timeDiffEndInHours = (displayEnd - tableStartTime) / (1000 * 60 * 60);
340317

341318
// 해당 stage의 sequence 찾기
342319
const stage = stages.find((a) => a.stageNotionId === block.blockStageNotionId);
343320
const stageSequence = stage ? stage.sequence : 0;
344321

345-
// top 위치 = 시작 시간 차이(시간) * hourHeight + 시작 분 오프셋
346-
const top = timeDiffStartInHours * hourHeight + (startMinutes / 60) * hourHeight;
347-
// height = 종료 시간 위치 - 시작 시간 위치
348-
const endTop = timeDiffEndInHours * hourHeight + (endMinutes / 60) * hourHeight;
349-
const height = endTop - top;
322+
const top = timeDiffStartInHours * hourHeight;
323+
const height = Math.max((timeDiffEndInHours - timeDiffStartInHours) * hourHeight, 2); // 최소 높이 보장
350324
const left = stageSequence * columnWidth;
351325

352326
return { top, height, left };
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "@permit/design-system/styles/variables" as theme;
2+
13
.event_venue {
24
margin-top: 20px;
35
}
@@ -7,11 +9,17 @@
79
}
810

911
.qr_code_wrap {
10-
padding: 80px;
12+
margin: 68px;
13+
background-color: theme.$white;
14+
cursor: pointer;
15+
border-radius: 12px;
16+
padding: 12px;
1117

1218
@media (max-width: 768px) {
19+
margin: 28px;
20+
1321
display: flex;
1422
justify-content: center;
15-
padding: 40px;
23+
padding: 12px;
1624
}
1725
}

0 commit comments

Comments
 (0)