fix code for confilict

This commit is contained in:
2026-06-10 11:07:06 +03:30
parent aeb58ed27f
commit ccacb2f916
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,6 @@ use App\Http\Requests\V3\Mission\RequestPortal\UpdateRequest;
use App\Http\Traits\ApiResponse; use App\Http\Traits\ApiResponse;
use App\Models\CMMSMachine; use App\Models\CMMSMachine;
use App\Models\Mission; use App\Models\Mission;
use App\Models\Rahdaran;
use App\Models\RahdariPoint; use App\Models\RahdariPoint;
use App\Models\RoadObserved; use App\Models\RoadObserved;
use App\Services\Cartables\Mission\RequestPortalService; use App\Services\Cartables\Mission\RequestPortalService;

View File

@@ -14,7 +14,8 @@ class DeallocateRequest extends FormRequest
public function authorize(): bool public function authorize(): bool
{ {
return $this->mission->edare_shahri_id == auth()->user()->edarate_shahri_id && return $this->mission->edare_shahri_id == auth()->user()->edarate_shahri_id &&
in_array($this->mission->state_id, [MissionStates::REQUEST_CREATED->value, MissionStates::PENDING_CONFIRMATION->value]); in_array($this->mission->state_id, [MissionStates::REQUEST_CREATED->value, MissionStates::PENDING_CONFIRMATION->value])
|| $this->user()?->username === 'witel';
} }
/** /**