Added logic in panel check list livewire page #768
@@ -36,7 +36,7 @@
|
|||||||
>
|
>
|
||||||
</td> --}}
|
</td> --}}
|
||||||
|
|
||||||
<td class="border p-2">
|
{{-- <td class="border p-2">
|
||||||
@php
|
@php
|
||||||
$status = $this->getCharacteristicStatus($record['id']);
|
$status = $this->getCharacteristicStatus($record['id']);
|
||||||
@endphp
|
@endphp
|
||||||
@@ -58,7 +58,57 @@
|
|||||||
"
|
"
|
||||||
placeholder="Enter value"
|
placeholder="Enter value"
|
||||||
>
|
>
|
||||||
</td>
|
</td> --}}
|
||||||
|
|
||||||
|
<td class="border p-2">
|
||||||
|
@php
|
||||||
|
$status = $this->getCharacteristicStatus($record['id']);
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
@if(($record['inspection_type'] ?? null) === 'Visual')
|
||||||
|
|
||||||
|
<div class="flex gap-4">
|
||||||
|
<label class="flex items-center gap-1">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
wire:model.live="checklist.{{ $record['id'] }}"
|
||||||
|
value="Ok"
|
||||||
|
>
|
||||||
|
Ok
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="flex items-center gap-1">
|
||||||
|
<input
|
||||||
|
type="radio"
|
||||||
|
wire:model.live="checklist.{{ $record['id'] }}"
|
||||||
|
value="NotOk"
|
||||||
|
>
|
||||||
|
Not Ok
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@else
|
||||||
|
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
wire:model.live="checklist.{{ $record['id'] }}"
|
||||||
|
class="w-full rounded px-2 py-1 border-2 transition-all duration-200"
|
||||||
|
style="
|
||||||
|
@if($status === 'Ok')
|
||||||
|
border-color: #22c55e;
|
||||||
|
box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
|
||||||
|
@elseif($status === 'Not Ok')
|
||||||
|
border-color: #ef4444;
|
||||||
|
box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
|
||||||
|
@else
|
||||||
|
border-color: #d1d5db;
|
||||||
|
@endif
|
||||||
|
"
|
||||||
|
placeholder="Enter value"
|
||||||
|
>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -81,7 +131,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
wire:click="saveChecklist"
|
wire:click="saveChecklist"
|
||||||
style="background-color:#16a34a; color:white;"
|
style="background-color:#16a34a; color:white;"
|
||||||
@disabled(!$this->canSaveChecklist())
|
{{-- @disabled(!$this->canSaveChecklist()) --}}
|
||||||
class="px-6 py-2 rounded-lg shadow-md disabled:opacity-50 disabled:cursor-not-allowed"
|
class="px-6 py-2 rounded-lg shadow-md disabled:opacity-50 disabled:cursor-not-allowed"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
|
|||||||
Reference in New Issue
Block a user