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);
|
$query->where('country_id', $request->country_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->filled('stay_type_id')) {
|
// if ($request->filled('stay_type_id')) {
|
||||||
$query->where("stay_type_id", $request->stay_type_id);
|
// $query->where("stay_type_id", $request->stay_type_id);
|
||||||
}
|
// }
|
||||||
|
|
||||||
})->latest()->paginate(10)->withQueryString();
|
})->latest()->paginate(10)->withQueryString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@ use Modules\CourseFinder\Models\Coop;
|
|||||||
use Modules\CourseFinder\Models\Program;
|
use Modules\CourseFinder\Models\Program;
|
||||||
use Modules\CourseFinder\Models\ProgramLevel;
|
use Modules\CourseFinder\Models\ProgramLevel;
|
||||||
use Modules\CourseFinder\Services\ProgramService;
|
use Modules\CourseFinder\Services\ProgramService;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
|
||||||
class WebsiteController extends Controller
|
class WebsiteController extends Controller
|
||||||
{
|
{
|
||||||
@@ -328,14 +329,16 @@ class WebsiteController extends Controller
|
|||||||
};
|
};
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
'serviceStatus' => $request->services,
|
||||||
'costs' => $costs,
|
'costs' => $costs,
|
||||||
'fee' => $program,
|
'fee' => $program,
|
||||||
'title' => 'View Cost Calculation',
|
'title' => 'View Cost Calculation',
|
||||||
'cost' => $cost,
|
'cost' => $cost,
|
||||||
|
'type' => Str::slug($request->status_type_id),
|
||||||
'breakdowns' => [
|
'breakdowns' => [
|
||||||
'alone' => $getBreakdown('Alone'),
|
'alone' => $getBreakdown('Alone'),
|
||||||
'with_spouse' => $getBreakdown('With Spouse'),
|
'with-spouse' => $getBreakdown('With Spouse'),
|
||||||
'with_spouse_and_child' => $getBreakdown('With Spouse and Child'),
|
'with-spouse-and-child' => $getBreakdown('With Spouse and Child'),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -147,11 +147,13 @@
|
|||||||
@foreach ($countries as $country)
|
@foreach ($countries as $country)
|
||||||
<div class="col col-sm-4">
|
<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="{{ $country->id }}"> <input type="radio" name="country_id" value="{{ $country->id }}"
|
<label
|
||||||
id="{{ $country->id }}"> {{ $country->title }} </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>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -166,10 +168,12 @@
|
|||||||
@foreach ($livingStatusOptions as $key => $status)
|
@foreach ($livingStatusOptions as $key => $status)
|
||||||
<div class="col col-sm-6">
|
<div class="col col-sm-6">
|
||||||
<div class="">
|
<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"
|
<label
|
||||||
for="{{ $status }}"> <input type="radio" name="status_type_id" value="{{ $key }}"
|
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||||
id="{{ $status }}"> {{ $status }}</label>
|
for="{{ $status }}"> <input type="radio"
|
||||||
|
name="status_type_id" value="{{ $status }}"
|
||||||
|
id="{{ $status }}"> {{ $status }}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -183,18 +187,24 @@
|
|||||||
<div class="row flex flex-wrap py-20">
|
<div class="row flex flex-wrap py-20">
|
||||||
<div class="col col-sm-4">
|
<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="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>
|
</div>
|
||||||
<div class="col col-sm-4">
|
<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>
|
</div>
|
||||||
@@ -209,12 +219,14 @@
|
|||||||
<div class="row flex flex-wrap py-20">
|
<div class="row flex flex-wrap py-20">
|
||||||
@foreach ($programLevelOptions as $level)
|
@foreach ($programLevelOptions as $level)
|
||||||
<div class="col col-sm-4">
|
<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"
|
<label
|
||||||
for="{{ $level }}"> <input type="radio" name="" id="{{ $level }}"
|
class="text-20 text-ter p-0 m-0 flex items-center gap-10 px-10 py-12 bg-white rounded-30 tabs"
|
||||||
value=""> {{ $level }}</label>
|
for="{{ $level }}"> <input type="radio" name=""
|
||||||
|
id="{{ $level }}" value="">
|
||||||
|
{{ $level }}</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
@@ -53,128 +53,133 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
@foreach ($breakdowns as $type => $breakdown)
|
|
||||||
<div class="a4-page">
|
|
||||||
{{-- <div class="card shadow-lg border-0 rounded-4"> --}}
|
|
||||||
|
|
||||||
<div class="bg-warning-subtle position-relative">
|
@php
|
||||||
<div class="card-body text-center py-10">
|
$breakdown = $breakdowns[$type];
|
||||||
<a class="navbar-brand p-0" href="{{ url('/') }}" rel="home">
|
@endphp
|
||||||
<span class="navbar-brand-inner">
|
|
||||||
<img src="{{ asset(setting('logo')) }}" alt="raffle logo" width="150px"
|
<div class="a4-page">
|
||||||
height="150px" />
|
{{-- <div class="card shadow-lg border-0 rounded-4"> --}}
|
||||||
</span>
|
|
||||||
</a>
|
<div class="bg-warning-subtle position-relative">
|
||||||
</div>
|
<div class="card-body text-center py-10">
|
||||||
|
<a class="navbar-brand p-0" href="{{ url('/') }}" rel="home">
|
||||||
|
<span class="navbar-brand-inner">
|
||||||
|
<img src="{{ asset(setting('logo')) }}" alt="raffle logo" width="150px"
|
||||||
|
height="150px" />
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center">
|
</div>
|
||||||
<p class="mb-0 fs-5 test-muted"><i>Estimated Cost Calculation For
|
<div class="text-center">
|
||||||
{{ $cost->country?->title ?? 'N/A' }}</i> (<strong
|
<p class="mb-0 fs-5 test-muted"><i>Estimated Cost Calculation For
|
||||||
class="text-capitalize">{{ strtoupper(str_replace('_', ' ', $type)) }}</strong>)
|
{{ $cost->country?->title ?? 'N/A' }}</i> (<strong
|
||||||
</p>
|
class="text-capitalize">{{ strtoupper(str_replace('_', ' ', $type)) }}</strong>)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Body -->
|
||||||
|
<div class="card-body p-4">
|
||||||
|
|
||||||
|
<!-- Tution Fee -->
|
||||||
|
<h6 class="fw-bold mt-4 text-primary">Tution Fee</h6>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table
|
||||||
|
class="table table-sm table-bordered table-striped shadow-sm rounded align-middle text-center small">
|
||||||
|
<thead>
|
||||||
|
<tr class="fw-bold text-uppercase text-end small">
|
||||||
|
<th></th>
|
||||||
|
<th>Yearly</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">{{ $fee['title'] }}</td>
|
||||||
|
<td class="text-end">
|
||||||
|
{{ $fee['fee'] }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- Tution Fee -->
|
||||||
|
|
||||||
|
<!-- Living & Accommodation -->
|
||||||
|
<h6 class="fw-bold mt-30 text-primary">Recurring Costs</h6>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table
|
||||||
|
class="table table-sm table-bordered table-striped shadow-sm rounded align-middle text-center small">
|
||||||
|
<thead>
|
||||||
|
<tr class="fw-bold text-uppercase text-end small">
|
||||||
|
<th></th>
|
||||||
|
<th>Monthly</th>
|
||||||
|
<th>Yearly</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">Living Cost</td>
|
||||||
|
<td class="text-end">{{ $breakdown['living']['monthly'] }}</td>
|
||||||
|
<td class="text-end">{{ $breakdown['living']['yearly'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">Accommodation Cost</td>
|
||||||
|
<td class="text-end">{{ $breakdown['accomodation']['monthly'] }}</td>
|
||||||
|
<td class="text-end">{{ $breakdown['accomodation']['yearly'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="table-success">
|
||||||
|
<td class="fw-bold text-uppercase">Total Recurring</td>
|
||||||
|
<td class="fw-bold text-end">
|
||||||
|
<span class="badge bg-success fs-6 px-2 py-1">
|
||||||
|
{{ $breakdown['living']['monthly'] + $breakdown['accomodation']['monthly'] }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="fw-bold text-end">
|
||||||
|
<span class="badge bg-success fs-6 px-2 py-1">
|
||||||
|
{{ $breakdown['living']['yearly'] + $breakdown['accomodation']['yearly'] }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- Living & Accommodation -->
|
||||||
|
|
||||||
|
<!-- One-time Costs -->
|
||||||
|
<h6 class="fw-bold mt-30 text-primary">One-time Costs</h6>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table
|
||||||
|
class="table table-sm table-hover table-striped border rounded shadow-sm align-middle small">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">Visa</td>
|
||||||
|
<td class="text-end">{{ $breakdown['onetime']['visa'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">Biometrics</td>
|
||||||
|
<td class="text-end">{{ $breakdown['onetime']['biometrics'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">SEVIS</td>
|
||||||
|
<td class="text-end">{{ $breakdown['onetime']['sevis'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="fw-semibold text-muted">Application</td>
|
||||||
|
<td class="text-end">{{ $breakdown['onetime']['application'] }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="table-success">
|
||||||
|
<td class="fw-bold text-uppercase">Total One-time</td>
|
||||||
|
<td class="fw-bold text-end">
|
||||||
|
<span class="badge bg-success fs-6 px-2 py-1">
|
||||||
|
{{ $breakdown['onetime']['total'] }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Body -->
|
@if ($serviceStatus === 'yes')
|
||||||
<div class="card-body p-4">
|
|
||||||
|
|
||||||
<!-- Tution Fee -->
|
|
||||||
<h6 class="fw-bold mt-4 text-primary">Tution Fee</h6>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table
|
|
||||||
class="table table-sm table-bordered table-striped shadow-sm rounded align-middle text-center small">
|
|
||||||
<thead>
|
|
||||||
<tr class="fw-bold text-uppercase text-end small">
|
|
||||||
<th></th>
|
|
||||||
<th>Yearly</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">{{ $fee['title'] }}</td>
|
|
||||||
<td class="text-end">
|
|
||||||
{{ $fee['fee'] }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- Tution Fee -->
|
|
||||||
|
|
||||||
<!-- Living & Accommodation -->
|
|
||||||
<h6 class="fw-bold mt-30 text-primary">Recurring Costs</h6>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table
|
|
||||||
class="table table-sm table-bordered table-striped shadow-sm rounded align-middle text-center small">
|
|
||||||
<thead>
|
|
||||||
<tr class="fw-bold text-uppercase text-end small">
|
|
||||||
<th></th>
|
|
||||||
<th>Monthly</th>
|
|
||||||
<th>Yearly</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">Living Cost</td>
|
|
||||||
<td class="text-end">{{ $breakdown['living']['monthly'] }}</td>
|
|
||||||
<td class="text-end">{{ $breakdown['living']['yearly'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">Accommodation Cost</td>
|
|
||||||
<td class="text-end">{{ $breakdown['accomodation']['monthly'] }}</td>
|
|
||||||
<td class="text-end">{{ $breakdown['accomodation']['yearly'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-success">
|
|
||||||
<td class="fw-bold text-uppercase">Total Recurring</td>
|
|
||||||
<td class="fw-bold text-end">
|
|
||||||
<span class="badge bg-success fs-6 px-2 py-1">
|
|
||||||
{{ $breakdown['living']['monthly'] + $breakdown['accomodation']['monthly'] }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class="fw-bold text-end">
|
|
||||||
<span class="badge bg-success fs-6 px-2 py-1">
|
|
||||||
{{ $breakdown['living']['yearly'] + $breakdown['accomodation']['yearly'] }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- Living & Accommodation -->
|
|
||||||
|
|
||||||
<!-- One-time Costs -->
|
|
||||||
<h6 class="fw-bold mt-30 text-primary">One-time Costs</h6>
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table
|
|
||||||
class="table table-sm table-hover table-striped border rounded shadow-sm align-middle small">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">Visa</td>
|
|
||||||
<td class="text-end">{{ $breakdown['onetime']['visa'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">Biometrics</td>
|
|
||||||
<td class="text-end">{{ $breakdown['onetime']['biometrics'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">SEVIS</td>
|
|
||||||
<td class="text-end">{{ $breakdown['onetime']['sevis'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="fw-semibold text-muted">Application</td>
|
|
||||||
<td class="text-end">{{ $breakdown['onetime']['application'] }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr class="table-success">
|
|
||||||
<td class="fw-bold text-uppercase">Total One-time</td>
|
|
||||||
<td class="fw-bold text-end">
|
|
||||||
<span class="badge bg-success fs-6 px-2 py-1">
|
|
||||||
{{ $breakdown['onetime']['total'] }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Service Costs -->
|
<!-- Service Costs -->
|
||||||
<h6 class="fw-bold mt-30 text-primary">Service Costs</h6>
|
<h6 class="fw-bold mt-30 text-primary">Service Costs</h6>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@@ -204,32 +209,31 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<!-- Overall -->
|
<!-- Overall -->
|
||||||
<div class="table-responsive mt-4">
|
<div class="table-responsive mt-4">
|
||||||
<table
|
<table
|
||||||
class="table table-sm table-bordered shadow-sm rounded-4 text-center align-middle small">
|
class="table table-sm table-bordered shadow-sm rounded-4 text-center align-middle small">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="table-warning align-middle">
|
<tr class="table-warning align-middle">
|
||||||
<td class="fw-bold text-uppercase">
|
<td class="fw-bold text-uppercase">
|
||||||
<strong>Overall Estimated Cost</strong>
|
<strong>Overall Estimated Cost</strong>
|
||||||
<div class="small fst-italic text-muted">
|
<div class="small fst-italic text-muted">
|
||||||
(Excluding Recurring Costs)
|
(Excluding Recurring Costs)
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-end">
|
<td class="text-end">
|
||||||
<strong>{{ $breakdown['service']['total'] + $breakdown['onetime']['total'] + $fee['fee'] }}</strong>
|
<strong>{{ $breakdown['service']['total'] + $breakdown['onetime']['total'] + $fee['fee'] }}</strong>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{-- </div> --}}
|
</div>
|
||||||
@endforeach
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user