feat: Implement multi-step cost calculator with dynamic form handling and styling enhancements

This commit is contained in:
2025-08-18 13:25:40 +05:45
parent fc272b7635
commit ba055ce495
4 changed files with 335 additions and 290 deletions

View File

@@ -3,6 +3,7 @@
namespace Modules\CostCalculator\Services;
use Modules\CostCalculator\Models\CostCalculator;
use Modules\CourseFinder\Models\Program;
class CostCalculatorService
{
@@ -13,20 +14,12 @@ class CostCalculatorService
$query->where('country_id', $request->country_id);
}
if ($request->filled('programlevel_id')) {
$query->where("programlevel_id", $request->programlevel_id);
if ($request->filled('stay_type_id')) {
$query->where("stay_type_id", $request->stay_type_id);
}
if ($request->filled('program_id')) {
$query->where("program_id", $request->program_id);
}
if ($request->filled('living_status_id')) {
$query->where("living_status_id", $request->living_status_id);
}
if ($request->filled('status')) {
$query->where('status', $request->status);
Program::where('status', 1)-> where('id', $request->program_id)->get();
}
})->latest()->paginate(10)->withQueryString();