pkgsp50777_楊舒諠 pkgsp50777
  • Joined on 2026-10-06
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-18 08:36:08 +00:00
9a37c273ca add-approved-count: the settlement allocation table's total row now starts with 「核准人數 N 人」 (user request 2026-11-18), followed by 支付金額合計, 個人上限合計, 最終補助合計 and 占月上限合計. The count is the number of allocation rows, i.e. people with approved cases that month (several cases count once); new applicants still shown as 「待重新計算」 are included. Shown on the department settlement page and the admin settlement detail (shared component). Calculation, the quota card's 計算人數 (headcount snapshot), the CSV preview and the approved-list export are unchanged. Component test and e2e added; CLAUDE.md updated; change archived into department-settlement
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-17 10:35:40 +00:00
bb8cd422aa record-token-exchange-error: when Authentik rejects the HR Sync token exchange, 「HR 同步失敗」 also records the OAuth error code next to stage and http_<status> (e.g. {"stage":"token","reason":"http_400","code":"invalid_grant"}), so the HR Sync manual's cases can be told apart: invalid_grant = user in hr-sync-deny (no token, not even self data), invalid_target = provider not registered. Only RFC 6749 / 8693 standard codes are kept as-is, anything else is "other", and error_description is never read. Reason format and old records unchanged. Prompted by employee 20260105 whose failure only showed http_400. CLAUDE.md updated; change archived into hr-sync
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-17 10:27:35 +00:00
b5b90881f8 record-hr-sync-gaps: when the login HR sync queries succeed but return data that cannot be applied, record 「HR 同步資料不完整」 (hr_sync.incomplete, actor 系統(HR 同步)) on the account with reason codes only: name_missing, not_active (+ HR status such as NOT_YET_HIRED), no_organization, unit_not_in_tree (+ unit code), plus the assignment's data date (HR Sync coverageTo). Department reasons are judged only when both the assignment and the organization tree were fetched; failures stay in 「HR 同步失敗」 and are not duplicated; complete data records nothing. Sync behavior is unchanged. Prompted by a new hire (2026-11-16) who logged in fine but stayed on 待指派部門 with no audit trail explaining why. CLAUDE.md updated; change archived into hr-sync
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-13 10:26:37 +00:00
0bfea35d97 clarify-edit-after-submit: make it obvious that a submitted case can still be edited before review (user report 2026-11-13: colleagues thought it could not). The detail header button 「撤回申請」 becomes 「撤回並修改」 and the 「我的申請」 row action 「撤回」 becomes 「撤回修改」; the confirm dialog explains the case returns to draft, opens the edit page and must be submitted again; a successful withdraw now goes straight to the edit page with a 「修改後請再按「送出」」 toast. The submitted notice and the detail hint name the button, and the help page gets 「送出後還能修改嗎?」 by status. Withdraw rules, audit and timeline labels are unchanged. CLAUDE.md updated; change archived into application-lifecycle
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-13 06:17:53 +00:00
5f7dc1618e storage-monthly-chart: the sysadmin storage card replaces the 3-month average and yearly estimate with a 「每月新增附件」 bar chart for this month so far plus the 5 months before (user decision 2026-11-13: no averages). Each month sums attachments by Taipei upload month, including files later superseded, deleted or purged by retention, and empty months show 0; bars are labelled with size and file count, the current month is lighter and marked 「至今」. Server-rendered with design tokens (no chart library), with an aria-label and a visually hidden table. CLAUDE.md notes the storage usage and low-disk check; change archived into data-reset
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-12 07:18:04 +00:00
ec5e018920 shorten-purpose-hint: the 工作用途說明 hint no longer reads like a 20-character minimum (user decision 2026-11-12): it now says 「請具體說明與工作的關聯」 with no number and shows only while 1–9 characters are entered (threshold 20 → 10). Still never blocks submit; empty is still rejected and the 500-character limit is unchanged. Change archived into subsidy-application
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-12 06:42:36 +00:00
124108ca71 attachment-retention: attachment files are deleted automatically (startup + hourly, idempotent, real time so system clock adjustments never purge early) for every case of a department-month once its settlement has been final-approved (or legacy paid) for 3 months (Taipei date, month-end clamped); months with no settleable case and no submitted-or-later settlement go on the 1st of card month + 5; open / submitted settlements and pending cases block it. Includes returned, rejected, withdrawn, drafts and superseded files (user decision 2026-11-12). Rows stay with attachments.purged_at (sha256 kept for duplicate detection), files are removed after the commit, one attachment.retention_purged audit per department-month. Purged attachments return 404, the UI shows 「附件已依保存期限刪除(日期)」, storage usage lists them separately. Help page and CLAUDE.md updated; change archived into application-attachments and data-reset
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 12:36:00 +00:00
64374d931f storage-usage-overview: the sysadmin maintenance tab shows storage usage (disk free/total via statfs, database + WAL size, active vs stale attachments from recorded sizes, average monthly new attachments over the last 3 full months, and pre-clear backups with sizes, newest first, warning when disk free is below 15%); a sysadmin can delete a single pre-clear backup with a required reason (data.backup_deleted audit, name validated and kept inside the backups directory). Change archived into data-reset
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 09:20:33 +00:00
21e10cfdda zulip-reject-and-settlement-reminder: 不核准 notifications (manager, expired or overdue rejections) are also sent as Zulip DMs with the full comment, merged per recipient; new reminder.settlement_open on the day after the employee deadline (default the 21st, from params) tells managers of unsubmitted departments that have submitted cases to submit the settlement by the manager deadline, with pending / needs-revision / approved counts, in-app and on Zulip (one line per department). The 3/1-day manager deadline reminders stay in-app only. Help and CLAUDE.md updated; change archived into notifications
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 09:05:32 +00:00
5c662aa9f8 ci: 依 mason 範本重新產生 CI 設定
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 08:52:35 +00:00
e600048c3d zulip-notifications: 待審 (incl. resubmits) and 退回補件 notifications are also sent as Zulip direct messages to the recipient's account email via an incoming-webhook bot (user decision 2026-11-11: only these two). notifications gets chat_status / chat_attempts / chat_at as the outbox; a per-minute dispatcher (after the business transaction) merges each recipient's pending rows into one message: reviews list applicant + case number (first 10), returns include the full manager comment with @ mentions neutralized; no amounts. Already-reviewed cases, recipients without email or inactive, and rows older than 24 h are skipped; transient failures retry 3 times, failures only log. ZULIP_SITE / ZULIP_BOT_EMAIL / ZULIP_API_KEY added to vibe.yaml (values in .env.deploy); missing config keeps the site running with in-app notifications only; ZULIP_DELIVERY=dry-run for local use. Help page and CLAUDE.md updated; change archived into notifications
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 08:25:31 +00:00
622dcbbf79 CLAUDE.md: Gitea push now uses a per-machine personal access token in wincred (set up with /mason:gitea-access) instead of the git-credential-oauth browser login
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-11 08:24:58 +00:00
5a9dc0fd55 CLAUDE.md: deployment skills moved from vibe-deploy (moonshine-skills, no longer maintained) to mason; containerize / deploy-site references now use the mason: prefix
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 10:23:29 +00:00
54860cdc2e notification-unread-dot: the bell dropdown marks unread notifications with the same blue dot and light-blue background as the notification list (it only used bold before). Shared UnreadDot component (aria-hidden; the sr-only 未讀 text stays), read items keep the empty slot so titles don't shift; bold titles kept. Change archived into notifications
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 10:07:41 +00:00
9427ff9530 Audit log pager: 回第一頁 / 上一頁 / 下一頁 are separate buttons (they ran together as one link), with 上一頁 added. The query pages backwards with the same keyset (before: rows newer than the cursor, ascending, reversed) and returns prevCursor; unavailable buttons show disabled. Opening and closing a detail keeps the current page. E2E inserts 120 rows under a unique actor (insertAuditLogs) to page forward and back
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 09:27:19 +00:00
4b732b949a search-accounts: /admin/accounts gets a search box (employee number, name or email, case-insensitive substring; LIKE wildcards matched literally) and department / role / HR status filters, combined with the existing all / pending / inactive tabs. Conditions live in the URL, so row actions return to the same results; the list shows 「共 N 筆」 and 「清除條件」. The form is keyed by the query so clearing resets its fields. Change archived into org-directory
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 08:41:57 +00:00
4a424230e5 exclude-part-time-from-headcount: headcount snapshots count only people full-time on the base date again (user decision 2026-11-02: interns and part-timers don't count). The base-date status comes from the app's own hr_employment_history (recorded by the daily roster sync since 2026-10-15), not the roster's employeeGroupCode, which is the group at query time. With no history at all (dev, e2e, never synced) nobody is excluded. Excluded people show as plain 「不計入」 with no reason; locked or adjusted snapshots are untouched, others update on the next roster sync. Help, settings text and CLAUDE.md updated; change archived into headcount-snapshot
bc102ef866 friendly-not-found-page: Chinese 404 page. notFound() inside the app frame (case missing or out of scope, etc.) and unmatched URLs now say 「找不到這個頁面。可能是網址有誤、資料已刪除,或您沒有權限查看。」 with 回首頁 instead of the English Next.js default; still HTTP 404 and no hint whether the case exists. Change archived into app-shell
Compare 2 commits »
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 06:48:55 +00:00
4332b7e528 Admin settlements overview: department names read as links (accent colour, underline, chevron) so it is clear they open the department detail. Quota card title wraps long unbroken names at 360px instead of pushing the 查看說明 link out of the card
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 05:44:51 +00:00
c42cd686ad Archive unify-settlement-sheet, force-submit-overdue-settlement, rebase-headcount-snapshot and show-roster-sync-failure; delta specs merged into the main specs
pkgsp50777 pushed to main at pkgsp50777/aisubsidy 2026-11-02 04:02:43 +00:00
2f1a54db6c rebase-headcount-snapshot: e2e follow-ups. The headcount settings tab now opens on last month (the current month has no snapshot until its base date); the estimate/final/preview tag of MoneyDisplay wraps on narrow cards (the admin 360px dashboard overflowed). E2E: duplicates use the same last-month card date, review and settings expect last month; CLAUDE.md notes the Chrome close hang after failed tests