1
0
forked from poc/pds

Issue solved in filter in connection type

This commit is contained in:
dhanabalan
2025-06-07 16:36:58 +05:30
parent 88802d8a11
commit cac691c82d
5 changed files with 32 additions and 23 deletions

View File

@@ -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();
}

View File

@@ -50,7 +50,7 @@
<table width="100%" style="border-collapse:collapse;">
<tr>
<td style="width:13%; text-align:left; border:none; border-bottom:1px solid #222;">
<img src="{{ public_path('images/cripumps.logo.png') }}" alt="Logo" height="45" style="position: relative; left: 5mm;">
{{-- <img src="{{ public_path('images/cripumps.logo.png') }}" alt="Logo" height="45" style="position: relative; left: 5mm;"> --}}
</td>
<td style="width:74%; border:none; border-bottom:1px solid #222;">
<div class="company-title">C.R.I. Pumps Private Limited</div>
@@ -58,14 +58,15 @@
<div class="company-address">{{ $plant?->address ?? '' }}</div>
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
</td>
@php
{{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
@if ($showIsiLogo)
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
@endif
</td>
</td> --}}
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;"> </td>
</tr>
<tr>
@php
@@ -78,7 +79,7 @@
$phase = $firstRecord['phase'] ?? '-';
}
@endphp
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:230mm;">
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:300mm;">
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
</td>
</tr>

View File

@@ -50,7 +50,7 @@
<table width="100%" style="border-collapse:collapse;">
<tr>
<td style="width:13%; text-align:left; border:none; border-bottom:1px solid #222;">
<img src="{{ public_path('images/cripumps.logo.png') }}" alt="Logo" height="45" style="position: relative; left: 5mm;">
{{-- <img src="{{ public_path('images/cripumps.logo.png') }}" alt="Logo" height="45" style="position: relative; left: 5mm;"> --}}
</td>
<td style="width:74%; border:none; border-bottom:1px solid #222;">
<div class="company-title">C.R.I. Pumps Private Limited</div>
@@ -58,14 +58,15 @@
<div class="company-address">{{ $plant?->address ?? '' }}</div>
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
</td>
@php
{{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
@if ($showIsiLogo)
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
@endif
</td>
</td> --}}
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;"> </td>
</tr>
<tr>
@php
@@ -78,7 +79,7 @@
$phase = $firstRecord['phase'] ?? '-';
}
@endphp
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:230mm;">
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:300mm;">
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
</td>
</tr>

View File

@@ -55,7 +55,7 @@
{{-- <td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
</td> --}}
@php
{{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@@ -65,7 +65,8 @@
</td>
@else
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
@endif
@endif --}}
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
</tr>
<tr>
{{-- @php

View File

@@ -60,7 +60,7 @@
{{-- <td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
</td> --}}
@php
{{-- @php
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
@endphp
@@ -70,7 +70,8 @@
</td>
@else
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
@endif
@endif --}}
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
</tr>
<tr>
{{-- @php
@@ -96,7 +97,7 @@
$phase = $firstRecord['phase'] ?? '-';
}
@endphp
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:230mm;">
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:300mm;">
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
</td>
</tr>