Reimplement remove / create in console

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-16 17:13:29 +04:00
parent f931bda10f
commit a42fc4fa61
26 changed files with 979 additions and 438 deletions

View File

@@ -78,7 +78,7 @@ export {
} from "./date";
export { getTrustCenterUrl } from "./trustCenter";
export { formatError, type GraphQLError } from "./error";
export { Role, getAssignableRoles } from "./roles";
export { Role, roles, getAssignableRoles } from "./roles";
export {
getTrustCenterDocumentAccessInfo,
getTrustCenterDocumentAccessStatusBadgeVariant,

View File

@@ -7,6 +7,13 @@ export const Role = {
} as const
export type Role = (typeof Role)[keyof typeof Role];
export const roles = [
"OWNER",
"ADMIN",
"VIEWER",
"AUDITOR",
"EMPLOYEE",
] as const
export function getAssignableRoles(currentRole: Role): Role[] {
if (currentRole === Role.OWNER) {