import InputError from '@/components/input-error'; import LoadingButton from '@/components/loading-button'; import Switch from '@/components/switch'; import { Card } from '@/components/ui/card'; import { Label } from '@/components/ui/label'; import { SharedData } from '@/types/global'; import { useForm, usePage } from '@inertiajs/react'; import { Editor } from 'richtor'; import 'richtor/styles'; interface OfflineFields { active: boolean; payment_instructions: string; payment_details: string; } interface OfflineProps { payment: Settings; } const Offline = ({ payment }: OfflineProps) => { const { props } = usePage(); const { translate } = props; const { button, common } = translate; const { data, setData, post, errors, processing } = useForm({ ...(payment.fields as OfflineFields), type: 'offline', }); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post(route('settings.payment.update', { id: payment.id })); }; return (

Offline Payment Settings

Configure manual payment options for your students

setData('active', checked)} />
setData('payment_instructions', value as string)} />

These instructions will be shown to students when they select offline payment

{/* Bank Details Section */}
setData('payment_details', value as string)} />

These payment/bank details will be displayed to students for making offline payments

Important Notice

Offline payments require manual verification. You will need to approve each payment in the Payment History section before the student can access the course.

{button.save_changes}
); }; export default Offline;