fixed ui, connected role user, branch user permissions user api
This commit is contained in:
@@ -8,6 +8,16 @@ export interface AddBranchUserPayload {
|
||||
userId: number;
|
||||
}
|
||||
|
||||
export interface AddRoleUserPayload {
|
||||
roleId: number;
|
||||
userId: number;
|
||||
}
|
||||
|
||||
export interface AddPermissionUserPayload {
|
||||
permissionId: number;
|
||||
userId: number;
|
||||
}
|
||||
|
||||
// Re-export so shared hooks can import from one place
|
||||
export type { BranchListParams, BranchListResponse };
|
||||
|
||||
@@ -48,6 +58,22 @@ export async function postBranchUser(payload: AddBranchUserPayload): Promise<voi
|
||||
await apiClient.post("/branch-users", payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /role-users
|
||||
* Assigns a role to a user.
|
||||
*/
|
||||
export async function postRoleUser(payload: AddRoleUserPayload): Promise<void> {
|
||||
await apiClient.post("/role-users", payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /permission-users
|
||||
* Assigns a permission to a user.
|
||||
*/
|
||||
export async function postPermissionUser(payload: AddPermissionUserPayload): Promise<void> {
|
||||
await apiClient.post("/permission-users", payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* Proxy for branch list fetching — kept here so shared hooks
|
||||
* don't import directly from the branches feature.
|
||||
|
||||
Reference in New Issue
Block a user