import { Head } from '@inertiajs/react'; import { Plus } from 'lucide-react'; import { useState } from 'react'; import { DataTable } from '@/components/data-table'; import { DateTimeField } from '@/components/datetime-field'; import { FormDialog } from '@/components/form-dialog'; import InputError from '@/components/input-error'; import { PageHeader } from '@/components/page-header'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '@/components/ui/select'; import { Textarea } from '@/components/ui/textarea'; import { store } from '@/routes/lecturer/academic-advising-logs'; import type { AcademicAdvisingLog } from '@/types/academic-advising-log'; import { advisingLogColumns } from './columns'; type Advisee = { id: number; student_number: string; user: { profile: { full_name: string } | null } | null; }; type Props = { logs: AcademicAdvisingLog[]; advisees: Advisee[]; }; function adviseeLabel(advisee: Advisee): string { return `${advisee.user?.profile?.full_name ?? 'N/A'} - ${advisee.student_number}`; } export default function LecturerAcademicAdvisingLogIndex({ logs, advisees, }: Props) { const [createOpen, setCreateOpen] = useState(false); return ( <>
} />
); } function CreateForm({ open, onOpenChange, advisees, }: { open: boolean; onOpenChange: (open: boolean) => void; advisees: Advisee[]; }) { return ( onOpenChange(false)} > {({ errors }) => (
{advisees.length === 0 && (

Anda belum memiliki mahasiswa bimbingan.

)}