Skip to content

Commit 62a590e

Browse files
committed
refactor: remove Quick Actions from admin pages and loading component
- Eliminated the Quick Actions section from the AdminIndex, SideNavBarMobile, and SideBarMenu components to streamline the UI. - Updated imports in the SideNavBarMobile and AdminLoading components to remove unused icons. - Cleaned up the code for better readability and maintainability.
1 parent 5436e1f commit 62a590e

File tree

4 files changed

+4
-109
lines changed

4 files changed

+4
-109
lines changed

src/src/app/admin/page.tsx

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { abpApplicationConfigurationGet, ApplicationConfigurationDto } from '@/client'
22
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
33
import { Badge } from '@/components/ui/badge'
4-
import { Button } from '@/components/ui/button'
54
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
65
import { Separator } from '@/components/ui/separator'
76
import {
@@ -11,13 +10,10 @@ import {
1110
Globe,
1211
Mail,
1312
Phone,
14-
Settings,
1513
Shield,
1614
User,
17-
Users,
1815
XCircle,
1916
} from 'lucide-react'
20-
import Link from 'next/link'
2117

2218
// Force dynamic rendering since this page uses server-side API calls and authentication
2319
export const dynamic = 'force-dynamic'
@@ -243,60 +239,6 @@ export default async function AdminIndex() {
243239
</Card>
244240
</div>
245241

246-
{/* Quick Actions */}
247-
<Card>
248-
<CardHeader>
249-
<CardTitle className="flex items-center gap-2">
250-
<Settings className="h-5 w-5" />
251-
Quick Actions
252-
</CardTitle>
253-
<CardDescription>Common administrative tasks</CardDescription>
254-
</CardHeader>
255-
<CardContent>
256-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
257-
<Link href="/admin/users">
258-
<Button
259-
variant="outline"
260-
className="w-full h-auto p-4 flex flex-col items-center gap-2"
261-
>
262-
<Users className="h-6 w-6" />
263-
<span>Manage Users</span>
264-
</Button>
265-
</Link>
266-
267-
<Link href="/admin/roles">
268-
<Button
269-
variant="outline"
270-
className="w-full h-auto p-4 flex flex-col items-center gap-2"
271-
>
272-
<Shield className="h-6 w-6" />
273-
<span>Manage Roles</span>
274-
</Button>
275-
</Link>
276-
277-
<Link href="/admin/tenants">
278-
<Button
279-
variant="outline"
280-
className="w-full h-auto p-4 flex flex-col items-center gap-2"
281-
>
282-
<Building className="h-6 w-6" />
283-
<span>Manage Tenants</span>
284-
</Button>
285-
</Link>
286-
287-
<Link href="/admin/settings">
288-
<Button
289-
variant="outline"
290-
className="w-full h-auto p-4 flex flex-col items-center gap-2"
291-
>
292-
<Settings className="h-6 w-6" />
293-
<span>System Settings</span>
294-
</Button>
295-
</Link>
296-
</div>
297-
</CardContent>
298-
</Card>
299-
300242
{/* System Configuration Details */}
301243
<Card>
302244
<CardHeader>

src/src/components/navbar/side-nav-bar-mobile.tsx

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client'
22
import { Button } from '@/components/ui/button'
3-
import { Card } from '@/components/ui/card'
43
import {
54
DropdownMenu,
65
DropdownMenuContent,
@@ -10,7 +9,7 @@ import {
109
} from '@/components/ui/dropdown-menu'
1110
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'
1211
import { AdminMenus } from '@/config'
13-
import { ChevronDown, ChevronRight, CircleUser, Menu, Package2, Zap, Settings, User, LogOut } from 'lucide-react'
12+
import { ChevronDown, ChevronRight, CircleUser, Menu, Package2, Settings, User, LogOut } from 'lucide-react'
1413
import Link from 'next/link'
1514
import { usePathname } from 'next/navigation'
1615
import { useState } from 'react'
@@ -155,21 +154,6 @@ export default function SideNavBarMobile() {
155154
)
156155
})}
157156
</nav>
158-
159-
{/* Mobile Quick Actions */}
160-
<div className="mt-auto pt-4 border-t">
161-
<Card className="p-4 bg-gradient-to-r from-primary/5 to-primary/10 border-primary/20 mb-4">
162-
<div className="flex items-center gap-3">
163-
<div className="w-8 h-8 bg-primary/10 rounded-lg flex items-center justify-center">
164-
<Zap className="h-4 w-4 text-primary" />
165-
</div>
166-
<div className="flex-1">
167-
<p className="text-sm font-medium text-foreground">Quick Actions</p>
168-
<p className="text-xs text-muted-foreground">Access common tasks</p>
169-
</div>
170-
</div>
171-
</Card>
172-
</div>
173157
</div>
174158
</SheetContent>
175159
</Sheet>
@@ -195,7 +179,7 @@ export default function SideNavBarMobile() {
195179
<DropdownMenuSeparator />
196180
<Link href="/admin" className="cursor-pointer">
197181
<DropdownMenuItem className="flex items-center gap-2">
198-
<Zap className="h-4 w-4" />
182+
<Package2 className="h-4 w-4" />
199183
Dashboard
200184
</DropdownMenuItem>
201185
</Link>

src/src/components/navbar/side-nav-bar.tsx

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client'
2-
import { Card } from '@/components/ui/card'
32
import { AdminMenus } from '@/config'
4-
import { ChevronDown, ChevronRight, Package2, Zap } from 'lucide-react'
3+
import { ChevronDown, ChevronRight, Package2 } from 'lucide-react'
54
import Link from 'next/link'
65
import { usePathname } from 'next/navigation'
76
import { useState } from 'react'
@@ -136,19 +135,6 @@ export default function SideBarMenu() {
136135
})}
137136
</nav>
138137
</div>
139-
<div className="mt-auto p-4">
140-
<Card className="p-4 bg-gradient-to-r from-primary/5 to-primary/10 border-primary/20">
141-
<div className="flex items-center gap-3">
142-
<div className="w-8 h-8 bg-primary/10 rounded-lg flex items-center justify-center">
143-
<Zap className="h-4 w-4 text-primary" />
144-
</div>
145-
<div className="flex-1">
146-
<p className="text-sm font-medium text-foreground">Quick Actions</p>
147-
<p className="text-xs text-muted-foreground">Access common tasks</p>
148-
</div>
149-
</div>
150-
</Card>
151-
</div>
152138
</div>
153139
</div>
154140
)

src/src/components/ui/AdminLoading.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
2-
import { Loader2, Settings, User, Building, Globe } from 'lucide-react'
2+
import { Loader2, User, Building, Globe } from 'lucide-react'
33

44
export function AdminLoading() {
55
return (
@@ -78,23 +78,6 @@ export function AdminLoading() {
7878
</Card>
7979
</div>
8080

81-
{/* Loading Quick Actions */}
82-
<Card>
83-
<CardHeader>
84-
<CardTitle className="flex items-center gap-2">
85-
<Settings className="h-5 w-5" />
86-
Quick Actions
87-
</CardTitle>
88-
<CardDescription>Loading administrative tasks...</CardDescription>
89-
</CardHeader>
90-
<CardContent>
91-
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
92-
{[...Array(4)].map((_, i) => (
93-
<div key={i} className="h-24 bg-muted rounded animate-pulse" />
94-
))}
95-
</div>
96-
</CardContent>
97-
</Card>
9881
</div>
9982
)
10083
}

0 commit comments

Comments
 (0)