components([ Select::make('student_id') ->label('Mahasiswa') ->placeholder('Pilih Mahasiswa') ->relationship('student', 'full_name') ->searchable() ->required() ->preload() ->helperText('Pilih mahasiswa yang hadir pada pertemuan ini.'), DateTimePicker::make('attended_at') ->label('Waktu Presensi') ->default(now()) ->native(false) ->helperText('Tanggal dan jam mahasiswa melakukan presensi.'), ]) ->columns(1); } public function table(Table $table): Table { return $table ->recordTitleAttribute('student.full_name') ->columns([ ...RowIndexColumn::make(), Tables\Columns\TextColumn::make('student.student_number') ->label('NIM') ->copyable() ->searchable() ->sortable() ->color('gray'), Tables\Columns\TextColumn::make('student.full_name') ->label('Nama Mahasiswa') ->searchable() ->sortable(), Tables\Columns\TextColumn::make('attended_at') ->label('Waktu Presensi') ->dateTime('l, d F Y H:i') ->sortable() ->description(fn ($record) => $record->attended_at->format('H:i').' WIB') ->color('primary'), ]) ->filters([ // ]) ->headerActions([ CreateAction::make() ->modalWidth(Width::Large), ]) ->actions([ EditAction::make() ->modalWidth(Width::Large), DeleteAction::make(), ]) ->toolbarActions([ BulkActionGroup::make([ ...DefaultBulkActions::make('Presensi Mahasiswa'), ]), ]) ->emptyStateDescription('Belum ada data presensi untuk pertemuan ini.'); } }