Issue solved in filter in connection type
This commit is contained in:
@@ -488,16 +488,19 @@ class TestingPanelReadingResource extends Resource
|
|||||||
->searchable()
|
->searchable()
|
||||||
->options(function (callable $get) {
|
->options(function (callable $get) {
|
||||||
$plantId = $get('Plant');
|
$plantId = $get('Plant');
|
||||||
|
if ($plantId) {
|
||||||
return Item::where('plant_id', $plantId)->whereHas('motorTestingMasters')->pluck('code', 'id')->toArray();
|
return Item::where('plant_id', $plantId)
|
||||||
|
->whereHas('motorTestingMasters')
|
||||||
// $query = Item::query();
|
->pluck('code', 'id')
|
||||||
|
->toArray();
|
||||||
// if ($plantId) {
|
}
|
||||||
// $query->where('plant_id', $plantId);
|
else
|
||||||
// }
|
{
|
||||||
|
return Item::whereHas('motorTestingMasters')
|
||||||
// return $query->pluck('code', 'id')->toArray();
|
->pluck('code', 'id')
|
||||||
|
->toArray();
|
||||||
|
}
|
||||||
|
//return [];
|
||||||
})
|
})
|
||||||
->reactive(),
|
->reactive(),
|
||||||
Select::make('machine_name')
|
Select::make('machine_name')
|
||||||
@@ -587,12 +590,14 @@ class TestingPanelReadingResource extends Resource
|
|||||||
{
|
{
|
||||||
return Configuration::where('plant_id', $plantId)
|
return Configuration::where('plant_id', $plantId)
|
||||||
->where('c_name', 'MOTOR_CONNECTION')
|
->where('c_name', 'MOTOR_CONNECTION')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Configuration::where('c_name', 'MOTOR_CONNECTION')
|
return Configuration::where('c_name', 'MOTOR_CONNECTION')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<table width="100%" style="border-collapse:collapse;">
|
<table width="100%" style="border-collapse:collapse;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:13%; text-align:left; border:none; border-bottom:1px solid #222;">
|
<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>
|
||||||
<td style="width:74%; border:none; border-bottom:1px solid #222;">
|
<td style="width:74%; border:none; border-bottom:1px solid #222;">
|
||||||
<div class="company-title">C.R.I. Pumps Private Limited</div>
|
<div class="company-title">C.R.I. Pumps Private Limited</div>
|
||||||
@@ -58,14 +58,15 @@
|
|||||||
<div class="company-address">{{ $plant?->address ?? '' }}</div>
|
<div class="company-address">{{ $plant?->address ?? '' }}</div>
|
||||||
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
|
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
|
||||||
</td>
|
</td>
|
||||||
@php
|
{{-- @php
|
||||||
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
@endphp
|
@endphp
|
||||||
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
||||||
@if ($showIsiLogo)
|
@if ($showIsiLogo)
|
||||||
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td> --}}
|
||||||
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
$phase = $firstRecord['phase'] ?? '-';
|
$phase = $firstRecord['phase'] ?? '-';
|
||||||
}
|
}
|
||||||
@endphp
|
@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 }}
|
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
<table width="100%" style="border-collapse:collapse;">
|
<table width="100%" style="border-collapse:collapse;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:13%; text-align:left; border:none; border-bottom:1px solid #222;">
|
<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>
|
||||||
<td style="width:74%; border:none; border-bottom:1px solid #222;">
|
<td style="width:74%; border:none; border-bottom:1px solid #222;">
|
||||||
<div class="company-title">C.R.I. Pumps Private Limited</div>
|
<div class="company-title">C.R.I. Pumps Private Limited</div>
|
||||||
@@ -58,14 +58,15 @@
|
|||||||
<div class="company-address">{{ $plant?->address ?? '' }}</div>
|
<div class="company-address">{{ $plant?->address ?? '' }}</div>
|
||||||
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
|
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
|
||||||
</td>
|
</td>
|
||||||
@php
|
{{-- @php
|
||||||
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
@endphp
|
@endphp
|
||||||
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
||||||
@if ($showIsiLogo)
|
@if ($showIsiLogo)
|
||||||
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td> --}}
|
||||||
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@php
|
@php
|
||||||
@@ -78,7 +79,7 @@
|
|||||||
$phase = $firstRecord['phase'] ?? '-';
|
$phase = $firstRecord['phase'] ?? '-';
|
||||||
}
|
}
|
||||||
@endphp
|
@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 }}
|
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
{{-- <td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
{{-- <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;">
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
</td> --}}
|
</td> --}}
|
||||||
@php
|
{{-- @php
|
||||||
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@@ -65,7 +65,8 @@
|
|||||||
</td>
|
</td>
|
||||||
@else
|
@else
|
||||||
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
{{-- @php
|
{{-- @php
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
{{-- <td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
{{-- <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;">
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
</td> --}}
|
</td> --}}
|
||||||
@php
|
{{-- @php
|
||||||
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@@ -70,7 +70,8 @@
|
|||||||
</td>
|
</td>
|
||||||
@else
|
@else
|
||||||
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
|
<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>
|
||||||
<tr>
|
<tr>
|
||||||
{{-- @php
|
{{-- @php
|
||||||
@@ -96,7 +97,7 @@
|
|||||||
$phase = $firstRecord['phase'] ?? '-';
|
$phase = $firstRecord['phase'] ?? '-';
|
||||||
}
|
}
|
||||||
@endphp
|
@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 }}
|
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user