Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5c380e0562 | |||
| 0bc06b710a | |||
| 7704752064 | |||
| 279470dbd0 | |||
| e63dc3efed |
53
AGENTS.md
53
AGENTS.md
@@ -1,37 +1,38 @@
|
|||||||
# Codex Working Rules
|
# Codex 작업 규칙
|
||||||
|
|
||||||
This file defines repo-specific rules that CODEX AI and future helpers should follow.
|
이 문서는 이 저장소에서 CODEX AI와 이후 작업자가 따라야 할 프로젝트 전용 규칙을 정리한다.
|
||||||
|
|
||||||
## Product Rules
|
## 제품 규칙
|
||||||
|
|
||||||
- Preserve the planner identity as a `10-minute planner diary`.
|
- 이 프로젝트의 핵심 정체성은 `10분 플래너 다이어리`다.
|
||||||
- Keep the default primary experience as `1 page + right-side information panel`.
|
- 기본 사용 흐름은 `1페이지 + 우측 정보 패널`을 유지한다.
|
||||||
- Keep `2 page spread` mode available unless the user explicitly removes it.
|
- `2페이지 펼침 보기`는 사용자가 명시적으로 제거하라고 하기 전까지 유지한다.
|
||||||
- Prefer calm paper-like layouts over generic dashboard styling.
|
- 일반적인 대시보드 느낌보다 차분한 종이 다이어리 인상을 우선한다.
|
||||||
|
|
||||||
## Technical Rules
|
## 기술 규칙
|
||||||
|
|
||||||
- Use Vue for implementation.
|
- 구현은 Vue를 사용한다.
|
||||||
- Use TailwindCSS for styling.
|
- 스타일링은 TailwindCSS를 사용한다.
|
||||||
- Prefer reusable Vue components over large monolithic templates.
|
- 큰 템플릿 하나보다 재사용 가능한 Vue 컴포넌트 구조를 우선한다.
|
||||||
- Keep mock data easy to replace with real data sources later.
|
- 현재 목업 데이터는 나중에 실제 데이터 소스로 교체하기 쉽게 유지한다.
|
||||||
- Preserve responsive behavior for desktop and mobile.
|
- 타입스크립트는 사용하지 않고, Vue + JavaScript 기준으로 유지한다.
|
||||||
|
- 데스크톱과 모바일 모두에서 레이아웃이 무너지지 않도록 반응형 동작을 유지한다.
|
||||||
|
|
||||||
## Workflow Rules
|
## 작업 규칙
|
||||||
|
|
||||||
- Use local Git versioning continuously during development.
|
- 개발 중에는 로컬 Git 버전 관리를 계속 유지한다.
|
||||||
- Record meaningful product or technical notes in `HANDOFF.md`.
|
- 중요한 제품/기술 메모는 `HANDOFF.md`에 기록한다.
|
||||||
- Do not remove user-authored notes from `HANDOFF.md` unless they are outdated and replaced.
|
- 구현 대기열과 진행 상황 관리는 `TODO.md`를 기준으로 한다.
|
||||||
- When a major change is made, update both code and handoff context together.
|
- 사용자가 직접 남긴 메모는, 더 최신 정보로 대체되는 경우가 아니면 함부로 삭제하지 않는다.
|
||||||
|
- 큰 변경이 있을 때는 코드만 바꾸지 말고 인수인계 문서도 함께 갱신한다.
|
||||||
|
|
||||||
## Commit Rules
|
## 커밋 규칙
|
||||||
|
|
||||||
- Use semantic version style commits starting from `v0.0.1` when the user asks for versioned checkpoints.
|
- 사용자가 버전형 체크포인트를 원할 경우 `v0.0.1` 같은 형식으로 커밋을 남긴다.
|
||||||
- Prefer small, understandable checkpoints over large ambiguous commits.
|
- 의미를 알기 어려운 큰 커밋보다, 이해 가능한 작은 단위의 커밋을 선호한다.
|
||||||
|
|
||||||
## Design Implementation Rules
|
## 디자인 구현 규칙
|
||||||
|
|
||||||
- Use the provided Figma files as the visual source of truth.
|
|
||||||
- Match the overall proportions, line rhythm, and typography feel of the diary layout.
|
|
||||||
- Add new UI around the planner only when it clearly supports navigation, planning, or review.
|
|
||||||
|
|
||||||
|
- 제공된 Figma 파일을 시각적 기준점으로 사용한다.
|
||||||
|
- 다이어리 레이아웃의 비율감, 선의 리듬, 타이포그래피 분위기를 최대한 유지한다.
|
||||||
|
- 플래너 주변의 추가 UI는 이동, 계획, 회고에 실제로 도움이 되는 경우에만 늘린다.
|
||||||
|
|||||||
81
HANDOFF.md
81
HANDOFF.md
@@ -1,46 +1,63 @@
|
|||||||
# Handoff Notes
|
# 인수인계 메모
|
||||||
|
|
||||||
## Project Summary
|
## 프로젝트 개요
|
||||||
|
|
||||||
- Project: 10 Minute Planner web UI
|
- 프로젝트명: 10 Minute Planner 웹 UI
|
||||||
- Stack: Vue 3 + Vite + TailwindCSS + TypeScript
|
- 기술 스택: Vue 3 + Vite + TailwindCSS + JavaScript
|
||||||
- Current version baseline: `v0.0.1`
|
- 현재 기준 버전: `v0.0.6`
|
||||||
|
|
||||||
## Source Design
|
## 기준 디자인
|
||||||
|
|
||||||
- Figma spread view: `https://www.figma.com/design/ZgIAmg2YlVWpABD7JVLPzY/Untitled?node-id=1-36&m=dev`
|
- Figma 펼침형 보기: `https://www.figma.com/design/ZgIAmg2YlVWpABD7JVLPzY/Untitled?node-id=1-36&m=dev`
|
||||||
- Figma focus view with side info: `https://www.figma.com/design/ZgIAmg2YlVWpABD7JVLPzY/Untitled?node-id=1-2472&m=dev`
|
- Figma 집중형 보기 + 사이드 정보: `https://www.figma.com/design/ZgIAmg2YlVWpABD7JVLPzY/Untitled?node-id=1-2472&m=dev`
|
||||||
|
|
||||||
## Current Product Direction
|
## 현재 제품 방향
|
||||||
|
|
||||||
- Default UX direction is `1 page + extra information panel`.
|
- 기본 UX 방향은 `1페이지 + 추가 정보 패널`이다.
|
||||||
- `2 page spread` view is still implemented as an alternate mode for comparison.
|
- `2페이지 펼침 보기`는 비교용 보조 모드로 함께 유지한다.
|
||||||
- The UI should feel like a paper diary, but interactions should still feel like an app.
|
- 화면 인상은 종이 다이어리 같아야 하지만, 상호작용은 웹앱처럼 빠르고 자연스러워야 한다.
|
||||||
|
|
||||||
## Current Implementation
|
## 현재 구현 상태
|
||||||
|
|
||||||
- Main shell: `src/App.vue`
|
- 메인 화면 셸: `src/App.vue`
|
||||||
- Planner paper layout: `src/components/PlannerPage.vue`
|
- 플래너 종이 레이아웃: `src/components/PlannerPage.vue`
|
||||||
- Right-side calendar: `src/components/MiniCalendar.vue`
|
- 우측 달력 컴포넌트: `src/components/MiniCalendar.vue`
|
||||||
- Tailwind setup is in place and should remain the styling system for this project.
|
- Tailwind 설정은 완료되어 있으며, 이 프로젝트의 스타일링 기준으로 유지한다.
|
||||||
|
- 현재 선택 날짜는 시스템 날짜 기준으로 시작한다.
|
||||||
|
- `COMMENT`, `TASKS`, `MEMO`는 화면에서 바로 편집할 수 있다.
|
||||||
|
- TASKS 왼쪽 라벨은 순번 고정이 아니라 자유 입력 가능하다.
|
||||||
|
- TASKS 체크박스는 토글 가능하며, 체크 상태는 바로 시각적으로 반영된다.
|
||||||
|
- `TIME TABLE`은 드래그로 10분 블록을 연속 선택할 수 있다.
|
||||||
|
- `TIME TABLE`은 우클릭 드래그 시 선택된 블록을 지우는 방식으로도 편집할 수 있다.
|
||||||
|
- `TOTAL TIME`은 타임테이블에서 선택된 블록 수를 기준으로 자동 계산된다.
|
||||||
|
- 달력은 연/월 이동이 가능하며, 현재 보이는 월과 선택된 날짜 상태를 분리해서 관리한다.
|
||||||
|
- 달력 상단은 월 좌우 화살표, 클릭형 연도 선택, `TODAY` 버튼 구조로 동작한다.
|
||||||
|
- 입력 내용이 있는 날짜는 달력 하단에 빨간 점으로 표시된다.
|
||||||
|
|
||||||
## Decisions Made
|
## 확정된 결정사항
|
||||||
|
|
||||||
- Vue was chosen over static HTML because the planner needs stateful interactions:
|
- 정적인 HTML보다 Vue가 적합하다.
|
||||||
date switching, mode toggling, sidebar summaries, and future data persistence.
|
날짜 전환, 모드 토글, 사이드 패널 요약, 이후 저장 기능 등 상태 기반 상호작용이 많기 때문이다.
|
||||||
- TailwindCSS is the required styling approach even when using Vue.
|
- TailwindCSS는 Vue를 사용하더라도 반드시 유지해야 하는 스타일링 방식이다.
|
||||||
- The current data is mock data for layout and interaction verification.
|
- 현재 데이터는 레이아웃과 상호작용 검증을 위한 목업 데이터다.
|
||||||
|
- 상단 날짜는 시스템 날짜 또는 현재 선택된 플래너 날짜 기준으로 자동 표시되어야 한다.
|
||||||
|
- `D-DAY`는 지금은 보류이며, 이후 별도의 목표 관리 패널과 연결해서 계산한다.
|
||||||
|
- `COMMENT`, `TASKS`, `MEMO`는 모두 입력 가능한 필드가 되어야 한다.
|
||||||
|
- TASKS 라벨은 번호만 고정하지 말고 자유 입력이 가능해야 한다.
|
||||||
|
- 번호 사용이 필요한 경우를 위해 우측 패널에서 TASKS 라벨을 순번으로 한 번에 채울 수 있어야 한다.
|
||||||
|
- `TOTAL TIME`은 타임테이블 선택 상태를 기반으로 자동 계산되어야 한다.
|
||||||
|
- 타임테이블은 마우스 드래그로 여러 줄을 지나가더라도 시간 흐름 기준으로 연속 선택되도록 해석해야 한다.
|
||||||
|
- 타임테이블 편집은 좌클릭 드래그로 칠하기, 우클릭 드래그로 지우기 방식이 더 자연스럽다.
|
||||||
|
- 달력에는 연/월 이동 기능이 필요하다.
|
||||||
|
- 내용이 저장된 날짜에는 달력에 빨간 점 표시가 필요하다.
|
||||||
|
|
||||||
## Next Recommended Steps
|
## 다음 권장 작업
|
||||||
|
|
||||||
- Connect planner data to persistent storage or local state management.
|
- `TODO.md` 기준으로 작은 단위씩 구현을 진행한다.
|
||||||
- Make task checkbox state editable.
|
- 목표나 통계 기능보다 먼저, 플래너 본문의 입력과 상호작용을 우선 구현한다.
|
||||||
- Add timetable interaction for selecting or painting focused time blocks.
|
- 달력 표시와 통계 기능을 본격화하기 전에 저장 구조를 먼저 정리하는 것이 좋다.
|
||||||
- Decide whether the right panel should prioritize calendar, stats, or next-day planning on mobile.
|
|
||||||
- Add print/export styling if the diary-like output needs physical printing.
|
|
||||||
|
|
||||||
## Update Rule
|
## 갱신 규칙
|
||||||
|
|
||||||
- When an important decision, constraint, bug, or workflow change happens, append it here.
|
|
||||||
- Keep this file concise and practical so the next helper can continue without re-discovery.
|
|
||||||
|
|
||||||
|
- 중요한 결정, 제약, 버그, 작업 방식 변경이 생기면 이 문서에 이어서 반영한다.
|
||||||
|
- 다음 작업자가 다시 탐색하지 않아도 되도록 짧고 실무적으로 유지한다.
|
||||||
|
|||||||
61
TODO.md
Normal file
61
TODO.md
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# 할 일 목록
|
||||||
|
|
||||||
|
10 Minute Planner를 단계적으로 구현하기 위한 작업 체크리스트다.
|
||||||
|
|
||||||
|
## 현재 방향
|
||||||
|
|
||||||
|
- 기본 레이아웃은 `1페이지 + 우측 정보 패널`을 유지한다.
|
||||||
|
- `2페이지 펼침 보기`는 비교용 보조 모드로 유지한다.
|
||||||
|
- 스타일은 Vue + TailwindCSS 기준으로 구현한다.
|
||||||
|
- D-DAY는 목표 관리 패널과 연결되는 기능으로 추후 구현한다.
|
||||||
|
|
||||||
|
## 1단계: 플래너 핵심 상호작용
|
||||||
|
|
||||||
|
- [x] 상단 날짜를 시스템 날짜 기준으로 자동 표시한다.
|
||||||
|
- [x] `COMMENT`를 자유 입력 가능한 입력 필드로 바꾼다.
|
||||||
|
- [x] `TASKS` 각 줄을 텍스트 입력 + 체크박스 토글 가능하게 만든다.
|
||||||
|
- [x] `MEMO` 각 줄을 텍스트 입력 가능하게 만든다.
|
||||||
|
- [x] `TIME TABLE`을 마우스 드래그로 칠할 수 있게 만든다.
|
||||||
|
- [x] `TIME TABLE` 드래그가 여러 줄을 지나가더라도 시간 흐름 기준으로 연속 선택되도록 처리한다.
|
||||||
|
- [x] 선택된 `TIME TABLE` 구간을 기준으로 `TOTAL TIME`을 자동 계산한다.
|
||||||
|
|
||||||
|
## 2단계: 달력과 이동 기능
|
||||||
|
|
||||||
|
- [x] 달력에 연/월 이동 기능을 추가한다.
|
||||||
|
- [x] 선택 날짜를 클릭하면 해당 날짜 플래너 데이터로 이동되게 한다.
|
||||||
|
- [x] 입력값이 하나라도 있는 날짜에는 달력 하단에 빨간 점 표시를 추가한다.
|
||||||
|
- [ ] `PREV DAY` / `NEXT DAY` 이동 시 현재 편집 중 데이터와 연결되도록 정리한다.
|
||||||
|
|
||||||
|
## 추가 반영 메모
|
||||||
|
|
||||||
|
- [x] TASKS 왼쪽 라벨은 자유 입력 가능해야 한다.
|
||||||
|
- [x] 우측 패널에서 TASKS 번호를 한 번에 채우는 빠른 액션이 있어야 한다.
|
||||||
|
- [x] 달력 상단은 좌우 화살표로 월 이동하는 구조가 더 적합하다.
|
||||||
|
- [x] 연도 클릭 시 연도 선택 UI가 열려야 한다.
|
||||||
|
- [x] 오늘 날짜로 즉시 돌아가는 버튼이 필요하다.
|
||||||
|
|
||||||
|
## 3단계: 목표와 회고 기능
|
||||||
|
|
||||||
|
- [ ] 목표 관리 패널을 설계한다.
|
||||||
|
- [ ] 선택한 목표 기준으로 `D-DAY`가 자동 계산되게 한다.
|
||||||
|
- [ ] 우측 요약 패널의 `PREV SNAPSHOT`, `READ NEXT`를 실제 데이터 기반으로 연결한다.
|
||||||
|
- [ ] 다음날 할 일 자동 제안 규칙을 정리한다.
|
||||||
|
|
||||||
|
## 4단계: 데이터 구조와 저장
|
||||||
|
|
||||||
|
- [ ] 플래너 데이터 구조를 날짜별 상태 중심으로 정리한다.
|
||||||
|
- [ ] 입력 데이터의 저장 위치를 결정한다.
|
||||||
|
- [ ] 로컬 저장 또는 외부 저장 방식 중 우선 구현 방식을 정한다.
|
||||||
|
- [ ] 입력 상태가 새로고침 후에도 유지되도록 만든다.
|
||||||
|
|
||||||
|
## 5단계: 확장 화면
|
||||||
|
|
||||||
|
- [ ] 통계 페이지 요구사항을 정리한다.
|
||||||
|
- [ ] 통계 페이지 라우팅 또는 화면 전환 구조를 설계한다.
|
||||||
|
- [ ] 집중 시간, 완료율, 연속 기록 같은 핵심 지표를 정의한다.
|
||||||
|
|
||||||
|
## 메모
|
||||||
|
|
||||||
|
- D-DAY는 현재 보류 상태다. 목표 패널 설계 후 연결한다.
|
||||||
|
- `TIME TABLE` 드래그는 단순 사각형 선택이 아니라 시간 셀 단위의 연속 선택으로 해석한다.
|
||||||
|
- 구현할 때마다 완료된 항목은 체크하고, 큰 결정사항은 `HANDOFF.md`에도 함께 반영한다.
|
||||||
@@ -7,6 +7,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="bg-stone-100">
|
<body class="bg-stone-100">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
171
package-lock.json
generated
171
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "ten-minute-planner",
|
"name": "ten-minute-planner",
|
||||||
"version": "0.0.0",
|
"version": "0.0.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ten-minute-planner",
|
"name": "ten-minute-planner",
|
||||||
"version": "0.0.0",
|
"version": "0.0.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vue": "^3.5.13"
|
"vue": "^3.5.13"
|
||||||
},
|
},
|
||||||
@@ -15,9 +15,7 @@
|
|||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"typescript": "^5.7.2",
|
"vite": "^6.0.5"
|
||||||
"vite": "^6.0.5",
|
|
||||||
"vue-tsc": "^2.2.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@alloc/quick-lru": {
|
"node_modules/@alloc/quick-lru": {
|
||||||
@@ -968,35 +966,6 @@
|
|||||||
"vue": "^3.2.25"
|
"vue": "^3.2.25"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@volar/language-core": {
|
|
||||||
"version": "2.4.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.15.tgz",
|
|
||||||
"integrity": "sha512-3VHw+QZU0ZG9IuQmzT68IyN4hZNd9GchGPhbD9+pa8CVv7rnoOZwo7T8weIbrRmihqy3ATpdfXFnqRrfPVK6CA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@volar/source-map": "2.4.15"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@volar/source-map": {
|
|
||||||
"version": "2.4.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.15.tgz",
|
|
||||||
"integrity": "sha512-CPbMWlUN6hVZJYGcU/GSoHu4EnCHiLaXI9n8c9la6RaI9W5JHX+NqG+GSQcB0JdC2FIBLdZJwGsfKyBB71VlTg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@volar/typescript": {
|
|
||||||
"version": "2.4.15",
|
|
||||||
"resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.15.tgz",
|
|
||||||
"integrity": "sha512-2aZ8i0cqPGjXb4BhkMsPYDkkuc2ZQ6yOpqwAuNwUoncELqoy5fRgOQtLR9gB0g902iS0NAkvpIzs27geVyVdPg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@volar/language-core": "2.4.15",
|
|
||||||
"path-browserify": "^1.0.1",
|
|
||||||
"vscode-uri": "^3.0.8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/compiler-core": {
|
"node_modules/@vue/compiler-core": {
|
||||||
"version": "3.5.32",
|
"version": "3.5.32",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.32.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.32.tgz",
|
||||||
@@ -1047,42 +1016,6 @@
|
|||||||
"@vue/shared": "3.5.32"
|
"@vue/shared": "3.5.32"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@vue/compiler-vue2": {
|
|
||||||
"version": "2.7.16",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/compiler-vue2/-/compiler-vue2-2.7.16.tgz",
|
|
||||||
"integrity": "sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"de-indent": "^1.0.2",
|
|
||||||
"he": "^1.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/language-core": {
|
|
||||||
"version": "2.2.12",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vue/language-core/-/language-core-2.2.12.tgz",
|
|
||||||
"integrity": "sha512-IsGljWbKGU1MZpBPN+BvPAdr55YPkj2nB/TBNGNC32Vy2qLG25DYu/NBN2vNtZqdRbTRjaoYrahLrToim2NanA==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@volar/language-core": "2.4.15",
|
|
||||||
"@vue/compiler-dom": "^3.5.0",
|
|
||||||
"@vue/compiler-vue2": "^2.7.16",
|
|
||||||
"@vue/shared": "^3.5.0",
|
|
||||||
"alien-signals": "^1.0.3",
|
|
||||||
"minimatch": "^9.0.3",
|
|
||||||
"muggle-string": "^0.4.1",
|
|
||||||
"path-browserify": "^1.0.1"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": "*"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"typescript": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vue/reactivity": {
|
"node_modules/@vue/reactivity": {
|
||||||
"version": "3.5.32",
|
"version": "3.5.32",
|
||||||
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.32.tgz",
|
"resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.32.tgz",
|
||||||
@@ -1133,13 +1066,6 @@
|
|||||||
"integrity": "sha512-ksNyrmRQzWJJ8n3cRDuSF7zNNontuJg1YHnmWRJd2AMu8Ij2bqwiiri2lH5rHtYPZjj4STkNcgcmiQqlOjiYGg==",
|
"integrity": "sha512-ksNyrmRQzWJJ8n3cRDuSF7zNNontuJg1YHnmWRJd2AMu8Ij2bqwiiri2lH5rHtYPZjj4STkNcgcmiQqlOjiYGg==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/alien-signals": {
|
|
||||||
"version": "1.0.13",
|
|
||||||
"resolved": "https://registry.npmjs.org/alien-signals/-/alien-signals-1.0.13.tgz",
|
|
||||||
"integrity": "sha512-OGj9yyTnJEttvzhTUWuscOvtqxq5vrhF7vL9oS0xJ2mK0ItPYP1/y+vCFebfxoEyAz0++1AIwJ5CMr+Fk3nDmg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/any-promise": {
|
"node_modules/any-promise": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||||
@@ -1205,13 +1131,6 @@
|
|||||||
"postcss": "^8.1.0"
|
"postcss": "^8.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/balanced-match": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/baseline-browser-mapping": {
|
"node_modules/baseline-browser-mapping": {
|
||||||
"version": "2.10.20",
|
"version": "2.10.20",
|
||||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.20.tgz",
|
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.20.tgz",
|
||||||
@@ -1238,16 +1157,6 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"balanced-match": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/braces": {
|
"node_modules/braces": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
@@ -1393,13 +1302,6 @@
|
|||||||
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/de-indent": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/didyoumean": {
|
"node_modules/didyoumean": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
|
||||||
@@ -1619,16 +1521,6 @@
|
|||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/he": {
|
|
||||||
"version": "1.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
|
||||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
|
||||||
"he": "bin/he"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-binary-path": {
|
"node_modules/is-binary-path": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||||
@@ -1754,29 +1646,6 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
|
||||||
"version": "9.0.9",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz",
|
|
||||||
"integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"brace-expansion": "^2.0.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16 || 14 >=14.17"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sponsors/isaacs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/muggle-string": {
|
|
||||||
"version": "0.4.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/muggle-string/-/muggle-string-0.4.1.tgz",
|
|
||||||
"integrity": "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/mz": {
|
"node_modules/mz": {
|
||||||
"version": "2.7.0",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||||
@@ -1844,13 +1713,6 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/path-browserify": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/path-parse": {
|
"node_modules/path-parse": {
|
||||||
"version": "1.0.7",
|
"version": "1.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||||
@@ -2383,8 +2245,9 @@
|
|||||||
"version": "5.9.3",
|
"version": "5.9.3",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||||
"devOptional": true,
|
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
"optional": true,
|
||||||
|
"peer": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
"tsserver": "bin/tsserver"
|
"tsserver": "bin/tsserver"
|
||||||
@@ -2537,13 +2400,6 @@
|
|||||||
"url": "https://github.com/sponsors/jonschlinkert"
|
"url": "https://github.com/sponsors/jonschlinkert"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vscode-uri": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/vue": {
|
"node_modules/vue": {
|
||||||
"version": "3.5.32",
|
"version": "3.5.32",
|
||||||
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.32.tgz",
|
"resolved": "https://registry.npmjs.org/vue/-/vue-3.5.32.tgz",
|
||||||
@@ -2564,23 +2420,6 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"node_modules/vue-tsc": {
|
|
||||||
"version": "2.2.12",
|
|
||||||
"resolved": "https://registry.npmjs.org/vue-tsc/-/vue-tsc-2.2.12.tgz",
|
|
||||||
"integrity": "sha512-P7OP77b2h/Pmk+lZdJ0YWs+5tJ6J2+uOQPo7tlBnY44QqQSPYvS0qVT4wqDJgwrZaLe47etJLLQRFia71GYITw==",
|
|
||||||
"dev": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@volar/typescript": "2.4.15",
|
|
||||||
"@vue/language-core": "2.2.12"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"vue-tsc": "bin/vue-tsc.js"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"typescript": ">=5.0.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "ten-minute-planner",
|
"name": "ten-minute-planner",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.0.0",
|
"version": "0.0.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -16,8 +16,6 @@
|
|||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"postcss": "^8.4.49",
|
"postcss": "^8.4.49",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"typescript": "^5.7.2",
|
"vite": "^6.0.5"
|
||||||
"vite": "^6.0.5",
|
|
||||||
"vue-tsc": "^2.2.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
317
src/App.vue
317
src/App.vue
@@ -1,28 +1,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup>
|
||||||
import { computed, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
import MiniCalendar from './components/MiniCalendar.vue'
|
import MiniCalendar from './components/MiniCalendar.vue'
|
||||||
import PlannerPage from './components/PlannerPage.vue'
|
import PlannerPage from './components/PlannerPage.vue'
|
||||||
|
|
||||||
type PlannerTask = {
|
const viewMode = ref('focus')
|
||||||
id: string
|
const selectedDate = ref(new Date())
|
||||||
title: string
|
const calendarViewDate = ref(new Date(selectedDate.value))
|
||||||
checked?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
type PlannerRecord = {
|
|
||||||
dday: string
|
|
||||||
comment: string
|
|
||||||
totalTime: string
|
|
||||||
tasks: PlannerTask[]
|
|
||||||
memo: string[]
|
|
||||||
prevSummary: string[]
|
|
||||||
nextFocus: string[]
|
|
||||||
}
|
|
||||||
|
|
||||||
type ViewMode = 'focus' | 'spread'
|
|
||||||
|
|
||||||
const viewMode = ref<ViewMode>('focus')
|
|
||||||
const selectedDate = ref(new Date(2026, 3, 21))
|
|
||||||
|
|
||||||
const hours = [
|
const hours = [
|
||||||
'6', '7', '8', '9', '10', '11', '12',
|
'6', '7', '8', '9', '10', '11', '12',
|
||||||
@@ -31,27 +14,48 @@ const hours = [
|
|||||||
'1', '2', '3', '4', '5',
|
'1', '2', '3', '4', '5',
|
||||||
]
|
]
|
||||||
|
|
||||||
const plannerSeed: Record<string, PlannerRecord> = {
|
const timetableCellCount = hours.length * 6
|
||||||
|
|
||||||
|
function createEmptyTimetable() {
|
||||||
|
return Array.from({ length: timetableCellCount }, () => false)
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTaskLabel(index) {
|
||||||
|
return `${index + 1}`.padStart(2, '0')
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTimetableFromRanges(ranges) {
|
||||||
|
const timetable = createEmptyTimetable()
|
||||||
|
|
||||||
|
ranges.forEach(([start, end]) => {
|
||||||
|
for (let index = start; index <= end; index += 1) {
|
||||||
|
timetable[index] = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return timetable
|
||||||
|
}
|
||||||
|
|
||||||
|
const plannerSeed = {
|
||||||
'2026-04-21': {
|
'2026-04-21': {
|
||||||
dday: 'D-12 LAUNCH',
|
dday: 'D-12 LAUNCH',
|
||||||
comment: '집중 작업 3개만 남기고, 10분 단위로 흐름을 끊지 않기.',
|
comment: '집중 작업 3개만 남기고, 10분 단위로 흐름을 끊지 않기.',
|
||||||
totalTime: '09H 40M',
|
|
||||||
tasks: [
|
tasks: [
|
||||||
{ id: '01', title: '홈 화면 정보 구조 정리', checked: true },
|
{ label: '01', title: '홈 화면 정보 구조 정리', checked: true },
|
||||||
{ id: '02', title: '플래너 페이지 헤더 상태 연결', checked: true },
|
{ label: '02', title: '플래너 페이지 헤더 상태 연결', checked: true },
|
||||||
{ id: '03', title: '타임테이블 액티브 블록 설계' },
|
{ label: '03', title: '타임테이블 액티브 블록 설계' },
|
||||||
{ id: '04', title: '우측 캘린더 빠른 이동 구현' },
|
{ label: '04', title: '우측 캘린더 빠른 이동 구현' },
|
||||||
{ id: '05', title: '전날 요약 영역 문구 다듬기' },
|
{ label: '05', title: '전날 요약 영역 문구 다듬기' },
|
||||||
{ id: '06', title: '다음날 할 일 자동 제안 시나리오' },
|
{ label: '06', title: '다음날 할 일 자동 제안 시나리오' },
|
||||||
{ id: '07', title: '통계 카드 레이아웃 정리' },
|
{ label: '07', title: '통계 카드 레이아웃 정리' },
|
||||||
{ id: '08', title: '모바일 스택 레이아웃 점검' },
|
{ label: '08', title: '모바일 스택 레이아웃 점검' },
|
||||||
{ id: '09', title: '체크박스 인터랙션 연결' },
|
{ label: '09', title: '체크박스 인터랙션 연결' },
|
||||||
{ id: '10', title: '페이지 넘김 애니메이션 방향 검토' },
|
{ label: '10', title: '페이지 넘김 애니메이션 방향 검토' },
|
||||||
{ id: '11', title: 'Tailwind 토큰 정리' },
|
{ label: '11', title: 'Tailwind 토큰 정리' },
|
||||||
{ id: '12', title: 'Vue 컴포넌트 분리 기준 정하기' },
|
{ label: '12', title: 'Vue 컴포넌트 분리 기준 정하기' },
|
||||||
{ id: '13', title: '빈 상태 문구 작성' },
|
{ label: '13', title: '빈 상태 문구 작성' },
|
||||||
{ id: '14', title: '주간 리듬 회고 메모 추가' },
|
{ label: '14', title: '주간 리듬 회고 메모 추가' },
|
||||||
{ id: '15', title: '디자인 QA 체크리스트 정리' },
|
{ label: '15', title: '디자인 QA 체크리스트 정리' },
|
||||||
],
|
],
|
||||||
memo: [
|
memo: [
|
||||||
'오른쪽 패널은 정보 확인과 이동이 한 번에 되도록 유지.',
|
'오른쪽 패널은 정보 확인과 이동이 한 번에 되도록 유지.',
|
||||||
@@ -68,27 +72,31 @@ const plannerSeed: Record<string, PlannerRecord> = {
|
|||||||
'다음날 핵심 3개 자동 복사',
|
'다음날 핵심 3개 자동 복사',
|
||||||
'미완료 작업만 재정렬',
|
'미완료 작업만 재정렬',
|
||||||
],
|
],
|
||||||
|
timetable: createTimetableFromRanges([
|
||||||
|
[6, 13],
|
||||||
|
[24, 32],
|
||||||
|
[42, 47],
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
'2026-04-22': {
|
'2026-04-22': {
|
||||||
dday: 'D-11 LAUNCH',
|
dday: 'D-11 LAUNCH',
|
||||||
comment: '초반 90분은 구현, 후반은 문장과 사용성 정리에 사용.',
|
comment: '초반 90분은 구현, 후반은 문장과 사용성 정리에 사용.',
|
||||||
totalTime: '08H 20M',
|
|
||||||
tasks: [
|
tasks: [
|
||||||
{ id: '01', title: '통계 섹션 수치 실제 계산 연결', checked: true },
|
{ label: '01', title: '통계 섹션 수치 실제 계산 연결', checked: true },
|
||||||
{ id: '02', title: '날짜 선택 시 상태 동기화' },
|
{ label: '02', title: '날짜 선택 시 상태 동기화' },
|
||||||
{ id: '03', title: '다음날 할 일 템플릿 개선' },
|
{ label: '03', title: '다음날 할 일 템플릿 개선' },
|
||||||
{ id: '04', title: '2페이지 보기 비교 카피 작성' },
|
{ label: '04', title: '2페이지 보기 비교 카피 작성' },
|
||||||
{ id: '05', title: '주간 흐름 카드 추가' },
|
{ label: '05', title: '주간 흐름 카드 추가' },
|
||||||
{ id: '06', title: '메모 영역 편집 UX 개선' },
|
{ label: '06', title: '메모 영역 편집 UX 개선' },
|
||||||
{ id: '07', title: '프린트 스타일 초안 점검' },
|
{ label: '07', title: '프린트 스타일 초안 점검' },
|
||||||
{ id: '08', title: '색 대비 보정' },
|
{ label: '08', title: '색 대비 보정' },
|
||||||
{ id: '09', title: '우측 패널 축약 버전 검토' },
|
{ label: '09', title: '우측 패널 축약 버전 검토' },
|
||||||
{ id: '10', title: '마감용 체크리스트 분리' },
|
{ label: '10', title: '마감용 체크리스트 분리' },
|
||||||
{ id: '11', title: '키보드 탐색 흐름 다듬기' },
|
{ label: '11', title: '키보드 탐색 흐름 다듬기' },
|
||||||
{ id: '12', title: '데이터 구조 문서화' },
|
{ label: '12', title: '데이터 구조 문서화' },
|
||||||
{ id: '13', title: '테스트 날짜 더미 세트 늘리기' },
|
{ label: '13', title: '테스트 날짜 더미 세트 늘리기' },
|
||||||
{ id: '14', title: '브랜드 푸터 위치 확정' },
|
{ label: '14', title: '브랜드 푸터 위치 확정' },
|
||||||
{ id: '15', title: '빈 상태 일러스트 여부 결정' },
|
{ label: '15', title: '빈 상태 일러스트 여부 결정' },
|
||||||
],
|
],
|
||||||
memo: [
|
memo: [
|
||||||
'한 화면에 모든 정보를 모으되 시선 이동은 짧게.',
|
'한 화면에 모든 정보를 모으되 시선 이동은 짧게.',
|
||||||
@@ -105,6 +113,11 @@ const plannerSeed: Record<string, PlannerRecord> = {
|
|||||||
'오늘 미완료 작업 넘기기',
|
'오늘 미완료 작업 넘기기',
|
||||||
'이번 주 누적 시간 요약',
|
'이번 주 누적 시간 요약',
|
||||||
],
|
],
|
||||||
|
timetable: createTimetableFromRanges([
|
||||||
|
[3, 8],
|
||||||
|
[18, 23],
|
||||||
|
[54, 62],
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,29 +128,60 @@ const dateFormatter = new Intl.DateTimeFormat('ko-KR', {
|
|||||||
weekday: 'short',
|
weekday: 'short',
|
||||||
})
|
})
|
||||||
|
|
||||||
function toKey(date: Date) {
|
function toKey(date) {
|
||||||
const year = date.getFullYear()
|
const year = date.getFullYear()
|
||||||
const month = `${date.getMonth() + 1}`.padStart(2, '0')
|
const month = `${date.getMonth() + 1}`.padStart(2, '0')
|
||||||
const day = `${date.getDate()}`.padStart(2, '0')
|
const day = `${date.getDate()}`.padStart(2, '0')
|
||||||
return `${year}-${month}-${day}`
|
return `${year}-${month}-${day}`
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildFallbackRecord(date: Date): PlannerRecord {
|
function buildFallbackRecord(date) {
|
||||||
return {
|
return {
|
||||||
dday: 'D-00 FOCUS',
|
dday: 'D-00 FOCUS',
|
||||||
comment: `${date.getMonth() + 1}월 ${date.getDate()}일 플래너를 위한 빈 페이지입니다.`,
|
comment: '',
|
||||||
totalTime: '00H 00M',
|
|
||||||
tasks: Array.from({ length: 15 }, (_, index) => ({
|
tasks: Array.from({ length: 15 }, (_, index) => ({
|
||||||
id: `${index + 1}`.padStart(2, '0'),
|
label: createTaskLabel(index),
|
||||||
title: index < 3 ? '새 작업을 추가해 주세요.' : '',
|
title: '',
|
||||||
|
checked: false,
|
||||||
})),
|
})),
|
||||||
memo: ['메모를 남겨 두세요.', '중요한 문장을 짧게 적어 보세요.', '내일로 넘길 내용을 적어 두세요.'],
|
memo: ['', '', ''],
|
||||||
prevSummary: ['이전 기록 없음', '새로운 흐름 시작', ''],
|
prevSummary: ['이전 기록 없음', '새로운 흐름 시작', ''],
|
||||||
nextFocus: ['다음 집중 블록 준비', '내일의 핵심 3개 정하기', ''],
|
nextFocus: ['다음 집중 블록 준비', '내일의 핵심 3개 정하기', ''],
|
||||||
|
timetable: createEmptyTimetable(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const planner = computed(() => plannerSeed[toKey(selectedDate.value)] ?? buildFallbackRecord(selectedDate.value))
|
function normalizeRecord(record) {
|
||||||
|
return {
|
||||||
|
...record,
|
||||||
|
tasks: record.tasks.map((task, index) => ({
|
||||||
|
label: task.label ?? task.id ?? createTaskLabel(index),
|
||||||
|
title: task.title ?? '',
|
||||||
|
checked: Boolean(task.checked),
|
||||||
|
})),
|
||||||
|
timetable: Array.isArray(record.timetable) && record.timetable.length === timetableCellCount
|
||||||
|
? [...record.timetable]
|
||||||
|
: createEmptyTimetable(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const plannerRecords = reactive(
|
||||||
|
Object.fromEntries(
|
||||||
|
Object.entries(plannerSeed).map(([key, record]) => [key, normalizeRecord(record)]),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
function getPlannerRecord(date) {
|
||||||
|
const key = toKey(date)
|
||||||
|
|
||||||
|
if (!plannerRecords[key]) {
|
||||||
|
plannerRecords[key] = buildFallbackRecord(date)
|
||||||
|
}
|
||||||
|
|
||||||
|
return plannerRecords[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
const planner = computed(() => getPlannerRecord(selectedDate.value))
|
||||||
|
|
||||||
const secondaryDate = computed(() => {
|
const secondaryDate = computed(() => {
|
||||||
const next = new Date(selectedDate.value)
|
const next = new Date(selectedDate.value)
|
||||||
@@ -145,14 +189,16 @@ const secondaryDate = computed(() => {
|
|||||||
return next
|
return next
|
||||||
})
|
})
|
||||||
|
|
||||||
const secondaryPlanner = computed(() => plannerSeed[toKey(secondaryDate.value)] ?? buildFallbackRecord(secondaryDate.value))
|
const secondaryPlanner = computed(() => getPlannerRecord(secondaryDate.value))
|
||||||
|
|
||||||
const monthLabel = computed(() =>
|
const monthLabel = computed(() =>
|
||||||
`${selectedDate.value.getFullYear()}.${`${selectedDate.value.getMonth() + 1}`.padStart(2, '0')}`,
|
`${calendarViewDate.value.getMonth() + 1}`.padStart(2, '0'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const yearLabel = computed(() => `${calendarViewDate.value.getFullYear()}`)
|
||||||
|
|
||||||
const calendarDays = computed(() => {
|
const calendarDays = computed(() => {
|
||||||
const base = selectedDate.value
|
const base = calendarViewDate.value
|
||||||
const first = new Date(base.getFullYear(), base.getMonth(), 1)
|
const first = new Date(base.getFullYear(), base.getMonth(), 1)
|
||||||
const start = new Date(first)
|
const start = new Date(first)
|
||||||
start.setDate(first.getDate() - first.getDay())
|
start.setDate(first.getDate() - first.getDay())
|
||||||
@@ -169,13 +215,91 @@ const calendarDays = computed(() => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const markedDateKeys = computed(() =>
|
||||||
|
Object.entries(plannerRecords)
|
||||||
|
.filter(([, record]) => hasPlannerContent(record))
|
||||||
|
.map(([key]) => key),
|
||||||
|
)
|
||||||
|
|
||||||
const completedTasks = computed(() => planner.value.tasks.filter((task) => task.checked).length)
|
const completedTasks = computed(() => planner.value.tasks.filter((task) => task.checked).length)
|
||||||
const completionRate = computed(() => Math.round((completedTasks.value / planner.value.tasks.length) * 100))
|
const completionRate = computed(() => Math.round((completedTasks.value / planner.value.tasks.length) * 100))
|
||||||
|
|
||||||
function shiftDate(amount: number) {
|
function formatTotalTime(record) {
|
||||||
|
const activeCellCount = record.timetable.filter(Boolean).length
|
||||||
|
const totalMinutes = activeCellCount * 10
|
||||||
|
const hoursPart = `${Math.floor(totalMinutes / 60)}`.padStart(2, '0')
|
||||||
|
const minutesPart = `${totalMinutes % 60}`.padStart(2, '0')
|
||||||
|
|
||||||
|
return `${hoursPart}H ${minutesPart}M`
|
||||||
|
}
|
||||||
|
|
||||||
|
function shiftDate(amount) {
|
||||||
const next = new Date(selectedDate.value)
|
const next = new Date(selectedDate.value)
|
||||||
next.setDate(next.getDate() + amount)
|
next.setDate(next.getDate() + amount)
|
||||||
selectedDate.value = next
|
selectedDate.value = next
|
||||||
|
calendarViewDate.value = new Date(next)
|
||||||
|
}
|
||||||
|
|
||||||
|
function shiftCalendarMonth(amount) {
|
||||||
|
const next = new Date(calendarViewDate.value)
|
||||||
|
next.setMonth(next.getMonth() + amount)
|
||||||
|
calendarViewDate.value = next
|
||||||
|
}
|
||||||
|
|
||||||
|
function shiftCalendarYear(amount) {
|
||||||
|
const next = new Date(calendarViewDate.value)
|
||||||
|
next.setFullYear(next.getFullYear() + amount)
|
||||||
|
calendarViewDate.value = next
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDate(date) {
|
||||||
|
selectedDate.value = new Date(date)
|
||||||
|
calendarViewDate.value = new Date(date)
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateComment(record, value) {
|
||||||
|
record.comment = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTaskLabel(record, { index, value }) {
|
||||||
|
record.tasks[index].label = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTaskTitle(record, { index, value }) {
|
||||||
|
record.tasks[index].title = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleTask(record, index) {
|
||||||
|
record.tasks[index].checked = !record.tasks[index].checked
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateMemo(record, { index, value }) {
|
||||||
|
record.memo[index] = value
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTimetable(record, nextTimetable) {
|
||||||
|
record.timetable = nextTimetable
|
||||||
|
}
|
||||||
|
|
||||||
|
function hasPlannerContent(record) {
|
||||||
|
return Boolean(
|
||||||
|
record.comment.trim() ||
|
||||||
|
record.tasks.some((task) => task.title.trim() || task.checked) ||
|
||||||
|
record.memo.some((item) => item.trim()) ||
|
||||||
|
record.timetable.some(Boolean),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillTaskLabelsWithNumbers(record) {
|
||||||
|
record.tasks.forEach((task, index) => {
|
||||||
|
task.label = createTaskLabel(index)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearTaskLabels(record) {
|
||||||
|
record.tasks.forEach((task) => {
|
||||||
|
task.label = ''
|
||||||
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -240,10 +364,17 @@ function shiftDate(amount: number) {
|
|||||||
:date-label="dateFormatter.format(selectedDate)"
|
:date-label="dateFormatter.format(selectedDate)"
|
||||||
:dday="planner.dday"
|
:dday="planner.dday"
|
||||||
:comment="planner.comment"
|
:comment="planner.comment"
|
||||||
:total-time="planner.totalTime"
|
:total-time="formatTotalTime(planner)"
|
||||||
:tasks="planner.tasks"
|
:tasks="planner.tasks"
|
||||||
:memo="planner.memo"
|
:memo="planner.memo"
|
||||||
:hours="hours"
|
:hours="hours"
|
||||||
|
:timetable="planner.timetable"
|
||||||
|
@update:comment="updateComment(planner, $event)"
|
||||||
|
@update:task-label="updateTaskLabel(planner, $event)"
|
||||||
|
@update:task-title="updateTaskTitle(planner, $event)"
|
||||||
|
@toggle:task="toggleTask(planner, $event)"
|
||||||
|
@update:memo="updateMemo(planner, $event)"
|
||||||
|
@update:timetable="updateTimetable(planner, $event)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<aside class="flex flex-col gap-4">
|
<aside class="flex flex-col gap-4">
|
||||||
@@ -260,6 +391,29 @@ function shiftDate(amount: number) {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="border border-stone-200 bg-white/80 p-5">
|
||||||
|
<p class="mb-3 text-[11px] font-bold tracking-[0.22em] text-ink">TASK LABELS</p>
|
||||||
|
<p class="text-[11px] font-semibold leading-5 tracking-[0.06em] text-stone-600">
|
||||||
|
왼쪽 라벨은 직접 입력할 수 있고, 필요하면 아래 버튼으로 순번을 한 번에 채울 수 있습니다.
|
||||||
|
</p>
|
||||||
|
<div class="mt-4 flex flex-wrap gap-2">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="fillTaskLabelsWithNumbers(planner)"
|
||||||
|
>
|
||||||
|
번호 채우기
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="clearTaskLabels(planner)"
|
||||||
|
>
|
||||||
|
라벨 비우기
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section class="border border-stone-200 bg-white/80 p-5">
|
<section class="border border-stone-200 bg-white/80 p-5">
|
||||||
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">READ NEXT</p>
|
<p class="mb-4 text-[11px] font-bold tracking-[0.22em] text-ink">READ NEXT</p>
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
@@ -275,9 +429,14 @@ function shiftDate(amount: number) {
|
|||||||
|
|
||||||
<MiniCalendar
|
<MiniCalendar
|
||||||
:month-label="monthLabel"
|
:month-label="monthLabel"
|
||||||
|
:year-label="yearLabel"
|
||||||
:days="calendarDays"
|
:days="calendarDays"
|
||||||
:selected-key="toKey(selectedDate)"
|
:selected-key="toKey(selectedDate)"
|
||||||
@select="selectedDate = $event"
|
:marked-keys="markedDateKeys"
|
||||||
|
@shift-month="shiftCalendarMonth"
|
||||||
|
@shift-year="shiftCalendarYear"
|
||||||
|
@go-today="selectDate(new Date())"
|
||||||
|
@select="selectDate"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<section class="grid grid-cols-2 gap-4">
|
<section class="grid grid-cols-2 gap-4">
|
||||||
@@ -289,7 +448,7 @@ function shiftDate(amount: number) {
|
|||||||
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">TASK COMPLETION</p>
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">TASK COMPLETION</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-[22px] font-semibold tracking-[-0.04em] text-stone-900">{{ planner.totalTime }}</p>
|
<p class="text-[22px] font-semibold tracking-[-0.04em] text-stone-900">{{ formatTotalTime(planner) }}</p>
|
||||||
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">FOCUSED TIME</p>
|
<p class="text-[11px] font-semibold tracking-[0.08em] text-stone-500">FOCUSED TIME</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -316,19 +475,33 @@ function shiftDate(amount: number) {
|
|||||||
:date-label="dateFormatter.format(selectedDate)"
|
:date-label="dateFormatter.format(selectedDate)"
|
||||||
:dday="planner.dday"
|
:dday="planner.dday"
|
||||||
:comment="planner.comment"
|
:comment="planner.comment"
|
||||||
:total-time="planner.totalTime"
|
:total-time="formatTotalTime(planner)"
|
||||||
:tasks="planner.tasks"
|
:tasks="planner.tasks"
|
||||||
:memo="planner.memo"
|
:memo="planner.memo"
|
||||||
:hours="hours"
|
:hours="hours"
|
||||||
|
:timetable="planner.timetable"
|
||||||
|
@update:comment="updateComment(planner, $event)"
|
||||||
|
@update:task-label="updateTaskLabel(planner, $event)"
|
||||||
|
@update:task-title="updateTaskTitle(planner, $event)"
|
||||||
|
@toggle:task="toggleTask(planner, $event)"
|
||||||
|
@update:memo="updateMemo(planner, $event)"
|
||||||
|
@update:timetable="updateTimetable(planner, $event)"
|
||||||
/>
|
/>
|
||||||
<PlannerPage
|
<PlannerPage
|
||||||
:date-label="dateFormatter.format(secondaryDate)"
|
:date-label="dateFormatter.format(secondaryDate)"
|
||||||
:dday="secondaryPlanner.dday"
|
:dday="secondaryPlanner.dday"
|
||||||
:comment="secondaryPlanner.comment"
|
:comment="secondaryPlanner.comment"
|
||||||
:total-time="secondaryPlanner.totalTime"
|
:total-time="formatTotalTime(secondaryPlanner)"
|
||||||
:tasks="secondaryPlanner.tasks"
|
:tasks="secondaryPlanner.tasks"
|
||||||
:memo="secondaryPlanner.memo"
|
:memo="secondaryPlanner.memo"
|
||||||
:hours="hours"
|
:hours="hours"
|
||||||
|
:timetable="secondaryPlanner.timetable"
|
||||||
|
@update:comment="updateComment(secondaryPlanner, $event)"
|
||||||
|
@update:task-label="updateTaskLabel(secondaryPlanner, $event)"
|
||||||
|
@update:task-title="updateTaskTitle(secondaryPlanner, $event)"
|
||||||
|
@toggle:task="toggleTask(secondaryPlanner, $event)"
|
||||||
|
@update:memo="updateMemo(secondaryPlanner, $event)"
|
||||||
|
@update:timetable="updateTimetable(secondaryPlanner, $event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,27 +1,120 @@
|
|||||||
<script setup lang="ts">
|
<script setup>
|
||||||
type DayCell = {
|
import { computed, ref } from 'vue'
|
||||||
key: string
|
|
||||||
label: number
|
const props = defineProps({
|
||||||
date: Date
|
monthLabel: {
|
||||||
isCurrentMonth: boolean
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
yearLabel: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
days: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
selectedKey: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
markedKeys: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['select', 'shift-month', 'shift-year', 'go-today'])
|
||||||
|
|
||||||
|
const isYearPickerOpen = ref(false)
|
||||||
|
const currentYearNumber = computed(() => Number(props.yearLabel))
|
||||||
|
const yearRangeStart = computed(() => currentYearNumber.value - (currentYearNumber.value % 12))
|
||||||
|
const visibleYears = computed(() =>
|
||||||
|
Array.from({ length: 12 }, (_, index) => yearRangeStart.value + index),
|
||||||
|
)
|
||||||
|
|
||||||
|
function selectYear(year) {
|
||||||
|
emit('shift-year', year - currentYearNumber.value)
|
||||||
|
isYearPickerOpen.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<{
|
|
||||||
monthLabel: string
|
|
||||||
days: DayCell[]
|
|
||||||
selectedKey: string
|
|
||||||
}>()
|
|
||||||
|
|
||||||
const emit = defineEmits<{
|
|
||||||
select: [date: Date]
|
|
||||||
}>()
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<section class="border border-stone-200 bg-white/80 p-5">
|
<section class="border border-stone-200 bg-white/80 p-5">
|
||||||
<div class="mb-4 flex items-center justify-between">
|
<div class="relative mb-4 flex items-start justify-between gap-4">
|
||||||
<h2 class="text-[11px] font-bold tracking-[0.22em] text-ink">CALENDAR</h2>
|
<div>
|
||||||
<span class="text-[11px] font-semibold tracking-[0.16em] text-stone-500">{{ monthLabel }}</span>
|
<h2 class="text-[11px] font-bold tracking-[0.22em] text-ink">CALENDAR</h2>
|
||||||
|
<div class="mt-2 flex items-center gap-3">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="emit('shift-month', -1)"
|
||||||
|
>
|
||||||
|
←
|
||||||
|
</button>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<p class="text-base font-semibold tracking-[-0.04em] text-stone-900">{{ monthLabel }}</p>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full px-2 py-1 text-[11px] font-semibold tracking-[0.16em] text-stone-500 transition hover:bg-stone-100 hover:text-ink"
|
||||||
|
@click="isYearPickerOpen = !isYearPickerOpen"
|
||||||
|
>
|
||||||
|
{{ yearLabel }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="emit('shift-month', 1)"
|
||||||
|
>
|
||||||
|
→
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-3 py-2 text-[10px] font-bold tracking-[0.14em] text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="emit('go-today')"
|
||||||
|
>
|
||||||
|
TODAY
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="isYearPickerOpen"
|
||||||
|
class="absolute right-0 top-14 z-10 w-[220px] rounded-2xl border border-stone-200 bg-white p-4 shadow-lg"
|
||||||
|
>
|
||||||
|
<div class="mb-3 flex items-center justify-between">
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="emit('shift-year', -12)"
|
||||||
|
>
|
||||||
|
←
|
||||||
|
</button>
|
||||||
|
<p class="text-[11px] font-bold tracking-[0.16em] text-stone-500">
|
||||||
|
{{ visibleYears[0] }} - {{ visibleYears[visibleYears.length - 1] }}
|
||||||
|
</p>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="rounded-full border border-stone-200 px-2 py-1 text-xs font-bold text-stone-600 transition hover:border-stone-400 hover:text-ink"
|
||||||
|
@click="emit('shift-year', 12)"
|
||||||
|
>
|
||||||
|
→
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-3 gap-2">
|
||||||
|
<button
|
||||||
|
v-for="year in visibleYears"
|
||||||
|
:key="year"
|
||||||
|
type="button"
|
||||||
|
class="rounded-xl border px-3 py-2 text-[11px] font-semibold transition"
|
||||||
|
:class="year === currentYearNumber ? 'border-ink bg-ink text-white' : 'border-stone-200 text-stone-700 hover:border-stone-400 hover:bg-stone-50'"
|
||||||
|
@click="selectYear(year)"
|
||||||
|
>
|
||||||
|
{{ year }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-3 grid grid-cols-7 gap-2 text-center text-[10px] font-bold tracking-[0.12em] text-stone-400">
|
<div class="mb-3 grid grid-cols-7 gap-2 text-center text-[10px] font-bold tracking-[0.12em] text-stone-400">
|
||||||
<span v-for="weekday in ['S', 'M', 'T', 'W', 'T', 'F', 'S']" :key="weekday">{{ weekday }}</span>
|
<span v-for="weekday in ['S', 'M', 'T', 'W', 'T', 'F', 'S']" :key="weekday">{{ weekday }}</span>
|
||||||
@@ -40,7 +133,13 @@ const emit = defineEmits<{
|
|||||||
]"
|
]"
|
||||||
@click="emit('select', day.date)"
|
@click="emit('select', day.date)"
|
||||||
>
|
>
|
||||||
{{ day.label }}
|
<span class="relative flex h-full w-full items-center justify-center">
|
||||||
|
<span>{{ day.label }}</span>
|
||||||
|
<span
|
||||||
|
v-if="markedKeys.includes(day.key)"
|
||||||
|
class="absolute bottom-[3px] h-[5px] w-[5px] rounded-full bg-red-500"
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -1,22 +1,103 @@
|
|||||||
<script setup lang="ts">
|
<script setup>
|
||||||
type PlannerTask = {
|
import { onBeforeUnmount } from 'vue'
|
||||||
id: string
|
|
||||||
title: string
|
const props = defineProps({
|
||||||
checked?: boolean
|
dateLabel: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
dday: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
comment: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
totalTime: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
tasks: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
memo: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
hours: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
timetable: {
|
||||||
|
type: Array,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
brand: {
|
||||||
|
type: String,
|
||||||
|
default: 'SORI.STUDIO',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits([
|
||||||
|
'update:comment',
|
||||||
|
'update:task-label',
|
||||||
|
'update:task-title',
|
||||||
|
'toggle:task',
|
||||||
|
'update:memo',
|
||||||
|
'update:timetable',
|
||||||
|
])
|
||||||
|
|
||||||
|
let dragState = null
|
||||||
|
|
||||||
|
function buildTimedRange(baseTimetable, startIndex, endIndex, nextValue) {
|
||||||
|
const nextTimetable = [...baseTimetable]
|
||||||
|
const rangeStart = Math.min(startIndex, endIndex)
|
||||||
|
const rangeEnd = Math.max(startIndex, endIndex)
|
||||||
|
|
||||||
|
for (let index = rangeStart; index <= rangeEnd; index += 1) {
|
||||||
|
nextTimetable[index] = nextValue
|
||||||
|
}
|
||||||
|
|
||||||
|
return nextTimetable
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlannerProps = {
|
function startTimetableDrag(index, event) {
|
||||||
dateLabel: string
|
if (event.button !== 0 && event.button !== 2) {
|
||||||
dday: string
|
return
|
||||||
comment: string
|
}
|
||||||
totalTime: string
|
|
||||||
tasks: PlannerTask[]
|
const shouldFill = event.button === 2 ? false : !props.timetable[index]
|
||||||
memo: string[]
|
|
||||||
hours: string[]
|
dragState = {
|
||||||
brand?: string
|
startIndex: index,
|
||||||
|
baseTimetable: [...props.timetable],
|
||||||
|
nextValue: shouldFill,
|
||||||
|
}
|
||||||
|
|
||||||
|
emit('update:timetable', buildTimedRange(dragState.baseTimetable, index, index, dragState.nextValue))
|
||||||
}
|
}
|
||||||
|
|
||||||
defineProps<PlannerProps>()
|
function moveTimetableDrag(index) {
|
||||||
|
if (!dragState) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
emit(
|
||||||
|
'update:timetable',
|
||||||
|
buildTimedRange(dragState.baseTimetable, dragState.startIndex, index, dragState.nextValue),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopTimetableDrag() {
|
||||||
|
dragState = null
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('pointerup', stopTimetableDrag)
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
window.removeEventListener('pointerup', stopTimetableDrag)
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -37,9 +118,13 @@ defineProps<PlannerProps>()
|
|||||||
<div class="flex gap-4 border-b border-ink pb-[18px]">
|
<div class="flex gap-4 border-b border-ink pb-[18px]">
|
||||||
<div class="relative h-[90px] w-[394px] flex-1 border-t border-ink px-[10px] pt-[10px]">
|
<div class="relative h-[90px] w-[394px] flex-1 border-t border-ink px-[10px] pt-[10px]">
|
||||||
<span class="absolute -top-2 left-0 bg-paper px-[2px] text-muted">COMMENT</span>
|
<span class="absolute -top-2 left-0 bg-paper px-[2px] text-muted">COMMENT</span>
|
||||||
<p class="pt-6 text-[11px] font-semibold normal-case tracking-[0.08em] text-stone-700 sm:text-xs">
|
<textarea
|
||||||
{{ comment }}
|
:value="comment"
|
||||||
</p>
|
rows="3"
|
||||||
|
class="mt-4 h-[56px] w-full resize-none bg-transparent pt-2 text-[11px] font-semibold normal-case tracking-[0.08em] text-stone-700 outline-none placeholder:text-stone-400 sm:text-xs"
|
||||||
|
placeholder="오늘의 코멘트를 적어 주세요."
|
||||||
|
@input="emit('update:comment', $event.target.value)"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative h-[90px] w-[210px] border-t border-ink px-[10px] pt-[10px]">
|
<div class="relative h-[90px] w-[210px] border-t border-ink px-[10px] pt-[10px]">
|
||||||
<span class="absolute -top-2 left-0 bg-paper px-[2px] text-muted">TOTAL TIME</span>
|
<span class="absolute -top-2 left-0 bg-paper px-[2px] text-muted">TOTAL TIME</span>
|
||||||
@@ -59,19 +144,33 @@ defineProps<PlannerProps>()
|
|||||||
class="flex h-[38px] items-center border-b"
|
class="flex h-[38px] items-center border-b"
|
||||||
:class="index % 5 === 4 || index === tasks.length - 1 ? 'border-ink' : 'border-line'"
|
:class="index % 5 === 4 || index === tasks.length - 1 ? 'border-ink' : 'border-line'"
|
||||||
>
|
>
|
||||||
<div class="h-full w-[62px] border-r border-dashed border-ink px-2 py-2 text-[9px] text-stone-500">
|
<div class="h-full w-[62px] border-r border-dashed border-ink px-2 py-[7px]">
|
||||||
{{ task.id }}
|
<input
|
||||||
|
:value="task.label"
|
||||||
|
type="text"
|
||||||
|
class="w-full bg-transparent text-center text-[9px] font-semibold tracking-[0.08em] text-stone-500 outline-none placeholder:text-stone-300"
|
||||||
|
:placeholder="`${index + 1}`.padStart(2, '0')"
|
||||||
|
@input="emit('update:task-label', { index, value: $event.target.value })"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex min-w-0 flex-1 items-center px-3">
|
<div class="flex min-w-0 flex-1 items-center px-3">
|
||||||
<span class="truncate text-[11px] font-semibold normal-case tracking-[0.06em] text-stone-800">
|
<input
|
||||||
{{ task.title }}
|
:value="task.title"
|
||||||
</span>
|
type="text"
|
||||||
|
class="w-full truncate bg-transparent text-[11px] font-semibold normal-case tracking-[0.06em] text-stone-800 outline-none placeholder:text-stone-400"
|
||||||
|
placeholder="할 일을 입력해 주세요."
|
||||||
|
@input="emit('update:task-title', { index, value: $event.target.value })"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex h-full w-[42px] items-center justify-center p-[10px]">
|
<div class="flex h-full w-[42px] items-center justify-center p-[10px]">
|
||||||
<span
|
<button
|
||||||
class="block h-full w-full border border-dashed"
|
type="button"
|
||||||
:class="task.checked ? 'border-ink bg-stone-100' : 'border-ink/60'"
|
class="flex h-full w-full items-center justify-center border border-dashed transition"
|
||||||
/>
|
:class="task.checked ? 'border-ink bg-stone-100 text-ink' : 'border-ink/60 text-transparent'"
|
||||||
|
@click="emit('toggle:task', index)"
|
||||||
|
>
|
||||||
|
<span class="text-sm leading-none">✓</span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -82,13 +181,19 @@ defineProps<PlannerProps>()
|
|||||||
<div class="border-t border-ink">
|
<div class="border-t border-ink">
|
||||||
<div
|
<div
|
||||||
v-for="(memoItem, index) in memo"
|
v-for="(memoItem, index) in memo"
|
||||||
:key="`${memoItem}-${index}`"
|
:key="`memo-${index}`"
|
||||||
class="flex h-[38px] items-center border-b"
|
class="flex h-[38px] items-center border-b"
|
||||||
:class="index === memo.length - 1 ? 'border-ink' : 'border-line'"
|
:class="index === memo.length - 1 ? 'border-ink' : 'border-line'"
|
||||||
>
|
>
|
||||||
<div class="h-full w-[62px] border-r border-dashed border-ink" />
|
<div class="h-full w-[62px] border-r border-dashed border-ink" />
|
||||||
<div class="flex-1 px-3 text-[11px] font-semibold normal-case tracking-[0.06em] text-stone-700">
|
<div class="flex flex-1 items-center px-3">
|
||||||
{{ memoItem }}
|
<input
|
||||||
|
:value="memoItem"
|
||||||
|
type="text"
|
||||||
|
class="w-full bg-transparent text-[11px] font-semibold normal-case tracking-[0.06em] text-stone-700 outline-none placeholder:text-stone-400"
|
||||||
|
placeholder="메모를 입력해 주세요."
|
||||||
|
@input="emit('update:memo', { index, value: $event.target.value })"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -110,7 +215,11 @@ defineProps<PlannerProps>()
|
|||||||
<div
|
<div
|
||||||
v-for="quarter in 6"
|
v-for="quarter in 6"
|
||||||
:key="quarter"
|
:key="quarter"
|
||||||
class="h-full w-[30px] border-r border-dashed border-line last:border-r-0"
|
:class="props.timetable[index * 6 + quarter - 1] ? 'bg-stone-800/90' : 'bg-transparent'"
|
||||||
|
class="h-full w-[30px] cursor-crosshair border-r border-dashed border-line transition-colors last:border-r-0 touch-none select-none"
|
||||||
|
@contextmenu.prevent
|
||||||
|
@pointerdown.prevent="startTimetableDrag(index * 6 + quarter - 1, $event)"
|
||||||
|
@pointerenter="moveTimetableDrag(index * 6 + quarter - 1)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -118,7 +227,7 @@ defineProps<PlannerProps>()
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<p class="text-[10px] tracking-[0.18em] text-ink">{{ brand ?? 'SORI.STUDIO' }}</p>
|
<p class="text-[10px] tracking-[0.18em] text-ink">{{ brand }}</p>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "ES2020",
|
|
||||||
"useDefineForClassFields": true,
|
|
||||||
"module": "ESNext",
|
|
||||||
"moduleResolution": "Node",
|
|
||||||
"strict": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"types": ["vite/client"]
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.vue"]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user