This commit is contained in:
2025-08-05 11:03:07 +03:30
parent ec5d01be85
commit 19638e62c3
4 changed files with 6 additions and 6 deletions

View File

@@ -23,7 +23,7 @@ class HarimOfficeController extends Controller
{ {
$user = auth()->user(); $user = auth()->user();
$query = Harim::query() $query = Harim::query()
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value) ->where('state_id','=',HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value)
->where('edareh_shahri_id', '=', $user->edarate_shahri_id); ->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
$data = DataTableFacade::run( $data = DataTableFacade::run(
$query, $query,
@@ -46,7 +46,7 @@ class HarimOfficeController extends Controller
'action_name' => HarimAction::name($action), 'action_name' => HarimAction::name($action),
]); ]);
$state = HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value; $state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
$harim ->update([ $harim ->update([
'state_id' => $state, 'state_id' => $state,
@@ -69,7 +69,7 @@ class HarimOfficeController extends Controller
'action_name' => HarimAction::name($action), 'action_name' => HarimAction::name($action),
]); ]);
$state = HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value; $state = HarimStates::BARESI_TAVASOT_MOAVEN->value;
$harim ->update([ $harim ->update([
'state_id' => $state, 'state_id' => $state,

View File

@@ -13,7 +13,7 @@ class NoRequest extends FormRequest
public function authorize(): bool public function authorize(): bool
{ {
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id && return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value; $this->harim->state_id == HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value;
} }
/** /**

View File

@@ -13,7 +13,7 @@ class ShowRequest extends FormRequest
public function authorize(): bool public function authorize(): bool
{ {
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id && return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value; $this->harim->state_id == HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value;
} }
/** /**

View File

@@ -13,7 +13,7 @@ class YesRequest extends FormRequest
public function authorize(): bool public function authorize(): bool
{ {
return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id && return $this->harim->edareh_shahri_id == auth()->user()->edarate_shahri_id &&
$this->harim->state_id == HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value; $this->harim->state_id == HarimStates::BARESI_TAVASOT_DAFTAR_HARIM->value;
} }
/** /**