debug code for seecend time
This commit is contained in:
@@ -22,8 +22,7 @@ class GeneralManagerController extends Controller
|
||||
$user = auth()->user();
|
||||
$query = Harim::query()
|
||||
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value)
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
||||
->with('histories:expert_description');
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
@@ -77,7 +76,7 @@ class GeneralManagerController extends Controller
|
||||
}
|
||||
public function show(Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim);
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@ class HarimOfficeController extends Controller
|
||||
$user = auth()->user();
|
||||
$query = Harim::query()
|
||||
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Daftar_Harim->value)
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
||||
->with('expert_description');
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
$request,
|
||||
@@ -81,6 +80,6 @@ class HarimOfficeController extends Controller
|
||||
}
|
||||
public function show(Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim);
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,7 @@ class TechnicalDeputyController extends Controller
|
||||
$user = auth()->user();
|
||||
$query = Harim::query()
|
||||
->where('state_id', '=', HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value)
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
||||
->with('histories:expert_description');
|
||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||
|
||||
$data = DataTableFacade::run(
|
||||
$query,
|
||||
@@ -62,7 +61,7 @@ class TechnicalDeputyController extends Controller
|
||||
$action = HarimAction::REJECT->value;
|
||||
|
||||
$harim->histories()->create([
|
||||
'user_id' => auth()->user()->id,
|
||||
'expert_id' => auth()->user()->id,
|
||||
'previous_state_id' => $harim->state_id,
|
||||
'previous_state_name' => $harim->state_name,
|
||||
'expert_description' => $request->expert_description,
|
||||
@@ -79,6 +78,6 @@ class TechnicalDeputyController extends Controller
|
||||
}
|
||||
public function show(Harim $harim): JsonResponse
|
||||
{
|
||||
return $this->successResponse($harim);
|
||||
return $this->successResponse($harim->load('histories'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user