Files
edr-platform/apps/edr-freight-web/backoffice/src/super-admin/services/api/roleService.ts
Nathnael b1cb149c44 feat(backoffice): add organization admin permission assignment page (EDRFREIGHT-242)
There was no UI to assign permissions to the Organization Admin role,
even though the backend's Role→Permission endpoints
(@tria-plc/iamapi-common's role-permissions routes) were already live
and unused. Adds a dedicated page — application picker + the existing
permission checklist — that assigns/reads permissions for the fixed
Organization Admin role, linked from the Organization Admins page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 12:27:44 +00:00

21 lines
519 B
TypeScript

import { withHeaders } from "@/record-management/services/api/withHeaders";
import axiosInstance from "@/shared/services/axiosInstance";
import { AxiosResponse } from "axios";
export interface RoleDto {
id: string;
name: { am: string; en: string };
key: string;
}
export interface RoleListResponse {
count: number;
items: RoleDto[];
}
export const getRoles = async (): Promise<AxiosResponse<RoleListResponse>> =>
axiosInstance.get("/roles", {
headers: withHeaders(),
params: { take: 100 },
});