feat: Add CostCalculator module with CRUD functionality and frontend integration

- Created new module for CostCalculator with necessary routes and controllers.
- Implemented views for creating, editing, and displaying costs.
- Added form partials for cost input with validation.
- Integrated living status options in the form.
- Developed frontend logic for cost calculation steps with dynamic UI updates.
- Included necessary assets (JS and SCSS) for styling and functionality.
- Updated constants for living status options.
- Enhanced existing client-side cost calculator page with new features.
This commit is contained in:
2025-08-13 17:58:49 +05:45
parent 03c5955768
commit 165012ea56
38 changed files with 1405 additions and 162 deletions

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cost_calculators', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('country_id')->nullable();
$table->unsignedInteger('programlevel_id')->nullable();
$table->unsignedInteger('program_id')->nullable();
$table->unsignedInteger('living_status_id')->nullable();
$table->json('living_cost')->nullable();
$table->json('accomodation_cost')->nullable();
$table->json('onetime_cost')->nullable();
$table->json('other_services')->nullable();
$table->unsignedInteger('createdby')->nullable();
$table->unsignedInteger('updatedby')->nullable();
$table->boolean('status')->default(1);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cost_calculators');
}
};

View File

@@ -0,0 +1,16 @@
<?php
namespace Modules\CostCalculator\Database\Seeders;
use Illuminate\Database\Seeder;
class CostCalculatorDatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
// $this->call([]);
}
}