feat(mobile): weekly worktime insights (Phase 4B) - #14
Draft
dohyeon16 wants to merge 1 commit into
Draft
Conversation
Informational (not a legal determination) heads-up on this week's worktime, derived from ScheduledShift + AttendanceRecord + workplace policy. No backend, schema, or new business data — pure derived state. Weekly calculation (pure, tested) - Week is Mon–Sun (same convention as payCalc weekKeyOf). - Per date+workplace, actual attendance overrides planned shift → no double count of a shift that already has an actual record. - Completed record = worked minutes (break deducted); in-progress = clock-in→now (clamped); planned shift = start→end (skipped if no end time). - expected = actual + planned. Computed per workplace (allowance/40h are per site). Insights (threshold-based, information only) - >=15h → "주휴수당 요건 확인" (notes 소정근로/개근 등 조건에 따라 달라짐). - >=38h near / >40h exceed → "40시간 근접/초과 가능" (실제 적용은 사업장·근로조건에 따라). - No "발생 확정/위반/미지급" wording; every surface carries a 간이 안내 disclaimer. Surfaces - Home "이번 주 근무" compact card (실제/예정/예상 + status badges), semantic theme. - In-app notices merged into notificationsFeed with stable per-week ids (worktime-*-<monday>) + existing read-state → no duplicate on each launch, never generated for past weeks. Payday reminder untouched (already exists). Tests: +20 (thresholds, planned/actual, double-count guard, overnight, in-progress, per-workplace, month/year boundary, past-week suppression, notice id/read-state). Full suite 158/158, tsc 0, web + ios/android export OK. No backend/Production change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QEVyEfK1DDkhyEnpTUq3jo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 4B — 근무시간 사전 안내 (Draft)
정보성 안내이며 법적 판정이 아닙니다. 이번 주 근무시간을 미리 인지하도록 돕는 파생 안내로, backend/schema/신규 business data 없이 ScheduledShift + AttendanceRecord + 근무지 정책에서 계산합니다.
주간 시간 계산 정책 (순수 함수 · 테스트)
weekKeyOf와 동일 관례).현재(clamp), 예정=시작종료(종료 없으면 0).expected = actual + planned, 근무지별 계산(주휴/40h는 사업장 단위).안내 문구 (정보성 · 임계 기반)
알림 조건
notificationsFeed에 병합. id에 주(월요일) 포함(worktime-*-<monday>) + 기존 read 상태 → 매 실행마다 중복 생성 안 함, 지난 주 미생성(항상 이번 주만 계산). 급여일 리마인더는 기존 것 그대로(재구현 안 함).테스트
tsc --noEmit0, web + ios/android export OK, git diff --check clean, secret scan clean.expo doctor경고 2건은 기존 이슈(패키지 미변경).무변경 / 상태
브랜치 전략
feature/mobile-attendance-audit(Phase 4A, PR feat(mobile): attendance change history + missing clock-out reminder (Phase 4A) #13) 위에 스택. 기존 PR feat: expand payroll, attendance, scheduling, and security features #1/refactor: organize mobile source by feature #3/feat(mobile): integrate backend authentication #7/feat(mobile): sync work data with backend #10/feat(mobile): sync workplace payroll policy fields #12 및 feat(mobile): attendance change history + missing clock-out reminder (Phase 4A) #13 직접 수정/rebase 없음.후속 (Phase 4C)
🤖 Generated with Claude Code
https://claude.ai/code/session_01QEVyEfK1DDkhyEnpTUq3jo