diff --git a/app/pages/staff.vue b/app/pages/staff.vue index 8ca46cc6..3edaeb2d 100644 --- a/app/pages/staff.vue +++ b/app/pages/staff.vue @@ -73,6 +73,7 @@ zh: finance: 財務組 service: 場務組 production: 製播組 + UCA: UCA en: noStaff: The staff information has not been announced yet. meta: @@ -91,4 +92,5 @@ en: finance: Finance service: Service production: Production + UCA: UCA diff --git a/server/api/sheets/[sheet].get.ts b/server/api/sheets/[sheet].get.ts index 884c98bc..0a8bfaee 100644 --- a/server/api/sheets/[sheet].get.ts +++ b/server/api/sheets/[sheet].get.ts @@ -16,7 +16,7 @@ export default defineCachedEventHandler( const { sheet } = await getValidatedRouterParams(event, requestSchema.parse) const name = SHEET_NAMES[sheet] - const url = `https://docs.google.com/spreadsheets/d/${googleSheetId}/gviz/tq?tqx=out:csv&sheet=${encodeURIComponent(name)}` + const url = `https://docs.google.com/spreadsheets/d/${googleSheetId}/gviz/tq?tqx=out:csv&sheet=${encodeURIComponent(name)}&headers=1` const csv = await $fetch(url, { responseType: 'text' }) const records = parse(csv, { columns: true, skip_empty_lines: true }) return records diff --git a/shared/types/staff.ts b/shared/types/staff.ts index 7ba6bd81..b804cef8 100644 --- a/shared/types/staff.ts +++ b/shared/types/staff.ts @@ -1,10 +1,10 @@ import { z } from 'zod' -export const STAFF_GROUP_NAMES = ['總召組', '行政組', '議程組', '贊助組', '交流組', '公關組', '資訊組', '設計組', '紀錄組', '財務組', '場務組', '製播組'] as const +export const STAFF_GROUP_NAMES = ['總召組', '行政組', '議程組', '贊助組', '交流組', '公關組', '資訊組', '設計組', '紀錄組', '財務組', '場務組', '製播組', 'UCA'] as const export const StaffGroupNameSchema = z.enum(STAFF_GROUP_NAMES) export type StaffGroupName = z.infer -export const STAFF_GROUP_KEYS = ['coordinator', 'secretary', 'program', 'sponsorship', 'engagement', 'pr', 'it', 'design', 'documentary', 'finance', 'service', 'production'] as const +export const STAFF_GROUP_KEYS = ['coordinator', 'secretary', 'program', 'sponsorship', 'engagement', 'pr', 'it', 'design', 'documentary', 'finance', 'service', 'production', 'UCA'] as const export const StaffGroupKeySchema = z.enum(STAFF_GROUP_KEYS) export type StaffGroupKey = z.infer @@ -21,6 +21,7 @@ export const staffGroupKeyByName = { 財務組: 'finance', 場務組: 'service', 製播組: 'production', + UCA: 'UCA', } as const satisfies Record export const StaffRowSchema = z.object({