feat(improvement): add pagination to endpoints and pages + sync navbar when data changes

This commit is contained in:
2026-03-13 10:30:27 +08:00
parent a9ebbf6a4a
commit 56404792c6
14 changed files with 543 additions and 210 deletions

View File

@@ -101,9 +101,13 @@ export default function WorkspaceCreate() {
description,
members: members.map(m => ({ user_id: m.user.id, role: m.role }))
};
const newWorkspace = await createWorkspace({ name, description });
await createWorkspace(payload);
window.dispatchEvent(new CustomEvent('workspace_created', {
detail: newWorkspace
}));
toast.success(t.workspace?.toast?.successCreate || "Workspace created successfully.");
navigate('/workspaces');
} catch (error) {
toast.error(t.workspace?.toast?.errorCreate || "Failed to create workspace.");