Commit Graph

44 Commits

Author SHA1 Message Date
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
b528a63387 Add identity type display to member dashboard
Shows 病友 or 家長/父母 in the membership info section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:35:30 +08:00
2faefb5872 Add identity_type and guardian relationship to members
- Add identity_type field (patient/parent) to distinguish 病友/家長
- Add guardian_member_id for parent-child relationships
- Add guardian() and dependents() relationships
- Add isPatient(), isParent() helper methods
- Add identity_type_label accessor

Data updated:
- 47 members set as patient, 4 as parent
- 25 members with approved disability, 26 without
- 張序 linked to guardian 張誠駿
- Payment amounts corrected based on 2024 accounting records

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:34:36 +08:00
2d925e0b47 Add disability status card to member dashboard
- Shows approval status (approved/pending/rejected/not applied)
- Green background when approved with "會費套用 50% 優惠" text
- Links to profile edit for uploading certificate

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 04:00:20 +08:00
e27d3c0f72 Update membership types to match charter Article 7
- Add individual, sponsor, honorary_academic types (per charter)
- Keep legacy types (regular, honorary, lifetime, student) for compatibility
- Update labels to Chinese names
- Fix MembershipPayment import to include verification dates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:43:08 +08:00
42099759e8 Add phone login support and member import functionality
Features:
- Support login via phone number or email (LoginRequest)
- Add members:import-roster command for Excel roster import
- Merge survey emails with roster data

Code Quality (Phase 1-4):
- Add database locking for balance calculation
- Add self-approval checks for finance workflow
- Create service layer (FinanceDocumentApprovalService, PaymentVerificationService)
- Add HasAccountingEntries and HasApprovalWorkflow traits
- Create FormRequest classes for validation
- Add status-badge component
- Define authorization gates in AuthServiceProvider
- Add accounting config file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 03:08:06 +08:00
ed7169b64e Add internal task notes to README
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 10:06:45 +08:00
642b879dd4 Add membership fee system with disability discount and fix document permissions
Features:
- Implement two fee types: entrance fee and annual fee (both NT$1,000)
- Add 50% discount for disability certificate holders
- Add disability certificate upload in member profile
- Integrate disability verification into cashier approval workflow
- Add membership fee settings in system admin

Document permissions:
- Fix hard-coded role logic in Document model
- Use permission-based authorization instead of role checks

Additional features:
- Add announcements, general ledger, and trial balance modules
- Add income management and accounting entries
- Add comprehensive test suite with factories
- Update UI translations to Traditional Chinese

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 09:56:01 +08:00
83ce1f7fc8 chore: ignore admin data directory 2025-11-30 14:49:45 +08:00
bcff65cf67 Fix audit logs and issue reports pages, rename Issues to Tasks
修復稽核日誌與任務報表頁面,並將「問題」改名為「任務」

## Changes 變更內容

### Bug Fixes 錯誤修復
1. Fixed audit logs page 500 error
   - Added missing $auditableTypes variable to controller
   - Changed $events to $actions in view
   - Added description and ip_address columns to audit_logs table
   - Updated AuditLog model fillable array

2. Fixed issue reports page SQLite compatibility errors
   - Replaced MySQL NOW() function with Laravel now() helper
   - Replaced TIMESTAMPDIFF() with PHP-based date calculation
   - Fixed request->date() default value handling

### Feature Changes 功能變更
3. Renamed "Issues" terminology to "Tasks" throughout the system
   - Updated navigation menus (Admin: Issues → Admin: Tasks)
   - Updated all issue-related views to use task terminology
   - Changed Chinese labels from "問題" to "任務"
   - Updated dashboard, issue tracker, and reports pages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 10:47:04 +08:00
bf6179c457 Remove default sizing from ApplicationLogo component
- Removed 'h-10 w-auto' from resources/views/components/application-logo.blade.php.
- This resolves CSS conflicts where default classes were persisting alongside custom width/height classes (e.g., 'h-10 w-auto h-auto w-32').
- All logo instances now fully respect the classes passed to them.
2025-11-28 00:51:51 +08:00
21c82a5f18 Strictly limit logo width on homepage and guest pages
- Updated welcome.blade.php (homepage) to use 'w-32 h-auto' (128px width).
- Updated guest.blade.php (login/register) to use 'w-48 h-auto' (192px width).
- This addresses the user's feedback that the logo width was not constrained, causing it to appear too large.
2025-11-28 00:49:29 +08:00
6860a98f61 Optimize homepage logo size
- Reduced the height of the application logo on guest pages (login/register) from h-20 (80px) to h-12 (48px).
- This addresses the user's feedback that the logo was too large on pre-login pages.
2025-11-28 00:46:48 +08:00
b6be6578c4 Restrict access to forbidden links and widgets based on roles
- Wrapped Admin/Management navigation links in @role and @can permission checks.
- Restricted dashboard 'Management/Ops' and 'Finance Application' widgets to authorized roles.
- Applied granular visibility control to 'To-do' buckets on the dashboard for Applicant, Cashier, Accountant, and Chair.
2025-11-28 00:38:10 +08:00
ebf7f4b42d Translate UI to Traditional Chinese
- Created 'lang/zh_TW.json' with comprehensive translations for UI elements, forms, navigation, and messages.
- Updated 'config/app.php' to set locale to 'zh_TW' and timezone to 'Asia/Taipei'.
- This ensures the entire application interface is presented in Traditional Chinese.
2025-11-28 00:31:05 +08:00
6890cf085d Fix 'My Membership' 404 by adding missing profile flow
- Added a 'Create Member Profile' page for existing users who don't have a member record.
- Updated MemberDashboardController to redirect to profile creation instead of aborting 404.
- Added 'member.profile.create' and 'member.profile.store' routes.
2025-11-28 00:25:04 +08:00
c7a1f9130e Refactor 'My Membership' page scripts
- Replaced inline JS function generation in loops with Alpine.js event handlers.
- Improved safety of rejection reason output using json_encode.
2025-11-28 00:21:57 +08:00
cf367fe6e0 Fix 404 error in finance document emails
- Update invalid 'finance.show' route to the correct 'admin.finance.show' in email templates.
- This prevents broken links in approval, rejection, and status update emails.
2025-11-28 00:20:53 +08:00
70dec7615e Optimize Navigation Bar for overflow handling
- Grouped all Admin links into a 'Management' dropdown menu on desktop to prevent navbar overflow.
- Added a 'Management' section header to the mobile menu for better organization.
- Ensured the 'Management' dropdown trigger visually matches other nav links and indicates active state.
2025-11-28 00:17:02 +08:00
56692bc540 Fix undefined $active variable in nav components
- Set default value for 'active' prop to false in nav-link.blade.php and responsive-nav-link.blade.php.
- This resolves the ErrorException when the prop is not explicitly passed.
2025-11-28 00:15:15 +08:00
86f22f2a76 Enhance UI and Accessibility (WCAG)
- Add 'Skip to main content' links to App and Guest layouts.
- Add aria-current to navigation links for active page indication.
- Add aria-label to mobile menu button.
- Include pending UI updates for Dashboard and Welcome pages with improved structure.
2025-11-28 00:13:04 +08:00
83602b1ed1 Implement dark mode, bug report page, and schema dump 2025-11-27 15:06:45 +08:00
13bc6db529 Initial commit 2025-11-20 23:21:05 +08:00