diff --git a/app/Filament/Resources/TestingPanelReadingResource.php b/app/Filament/Resources/TestingPanelReadingResource.php index 77998f767..ff6be0e36 100644 --- a/app/Filament/Resources/TestingPanelReadingResource.php +++ b/app/Filament/Resources/TestingPanelReadingResource.php @@ -488,16 +488,19 @@ class TestingPanelReadingResource extends Resource ->searchable() ->options(function (callable $get) { $plantId = $get('Plant'); - - return Item::where('plant_id', $plantId)->whereHas('motorTestingMasters')->pluck('code', 'id')->toArray(); - - // $query = Item::query(); - - // if ($plantId) { - // $query->where('plant_id', $plantId); - // } - - // return $query->pluck('code', 'id')->toArray(); + if ($plantId) { + return Item::where('plant_id', $plantId) + ->whereHas('motorTestingMasters') + ->pluck('code', 'id') + ->toArray(); + } + else + { + return Item::whereHas('motorTestingMasters') + ->pluck('code', 'id') + ->toArray(); + } + //return []; }) ->reactive(), Select::make('machine_name') @@ -587,12 +590,14 @@ class TestingPanelReadingResource extends Resource { return Configuration::where('plant_id', $plantId) ->where('c_name', 'MOTOR_CONNECTION') + ->orderBy('created_at') ->pluck('c_value', 'c_value') ->toArray(); } else { return Configuration::where('c_name', 'MOTOR_CONNECTION') + ->orderBy('created_at') ->pluck('c_value', 'c_value') ->toArray(); } diff --git a/resources/views/exports/export-isi-pdf.blade.php b/resources/views/exports/export-isi-pdf.blade.php index 233f228b4..02dc67785 100644 --- a/resources/views/exports/export-isi-pdf.blade.php +++ b/resources/views/exports/export-isi-pdf.blade.php @@ -50,7 +50,7 @@
|
- |
C.R.I. Pumps Private Limited
@@ -58,14 +58,15 @@
{{ $plant?->address ?? '' }}
MOTOR FREE RUN TEST REGISTER
|
- @php
+ {{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@if ($showIsiLogo)
|
+ --}}
+ |||
| + | MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }} | ||||
|
- |
C.R.I. Pumps Private Limited
@@ -58,14 +58,15 @@
{{ $plant?->address ?? '' }}
MOTOR FREE RUN TEST REGISTER
|
- @php
+ {{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@if ($showIsiLogo)
|
+ --}}
+ |||
| + | MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }} |
| --}}
- @php
+ {{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@@ -65,7 +65,8 @@
@else
- @endif + @endif --}} + | ||
|
| --}}
- @php
+ {{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@@ -70,7 +70,8 @@
@else
- @endif + @endif --}} + | ||||
| + | MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }} | ||||