202508030942
調整檔案位置 RoomGrid 加入 all
This commit is contained in:
parent
cb530f94b8
commit
5d8c436f86
@ -38,6 +38,7 @@ class RoomGrid extends Component
|
||||
$this->rooms = Room::where('branch_id', $this->selectedBranchId)->orderBy('name')->get();
|
||||
|
||||
$floors = $this->rooms->pluck('floor')->unique()->sort()->values()->toArray();
|
||||
array_unshift($floors, 'all');
|
||||
|
||||
return view('livewire.grids.room-grid', [
|
||||
'rooms' => $this->rooms,
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Forms\ImportDatas;
|
||||
namespace App\Livewire\ImportDatas;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@ -108,7 +108,7 @@ class Artist extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.forms.import-datas.artist');
|
||||
return view('livewire.import-datas.artist');
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Forms\ImportDatas;
|
||||
namespace App\Livewire\ImportDatas;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@ -108,7 +108,7 @@ class Branch extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.forms.import-datas.branch');
|
||||
return view('livewire.import-datas.branch');
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Forms\ImportDatas;
|
||||
namespace App\Livewire\ImportDatas;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
@ -108,7 +108,7 @@ class Song extends Component
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.forms.import-datas.song');
|
||||
return view('livewire.import-datas.song');
|
||||
}
|
||||
|
||||
}
|
@ -44,7 +44,7 @@ final class ActivityLogTable extends PowerGridComponent
|
||||
->showToggleColumns();
|
||||
//->showSoftDeletes()
|
||||
//->showSearchInput()
|
||||
$header->includeViewOnTop('livewire.forms.headers.activity-log');
|
||||
$header->includeViewOnTop('livewire.headers.activity-log');
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
return $actions;
|
||||
|
@ -63,7 +63,7 @@ final class ArtistTable extends PowerGridComponent
|
||||
//->showSoftDeletes()
|
||||
//->showSearchInput()
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.artist') ;
|
||||
$header->includeViewOnTop('livewire.headers.artist') ;
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -61,7 +61,7 @@ final class BranchTable extends PowerGridComponent
|
||||
//->showSoftDeletes()
|
||||
//->showSearchInput()
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.branch') ;
|
||||
$header->includeViewOnTop('livewire.headers.branch') ;
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -42,7 +42,7 @@ final class RoleTable extends PowerGridComponent
|
||||
$actions = [];
|
||||
$header =PowerGrid::header();
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.role');
|
||||
$header->includeViewOnTop('livewire.headers.role');
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()
|
||||
|
@ -28,7 +28,7 @@ final class RoomStatusLogTable extends PowerGridComponent
|
||||
$header = PowerGrid::header()
|
||||
->withoutLoading()
|
||||
->showToggleColumns();
|
||||
$header->includeViewOnTop('livewire.forms.headers.room-status-log');
|
||||
$header->includeViewOnTop('livewire.headers.room-status-log');
|
||||
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -18,6 +18,7 @@ use PowerComponents\LivewirePowerGrid\PowerGridComponent;
|
||||
use PowerComponents\LivewirePowerGrid\Traits\WithExport;
|
||||
use PowerComponents\LivewirePowerGrid\Components\SetUp\Exportable;
|
||||
use Livewire\Attributes\On;
|
||||
use Livewire\Attributes\Url;
|
||||
use WireUi\Traits\WireUiActions;
|
||||
|
||||
final class RoomTable extends PowerGridComponent
|
||||
@ -26,6 +27,7 @@ final class RoomTable extends PowerGridComponent
|
||||
public string $tableName = 'room-table';
|
||||
public bool $canDownload;
|
||||
public bool $canDelect;
|
||||
#[Url]
|
||||
public ?int $selectedBranchId = null;
|
||||
public ?string $external_ip= "";
|
||||
|
||||
@ -54,7 +56,7 @@ final class RoomTable extends PowerGridComponent
|
||||
$header = PowerGrid::header()
|
||||
->withoutLoading()
|
||||
->showToggleColumns();
|
||||
$header->includeViewOnTop('livewire.forms.headers.room');
|
||||
$header->includeViewOnTop('livewire.headers.room');
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
return $actions;
|
||||
|
@ -59,7 +59,7 @@ final class SongTable extends PowerGridComponent
|
||||
}
|
||||
$header = PowerGrid::header()->showSoftDeletes()->showToggleColumns();
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.song');
|
||||
$header->includeViewOnTop('livewire.headers.song');
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -53,7 +53,7 @@ final class TextAdsTable extends PowerGridComponent
|
||||
}
|
||||
$header = PowerGrid::header()->showSoftDeletes()->showToggleColumns();
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.text-ad');
|
||||
$header->includeViewOnTop('livewire.headers.text-ad');
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -55,7 +55,7 @@ final class UserTable extends PowerGridComponent
|
||||
$header = PowerGrid::header()
|
||||
->showToggleColumns();
|
||||
if($this->canCreate){
|
||||
$header->includeViewOnTop('livewire.forms.headers.user');
|
||||
$header->includeViewOnTop('livewire.headers.user');
|
||||
}
|
||||
$actions[]=$header;
|
||||
$actions[]=PowerGrid::footer()->showPerPage()->showRecordCount();
|
||||
|
@ -3,5 +3,5 @@
|
||||
<x-wireui:notifications/>
|
||||
<livewire:tables.artist-table />
|
||||
<livewire:forms.artist-form />
|
||||
<livewire:forms.import-datas.artist />
|
||||
<livewire:import-datas.artist />
|
||||
</x-layouts.admin>
|
@ -3,5 +3,5 @@
|
||||
<x-wireui:notifications/>
|
||||
<livewire:tables.branch-table />
|
||||
<livewire:forms.branch-form />
|
||||
<livewire:forms.import-datas.branch />
|
||||
<livewire:import-datas.branch />
|
||||
</x-layouts.admin>
|
@ -3,5 +3,5 @@
|
||||
<x-wireui:notifications/>
|
||||
<livewire:tables.song-table />
|
||||
<livewire:forms.song-form />
|
||||
<livewire:forms.import-datas.song />
|
||||
<livewire:import-datas.song />
|
||||
</x-layouts.admin>
|
@ -22,7 +22,7 @@
|
||||
:class="floor === '{{ $fl }}' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700'"
|
||||
x-on:click="floor = '{{ $fl }}'"
|
||||
>
|
||||
{{ $fl }}F
|
||||
{{ $fl === 'all' ? '全部' : $fl . '樓' }}
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
@ -44,7 +44,7 @@
|
||||
<div wire:poll.5s>
|
||||
<div class="grid grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
||||
@forelse($rooms as $room)
|
||||
<div x-show="floor == '{{ $room->floor }}' && (type == 'all' || type == '{{ $room->type }}')" x-transition class="transition-all duration-300">
|
||||
<div x-show="(floor == 'all' || floor == '{{ $room->floor }}') && (type == 'all' || type == '{{ $room->type }}')" x-transition class="transition-all duration-300">
|
||||
@if($room->type->value === \App\Enums\RoomType::SVR->value)
|
||||
<x-room-card-svr :room="$room" />
|
||||
@else
|
||||
|
Loading…
x
Reference in New Issue
Block a user