fix: tailwind v4 postcss, auth-server session, eslint cleanups
This commit is contained in:
10
frontend/app/(protected)/admin/roles/page.jsx
Normal file → Executable file
10
frontend/app/(protected)/admin/roles/page.jsx
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import api from '@/lib/api';
|
||||
import { api } from '@/lib/api';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -55,16 +55,16 @@ export default function RolesPage() {
|
||||
return (
|
||||
<>
|
||||
<div className="space-y-4">
|
||||
<div className="flex justify-between items-center">
|
||||
<div className="flex items-center justify-between">
|
||||
<h2 className="text-2xl font-semibold">Roles & Permissions</h2>
|
||||
<Button onClick={handleCreate}>
|
||||
<PlusCircle className="mr-2 h-4 w-4" /> Add Role
|
||||
<PlusCircle className="w-4 h-4 mr-2" /> Add Role
|
||||
</Button>
|
||||
</div>
|
||||
{roles.map(role => (
|
||||
<Card key={role.id}>
|
||||
<CardHeader>
|
||||
<div className="flex justify-between items-start">
|
||||
<div className="flex items-start justify-between">
|
||||
<div>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<ShieldCheck className="text-primary" />
|
||||
@@ -78,7 +78,7 @@ export default function RolesPage() {
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-sm font-medium mb-2">Assigned Permissions:</p>
|
||||
<p className="mb-2 text-sm font-medium">Assigned Permissions:</p>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{role.Permissions.length > 0 ? (
|
||||
role.Permissions.map(perm => (
|
||||
|
||||
Reference in New Issue
Block a user