Skip to content
Merged
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Foundational mandates here take absolute precedence. **NEVER** invent ad-hoc beh

- **Type Integrity**: Always run `bun sb:typegen` after schema changes. **Prefer** importing types from `packages/types/src/db.ts`.
- **Bilingual Support**: ALWAYS provide translations for both English (en.json) AND Vietnamese (vi.json) for all user-facing strings.
- **Shared UI Translation Parity**: When adding new translation keys consumed from shared packages like `packages/ui` (for example `common.*` keys), update every app-level `messages/en.json` and `messages/vi.json` bundle that ships that shared UI, and keep the message files alphabetically sorted.
- **Navigation Parity**: ALWAYS update `navigation.tsx` in the relevant app when adding new routes (aliases + children + icons + permissions).
- **Proactive Refactoring**: Evaluate files >400 LOC and components >200 LOC for extraction into smaller, focused units.
- **Unified Verification**: Always end your session with a `bun check`. Ensure all checks pass (you may ignore ones that were not introduced by you). For mobile changes, run `bun check:mobile`.
Expand Down
4 changes: 4 additions & 0 deletions apps/calendar/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,8 @@
"archive_tasks_confirmation": "Are you sure you want to archive all {count} task(s) from this list? They will be moved to the archive.",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
"ascending": "Ascending",
Expand Down Expand Up @@ -2015,6 +2017,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/calendar/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,8 @@
"archive_tasks_confirmation": "Bạn có chắc chắn muốn lưu trữ tất cả {count} công việc từ danh sách này không?",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
"ascending": "Tăng dần",
Expand Down Expand Up @@ -2015,6 +2017,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
4 changes: 4 additions & 0 deletions apps/finance/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@
"archive_tasks_confirmation": "Are you sure you want to archive all {count} task(s) from this list? They will be moved to the archive.",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
"ascending": "Ascending",
Expand Down Expand Up @@ -1998,6 +2000,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/finance/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@
"archive_tasks_confirmation": "Bạn có chắc chắn muốn lưu trữ tất cả {count} công việc từ danh sách này không?",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
"ascending": "Tăng dần",
Expand Down Expand Up @@ -1998,6 +2000,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
4 changes: 4 additions & 0 deletions apps/rewise/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,8 @@
"archive_tasks_confirmation": "Are you sure you want to archive all {count} task(s) from this list? They will be moved to the archive.",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
"ascending": "Ascending",
Expand Down Expand Up @@ -2003,6 +2005,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/rewise/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1679,6 +1679,8 @@
"archive_tasks_confirmation": "Bạn có chắc chắn muốn lưu trữ tất cả {count} công việc từ danh sách này không?",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
"ascending": "Tăng dần",
Expand Down Expand Up @@ -2003,6 +2005,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
4 changes: 4 additions & 0 deletions apps/tasks/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,8 @@
"archive_tasks_confirmation": "Are you sure you want to archive all {count} task(s) from this list? They will be moved to the archive.",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
"ascending": "Ascending",
Expand Down Expand Up @@ -2097,6 +2099,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/tasks/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,8 @@
"archive_tasks_confirmation": "Bạn có chắc chắn muốn lưu trữ tất cả {count} công việc từ danh sách này không?",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
"ascending": "Tăng dần",
Expand Down Expand Up @@ -2097,6 +2099,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
4 changes: 4 additions & 0 deletions apps/track/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@
"archive_tasks_confirmation": "Are you sure you want to archive all {count} task(s) from this list? They will be moved to the archive.",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
"ascending": "Ascending",
Expand Down Expand Up @@ -1998,6 +2000,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/track/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,8 @@
"archive_tasks_confirmation": "Bạn có chắc chắn muốn lưu trữ tất cả {count} công việc từ danh sách này không?",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
"ascending": "Tăng dần",
Expand Down Expand Up @@ -1998,6 +2000,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
4 changes: 4 additions & 0 deletions apps/web/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,8 @@
"archive_whiteboard_title": "Archive Whiteboard",
"archived": "Archived",
"archived_boards": "Archived Boards",
"archived_tasks_partially": "{moved, plural, one {Archived 1 task} other {Archived # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"archived_tasks_successfully": "{count, plural, one {Archived 1 task successfully} other {Archived # tasks successfully}}",
"archived_whiteboards": "Archived Whiteboards",
"archiving": "Archiving...",
"are_you_sure": "Are you sure?",
Expand Down Expand Up @@ -2270,6 +2272,8 @@
"move_tasks_description": "{count, plural, one {Select a destination board and list to move your task to.} other {Select a destination board and list to move your tasks to.}}",
"move_tasks_title": "{count, plural, one {Move 1 task} other {Move # tasks}}",
"move_to_list": "Move to List",
"moved_tasks_partially": "{moved, plural, one {Moved 1 task} other {Moved # tasks}}, {failed, plural, one {1 task failed} other {# tasks failed}}",
"moved_tasks_successfully": "{count, plural, one {Moved 1 task successfully} other {Moved # tasks successfully}}",
"moving": "Moving...",
"moving_tasks_to": "{count, plural, one {Moving 1 task to} other {Moving # tasks to}}",
"n_assignees": "{count} assignees",
Expand Down
4 changes: 4 additions & 0 deletions apps/web/messages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,8 @@
"archive_whiteboard_title": "Lưu trữ bảng trắng",
"archived": "Đã lưu trữ",
"archived_boards": "Bảng đã lưu trữ",
"archived_tasks_partially": "{moved, plural, one {Đã lưu trữ 1 công việc} other {Đã lưu trữ # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"archived_tasks_successfully": "{count, plural, one {Đã lưu trữ thành công 1 công việc} other {Đã lưu trữ thành công # công việc}}",
"archived_whiteboards": "Bảng trắng đã lưu trữ",
"archiving": "Đang lưu trữ...",
"are_you_sure": "Bạn có chắc chắn không?",
Expand Down Expand Up @@ -2270,6 +2272,8 @@
"move_tasks_description": "{count, plural, other {Chọn bảng và danh sách đích để di chuyển công việc.}}",
"move_tasks_title": "{count, plural, other {Di chuyển # công việc}}",
"move_to_list": "Di chuyển đến danh sách",
"moved_tasks_partially": "{moved, plural, one {Đã di chuyển 1 công việc} other {Đã di chuyển # công việc}}, {failed, plural, one {1 công việc thất bại} other {# công việc thất bại}}",
"moved_tasks_successfully": "{count, plural, one {Đã di chuyển thành công 1 công việc} other {Đã di chuyển thành công # công việc}}",
"moving": "Đang di chuyển...",
"moving_tasks_to": "{count, plural, other {Đang di chuyển # công việc tới}}",
"n_assignees": "{count} người thực hiện",
Expand Down
41 changes: 41 additions & 0 deletions apps/web/src/app/api/v1/task-board-status-templates/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
createAdminClient,
createClient,
} from '@tuturuuu/supabase/next/server';
import { NextResponse } from 'next/server';

export async function GET(request: Request) {
try {
const supabase = await createClient(request);
const {
data: { user },
error: authError,
} = await supabase.auth.getUser();

if (authError || !user) {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
}

const sbAdmin = await createAdminClient();
const { data: templates, error } = await sbAdmin
.from('task_board_status_templates')
.select('*')
.order('is_default', { ascending: false })
.order('name', { ascending: true });

if (error) {
return NextResponse.json(
{ error: 'Failed to fetch status templates' },
{ status: 500 }
);
}

return NextResponse.json({ templates: templates ?? [] });
} catch (error) {
console.error('Error fetching task board status templates:', error);
return NextResponse.json(
{ error: 'Internal server error' },
{ status: 500 }
);
}
}
Loading
Loading