Commit Graph

72 Commits

Author SHA1 Message Date
3e03784202 docs(03-01): complete expandable note history panel plan
- Created comprehensive SUMMARY.md documenting implementation
- Updated STATE.md: Phase 3 complete, all 3 phases finished
- Recorded metrics: 2.2 min duration, 11 tests passing
- Documented decisions: collapse plugin, template wrapper pattern, client-side search
- Self-check verified: all files and commits present
2026-02-13 13:02:02 +08:00
46973c2f85 test(03-01): add feature tests for note history panel
- Test notes index returns author name and created_at for display
- Test empty state response (empty array when no notes)
- Test Blade view renders all Alpine.js history panel directives
- Test store endpoint returns complete note data for cache sync
- All 11 tests pass (7 existing + 4 new)
2026-02-13 12:59:39 +08:00
c0ebbdbe20 feat(03-01): add expandable note history panel with search
- Install @alpinejs/collapse plugin for smooth expand/collapse animation
- Fix controller ordering: notes now explicitly ordered newest first via latest('created_at')
- Note count badge is now clickable button to toggle history panel
- Add expansion panel row with loading state, search filter, empty state
- Search filters notes by content or author name (client-side)
- Panel collapses cleanly, search query resets on close
- Cache sync: new notes from inline form appear in history immediately
- Display format: author name and formatted datetime (YYYY年MM月DD日 HH:mm)
- Empty state shows '尚無備註', no-results shows '找不到符合的備忘錄'
2026-02-13 12:59:03 +08:00
14bab518dd docs(03): create phase plan for note history display 2026-02-13 12:53:17 +08:00
2791b34e59 docs(phase-03): research note history & display implementation 2026-02-13 12:49:28 +08:00
3d6cefef00 docs(phase-02): complete phase execution and verification
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-13 12:39:48 +08:00
461b448b0c docs(02-01): complete inline quick-add UI plan
- Alpine.js inline note forms in member list with per-row badge counters
- AJAX submission, validation error display, and full dark mode support
- 5 feature tests pass, no regressions in 7 Phase 1 tests
- Duration: 2 min 17 sec
- Tasks: 2 (feat + test)
- Files: 2 (1 created, 1 modified)
- Self-check: PASSED
2026-02-13 12:35:49 +08:00
eba6f60d18 test(02-01): add feature tests for inline note UI
- Test note count badge renders with correct count from withCount
- Test Alpine.js directives present in HTML (noteFormOpen, submitNote, x-model, :disabled)
- Test 備忘錄 column header renders
- Test zero-note members show 0 count
- Test correct note store route URL embedded for each member

