refactor: refactor superadmin modules

This commit is contained in:
2026-06-17 01:35:09 +05:30
parent 6f4399a048
commit 1325afdab2
40 changed files with 1709 additions and 1320 deletions

View File

@@ -1,8 +1,6 @@
'use client';
import { Search } from 'lucide-react';
import { Input } from '@/components/ui/input';
import { TableSearchInput } from '@/components/data-table/TableSearchInput';
import {
Select,
SelectContent,
@@ -27,15 +25,12 @@ export function PlanFilters({
}: PlanFiltersProps) {
return (
<div className="flex flex-col gap-3 sm:flex-row sm:items-center">
<div className="relative w-full sm:w-72">
<Search className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" />
<Input
value={searchTerm}
onChange={(event) => onSearchChange(event.target.value)}
placeholder="Search plans"
className="pl-9"
/>
</div>
<TableSearchInput
value={searchTerm}
onChange={onSearchChange}
placeholder="Search plans"
className="w-full sm:w-72"
/>
<Select value={statusFilter} onValueChange={(value) => onStatusChange(value as PlanStatusFilter)}>
<SelectTrigger className="w-full sm:w-40">
<SelectValue placeholder="Status" />

View File

@@ -15,6 +15,7 @@ interface PlanTableProps {
limit: number;
total: number;
onPageChange: (skip: number) => void;
onLimitChange: (limit: number) => void;
}
export function PlanTable({
@@ -26,6 +27,7 @@ export function PlanTable({
limit,
total,
onPageChange,
onLimitChange,
}: PlanTableProps) {
return (
<DataTable
@@ -40,7 +42,7 @@ export function PlanTable({
limit,
totalItems: total,
onPageChange,
onLimitChange: () => undefined,
onLimitChange,
}}
/>
);