Skip to content

fix: 修正 staff 頁面未顯示資料#241

Merged
mirumodapon merged 2 commits into
mainfrom
fix/staff
Jul 7, 2026
Merged

fix: 修正 staff 頁面未顯示資料#241
mirumodapon merged 2 commits into
mainfrom
fix/staff

Conversation

@Link1515

@Link1515 Link1515 commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

修正 staff 頁面沒有正確顯示工作人員資料的問題。主要原因包含 Google Sheets CSV 匯出時未明確指定 header row,導致資料解析結果不符合預期,以及 staff 分組型別尚未包含 UCA 分組。

1782957781033 (取得的 csv 會把部分資料放到第一行)

Changes

  • 在 Google Sheets CSV 取得 URL 加上 headers=1,確保第一列會被當作欄位名稱解析。
  • 新增 UCA staff group 到 staff 分組名稱、分組 key 與對應表。
  • 在 staff 頁面的中英文 i18n 補上 UCA 分組顯示文字。

Summary by CodeRabbit

  • New Features
    • Added support for the new UCA staff group in the staff section, with matching labels in English and Chinese.
  • Bug Fixes
    • Improved staff sheet imports so columns are read correctly from downloaded data.
    • Expanded staff group handling to recognize the new UCA value throughout the app.

@rileychh-dokploy-coscup

rileychh-dokploy-coscup Bot commented Jul 2, 2026

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ✅ Done Preview URL 2026-07-02T02:13:29.560Z

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 582ed7b9-30e1-42bc-ad43-89f17c83163e

📥 Commits

Reviewing files that changed from the base of the PR and between 53988d1 and 16cfb17.

📒 Files selected for processing (3)
  • app/pages/staff.vue
  • server/api/sheets/[sheet].get.ts
  • shared/types/staff.ts

📝 Walkthrough

Walkthrough

Adds a new 'UCA' staff group name/key across shared type definitions and its mapping, adds corresponding zh/en i18n translation entries in the staff page, and appends a headers=1 query parameter to the Google Sheets CSV export URL.

Changes

UCA Staff Group Addition

Layer / File(s) Summary
Staff group type and mapping updates
shared/types/staff.ts
STAFF_GROUP_NAMES, STAFF_GROUP_KEYS, and staffGroupKeyByName are extended with a new 'UCA' entry.
UCA translation entries
app/pages/staff.vue
Adds group.UCA translation entries to the Chinese and English i18n catalogs.
Sheets CSV URL header fix
server/api/sheets/[sheet].get.ts
Appends headers=1 to the Google Sheets CSV export URL.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 標題清楚概括了修正 staff 頁面無法正常顯示資料的主要變更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/staff

Comment @coderabbitai help to get the list of available commands.

@mirumodapon mirumodapon merged commit bcf57bd into main Jul 7, 2026
2 checks passed
@mirumodapon mirumodapon deleted the fix/staff branch July 7, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants