feat(subscription): implement feature gating for subscription-based access in admin panel
This commit is contained in:
@@ -17,6 +17,7 @@ import Pagination from '../components/ui/Pagination';
|
||||
import Modal from '../components/ui/Modal';
|
||||
import PageHeader from '../components/ui/PageHeader';
|
||||
import SearchableSelect from '../components/ui/SearchableSelect';
|
||||
import FeatureGate from '../components/ui/FeatureGate';
|
||||
|
||||
const sessionSchema = z.object({
|
||||
visit_price_rials: z.coerce.number().min(0),
|
||||
@@ -44,7 +45,7 @@ function calcFinalPrice(visitPrice: number, baseDiscount: number, suppDiscount:
|
||||
return Math.round(afterSupp) + servicesTotal;
|
||||
}
|
||||
|
||||
export default function MyPatientsPage() {
|
||||
function MyPatientsPageInner() {
|
||||
const qc = useQueryClient();
|
||||
const [selectedRecord, setSelectedRecord] = useState<PatientRecord | null>(null);
|
||||
const [page, setPage] = useState(1);
|
||||
@@ -543,3 +544,11 @@ function EditSessionModal({
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
export default function MyPatientsPage() {
|
||||
return (
|
||||
<FeatureGate feature="patient_records">
|
||||
<MyPatientsPageInner />
|
||||
</FeatureGate>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user