42 lines
1.7 KiB
PHP
42 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Master\Locations\Pages;
|
|
|
|
use App\Filament\Actions\Cheerful\CreateAction;
|
|
use App\Filament\Resources\Master\Locations\LocationResource;
|
|
use App\Filament\Support\CheerfulNotification;
|
|
use Filament\Resources\Pages\ManageRecords;
|
|
use Filament\Support\Enums\Width;
|
|
|
|
class ManageLocations extends ManageRecords
|
|
{
|
|
protected static string $resource = LocationResource::class;
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return CheerfulNotification::getMessage('Lokus 📍✨', 'Kelola Lokus');
|
|
}
|
|
|
|
public function getSubheading(): ?string
|
|
{
|
|
return CheerfulNotification::getMessage('Kelola titik-titik lokasi (Lokus) data agar pemetaan informasi semakin presisi! 🗺️😊', 'Gunakan halaman ini untuk memantau dan memperbarui data Lokus di sistem.');
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
CreateAction::make()
|
|
->label('Tambah')
|
|
->modalHeading(fn () => CheerfulNotification::getMessage('Tambah Lokus Baru 📍✨', 'Tambah Lokus'))
|
|
->modalDescription(fn () => CheerfulNotification::getMessage('Tentukan titik lokasi baru biar datanya makin presisi! 🗺️😊', 'Silakan masukkan detail lokasi/lokus data di bawah ini.'))
|
|
->modalSubmitActionLabel('Simpan')
|
|
->modalCancelActionLabel('Batal')
|
|
->extraModalFooterActions(fn (CreateAction $action): array => [
|
|
$action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
|
|
->label('Simpan dan Tambah Lagi'),
|
|
])
|
|
->modalWidth(Width::Large),
|
|
];
|
|
}
|
|
}
|