From 9ecabc9069eb2846ee96aaa835325ad3157c31fa Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Thu, 14 Aug 2025 13:47:31 +0800 Subject: [PATCH] =?UTF-8?q?202508141346=20=E5=8C=85=E5=BB=82=20Grid=20?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=A8=93=E5=B1=A4=E5=8A=A0=E5=85=A5=E5=85=A8?= =?UTF-8?q?=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Livewire/Grids/RoomGrid.php | 1 + resources/views/livewire/grids/room-grid.blade.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Grids/RoomGrid.php b/app/Livewire/Grids/RoomGrid.php index d0ad6e9..3358169 100644 --- a/app/Livewire/Grids/RoomGrid.php +++ b/app/Livewire/Grids/RoomGrid.php @@ -33,6 +33,7 @@ class RoomGrid extends Component if ($branch) { $rooms = Room::where('branch_id', $branch->id)->orderBy('name', 'asc')->get(); $floors = $rooms->pluck('floor')->unique()->sort()->values()->toArray(); + array_unshift($floors, 'all'); } return view('livewire.grids.room-grid', [ diff --git a/resources/views/livewire/grids/room-grid.blade.php b/resources/views/livewire/grids/room-grid.blade.php index e685b41..5c5a67b 100644 --- a/resources/views/livewire/grids/room-grid.blade.php +++ b/resources/views/livewire/grids/room-grid.blade.php @@ -8,7 +8,7 @@ :class="floor === '{{ $fl }}' ? 'bg-blue-500 text-white' : 'bg-white text-gray-700'" x-on:click="floor = '{{ $fl }}'" > - {{ $fl }}F + {{ $fl === 'all' ? '全部' : $fl . '樓' }} @endforeach @@ -30,7 +30,7 @@
@forelse($rooms as $room) -
+
@if($room->type->value === \App\Enums\RoomType::SVR->value) @else