All 5 tests pass. No regressions in 7 Phase 1 tests.
2026-02-13 12:33:40 +08:00
e760bbbfc2 feat(02-01): add inline note UI to member list
- Add Alpine.js x-data scope to each member row with noteFormOpen, noteContent, isSubmitting, errors, noteCount
- Add submitNote() async method calling axios.post to admin.members.notes.store route
- Add note count badge with reactive x-text binding to noteCount (initialized from withCount)
- Add toggle button to expand/collapse inline note form
- Add inline form with textarea, cancel button, and submit button
- Submit button disabled when isSubmitting or noteContent is empty
- Loading state toggles between 儲存 and 儲存中...
- Validation errors display in Traditional Chinese via x-show and x-text
- Cancel button clears content, closes form, and resets errors
- Add 備忘錄 column header between 狀態 and 操作
- Update empty state colspan from 7 to 8
- Add x-cloak CSS to prevent flash of unstyled content
- All elements include dark mode classes (dark:*)
2026-02-13 12:32:58 +08:00
320e05a5d3 docs(02-inline-quick-add-ui): create phase plan 2026-02-13 12:27:15 +08:00
3d36d50870 docs(phase-02): research Alpine.js inline forms with Laravel 2026-02-13 12:23:32 +08:00
b3275b7983 docs(phase-01): mark phase 1 complete in roadmap 2026-02-13 12:17:49 +08:00
b94d901021 docs(phase-01): complete phase execution and verification 2026-02-13 12:17:22 +08:00
c71c1c3a62 docs(01-02): complete backend API plan
- Created 01-02-SUMMARY.md with execution details
- Updated STATE.md: Phase 1 complete (2/2 plans)
- Performance metrics: 2 plans, 5 min total, 2.5 min avg
- All success criteria met, no deviations
2026-02-13 12:12:53 +08:00
35a9f83989 feat(01-02): add withCount for notes and comprehensive tests
- AdminMemberController index() now includes withCount('notes')
- Created MemberNoteTest with 7 feature tests
- Tests cover: creation, retrieval, validation, audit logging, authorization, N+1 prevention, ordering
- All new tests passing (7/7)
- No regressions in existing test suite
2026-02-13 12:10:39 +08:00
e8bef5bc06 feat(01-02): create MemberNoteController and routes
- MemberNoteController with index() and store() methods
- StoreNoteRequest with Traditional Chinese validation messages
- Routes registered at admin.members.notes.index/store
- JSON responses for AJAX consumption in Phase 2
- DB::transaction wrapper with AuditLogger::log
2026-02-13 12:09:09 +08:00
181c395b3c docs(01-01): complete database foundation plan
- Add SUMMARY.md documenting all tasks and deviations
- Update STATE.md: plan 1 of 2 complete in phase 01
- Update performance metrics: 3 min execution time
- Document morph map decision in STATE.md
2026-02-13 12:07:30 +08:00
2e9b17e902 fix(01-01): use morphMap instead of enforceMorphMap to avoid breaking Spatie
- Changed from enforceMorphMap to morphMap in AppServiceProvider
- enforceMorphMap was causing errors with Spatie Laravel Permission package
- morphMap still provides namespace protection for our custom models
- Adds comment explaining why we don't enforce strict mapping
2026-02-13 12:05:38 +08:00
4ca7530957 feat(01-01): add Member notes relationship, morph map, and NoteFactory
- Add notes() morphMany relationship to Member model (ordered by created_at desc)
- Register morph map in AppServiceProvider ('member' => Member::class)
- Create NoteFactory with forMember() and byAuthor() state methods
2026-02-13 12:04:05 +08:00
f2912badfa feat(01-01): create notes table and Note model with polymorphic relationships
- Add notes migration with polymorphic columns (notable_type, notable_id)
- Add foreign key to users table for author tracking
- Add indexes on composite (notable_type, notable_id) and created_at
- Create Note model with morphTo and belongsTo relationships
2026-02-13 12:03:10 +08:00
2257cdc03f docs(01): create phase plan — 2 plans for database schema and backend API 2026-02-13 11:56:25 +08:00
3715aae2eb docs(01): research phase domain 2026-02-13 11:51:56 +08:00
8779762402 docs: create roadmap (3 phases) 2026-02-13 11:44:07 +08:00
a8623841ae docs: define v1 requirements 2026-02-13 11:35:01 +08:00
c962514532 docs: research member notes ecosystem 2026-02-13 11:14:28 +08:00
23573d3ebc chore: add project config 2026-02-13 10:55:39 +08:00
aa51ad70d9 docs: initialize project 2026-02-13 10:53:03 +08:00
47218c1874 docs: map existing codebase 2026-02-13 10:34:18 +08:00
296a70010d fix(profile): show and persist line id in profile form 2026-02-13 08:42:04 +08:00
5c3866446c feat(auth): disable public registration while keeping member login 2026-02-13 08:15:45 +08:00
7095be82d5 fix(cms): allow archiving already-imported article documents 2026-02-11 09:20:44 +08:00
ec2b1d21f4 feat(cms): import legacy article documents into document library 2026-02-11 09:15:19 +08:00
4e7ef92d0b feat(cms): expose public document api and trigger site revalidation 2026-02-11 09:00:11 +08:00
b6e18a83ec feat(cms): sync site assets, revalidate webhook, and document download naming 2026-02-10 23:38:31 +08:00
c4969cd4d2 Split migrated document posts into guides and story 2026-02-10 20:26:57 +08:00
097e332608 Make document reclassify command revalidation optional 2026-02-10 20:04:21 +08:00
2a98d22740 Add command to reclassify document content 2026-02-10 20:03:47 +08:00
f0dbea1af5 Add Line ID field to member lifecycle 2026-02-10 15:31:29 +08:00
860dbfb54e Eager-load categories on related articles in API response
The related articles query was missing ->with(['categories']),
causing the frontend ArticleCard to crash on undefined categories.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:36:07 +08:00
dd7077f77b Return relative image paths from API for Next.js frontend
Changed getFeaturedImageUrlAttribute to return relative paths
(e.g., /images/blog/photo.jpg) instead of full Laravel storage URLs.
Migrated image paths updated from migrated-images/ to images/ prefix.
Images are now served from Next.js public/ directory via Vercel CDN.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:32:18 +08:00
a30af8eaf7 Add headless CMS for official site content management
Integrate article and page management into the Laravel admin dashboard
to serve as a headless CMS for the Next.js frontend (usher-site).

Backend:
- 7 migrations: article_categories, article_tags, articles, pivots, attachments, pages
- 5 models with relationships: Article, ArticleCategory, ArticleTag, ArticleAttachment, Page
- 4 admin controllers: articles (with publish/archive/pin), categories, tags, pages
- Admin views with EasyMDE markdown editor, multi-select categories/tags
- Navigation section "官網管理" in admin sidebar

API (v1):
- GET /api/v1/articles (filtered by type, category, tag, search; paginated)
- GET /api/v1/articles/{slug} (with related articles)
- GET /api/v1/categories
- GET /api/v1/pages/{slug} (with children)
- GET /api/v1/homepage (aggregated homepage data)
- Attachment download endpoint
- CORS configured for usher.org.tw, vercel.app, localhost:3000

Content migration:
- ImportHugoContent command: imports Hugo markdown files as articles/pages
- Successfully imported 27 articles, 17 categories, 11 tags, 9 pages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 11:58:22 +08:00
bfbec861d0 Document armub deploy instance 2026-02-07 10:41:34 +08:00
329877b5bf Add receipt numbers to membership payments 2026-02-05 16:41:04 +08:00
8fc4adb6ad Handle null approval timestamps on member dashboard 2026-01-25 18:58:56 +08:00
ee35cd0ac3 Fix ROC date parsing for roster import 2026-01-25 06:41:42 +08:00
2cf0c19b61 Expand member profile fields 2026-01-25 06:37:10 +08:00
29c44f2dbe Update roster import to sync existing members 2026-01-25 06:22:57 +08:00
c2f0047ed9 Add personal application fields to members 2026-01-25 05:52:40 +08:00
65de7d9019 Move disability status card to payment history 2026-01-25 05:31:01 +08:00
36a4e87f3f Add fee type to membership payments display 2026-01-25 05:10:01 +08:00