20250729
改字 移除 包廂關開帳
This commit is contained in:
parent
b17d008735
commit
cdde9b9b4b
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Grids\Modals;
|
||||
namespace App\Livewire\Modals;
|
||||
|
||||
use App\Models\Room;
|
||||
use App\Models\Branch;
|
||||
@ -16,8 +16,7 @@ class RoomDetailModal extends Component
|
||||
|
||||
protected $listeners = [
|
||||
'openModal', 'closeModal',
|
||||
'startNotify', 'stopNotify', 'fireNotify',
|
||||
'openAccountNotify','closeAccountNotify'
|
||||
'startNotify', 'stopNotify', 'fireNotify'
|
||||
];
|
||||
|
||||
public $room_name;
|
||||
@ -53,17 +52,6 @@ class RoomDetailModal extends Component
|
||||
$this->send($data);
|
||||
}
|
||||
|
||||
public function openAccountNotify()
|
||||
{
|
||||
$data = $this->buildNotifyData('active', now(), null);
|
||||
$this->send($data);
|
||||
}
|
||||
|
||||
public function closeAccountNotify()
|
||||
{
|
||||
$data = $this->buildNotifyData('closed', now(), null);
|
||||
$this->send($data);
|
||||
}
|
||||
protected function buildNotifyData(string $command, $startedAt = null, $endedAt = null): array
|
||||
{
|
||||
return [
|
||||
@ -110,6 +98,6 @@ class RoomDetailModal extends Component
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.grids.modals.room-detail-modal');
|
||||
return view('livewire.modals.room-detail-modal');
|
||||
}
|
||||
}
|
@ -244,7 +244,7 @@ final class RoomTable extends PowerGridComponent
|
||||
->slot('包廂設定')
|
||||
->icon('solid-cog')
|
||||
->class('inline-flex items-center gap-1 px-3 py-1 rounded ')
|
||||
->dispatchTo('forms.modals.room-detail-modal', 'openModal', ['roomId' => $row->id]);
|
||||
->dispatchTo('modals.room-detail-modal', 'openModal', ['roomId' => $row->id]);
|
||||
}
|
||||
return $actions;
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ return [
|
||||
'user.status.Suspended' => '停權',
|
||||
'user.status.Deleting' => '刪除中',
|
||||
|
||||
'room.status.Active' => '已占用',
|
||||
'room.status.Closed' => '可用',
|
||||
'room.status.Active' => '啟用中',
|
||||
'room.status.Closed' => '待機',
|
||||
'room.status.Fire' => '火災',
|
||||
'room.status.Maintain' => '維護',
|
||||
'room.status.Maintain' => '維修',
|
||||
'room.status.Error' => '異常',
|
||||
];
|
@ -8,7 +8,7 @@
|
||||
@endphp
|
||||
|
||||
<div class="border p-2 rounded shadow-md h-32 relative cursor-pointer bg-amber-50"
|
||||
wire:click="$dispatchTo('grids.modals.room-detail-modal','openModal', { roomId: {{ $room->id }} })">
|
||||
wire:click="$dispatchTo('modals.room-detail-modal','openModal', { roomId: {{ $room->id }} })">
|
||||
{{-- 房間名稱 + 線上狀態圓點 --}}
|
||||
<div class="font-bold flex items-center gap-1">
|
||||
<span class="w-2.5 h-2.5 rounded-full inline-block
|
||||
|
@ -3,5 +3,5 @@
|
||||
<x-wireui:notifications/>
|
||||
<livewire:tables.room-table/>
|
||||
<livewire:forms.room-form />
|
||||
<livewire:grids.modals.room-detail-modal />
|
||||
<livewire:modals.room-detail-modal />
|
||||
</x-layouts.admin>
|
@ -60,5 +60,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<x-wireui:notifications/>
|
||||
<livewire:grids.modals.room-detail-modal />
|
||||
<livewire:modals.room-detail-modal />
|
||||
</x-wireui:card>
|
@ -16,14 +16,9 @@
|
||||
{{ $room_name ?? '未選擇' }}包廂設定
|
||||
</x-slot>
|
||||
<div class="grid grid-cols-3 gap-4 mb-4">
|
||||
<x-wireui:button wire:click="startNotify" >開機</x-wireui:button>
|
||||
<x-wireui:button wire:click="startNotify" >維修</x-wireui:button>
|
||||
<x-wireui:button wire:click="stopNotify" >關機</x-wireui:button>
|
||||
<x-wireui:button wire:click="fireNotify" >火災</x-wireui:button>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 gap-4 mb-4">
|
||||
<x-wireui:button wire:click="openAccountNotify" >包廂開帳</x-wireui:button>
|
||||
<x-wireui:button wire:click="closeAccountNotify" >包廂關帳</x-wireui:button>
|
||||
</div>
|
||||
|
||||
</x-wireui:card>
|
||||
</x-wireui:modal>
|
Loading…
x
Reference in New Issue
Block a user