Merge branch 'feature/DriverAccident' into 'develop'

create new migration and bug fix another code for safety and privacy

See merge request witelgroup/rms_v2!175
This commit is contained in:
2025-08-30 10:56:41 +00:00
9 changed files with 40 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ class AccessRoadReport implements FromView, WithEvents, ShouldAutoSize, WithDraw
}
}
return view('v3.Reports.SafetyAndPrivacy.Country.AccessRoadReport', [
return view('v3.Reports.SafetyAndPrivacy.Country.AccessRoadActivityReport', [
'data' => $data,
]);
}

View File

@@ -44,7 +44,7 @@ class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDr
}
}
return view('v3.Reports.SafetyAndPrivacy.Country.ConstructionReport', [
return view('v3.Reports.SafetyAndPrivacy.Country.ConstructionActivityReport', [
'data' => $data,
]);
}

View File

@@ -44,7 +44,7 @@ class UtilityPassingReport implements FromView, WithEvents, ShouldAutoSize, With
}
}
return view('v3.Reports.SafetyAndPrivacy.Country.UtilityPassingReport', [
return view('v3.Reports.SafetyAndPrivacy.Country.UtilityPassingActivityReport', [
'data' => $data,
]);
}

View File

@@ -43,7 +43,7 @@ class AccessRoadReport implements FromView, WithEvents, ShouldAutoSize, WithDraw
}
}
return view('v3.Reports.SafetyAndPrivacy.Province.AccessRoadReport', [
return view('v3.Reports.SafetyAndPrivacy.Province.AccessRoadActivityReport', [
'data' => $data,
]);
}

View File

@@ -43,7 +43,7 @@ class ConstructionReport implements FromView, WithEvents, ShouldAutoSize, WithDr
}
}
return view('v3.Reports.SafetyAndPrivacy.Province.ConstructionReport', [
return view('v3.Reports.SafetyAndPrivacy.Province.ConstructionActivityReport', [
'data' => $data,
]);
}

View File

@@ -43,7 +43,7 @@ class UtilityPassingReport implements FromView, WithEvents, ShouldAutoSize, With
}
}
return view('v3.Reports.SafetyAndPrivacy.Province.UtilityPassingReport', [
return view('v3.Reports.SafetyAndPrivacy.Province.UtilityPassingActivityReport', [
'data' => $data,
]);
}

View File

@@ -64,7 +64,10 @@ class HomeContentController extends Controller
public function getAllCitiesByProvince($id)
{
$cities = \App\Models\City::where('province_id', $id)->where('type_id', 1)->get();
$cities = \App\Models\City::query()
->where('province_id', $id)
->where('type_id', 1)
->get(['id', 'name_fa', 'province_id','center_lat','center_lng']);
// $cities = \App\Models\City::where('province_id', $id)->get();
return response()->json([

View File

@@ -246,7 +246,6 @@ class AccidentReceiptController extends Controller
public function confirmPaymentInfo(ConfirmPaymentInfoRequest $request, Accident $accident): JsonResponse
{
DB::transaction(function () use ($request, $accident) {
$accident->update([
'deposit_insurance_image' => $request->has('deposit_insurance_image') ? FileFacade::save($request->deposit_insurance_image, "receipts_files/{$accident->id}/deposit_insurance") : null,
'deposit_insurance_amount' => $request->deposit_insurance_amount ?? 0,

View File

@@ -0,0 +1,30 @@
<?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('accidents', function (Blueprint $table) {
$table->unsignedBigInteger('driver_share_amount')->nullable();
$table->unsignedBigInteger('driver_rate')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('accidents', function (Blueprint $table) {
$table->dropColumn('driver_share_amount', 'driver_rate');
});
}
};