12
13
31
32
33 Available
34 Occupied
35 Cleaning
36 Disabled
37
38
39 {{-- OCCUPIED TABLE SEARCH --}}
40
41
42
43
44
45
46
47
51
52
58
59
60
61 Search only filters occupied tables. Leave empty to show all tables.
62
63
64
65
66
67
68 No occupied table found for this search.
69
70
71
72 @forelse($tables as $table)
73 @php
74 $order = $active_orders->get($table->id);
75 $status = $order ? 'occupied' : ($table->table_status ?: 'available');
76 $availableSeats = max(0, (int)$table->seats - (int)$table->current_persons);
77
78 $customerName = $order ? (optional($order->contact)->name ?: 'Walk-In') : '';
79 $customerMobile = $order ? (optional($order->contact)->mobile ?: '') : '';
80 $waiterName = $order ? ($waiter_names[$order->res_waiter_id] ?? '') : '';
81 $invoiceNo = $order ? ($order->invoice_no ?? '') : '';
82
83 $searchText = strtolower(
84 ($table->name ?? '') . ' ' .
85 (optional($table->floor)->name ?? '') . ' ' .
86 $invoiceNo . ' ' .
87 $customerName . ' ' .
88 $customerMobile . ' ' .
89 $waiterName
90 );
91 @endphp
92
93
96
97
99
100
101
102 {{ optional($table->floor)->name ?: 'No Floor' }}
103
{{ $table->name }}
104
105
{{ strtoupper($status) }}
106
107
108
109 Total Seats {{ $table->seats }}
110 Persons {{ $table->current_persons }}
111 Available {{ $availableSeats }}
112
113
114 @if($order)
115
116
Order: {{ $order->invoice_no }}
117
Customer: {{ optional($order->contact)->name ?: 'Walk-In' }}
118 @if(!empty(optional($order->contact)->mobile))
119
Mobile: {{ optional($order->contact)->mobile }}
120 @endif
121
Waiter: {{ $waiter_names[$order->res_waiter_id] ?? '-' }}
122
Time: {{ @format_datetime($order->transaction_date) }}
123
Total: @format_currency($order->final_total)
124
125 @else
126
No running order
127 @endif
128
129
130
131
136
137
138
139
140 @if($order)
141
143 Open Order
144
145 @else
146
148 New Order
149
150 @endif
151
152
157
158
159
160
161 @empty
162
163
164 No tables found. Add floors and tables first.
165
166
167 @endforelse
168
169
170
171 @endsection
172
173 @section('css')
174
222 @endsection
223
224 @section('javascript')
225