separate operator from supervisor in road item

This commit is contained in:
2025-06-16 10:49:04 +03:30
committed by joddyabott
parent dc887a5215
commit c9cc74ec48
12 changed files with 384 additions and 154 deletions

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Requests\V3\RoadItemsProject;
namespace App\Http\Requests\V3\RoadItem;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Validator;

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\V3\RoadItem\Supervisor;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class ConfirmRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('gate-supervise-road-item', $this->roadItemsProject);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'description' => 'string',
];
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Http\Requests\V3\RoadItem\Supervisor;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class RejectRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('gate-supervise-road-item', $this->roadItemsProject);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array|string>
*/
public function rules(): array
{
return [
'description' => 'string',
];
}
}

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Requests\V3\RoadItemsProject;
namespace App\Http\Requests\V3\RoadItem;
use App\Models\InfoItem;
use App\Models\User;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Http\Requests\V3\RoadItemsProject;
namespace App\Http\Requests\V3\RoadItem;
use App\Models\InfoItem;
use App\Models\User;