refactor: Rename 'Lokasi' to 'Lokus' and 'Sub Lokasi' to 'Sub Lokus' in Filament resource labels and titles.
This commit is contained in:
parent
221b301d89
commit
d8cf50ce1f
@ -35,7 +35,7 @@ class LocationResource extends Resource
|
|||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::MapPin;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::MapPin;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Lokasi';
|
protected static ?string $navigationLabel = 'Lokus';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 3;
|
protected static ?int $navigationSort = 3;
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ public static function table(Table $table): Table
|
|||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
...DefaultBulkActions::make('Lokasi'),
|
...DefaultBulkActions::make('Lokus'),
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
->emptyStateIcon(Heroicon::MapPin)
|
->emptyStateIcon(Heroicon::MapPin)
|
||||||
|
|||||||
@ -11,14 +11,14 @@ class ManageLocations extends ManageRecords
|
|||||||
{
|
{
|
||||||
protected static string $resource = LocationResource::class;
|
protected static string $resource = LocationResource::class;
|
||||||
|
|
||||||
protected static ?string $title = 'Lokasi';
|
protected static ?string $title = 'Lokus';
|
||||||
|
|
||||||
protected function getHeaderActions(): array
|
protected function getHeaderActions(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
->label('Tambah')
|
->label('Tambah')
|
||||||
->modalHeading('Tambah Lokasi')
|
->modalHeading('Tambah Lokus')
|
||||||
->modalSubmitActionLabel('Simpan')
|
->modalSubmitActionLabel('Simpan')
|
||||||
->modalCancelActionLabel('Batal')
|
->modalCancelActionLabel('Batal')
|
||||||
->extraModalFooterActions(fn (CreateAction $action): array => [
|
->extraModalFooterActions(fn (CreateAction $action): array => [
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
class ManageSubLocations extends ManageRecords
|
class ManageSubLocations extends ManageRecords
|
||||||
{
|
{
|
||||||
protected static ?string $title = 'Sub Lokasi';
|
protected static ?string $title = 'Sub Lokus';
|
||||||
|
|
||||||
protected static string $resource = SubLocationResource::class;
|
protected static string $resource = SubLocationResource::class;
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ protected function getHeaderActions(): array
|
|||||||
return [
|
return [
|
||||||
CreateAction::make()
|
CreateAction::make()
|
||||||
->label('Tambah')
|
->label('Tambah')
|
||||||
->modalHeading('Tambah Sub Lokasi')
|
->modalHeading('Tambah Sub Lokus')
|
||||||
->modalSubmitActionLabel('Simpan')
|
->modalSubmitActionLabel('Simpan')
|
||||||
->modalCancelActionLabel('Batal')
|
->modalCancelActionLabel('Batal')
|
||||||
->extraModalFooterActions(fn (CreateAction $action): array => [
|
->extraModalFooterActions(fn (CreateAction $action): array => [
|
||||||
|
|||||||
@ -37,7 +37,7 @@ class SubLocationResource extends Resource
|
|||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::NumberedList;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::NumberedList;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Sub Lokasi';
|
protected static ?string $navigationLabel = 'Sub Lokus';
|
||||||
|
|
||||||
protected static ?int $navigationSort = 4;
|
protected static ?int $navigationSort = 4;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ public static function form(Schema $schema): Schema
|
|||||||
return $schema
|
return $schema
|
||||||
->components([
|
->components([
|
||||||
Select::make('location_id')
|
Select::make('location_id')
|
||||||
->label('Lokasi')
|
->label('Lokus')
|
||||||
->options(Location::query()->pluck('name', 'id'))
|
->options(Location::query()->pluck('name', 'id'))
|
||||||
->searchable()
|
->searchable()
|
||||||
->native(false)
|
->native(false)
|
||||||
@ -74,7 +74,7 @@ public static function table(Table $table): Table
|
|||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
TextColumn::make('location.name')
|
TextColumn::make('location.name')
|
||||||
->label('Lokasi')
|
->label('Lokus')
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ public static function table(Table $table): Table
|
|||||||
])
|
])
|
||||||
->toolbarActions([
|
->toolbarActions([
|
||||||
BulkActionGroup::make([
|
BulkActionGroup::make([
|
||||||
...DefaultBulkActions::make('Sub Lokasi'),
|
...DefaultBulkActions::make('Sub Lokus'),
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
->emptyStateIcon(Heroicon::NumberedList)
|
->emptyStateIcon(Heroicon::NumberedList)
|
||||||
|
|||||||
@ -31,7 +31,7 @@ public static function configure(Schema $schema): Schema
|
|||||||
Grid::make(2)
|
Grid::make(2)
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('location_id')
|
Select::make('location_id')
|
||||||
->label('Lokasi')
|
->label('Lokus')
|
||||||
->relationship('location', 'name')
|
->relationship('location', 'name')
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
@ -43,7 +43,7 @@ public static function configure(Schema $schema): Schema
|
|||||||
->autocomplete(false),
|
->autocomplete(false),
|
||||||
|
|
||||||
Select::make('sub_location_id')
|
Select::make('sub_location_id')
|
||||||
->label('Sub Lokasi')
|
->label('Sub Lokus')
|
||||||
->relationship('subLocation', 'name', fn (Builder $query, Get $get): Builder => $query->where('location_id', $get('location_id')))
|
->relationship('subLocation', 'name', fn (Builder $query, Get $get): Builder => $query->where('location_id', $get('location_id')))
|
||||||
->searchable()
|
->searchable()
|
||||||
->preload()
|
->preload()
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public static function configure(Table $table): Table
|
|||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
TextColumn::make('location.name')
|
TextColumn::make('location.name')
|
||||||
->label('Lokasi')
|
->label('Lokus')
|
||||||
->searchable()
|
->searchable()
|
||||||
->sortable(),
|
->sortable(),
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user