Conversation
Admin screen "정책 개정 등록" for the policy-document revision notice system. - app/admin/policy-documents: list (status filter, publish action, consent-progress dialog) + create form - PolicyDocumentForm: picks documentType, shows only the relevant decision checklist (5축 / 불리·중대 / 매체·광고·야간 / 범위확대), handles 200-response gate outcomes (saved / blockers / warnings+ack) - content.ts policyDocuments API + use-content hooks + zod schema + types/admin + sidebar link Frontend only. Calls sometimes-api admin/v2/content/policy-documents. Merge AFTER the sometimes-api Phase 1b API is deployed (else 404).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13454b49ce
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (data.reconsentOverride && !data.reconsentOverrideReason?.trim()) { | ||
| ctx.addIssue({ | ||
| code: z.ZodIssueCode.custom, | ||
| path: ['reconsentOverrideReason'], | ||
| message: '재동의 예외 처리 시 사유를 입력해주세요.', |
There was a problem hiding this comment.
Gate override-reason validation by document type
If an operator checks 재동의 예외 처리 while on the default terms/refund form, leaves the reason blank, and then switches to any non-adverse document type, the override controls are hidden but react-hook-form keeps reconsentOverride set. This unconditional validation then attaches an error to the hidden reconsentOverrideReason field, so the form cannot be submitted and the user has no visible way to fix it except switching back; scope this check to the same document types that render/send the override fields or clear/unregister it on type changes.
Useful? React with 👍 / 👎.



배경
약관·개인정보처리방침 개정공지/재동의 시스템 Phase 1b의 어드민 프론트다. 운영자(법무/CS)가 정책 개정을 등록하면 백엔드가 법정 공지 트랙(7/30일)·재동의 필요 여부를 자동 판정한다. 이 화면은 그 입력 UI다.
무엇을 했나
app/admin/policy-documents/— 목록(상태 필터 / "공지 개시" / 재동의 진행률 다이얼로그) + 등록 폼PolicyDocumentForm— 문서유형 선택 시 해당 체크리스트만 노출(5축 / 불리·중대 / 매체·광고·야간 / 범위확대). 서버 판정 결과·경고·차단 사유 표시, 경고는 확인 후 재등록content.tspolicyDocuments API + react-query 훅 + zod 스키마 +types/admin+ 사이드바 링크프론트 전용.
sometimes-api의admin/v2/content/policy-documents호출.sometimes-api Phase 1b API가 배포된 뒤 merge (API 미배포 상태에서 배포하면 어드민 화면이 404). 관련: SmartNewbieProject/sometimes-api#267
검증
pnpm typecheck:admin-v2RC=0, 루트pnpm exec tsc --noEmitRC=0 (독립 재검증 포함)