feat: add radio filter for topup expiry

This commit is contained in:
2025-07-06 19:48:24 +05:00
parent 3e3b5f15db
commit d4993530f7
2 changed files with 20 additions and 1 deletions

View File

@ -388,6 +388,25 @@ export default function DynamicFilter<
</p>
);
}
if (config.type === "radio-group") {
const stringValue = value as string;
// For true/false values, display the label instead of the value
if (stringValue === "true" || stringValue === "false") {
const option = config.options.find((opt) => opt.value === stringValue);
const displayValue = option?.label || stringValue;
return (
<p>
{config.label}: <span className="text-muted-foreground">{displayValue}</span>
</p>
);
}
// For other values, display as normal
return (
<p>
{config.label}: <span className="text-muted-foreground">{stringValue}</span>
</p>
);
}
return (
<p>
{config.label}: <span className="text-muted-foreground">{value}</span>

View File

@ -82,7 +82,7 @@ export async function AppSidebar({
},
{
title: "Parental Control",
link: "/parental-control",
link: "/parental-control?page=1",
icon: <CreditCard size={16} />,
perm_identifier: "device",
},