Compare commits

..

18 Commits

Author SHA1 Message Date
4566276e64 Merge pull request '261026_02_ENH: 변경 타입에 clearLabel을 전체 -> 선택 해제로 수정' (#18) from develop into master
Reviewed-on: #18
2026-10-26 17:21:35 +09:00
b02abfe77c Merge pull request '261026_01_ENH: 공연 상세정보에 관리번호(NCAS), 변경 메모 추가' (#17) from develop into master
Reviewed-on: #17
2026-10-26 16:23:18 +09:00
39de5a9f6f Merge pull request '260909_01_ENH: 문자 미리보기는 의미가 없어서 제거' (#16) from develop into master
Reviewed-on: #16
2026-09-09 15:09:40 +09:00
a2940f2432 Merge pull request '260826_01_ENH: notihub 수정으로 인한 후속 조치' (#15) from develop into master
Reviewed-on: #15
2026-08-26 12:29:15 +09:00
a8e38a928e Merge pull request 'develop' (#14) from develop into master
Reviewed-on: #14
2026-08-19 11:10:19 +09:00
8855393723 Merge pull request '260806_01_ENH: 문자 템플릿 저장 json에서 form 방식으로 교체' (#13) from develop into master
Reviewed-on: #13
2026-08-06 14:36:56 +09:00
95a118b65e Merge pull request '260728_01_ENH: 연구원 계정에 사업 삭제 기능 부여' (#12) from develop into master
Reviewed-on: #12
2026-07-28 14:58:56 +09:00
daf5514124 Merge pull request '260723_01_ENH: 모니터링 배정 다이얼로그 디폴트 페이지 사이즈 변동 적용 되게 수정' (#11) from develop into master
Reviewed-on: #11
2026-07-23 09:16:29 +09:00
ad5b50088a Merge pull request '260713_01_ENH: 미진행인 모니터링 평가에 대해서도 upload가 가능하도록 수정 및 재단 계정에서도 업로드 가능하게 수정' (#10) from develop into master
Reviewed-on: #10
2026-07-13 12:12:36 +09:00
0f59300b02 Merge pull request 'develop' (#9) from develop into master
Reviewed-on: #9
2026-07-08 16:56:42 +09:00
2e7ce34894 Merge pull request '260708_01_ENH: api 응답 대기시간 300초로 수정' (#8) from develop into master
Reviewed-on: #8
2026-07-08 14:31:17 +09:00
ebb00ca2ed Merge pull request '260707_01_ENH: 모니터링 출발/도착 버튼은 모니터링 일자 이후로 부터 노출되게 수정 및 관리자는 출발 도착 삭제 가능하게 수정' (#7) from develop into master
Reviewed-on: #7
2026-07-07 15:09:06 +09:00
19a85882fb Merge pull request '260702_04_ENH: KON 조회 compact 조회에서 전체 조회로 수정' (#6) from develop into master
Reviewed-on: #6
2026-07-02 16:09:34 +09:00
bf19690c11 Merge pull request '260702_03_ENH: 사용자 페이지 페이지네이션 제거' (#5) from develop into master
Reviewed-on: #5
2026-07-02 15:47:26 +09:00
999ba522cb Merge pull request '260702_02_ENH: 페이지네이션 제거' (#4) from develop into master
Reviewed-on: #4
2026-07-02 15:44:23 +09:00
ab9d372d88 Merge pull request 'develop' (#3) from develop into master
Reviewed-on: #3
2026-07-02 11:38:17 +09:00
91f885da12 Merge pull request '260623_07_ENH: 필터 옵션에 불필요 내용 제거, 모니터링에서 리스트 클릭시 select box에 선택 내용 적용 제거, 모니터링에서 도착이 아닌 경우 업로드 못하게 조치, 지자체 파일 업로드 항시 가능하게 수정' (#2) from develop into master
Reviewed-on: #2
2026-06-23 16:20:28 +09:00
363cae4b93 Merge pull request 'develop' (#1) from develop into master
Reviewed-on: #1
2026-06-23 15:25:44 +09:00
3 changed files with 29 additions and 193 deletions

View File

@@ -230,7 +230,6 @@ When implementation is complete, report in Korean:
- Treat the current React version, component style, state management, routing, styling, and test approach as authoritative.
- Do not perform unrelated class-to-hook, JavaScript-to-TypeScript, state-library, styling-system, or React-to-Next.js migrations.
- Keep components focused and follow the repository's established split between presentation, state, data access, and side effects.
- Do not use nested ternary expressions. Use clear `if`/`else` branches, early returns, or well-named intermediate variables instead; a single, non-nested ternary is acceptable only when it remains immediately readable.
- Keep effects dependency-correct and clean up subscriptions, timers, listeners, and in-flight work where applicable.
- Use stable semantic keys and preserve accessibility, loading, empty, error, disabled, and success states.
- Preserve public component props and shared UI contracts unless a coordinated breaking change is explicitly approved.
@@ -267,35 +266,6 @@ Before each related task, read the current contents of every matching reference,
If a task spans multiple scopes, read every matching reference. Generated files under `.agent-harness/references/` are read-only copies; edit KriFrontCommon's `.agent/consumer.md` or `.agent/consumer-references/` and recompose instead.
## Noti-hub SMS Types
- `MessageType.SMS = 21`, `LMS = 22`, `MMS = 23`; `ChannelType.SMS = 2` is unchanged. `SMS_TYPE_ARRAY` and `SmsType` include all three.
- `LMS_MMS = 22` remains a deprecated source-compatibility alias for LMS only. It does not represent MMS. Enum reverse lookup for 22 returns LMS. Use numeric bulk-list paths; the server no longer accepts LMS_MMS in paths. Numeric 21/22/23 bulk-list requests all return the entire SMS channel, not type-filtered lists.
- Requests retain their existing URLs/body shapes. The server chooses the actual type per recipient after substitution: attachment -> MMS; otherwise title or UTF-8 body >= 90 bytes -> LMS; otherwise SMS.
- Refresh templates from the save response (`tmplatTy`); display actual delivery types from `sendTy`, not the template or result code. A bulk can contain multiple SMS types. LMS/MMS share result codes; use existing server result labels.
- SMS, LMS, MMS and KKO use cancellation code 9998. Verify with `npm run typecheck`, `npm run build`, and `node --test tests/noti-hub-sms.test.mjs`.
## Noti-hub Reservation Cancellation
- Import cancellation types, constants, and helpers from `@kri/common/noti-hub` only. They are runtime-neutral and require no optional peers.
- Individual current cancellation state is determined by resultCode via isReserveCanceledResult; bulk current state is cancellationStatus (NONE/PARTIAL/ALL). These describe current cancellation state, not cancellation eligibility. cancelDt and cancelUser are request history, not current state.
- SendResultInfo, SendInfo, and BulkSendInfo expose optional cancelable. Use isSendCancelable(item), which returns true only for cancelable === true, for cancellation eligibility; missing values from older responses are treated as false. Never infer eligibility from cancelDt, result labels, or result codes.
- cancelable reflects query-time state and may change before cancellation. Determine the final outcome from SendCancelResponse counts.
- sendIdx is the single-cancel identifier, not cmid. It is absent from the latest abbreviated report (/api/v1/report/last/send/...). Request sendIdx must be a positive integer; bulkSendKey is required and at most 32 characters.
- EMAIL_RESERVE_CANCELED_RESULT_CODE is 108 for EMAIL. SMS_KKO_RESERVE_CANCELED_RESULT_CODE is 9998 for SMS, LMS, MMS, and KKO. Unknown message types are not recognized as canceled.
- Display the server's resultViewLabel/resultLabel ("예약 취소"). There is no separate result-code list API.
- HTTP 200 can contain notCancelableCount. parseSendCancelResponse validates nonnegative integer counts and targetCount = canceledCount + alreadyCanceledCount + notCancelableCount, throwing TypeError on invalid data. Bulk targetCount counts currently registered detail rows; response canceledCount counts only cancellations made by that request.
- Existing response fields are unchanged; all added fields on existing types are optional. Verify with npm run typecheck and npm run build.
## HTTP Streaming
- `@kri/common/http` HTTP clients expose streamGet/streamPost/streamPut/streamPatch/streamDel, returning HttpStreamResponse (status, statusText, headers, url, nullable body).
- Streaming shares ordinary authentication, URL, body and HTTP-error policy. Read body incrementally; no automatic JSON/NDJSON/SSE parsing or reconnect is performed.
- Streaming options accept an external AbortSignal. Caller cancellation raises AbortError without an HTTP error notification. Cancel the body when it will not be consumed.
- timeoutMs covers connection/headers (and an HTTP error body); idleTimeoutMs covers inactivity after successful headers and resets on consumed chunks. Both default to the client's defaultTimeoutMs (60 seconds by default), and 0 disables that timer for streaming only.
- Mid-stream transport/time-out errors reach the body reader. HTTP error statuses use existing HttpError handlers before a stream is returned. A 204 response has body=null.
- See HTTP_STREAMING.md for examples and node --test tests/http-stream.test.mjs for focused validation after npm run build.
## KriUiRegistry Consumer Contract
When implementing or changing frontend UI, use this order:
@@ -305,28 +275,6 @@ When implementing or changing frontend UI, use this order:
3. Otherwise, prefer a suitable shadcn/ui component.
4. Create a custom component only when the preceding options cannot meet the requirement safely.
### KriAutoComplete Search Scroll
- `kri-auto-complete` exposes `resetScrollOnSearch?: boolean` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It defaults to `false`, preserving existing behavior.
- When enabled, a search value change (including clearing it) resets the option list scroll to the top on the next animation frame in both `filter` and `inputOnly` modes. Async result updates alone do not trigger another reset.
### KriAutoComplete Option Tooltip
- `kri-auto-complete` exposes `optionTooltip?: 'singleLine' | 'wrap'` and `optionTooltipClassName?: string` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It is off by default, preserving existing behavior.
- When enabled, hovering an option shows its full `label` in a right-side tooltip. `singleLine` stays on one line until the available viewport width; `wrap` wraps at 28rem. The item depends on the shadcn `tooltip` component and provides its own `TooltipProvider`.
### KriAutoComplete Search Match
- `kri-auto-complete` exposes `searchMatch?: 'fuzzy' | 'contains'` on `KriSingleSelect`, `KriMultiSelect`, and `MultiSelect`. It defaults to `fuzzy` (cmdk's default subsequence scoring), preserving existing behavior.
- `contains` keeps only options whose label or value contains the search text as a case-insensitive substring, in the original option order. It applies only when `searchMode` is `filter`.
### KriEditor SMS Preview
- `changeSmsType` reports `SMS | LMS | MMS`. Update consumer callbacks to handle `MMS`; this widens the previous callback contract.
- Attachment presence (`smsHasAttachment`) takes priority and reports MMS. Otherwise a title or UTF-8 preview size >= `smsMaxBytes` (default 90) reports LMS; the remainder reports SMS. LMS/MMS share `lmsMaxBytes` (default 2000).
- UTF-8 byte counting includes `smsPreviewSuffix` and its separating newline, without storing the suffix in the body.
- This is a preview. Use the template-save response for saved `tmplatTy` and delivery-result `sendTy` for actual per-recipient type after server substitution. Registry updates require updating installed consumer copies.
### Required Shared References
Before each related task, read the current contents of every matching reference, even if it was read earlier in the session.

View File

@@ -29,7 +29,6 @@ import {
filterPerformance,
getCodeLabel,
includesText,
isFoundationRole,
isInternalRole,
isResearcherRole,
isWrittenReviewerRole
@@ -123,7 +122,6 @@ const PerformancePage = () => {
const userRole = auth.user?.userRole;
const userId = auth.user?.userId;
const canEdit = isInternalRole(userRole);
const canEditNoticeAndStaff = isFoundationRole(userRole);
const canDelete = isResearcherRole(userRole);
const isWrittenReviewer = isWrittenReviewerRole(userRole);
const {isDialogOpen, showDialog, hideDialog} = useDialog();
@@ -658,7 +656,6 @@ const PerformancePage = () => {
performance={detailData ?? data.find((item) => item.id === selectedId) ?? null}
codes={codes}
canEdit={canEdit}
canEditNoticeAndStaff={canEditNoticeAndStaff}
canDelete={canDelete}
onSave={(draft) => updateMutation.mutate(draft)}
onDelete={deletePerformance}

View File

@@ -58,66 +58,6 @@ type PerformanceDetail = PerformanceCompact["performanceDetail"];
type MonitoringVisitResetStatus = "departure" | "arrival";
const DETAIL_TEXT_MAX_LENGTH = 2048;
const ARTIST_NAME_MAX_LENGTH = 128;
type StaffTextField = "staffName" | "staffTel1" | "staffTel2" | "staffEmail";
// DB 컬럼 길이와 맞춘다.
const STAFF_FIELD_MAX_LENGTH: Record<StaffTextField, number> = {
staffName: 32,
staffTel1: 32,
staffTel2: 32,
staffEmail: 128,
};
const STAFF_TEXT_FIELDS: StaffTextField[] = ["staffName", "staffTel1", "staffTel2", "staffEmail"];
type StaffRow = {
key: string;
// null이면 유형 코드가 없어 입력할 수 없는 빈 행이다.
staffType: number | null;
staff: PerformanceStaff | null;
index: number | null;
};
const isBlankStaff = (staff: PerformanceStaff) => STAFF_TEXT_FIELDS.every((field) => (staff[field] ?? "").trim() === "");
// 관계자 유형 코드마다 행을 만들고, 데이터가 없는 유형은 빈 행으로 채운다.
// 빈 행과 새로 입력한 관계자는 같은 key를 사용해 입력 중 포커스가 유지되게 한다.
const buildStaffRows = (staffList: PerformanceStaff[], staffCodes: Code[]): StaffRow[] => {
const toRow = (staff: PerformanceStaff, index: number): StaffRow => ({
key: staff.id > 0 ? `staff-${staff.id}` : `new-${staff.staffType}`,
staffType: staff.staffType,
staff,
index,
});
const rows: StaffRow[] = [];
const usedIndexes = new Set<number>();
staffCodes.forEach((code) => {
const matched = staffList
.map((staff, index) => ({staff, index}))
.filter(({staff}) => staff.staffType === code.codeValue);
if (matched.length === 0) {
rows.push({key: `new-${code.codeValue}`, staffType: code.codeValue, staff: null, index: null});
return;
}
matched.forEach(({staff, index}) => {
usedIndexes.add(index);
rows.push(toRow(staff, index));
});
});
staffList.forEach((staff, index) => {
if (!usedIndexes.has(index)) rows.push(toRow(staff, index));
});
if (rows.length === 0) {
rows.push({key: "empty", staffType: null, staff: null, index: null});
}
return rows;
};
// UpdateNoticeDt는 한국시간 ISO 문자열이므로 시간대 변환 없이 표시만 정리한다.
const formatUpdateNoticeDt = (value?: string) => (value ?? "").replace("T", " ").replace(/\.\d+/, "");
@@ -494,7 +434,6 @@ export function PerformanceDetailDialog({
performance,
codes,
canEdit,
canEditNoticeAndStaff = false,
canDelete,
onSave,
onDelete,
@@ -504,8 +443,6 @@ export function PerformanceDetailDialog({
performance: PerformanceFull | PerformanceCompact | null;
codes: CodeMap;
canEdit: boolean;
// 기본 정보는 표시만 하고 변경 정보, 관계자 정보만 수정할 수 있는 권한
canEditNoticeAndStaff?: boolean;
canDelete: boolean;
onSave?: (performance: PerformanceCompact) => void;
onDelete?: (performanceId: number) => void;
@@ -513,8 +450,6 @@ export function PerformanceDetailDialog({
const {auth} = useAuth();
const [draft, setDraft] = useState<PerformanceCompact | null>(null);
const [isEditing, setIsEditing] = useState(false);
const canModify = canEdit || canEditNoticeAndStaff;
const isEditingBasic = isEditing && canEdit;
const {data: monitoringUsers = []} = useUsersQuery(ROLE.MONITORING, open);
const {data: writtenUsers = []} = useUsersQuery(ROLE.WRITTEN_REVIEWER, open);
const monitoringUserMap = useMemo(
@@ -588,39 +523,6 @@ export function PerformanceDetailDialog({
});
};
const updateStaffRow = (row: StaffRow, key: StaffTextField, value: string) => {
if (row.index !== null) {
updateStaff(row.index, key, value);
return;
}
const staffType = row.staffType;
if (staffType === null) return;
setDraft((prev) => {
if (!prev) return prev;
// id는 서버에서 새로 발급하므로 0으로 보낸다.
const newStaff: PerformanceStaff = {
id: 0,
performanceId: prev.id,
staffType,
staffName: "",
staffTel1: "",
staffTel2: "",
staffEmail: "",
[key]: value,
};
return {...prev, performanceStaff: [...(prev.performanceStaff ?? []), newStaff]};
});
};
const renderStaffCell = (row: StaffRow, field: StaffTextField) => {
const value = row.staff?.[field] ?? "";
if (!isEditing || row.staffType === null) return value;
return <Input maxLength={STAFF_FIELD_MAX_LENGTH[field]} value={value} onChange={(event) => updateStaffRow(row, field, event.target.value)} />;
};
const staffRows = draft ? buildStaffRows(draft.performanceStaff ?? [], codes.staff_type ?? []) : [];
const resetDraft = () => {
if (!performance) return;
setDraft({
@@ -662,18 +564,6 @@ export function PerformanceDetailDialog({
alert(`${PERFORMANCE_FIELD_LABELS.UpdateNoticeTarget}을 선택한 경우 ${PERFORMANCE_FIELD_LABELS.UpdateNoticeMemo}을 입력해 주세요.`);
return;
}
// 기본 정보를 수정할 수 없는 권한은 기존 값을 고칠 수 없으므로 검사하지 않는다.
if (canEdit && (draft.artistName ?? "").trim() === "") {
alert(`${PERFORMANCE_FIELD_LABELS.artistName}을 입력해 주세요.`);
return;
}
// 모든 칸이 공란인 관계자는 저장하지 않는다.
const performanceStaff = (draft.performanceStaff ?? []).filter((staff) => !isBlankStaff(staff));
if (performanceStaff.some((staff) => (staff.staffName ?? "").trim() === "")) {
alert("관계자 이름을 입력해 주세요.");
return;
}
const performanceDetail: PerformanceDetail = {
...detail,
@@ -684,7 +574,7 @@ export function PerformanceDetailDialog({
// 변경 일시는 서버에서 생성하므로 요청에서 제외한다.
delete performanceDetail["UpdateNoticeDt"];
onSave?.({...draft, performanceDetail, performanceStaff});
onSave?.({...draft, performanceDetail});
setIsEditing(false);
};
@@ -714,36 +604,36 @@ export function PerformanceDetailDialog({
<section className="rounded-md border">
<DetailRow label={PERFORMANCE_FIELD_LABELS.no}>{draft.performanceDetail["performanceNo"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.id}>{draft.id}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.NCAS}>{isEditingBasic ? <Input inputMode="numeric" maxLength={DETAIL_TEXT_MAX_LENGTH} value={draft.performanceDetail["NCAS"] ?? ""} onChange={(event) => updateDetail("NCAS", event.target.value.replace(/\D/g, ""))} /> : draft.performanceDetail["NCAS"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.NCAS}>{isEditing ? <Input inputMode="numeric" maxLength={DETAIL_TEXT_MAX_LENGTH} value={draft.performanceDetail["NCAS"] ?? ""} onChange={(event) => updateDetail("NCAS", event.target.value.replace(/\D/g, ""))} /> : draft.performanceDetail["NCAS"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringAdd}>{draft.id % 100 !== 1? "추가" : ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.businessType}>{getCodeLabel(codes, "business_type", draft.businessType)}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceGenre}>{getCodeLabel(codes, "genre", draft.performanceGenre)}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceArea}>
{isEditingBasic ? (
{isEditing ? (
<FilterSelect value={String(draft.performanceArea ?? "")} onChange={(value) => updateDraft("performanceArea", Number(value))} options={codes.area ?? []} placeholder={PERFORMANCE_FIELD_LABELS.performanceArea} />
) : getCodeLabel(codes, "area", draft.performanceArea)}
</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceAreaDetail}>{isEditingBasic ? <Input value={draft.performanceDetail["performanceAreaDetail"] ?? ""} onChange={(event) => updateDetail("performanceAreaDetail", event.target.value)} /> : draft.performanceDetail["performanceAreaDetail"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.artistName}>{isEditingBasic ? <Input maxLength={ARTIST_NAME_MAX_LENGTH} value={draft.artistName ?? ""} onChange={(event) => updateDraft("artistName", event.target.value)} /> : draft.artistName}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceName}>{isEditingBasic ? <Input value={draft.performanceName} onChange={(event) => updateDraft("performanceName", event.target.value)} /> : draft.performanceName}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceStartMonth}>{isEditingBasic ? <Input type="number" value={draft.performanceStartMonth} onChange={(event) => updateDraft("performanceStartMonth", Number(event.target.value))} /> : `${draft.performanceStartMonth}월`}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceDtInfo}>{isEditingBasic ? <Input value={draft.performanceDtInfo} onChange={(event) => updateDraft("performanceDtInfo", event.target.value)} /> : draft.performanceDtInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceTimeInfo}>{isEditingBasic ? <Input value={draft.performanceTimeInfo} onChange={(event) => updateDraft("performanceTimeInfo", event.target.value)} /> : draft.performanceTimeInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceAreaDetail}>{isEditing ? <Input value={draft.performanceDetail["performanceAreaDetail"] ?? ""} onChange={(event) => updateDetail("performanceAreaDetail", event.target.value)} /> : draft.performanceDetail["performanceAreaDetail"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.artistName}>{draft.artistName}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceName}>{isEditing ? <Input value={draft.performanceName} onChange={(event) => updateDraft("performanceName", event.target.value)} /> : draft.performanceName}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceStartMonth}>{isEditing ? <Input type="number" value={draft.performanceStartMonth} onChange={(event) => updateDraft("performanceStartMonth", Number(event.target.value))} /> : `${draft.performanceStartMonth}월`}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceDtInfo}>{isEditing ? <Input value={draft.performanceDtInfo} onChange={(event) => updateDraft("performanceDtInfo", event.target.value)} /> : draft.performanceDtInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceTimeInfo}>{isEditing ? <Input value={draft.performanceTimeInfo} onChange={(event) => updateDraft("performanceTimeInfo", event.target.value)} /> : draft.performanceTimeInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationStatus}>
{isEditingBasic ? (
{isEditing ? (
<FilterSelect value={String(draft.ticketReservationStatus ?? "")} onChange={(value) => updateDraft("ticketReservationStatus", Number(value))} options={codes.ticket_reservation_status ?? []} placeholder={PERFORMANCE_FIELD_LABELS.ticketReservationStatus} />
) : getCodeLabel(codes, "ticket_reservation_status", draft.ticketReservationStatus)}
</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.ticketReservationMemo}>{isEditingBasic ? <Input value={draft.ticketReservationMemo} onChange={(event) => updateDraft("ticketReservationMemo", event.target.value)} /> : draft.ticketReservationMemo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringDate}>{isEditingBasic ? <DatePicker value={draft.performanceMonitoringSchedule?.monitoringDate ?? ""} onChange={(value) => updateSchedule("monitoringDate", value)} /> : draft.performanceMonitoringSchedule?.monitoringDate ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringTimeInfo}>{isEditingBasic ? <Input value={draft.performanceMonitoringSchedule?.monitoringTimeInfo ?? ""} onChange={(event) => updateSchedule("monitoringTimeInfo", event.target.value)} /> : draft.performanceMonitoringSchedule?.monitoringTimeInfo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.needMonitoring}>{isEditingBasic ? <Input value={draft.performanceDetail["needMonitoring"] ?? ""} onChange={(event) => updateDetail("needMonitoring", event.target.value)} /> : draft.performanceDetail["needMonitoring"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.needWrittenReview}>{isEditingBasic ? <Input value={draft.performanceDetail["needWrittenReview"] ?? ""} onChange={(event) => updateDetail("needWrittenReview", event.target.value)} /> : draft.performanceDetail["needWrittenReview"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.checkDeliver}>{isEditingBasic ? <Input value={draft.performanceDetail["checkDeliver"] ?? ""} onChange={(event) => updateDetail("checkDeliver", event.target.value)} /> : draft.performanceDetail["checkDeliver"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.timeTreeCheckDt}>{isEditingBasic ? <DatePicker value={draft.performanceDetail["timeTreeCheckDt"] ?? ""} onChange={(value) => updateDetail("timeTreeCheckDt", value)} /> : draft.performanceDetail["timeTreeCheckDt"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringAddress}>{isEditingBasic ? <Input value={draft.performanceMonitoringSchedule?.monitoringAddress ?? ""} onChange={(event) => updateSchedule("monitoringAddress", event.target.value)} /> : draft.performanceMonitoringSchedule?.monitoringAddress}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceMemo}>{isEditingBasic ? <Input value={draft.performanceMemo} onChange={(event) => updateDraft("performanceMemo", event.target.value)} /> : draft.performanceMemo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.checkReport}>{isEditingBasic ? <Input value={draft.performanceDetail["checkReport"] ?? ""} onChange={(event) => updateDetail("checkReport", event.target.value)} /> : draft.performanceDetail["checkReport"] ?? ""}</DetailRow>
<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 ? <DatePicker value={draft.performanceMonitoringSchedule?.monitoringDate ?? ""} onChange={(value) => updateSchedule("monitoringDate", 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.needMonitoring}>{isEditing ? <Input value={draft.performanceDetail["needMonitoring"] ?? ""} onChange={(event) => updateDetail("needMonitoring", event.target.value)} /> : draft.performanceDetail["needMonitoring"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.needWrittenReview}>{isEditing ? <Input value={draft.performanceDetail["needWrittenReview"] ?? ""} onChange={(event) => updateDetail("needWrittenReview", event.target.value)} /> : draft.performanceDetail["needWrittenReview"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.checkDeliver}>{isEditing ? <Input value={draft.performanceDetail["checkDeliver"] ?? ""} onChange={(event) => updateDetail("checkDeliver", event.target.value)} /> : draft.performanceDetail["checkDeliver"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.timeTreeCheckDt}>{isEditing ? <DatePicker value={draft.performanceDetail["timeTreeCheckDt"] ?? ""} onChange={(value) => updateDetail("timeTreeCheckDt", value)} /> : draft.performanceDetail["timeTreeCheckDt"] ?? ""}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.monitoringAddress}>{isEditing ? <Input value={draft.performanceMonitoringSchedule?.monitoringAddress ?? ""} onChange={(event) => updateSchedule("monitoringAddress", event.target.value)} /> : draft.performanceMonitoringSchedule?.monitoringAddress}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.performanceMemo}>{isEditing ? <Input value={draft.performanceMemo} onChange={(event) => updateDraft("performanceMemo", event.target.value)} /> : draft.performanceMemo}</DetailRow>
<DetailRow label={PERFORMANCE_FIELD_LABELS.checkReport}>{isEditing ? <Input value={draft.performanceDetail["checkReport"] ?? ""} onChange={(event) => updateDetail("checkReport", event.target.value)} /> : draft.performanceDetail["checkReport"] ?? ""}</DetailRow>
</section>
<section className="rounded-md border">
@@ -786,12 +676,13 @@ export function PerformanceDetailDialog({
</tr>
</thead>
<tbody>
{staffRows.map((row) => (
<tr key={row.key}>
<td className="h-9 border p-2">{getCodeLabel(codes, "staff_type", row.staffType)}</td>
{STAFF_TEXT_FIELDS.map((field) => (
<td key={field} className="border p-2">{renderStaffCell(row, field)}</td>
))}
{draft.performanceStaff?.map((staff, index) => (
<tr key={staff.id}>
<td className="border p-2">{getCodeLabel(codes, "staff_type", staff.staffType)}</td>
<td className="border p-2">{isEditing ? <Input value={staff.staffName} onChange={(event) => updateStaff(index, "staffName", event.target.value)} /> : staff.staffName}</td>
<td className="border p-2">{isEditing ? <Input value={staff.staffTel1} onChange={(event) => updateStaff(index, "staffTel1", event.target.value)} /> : staff.staffTel1}</td>
<td className="border p-2">{isEditing ? <Input value={staff.staffTel2} onChange={(event) => updateStaff(index, "staffTel2", event.target.value)} /> : staff.staffTel2}</td>
<td className="border p-2">{isEditing ? <Input value={staff.staffEmail} onChange={(event) => updateStaff(index, "staffEmail", event.target.value)} /> : staff.staffEmail}</td>
</tr>
))}
</tbody>
@@ -821,8 +712,8 @@ export function PerformanceDetailDialog({
<DialogFooter className="shrink-0 border-t pt-4">
{canDelete && draft && <Button type="button" variant="destructive" onClick={deletePerformance}>삭제</Button>}
{canModify && draft && !isEditing && <Button type="button" onClick={() => setIsEditing(true)}>수정</Button>}
{canModify && draft && isEditing && (
{canEdit && draft && !isEditing && <Button type="button" onClick={() => setIsEditing(true)}>수정</Button>}
{canEdit && draft && isEditing && (
<>
<Button type="button" onClick={save}>저장</Button>
<Button type="button" variant="outline" onClick={() => { resetDraft(); setIsEditing(false); }}>취소</Button>