261103_01_ENH: 티켓 비고는 평가위원 계정에서 숨김

This commit is contained in:
2026-11-03 09:49:44 +09:00
parent cfcc474f6e
commit a07db93423
3 changed files with 60 additions and 6 deletions

View File

@@ -68,13 +68,13 @@ const PerformancePage = () => {
const calendarOpen = isDialogOpen("assignCalendarDialog");
const {data: detail, refetch: refetchDetail} = usePerformanceQuery(detailOpen ? selectedId : "");
const isFoundation = isFoundationRole(auth.user?.userRole);
const canRegister = isInternalRole(auth.user?.userRole);
const canEdit = canRegister || isFoundation;
const isInternal = isInternalRole(auth.user?.userRole);
const isResearcher = isResearcherRole(auth.user?.userRole);
const canEdit = isInternal || isFoundation;
const {data: applyCounts = []} = useMonitoringApplyUsersCountQuery(canEdit && calendarOpen);
const {data: reviewers = []} = useUserListQuery(MONITORING_USER_ROLE, canEdit && calendarOpen);
const applyCountMap = new Map(applyCounts.map((item) => [item.performanceId, item.applyCnt]));
const canDelete = isResearcherRole(auth.user?.userRole);
const visibleData = isMonitoring
? data.filter((item) => Boolean(auth.user?.userId && item.performanceAssignList.some((assign) => assign.assignUser === auth.user?.userId)))
@@ -190,7 +190,7 @@ const PerformancePage = () => {
<CalendarDays className="h-4 w-4" />배정 캘린더
</Button>
)}
{canRegister && <Button type="button" onClick={() => showDialog("performanceExcelRegisterDialog")}><Upload className="h-4 w-4" />공연 등록</Button>}
{isInternal && <Button type="button" onClick={() => showDialog("performanceExcelRegisterDialog")}><Upload className="h-4 w-4" />공연 등록</Button>}
<ExcelDownloadButton requestExcelExport={downloadPerformances} />
</div>
<DataTable
@@ -215,7 +215,7 @@ const PerformancePage = () => {
codes={codes}
reviewSlots={reviewSlots}
canEdit={canEdit}
canDelete={canDelete}
canDelete={isResearcher}
onSave={async (performance) => {
await updateMutation.mutateAsync(performance);
await Promise.all([refetchList(), refetchDetail()]);

View File

@@ -342,7 +342,9 @@ export function PerformanceDetailDialog({
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationStatus}>
{isEditing ? <FilterSelect value={String(draft.ticketReservationStatus)} onChange={(value) => updateDraft("ticketReservationStatus", Number(value))} options={codes.ticket_reservation_status ?? []} placeholder="티켓 예약" /> : getCodeLabel(codes, "ticket_reservation_status", draft.ticketReservationStatus)}
</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationMemo}>{isEditing ? <Input value={draft.ticketReservationMemo} onChange={(event) => updateDraft("ticketReservationMemo", event.target.value)} /> : draft.ticketReservationMemo}</DetailRow>
{!isMonitoring && (
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationMemo}>{isEditing ? <Input value={draft.ticketReservationMemo} onChange={(event) => updateDraft("ticketReservationMemo", event.target.value)} /> : draft.ticketReservationMemo}</DetailRow>
)}
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringDate}>{isEditing ? <Input type="date" value={draft.performanceMonitoringSchedule.monitoringDate ?? ""} onChange={(event) => updateSchedule("monitoringDate", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringDate}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringTimeInfo}>{isEditing ? <Input value={draft.performanceMonitoringSchedule.monitoringTimeInfo ?? ""} onChange={(event) => updateSchedule("monitoringTimeInfo", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringTimeInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringAddress}>{isEditing ? <Input value={draft.performanceMonitoringSchedule.monitoringAddress ?? ""} onChange={(event) => updateSchedule("monitoringAddress", event.target.value)} /> : draft.performanceMonitoringSchedule.monitoringAddress}</DetailRow>