maintained filteration in stay type in cost calculator
This commit is contained in:
@@ -14,10 +14,9 @@ class CostCalculatorService
|
||||
$query->where('country_id', $request->country_id);
|
||||
}
|
||||
|
||||
if ($request->filled('stay_type_id')) {
|
||||
$query->where("stay_type_id", $request->stay_type_id);
|
||||
}
|
||||
|
||||
// if ($request->filled('stay_type_id')) {
|
||||
// $query->where("stay_type_id", $request->stay_type_id);
|
||||
// }
|
||||
})->latest()->paginate(10)->withQueryString();
|
||||
}
|
||||
|
||||
|
@@ -18,6 +18,7 @@ use Modules\CourseFinder\Models\Coop;
|
||||
use Modules\CourseFinder\Models\Program;
|
||||
use Modules\CourseFinder\Models\ProgramLevel;
|
||||
use Modules\CourseFinder\Services\ProgramService;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class WebsiteController extends Controller
|
||||
{
|
||||
@@ -328,14 +329,16 @@ class WebsiteController extends Controller
|
||||
};
|
||||
|
||||
$data = [
|
||||
'serviceStatus' => $request->services,
|
||||
'costs' => $costs,
|
||||
'fee' => $program,
|
||||
'title' => 'View Cost Calculation',
|
||||
'cost' => $cost,
|
||||
'type' => Str::slug($request->status_type_id),
|
||||
'breakdowns' => [
|
||||
'alone' => $getBreakdown('Alone'),
|
||||
'with_spouse' => $getBreakdown('With Spouse'),
|
||||
'with_spouse_and_child' => $getBreakdown('With Spouse and Child'),
|
||||
'with-spouse' => $getBreakdown('With Spouse'),
|
||||
'with-spouse-and-child' => $getBreakdown('With Spouse and Child'),
|
||||
],
|
||||
];
|
||||
|
||||
|
@@ -149,9 +149,11 @@
|
||||
<div>
|
||||
|
||||
|
||||
<label class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $country->id }}"> <input type="radio" name="country_id" value="{{ $country->id }}"
|
||||
id="{{ $country->id }}"> {{ $country->title }} </label>
|
||||
<label
|
||||
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $country->id }}"> <input type="radio" name="country_id"
|
||||
value="{{ $country->id }}" id="{{ $country->id }}">
|
||||
{{ $country->title }} </label>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -167,8 +169,10 @@
|
||||
<div class="col col-sm-6">
|
||||
<div class="">
|
||||
|
||||
<label class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $status }}"> <input type="radio" name="status_type_id" value="{{ $key }}"
|
||||
<label
|
||||
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $status }}"> <input type="radio"
|
||||
name="status_type_id" value="{{ $status }}"
|
||||
id="{{ $status }}"> {{ $status }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,16 +189,22 @@
|
||||
<div>
|
||||
|
||||
|
||||
<label class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs" for="serviceYes"> <input name="services" type="radio" id="serviceYes"> Yes</label>
|
||||
<label
|
||||
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="yes"> <input name="services" type="radio" id="yes"
|
||||
value="yes"> Yes</label>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col col-sm-4">
|
||||
<div >
|
||||
<div>
|
||||
|
||||
|
||||
<label class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs" for="serviceNo"> <input name="services" type="radio" id="serviceNo">No</label>
|
||||
<label
|
||||
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="no"> <input name="services" type="radio" id="no"
|
||||
value="no">No</label>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -209,12 +219,14 @@
|
||||
<div class="row flex flex-wrap py-20">
|
||||
@foreach ($programLevelOptions as $level)
|
||||
<div class="col col-sm-4">
|
||||
<div >
|
||||
<div>
|
||||
|
||||
|
||||
<label class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $level }}"> <input type="radio" name="" id="{{ $level }}"
|
||||
value=""> {{ $level }}</label>
|
||||
<label
|
||||
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||
for="{{ $level }}"> <input type="radio" name=""
|
||||
id="{{ $level }}" value="">
|
||||
{{ $level }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
@@ -53,7 +53,11 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-12">
|
||||
@foreach ($breakdowns as $type => $breakdown)
|
||||
|
||||
@php
|
||||
$breakdown = $breakdowns[$type];
|
||||
@endphp
|
||||
|
||||
<div class="a4-page">
|
||||
{{-- <div class="card shadow-lg border-0 rounded-4"> --}}
|
||||
|
||||
@@ -175,6 +179,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if ($serviceStatus === 'yes')
|
||||
<!-- Service Costs -->
|
||||
<h6 class="fw-bold mt-30 text-primary">Service Costs</h6>
|
||||
<div class="table-responsive">
|
||||
@@ -204,6 +209,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Overall -->
|
||||
<div class="table-responsive mt-4">
|
||||
@@ -228,8 +234,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{-- </div> --}}
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user