Fieldset::make('Kategori Permohonan')
->schema([
Radio::make('kategori')
->label('')
->options([
'Perorangan' => 'Perorangan',
'Lembaga / Organisasi' => 'Lembaga / Organisasi',
])->required()->columnSpan('full')->inline()->default('Perorangan'),
]),
TextInput::make('nomor_identitas')
->label(function (Closure $get){
if(strcmp($get('kategori'),'Perorangan')){
return (string) "NIK/No.Identitas Pribadi";
}
return (string) "NIK/No.Identitas Pimpinan";
})
->required()
->maxLength(255),
TextInput::make('nama_identitas')
->label(function (Closure $get){
if($get('kategori')==='Perorangan'){
return (string) "Nama Lengkap";
}
return (string) "Nama Lembaga / Organisasi";
})
->required()
->maxLength(255),
FileUpload::make('file_identitas')
->required()
->label(function (Closure $get){
if(strcmp($get('kategori'),'Perorangan')){
return (string) "Upload KTP Pribadi";
}
return (string) "Upload KTP Pimpinan";
})
->enableOpen()
->reactive()
->directory('ktp-pemohon')
->disk('private')->columnSpan('full')
->visible(fn (Closure $get) => strcmp($get('kategori'),'Lembaga / Organisasi'))->columnSpan('full'),