feat: implement 3-level heavy equipment drilldown and transporter options in unit transfer

This commit is contained in:
Ray1111-aa
2026-11-02 12:00:21 +07:00
parent 8a94e98ed9
commit b8fa1771b9
13 changed files with 2209 additions and 509 deletions
@@ -0,0 +1,29 @@
<?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::table('unit_transfers', function (Blueprint $table) {
$table->string('transporter_type', 30)->default('internal')->after('user_id');
$table->string('transporter_origin_location', 255)->nullable()->after('transporter_vehicle_id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('unit_transfers', function (Blueprint $table) {
$table->dropColumn(['transporter_type', 'transporter_origin_location']);
});
}
};
@@ -0,0 +1,32 @@
<?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::table('vehicles', function (Blueprint $table) {
if (!Schema::hasColumn('vehicles', 'operational_group')) {
$table->string('operational_group', 50)->nullable()->after('unit_type')->index();
}
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('vehicles', function (Blueprint $table) {
if (Schema::hasColumn('vehicles', 'operational_group')) {
$table->dropColumn('operational_group');
}
});
}
};