Merge pull request 'Added logic in panel check list livewire page' (#768) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 20s

Reviewed-on: #768
This commit was merged in pull request #768.
This commit is contained in:
2026-06-18 10:30:29 +00:00

View File

@@ -36,7 +36,7 @@
>
</td> --}}
<td class="border p-2">
{{-- <td class="border p-2">
@php
$status = $this->getCharacteristicStatus($record['id']);
@endphp
@@ -58,7 +58,57 @@
"
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>
@endforeach
</tbody>
@@ -81,7 +131,7 @@
type="button"
wire:click="saveChecklist"
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"
>
Save