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:
0
Modules/CostCalculator/database/migrations/.gitkeep
Normal file
0
Modules/CostCalculator/database/migrations/.gitkeep
Normal 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');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user