diff --git a/Modules/CostCalculator/app/Services/CostCalculatorService.php b/Modules/CostCalculator/app/Services/CostCalculatorService.php
index 1b14b61..159ac7b 100644
--- a/Modules/CostCalculator/app/Services/CostCalculatorService.php
+++ b/Modules/CostCalculator/app/Services/CostCalculatorService.php
@@ -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();
}
diff --git a/app/Http/Controllers/WebsiteController.php b/app/Http/Controllers/WebsiteController.php
index a1321e3..e30e1a4 100644
--- a/app/Http/Controllers/WebsiteController.php
+++ b/app/Http/Controllers/WebsiteController.php
@@ -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'),
],
];
diff --git a/resources/views/client/raffles/pages/cost-calculator.blade.php b/resources/views/client/raffles/pages/cost-calculator.blade.php
index faddf0d..c2463ed 100644
--- a/resources/views/client/raffles/pages/cost-calculator.blade.php
+++ b/resources/views/client/raffles/pages/cost-calculator.blade.php
@@ -147,11 +147,13 @@
@foreach ($countries as $country)
@endforeach
@@ -166,10 +168,12 @@
@foreach ($livingStatusOptions as $key => $status)
@endforeach
@@ -183,18 +187,24 @@
-
-
+
-
+
+
@@ -209,12 +219,14 @@
@foreach ($programLevelOptions as $level)
-
@endforeach
diff --git a/resources/views/client/raffles/pages/cost-result.blade.php b/resources/views/client/raffles/pages/cost-result.blade.php
index 3a2a52a..bfcd944 100644
--- a/resources/views/client/raffles/pages/cost-result.blade.php
+++ b/resources/views/client/raffles/pages/cost-result.blade.php
@@ -53,128 +53,133 @@
- @foreach ($breakdowns as $type => $breakdown)
-
- {{--
--}}
-
-
+ @php
+ $breakdown = $breakdowns[$type];
+ @endphp
+
+
+ {{--
--}}
+
+
+
-
-
Estimated Cost Calculation For
- {{ $cost->country?->title ?? 'N/A' }} ({{ strtoupper(str_replace('_', ' ', $type)) }})
-
+
+
+
Estimated Cost Calculation For
+ {{ $cost->country?->title ?? 'N/A' }} ({{ strtoupper(str_replace('_', ' ', $type)) }})
+
+
+
+
+
+
+
+
Tution Fee
+
+
+
+
+ |
+ Yearly |
+
+
+
+
+ {{ $fee['title'] }} |
+
+ {{ $fee['fee'] }}
+ |
+
+
+
+
+
+
+
+
Recurring Costs
+
+
+
+
+ |
+ Monthly |
+ Yearly |
+
+
+
+
+ Living Cost |
+ {{ $breakdown['living']['monthly'] }} |
+ {{ $breakdown['living']['yearly'] }} |
+
+
+ Accommodation Cost |
+ {{ $breakdown['accomodation']['monthly'] }} |
+ {{ $breakdown['accomodation']['yearly'] }} |
+
+
+ Total Recurring |
+
+
+ {{ $breakdown['living']['monthly'] + $breakdown['accomodation']['monthly'] }}
+
+ |
+
+
+ {{ $breakdown['living']['yearly'] + $breakdown['accomodation']['yearly'] }}
+
+ |
+
+
+
+
+
+
+
+
One-time Costs
+
+
+
+
+ Visa |
+ {{ $breakdown['onetime']['visa'] }} |
+
+
+ Biometrics |
+ {{ $breakdown['onetime']['biometrics'] }} |
+
+
+ SEVIS |
+ {{ $breakdown['onetime']['sevis'] }} |
+
+
+ Application |
+ {{ $breakdown['onetime']['application'] }} |
+
+
+ Total One-time |
+
+
+ {{ $breakdown['onetime']['total'] }}
+
+ |
+
+
+
-
-
-
-
-
Tution Fee
-
-
-
-
- |
- Yearly |
-
-
-
-
- {{ $fee['title'] }} |
-
- {{ $fee['fee'] }}
- |
-
-
-
-
-
-
-
-
Recurring Costs
-
-
-
-
- |
- Monthly |
- Yearly |
-
-
-
-
- Living Cost |
- {{ $breakdown['living']['monthly'] }} |
- {{ $breakdown['living']['yearly'] }} |
-
-
- Accommodation Cost |
- {{ $breakdown['accomodation']['monthly'] }} |
- {{ $breakdown['accomodation']['yearly'] }} |
-
-
- Total Recurring |
-
-
- {{ $breakdown['living']['monthly'] + $breakdown['accomodation']['monthly'] }}
-
- |
-
-
- {{ $breakdown['living']['yearly'] + $breakdown['accomodation']['yearly'] }}
-
- |
-
-
-
-
-
-
-
-
One-time Costs
-
-
-
-
- Visa |
- {{ $breakdown['onetime']['visa'] }} |
-
-
- Biometrics |
- {{ $breakdown['onetime']['biometrics'] }} |
-
-
- SEVIS |
- {{ $breakdown['onetime']['sevis'] }} |
-
-
- Application |
- {{ $breakdown['onetime']['application'] }} |
-
-
- Total One-time |
-
-
- {{ $breakdown['onetime']['total'] }}
-
- |
-
-
-
-
-
+ @if ($serviceStatus === 'yes')
Service Costs
@@ -204,32 +209,31 @@
+ @endif
-
-
-
-
-
-
- Overall Estimated Cost
-
- (Excluding Recurring Costs)
-
- |
-
- {{ $breakdown['service']['total'] + $breakdown['onetime']['total'] + $fee['fee'] }}
- |
-
-
-
-
-
-
+
+
+
+
+
+
+ Overall Estimated Cost
+
+ (Excluding Recurring Costs)
+
+ |
+
+ {{ $breakdown['service']['total'] + $breakdown['onetime']['total'] + $fee['fee'] }}
+ |
+
+
+
+
+
- {{--
--}}
- @endforeach
+