Added logic in panel check list livewire page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 3m29s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Larastan / larastan (pull_request) Failing after 33s
Laravel Pint / pint (pull_request) Successful in 3m29s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user