feat(subscription): implement feature gating for subscription-based access in admin panel
This commit is contained in:
@@ -14,6 +14,7 @@ import { formatRial, formatNumber, formatDateTime } from '../lib/utils';
|
||||
import Modal from '../components/ui/Modal';
|
||||
import Pagination from '../components/ui/Pagination';
|
||||
import PageHeader from '../components/ui/PageHeader';
|
||||
import FeatureGate from '../components/ui/FeatureGate';
|
||||
|
||||
const chargeSchema = z.object({
|
||||
amount_rials: z.coerce.number().min(10000, 'حداقل مبلغ ۱۰,۰۰۰ ریال است'),
|
||||
@@ -22,7 +23,7 @@ type ChargeForm = z.infer<typeof chargeSchema>;
|
||||
|
||||
const EMPTY_LOGS: SmsWalletLog[] = [];
|
||||
|
||||
export default function SmsWalletPage() {
|
||||
function SmsWalletPageInner() {
|
||||
const qc = useQueryClient();
|
||||
const [chargeOpen, setChargeOpen] = useState(false);
|
||||
const [gateway, setGateway] = useState<'mellat' | 'sep'>('mellat');
|
||||
@@ -433,3 +434,11 @@ export default function SmsWalletPage() {
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default function SmsWalletPage() {
|
||||
return (
|
||||
<FeatureGate feature="sms_panel">
|
||||
<SmsWalletPageInner />
|
||||
</FeatureGate>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user