mirror of
				https://github.com/i701/sarlink-portal.git
				synced 2025-11-04 12:36:59 +00:00 
			
		
		
		
	add admin checks for admin pages and run biome formating 🔨
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build and Push Docker Images / Build and Push Docker Images (push) Successful in 11m8s
				
			This commit is contained in:
		@@ -3,61 +3,61 @@ import { DevicesTable } from "@/components/devices-table";
 | 
			
		||||
import DynamicFilter from "@/components/generic-filter";
 | 
			
		||||
 | 
			
		||||
export default async function ParentalControl({
 | 
			
		||||
  searchParams,
 | 
			
		||||
	searchParams,
 | 
			
		||||
}: {
 | 
			
		||||
  searchParams: Promise<{
 | 
			
		||||
    page: number;
 | 
			
		||||
    sortBy: string;
 | 
			
		||||
    status: string;
 | 
			
		||||
  }>;
 | 
			
		||||
	searchParams: Promise<{
 | 
			
		||||
		page: number;
 | 
			
		||||
		sortBy: string;
 | 
			
		||||
		status: string;
 | 
			
		||||
	}>;
 | 
			
		||||
}) {
 | 
			
		||||
	const parentalControlFilters = {
 | 
			
		||||
		is_active: "true",
 | 
			
		||||
		has_a_pending_payment: "false",
 | 
			
		||||
	};
 | 
			
		||||
 | 
			
		||||
  const parentalControlFilters = {
 | 
			
		||||
    is_active: "true",
 | 
			
		||||
    has_a_pending_payment: "false",
 | 
			
		||||
  };
 | 
			
		||||
	return (
 | 
			
		||||
		<div>
 | 
			
		||||
			<div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
 | 
			
		||||
				<h3 className="text-sarLinkOrange text-2xl">Parental Control</h3>
 | 
			
		||||
			</div>
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <div>
 | 
			
		||||
      <div className="flex justify-between items-center border rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
 | 
			
		||||
        <h3 className="text-sarLinkOrange text-2xl">Parental Control</h3>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
      <div
 | 
			
		||||
        id="user-filters"
 | 
			
		||||
        className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-start"
 | 
			
		||||
      >
 | 
			
		||||
        <DynamicFilter
 | 
			
		||||
          description="Filter devices by name, MAC address, or vendor."
 | 
			
		||||
          title="Device Filter"
 | 
			
		||||
          inputs={[
 | 
			
		||||
            {
 | 
			
		||||
              name: "name",
 | 
			
		||||
              label: "Device Name",
 | 
			
		||||
              type: "string",
 | 
			
		||||
              placeholder: "Enter device name",
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
              name: "mac",
 | 
			
		||||
              label: "MAC Address",
 | 
			
		||||
              type: "string",
 | 
			
		||||
              placeholder: "Enter MAC address",
 | 
			
		||||
            },
 | 
			
		||||
            {
 | 
			
		||||
              name: "vendor",
 | 
			
		||||
              label: "Vendor",
 | 
			
		||||
              type: "string",
 | 
			
		||||
              placeholder: "Enter vendor name",
 | 
			
		||||
            }
 | 
			
		||||
          ]}
 | 
			
		||||
        />      </div>
 | 
			
		||||
      <Suspense key={(await searchParams).page} fallback={"loading...."}>
 | 
			
		||||
        <DevicesTable
 | 
			
		||||
          parentalControl={true}
 | 
			
		||||
          searchParams={searchParams}
 | 
			
		||||
          additionalFilters={parentalControlFilters}
 | 
			
		||||
        />
 | 
			
		||||
      </Suspense>
 | 
			
		||||
    </div>
 | 
			
		||||
  );
 | 
			
		||||
			<div
 | 
			
		||||
				id="user-filters"
 | 
			
		||||
				className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-start"
 | 
			
		||||
			>
 | 
			
		||||
				<DynamicFilter
 | 
			
		||||
					description="Filter devices by name, MAC address, or vendor."
 | 
			
		||||
					title="Device Filter"
 | 
			
		||||
					inputs={[
 | 
			
		||||
						{
 | 
			
		||||
							name: "name",
 | 
			
		||||
							label: "Device Name",
 | 
			
		||||
							type: "string",
 | 
			
		||||
							placeholder: "Enter device name",
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							name: "mac",
 | 
			
		||||
							label: "MAC Address",
 | 
			
		||||
							type: "string",
 | 
			
		||||
							placeholder: "Enter MAC address",
 | 
			
		||||
						},
 | 
			
		||||
						{
 | 
			
		||||
							name: "vendor",
 | 
			
		||||
							label: "Vendor",
 | 
			
		||||
							type: "string",
 | 
			
		||||
							placeholder: "Enter vendor name",
 | 
			
		||||
						},
 | 
			
		||||
					]}
 | 
			
		||||
				/>{" "}
 | 
			
		||||
			</div>
 | 
			
		||||
			<Suspense key={(await searchParams).page} fallback={"loading...."}>
 | 
			
		||||
				<DevicesTable
 | 
			
		||||
					parentalControl={true}
 | 
			
		||||
					searchParams={searchParams}
 | 
			
		||||
					additionalFilters={parentalControlFilters}
 | 
			
		||||
				/>
 | 
			
		||||
			</Suspense>
 | 
			
		||||
		</div>
 | 
			
		||||
	);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user