Skip to content

feat(admin): 정책 개정 등록 화면 (Phase 1b) - #40

Open
Smartnewb wants to merge 1 commit into
mainfrom
feat/policy-change-notice-admin
Open

Smartnewb wants to merge 1 commit into
mainfrom
feat/policy-change-notice-admin

Conversation

@Smartnewb

Copy link
Copy Markdown
Owner

배경

약관·개인정보처리방침 개정공지/재동의 시스템 Phase 1b의 어드민 프론트다. 운영자(법무/CS)가 정책 개정을 등록하면 백엔드가 법정 공지 트랙(7/30일)·재동의 필요 여부를 자동 판정한다. 이 화면은 그 입력 UI다.

무엇을 했나

  • app/admin/policy-documents/ — 목록(상태 필터 / "공지 개시" / 재동의 진행률 다이얼로그) + 등록 폼
  • PolicyDocumentForm — 문서유형 선택 시 해당 체크리스트만 노출(5축 / 불리·중대 / 매체·광고·야간 / 범위확대). 서버 판정 결과·경고·차단 사유 표시, 경고는 확인 후 재등록
  • content.ts policyDocuments API + react-query 훅 + zod 스키마 + types/admin + 사이드바 링크

프론트 전용. sometimes-apiadmin/v2/content/policy-documents 호출.

⚠️ 머지 순서

sometimes-api Phase 1b API가 배포된 뒤 merge (API 미배포 상태에서 배포하면 어드민 화면이 404). 관련: SmartNewbieProject/sometimes-api#267

검증

  • pnpm typecheck:admin-v2 RC=0, 루트 pnpm exec tsc --noEmit RC=0 (독립 재검증 포함)

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).
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
project-solo Ready Ready Preview, Comment Jul 8, 2026 8:25am

Request Review

@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +62 to +66
if (data.reconsentOverride && !data.reconsentOverrideReason?.trim()) {
ctx.addIssue({
code: z.ZodIssueCode.custom,
path: ['reconsentOverrideReason'],
message: '재동의 예외 처리 시 사유를 입력해주세요.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant