Skip to content

[기능추가] [4-6][4-7] 설정 기본/모바일 네비게이션 UI#116

Merged
sscoderati merged 3 commits intomainfrom
codex/issue-60-basic-settings-ui
Mar 31, 2026
Merged

[기능추가] [4-6][4-7] 설정 기본/모바일 네비게이션 UI#116
sscoderati merged 3 commits intomainfrom
codex/issue-60-basic-settings-ui

Conversation

@sscoderati
Copy link
Copy Markdown
Owner

@sscoderati sscoderati commented Mar 31, 2026

작업 내용

  • 설정 화면에 기본 설정 섹션 추가
  • 가계부 이름/목표 문구/회계기준일(1~28) 입력 폼 구현
  • GET /api/ledgers/:ledgerId로 현재 기본 설정 로드
  • PATCH /api/ledgers/:ledgerId 저장 연결
  • 회계기준일 1~28 프론트 검증 추가
  • 저장 성공 시 성공 스낵바 노출
  • 모바일 설정에 메뉴 리스트 → 하위 화면 전환 흐름 추가
  • 모바일 하위 화면 진입 시 ← 버튼 + 화면명 헤더 표시
  • 모바일 뒤로가기(←) 탭 시 설정 메인 메뉴로 복귀
  • 데스크톱(md 이상)에서는 뒤로가기 헤더 미노출
  • memories/task.md의 [4-6], [4-7] 상태를 완료로 업데이트

검증

  • 로컬 의존성(node_modules) 부재로 vite/tsc 실행은 불가하여 런타임 검증은 미실시

Closes #60
Closes #61

Copilot AI review requested due to automatic review settings March 31, 2026 10:00
@sscoderati sscoderati changed the title [기능추가] [4-6] 설정 — 기본 설정 UI [기능추가] [4-6][4-7] 설정 기본/모바일 네비게이션 UI Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

설정 화면에 기본 설정(가계부 이름/목표 문구/회계기준일) 섹션을 추가하고, 현재 값을 로드(GET) 및 저장(PATCH)할 수 있도록 UI와 API 연동을 구현한 PR입니다. 이와 함께 회계기준일(1~28) 프론트 검증 및 저장 성공 스낵바 노출을 포함합니다.

Changes:

  • 설정 탭에 기본 설정(BASIC) 섹션 및 입력 폼 UI 추가
  • GET /api/ledgers/:ledgerId로 기본 설정 로드 + PATCH /api/ledgers/:ledgerId로 저장 연동
  • 회계기준일 1~28 범위 검증 및 저장 성공 스낵바 노출, task 상태 업데이트

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
memories/task.md [4-6] 작업 상태를 완료로 갱신하고 진행 메모/체크리스트 반영
apps/web/src/routes/settings.tsx 기본 설정 섹션 UI 추가, ledger 상세 로드/저장(PATCH) 및 검증/성공 스낵바 연동

Comment thread apps/web/src/routes/settings.tsx Outdated
Comment on lines +407 to +414
const response = await apiFetch(`/api/ledgers/${ledgerId}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
bookName,
goal: basicGoal.trim(),
fiscalStartDay,
}),
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

(P2) 저장 요청 바디에 goal을 항상 basicGoal.trim()으로 포함시키고 있어, 서버에 goal이 null인 상태에서 사용자가 목표 문구를 수정하지 않고 저장만 눌러도 goal이 빈 문자열("")로 덮어써집니다. goal의 null/"" 의미를 구분하거나(예: null=미설정), 불필요한 필드 변경을 피하려면 값이 비어 있을 때는 goal 필드를 전송에서 제외(예: undefined로 두어 JSON 직렬화 시 생략)하거나, '비움'을 지원해야 한다면 API가 goal: null을 허용하도록 맞춰서 명시적으로 null을 보내는 방식으로 정리하는 편이 안전합니다.

Suggested change
const response = await apiFetch(`/api/ledgers/${ledgerId}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
bookName,
goal: basicGoal.trim(),
fiscalStartDay,
}),
const goal = basicGoal.trim()
const payload: { bookName: string; fiscalStartDay: number; goal?: string } = {
bookName,
fiscalStartDay,
}
if (goal !== '') {
payload.goal = goal
}
const response = await apiFetch(`/api/ledgers/${ledgerId}`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),

Copilot uses AI. Check for mistakes.
@sscoderati sscoderati merged commit 189ec78 into main Mar 31, 2026
@sscoderati sscoderati deleted the codex/issue-60-basic-settings-ui branch March 31, 2026 10:08
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.

[기능추가] [4-7] 설정 하위 화면 뒤로가기 헤더 [기능추가] [4-6] 설정 — 기본 설정 UI

2 participants