Implement project memberships teams and permission model

This commit is contained in:
2026-03-25 01:10:08 +01:00
parent 7d4b0733b3
commit 840d01f6fc
27 changed files with 1722 additions and 7 deletions
+11
View File
@@ -0,0 +1,11 @@
import type { UserModel } from '@/types/models/user-model';
export type TeamModel = {
id: number;
name: string;
user_ids: number[];
users: UserModel[];
created_at: string;
updated_at: string;
[key: string]: unknown;
};
+23
View File
@@ -1,4 +1,5 @@
import type { ProjectModel } from '@/types/models/project-model';
import type { TeamModel } from '@/types/models/team-model';
import type { UserModel } from '@/types/models/user-model';
export type AdminUsersPageProps = {
@@ -11,5 +12,27 @@ export type ProjectsIndexPageProps = {
};
export type ProjectShowPageProps = {
canManageAccess: boolean;
project: ProjectModel;
};
export type ProjectPermissionOption = {
label: string;
value: string;
};
export type ProjectAccessPageProps = {
directPermissions: Record<string, string[]>;
permissionOptions: ProjectPermissionOption[];
project: ProjectModel;
status?: string | null;
teamPermissions: Record<string, string[]>;
teams: TeamModel[];
users: UserModel[];
};
export type TeamsIndexPageProps = {
status?: string | null;
teams: TeamModel[];
users: UserModel[];
};