schema([ Forms\Components\Section::make('Data Siswa') ->schema([ Forms\Components\TextInput::make('nisn') ->label('NISN') ->maxLength(20), Forms\Components\TextInput::make('nis') ->label('NIS') ->required() ->maxLength(20), Forms\Components\TextInput::make('full_name') ->label('Nama Lengkap') ->required() ->maxLength(100), Forms\Components\Select::make('gender') ->label('Jenis Kelamin') ->options([ 'L' => 'L', 'P' => 'P', ]) ->required(), Forms\Components\DatePicker::make('birth_date') ->label('Tanggal Lahir') ->required(), Forms\Components\TextInput::make('birth_place') ->label('Tempat Lahir') ->required() ->maxLength(100), Forms\Components\TextInput::make('phone') ->label('Nomor Telepon') ->maxLength(15), Forms\Components\TextInput::make('email') ->label("Email Orang Tua") ->email() ->required() ->maxLength(100), Forms\Components\TextInput::make('parent_name') ->label("Nama Orang Tua") ->required() ->maxLength(100), Forms\Components\TextInput::make('parent_phone') ->label("Nomor Telepon Orang Tua") ->required() ->maxLength(15), Forms\Components\Select::make('religion') ->label('Agama') ->options([ 'islam' => 'Islam', 'hindu' => 'Hindu', 'katolik' => 'Katolik', 'kristen' => 'Kristen', 'buddha' => 'Buddha', ]), Forms\Components\Textarea::make('address') ->label('Alamat') ->rows(1), ]) ->columns(2), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('nis') ->label('NIS') ->searchable(), Tables\Columns\TextColumn::make('full_name') ->label('Nama') ->searchable() ->sortable(), Tables\Columns\TextColumn::make('gender') ->label('Jenis Kelamin') ->sortable(), Tables\Columns\TextColumn::make('birth_place') ->label('Tempat Lahir'), Tables\Columns\TextColumn::make('birth_date') ->label('Tanggal Lahir') ->date(), Tables\Columns\TextColumn::make('parent_name') ->label("Nama Orang Tua"), Tables\Columns\TextColumn::make('religion') ->label("Agama") ->formatStateUsing(fn (string $state): string => strtoupper($state)) ->badge(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->filters([ // ]) ->actions([ Tables\Actions\ViewAction::make(), Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]) ->emptyStateActions([ Tables\Actions\CreateAction::make(), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListStudents::route('/'), 'create' => Pages\CreateStudent::route('/create'), 'edit' => Pages\EditStudent::route('/{record}/edit'), ]; } public static function getNavigationLabel(): string { return 'Siswa'; } public static function getBreadcrumb(): string { return 'Siswa'; } public static function getPluralModelLabel(): string { return 'Siswa'; } }