debug code for seecend time
This commit is contained in:
@@ -22,8 +22,7 @@ class GeneralManagerController extends Controller
|
|||||||
$user = auth()->user();
|
$user = auth()->user();
|
||||||
$query = Harim::query()
|
$query = Harim::query()
|
||||||
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value)
|
->where('state_id','=',HarimStates::Baresi_Imeni_Rah_Tavasot_Modir_Kol->value)
|
||||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||||
->with('histories:expert_description');
|
|
||||||
|
|
||||||
$data = DataTableFacade::run(
|
$data = DataTableFacade::run(
|
||||||
$query,
|
$query,
|
||||||
@@ -77,7 +76,7 @@ class GeneralManagerController extends Controller
|
|||||||
}
|
}
|
||||||
public function show(Harim $harim): JsonResponse
|
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();
|
$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_Imeni_Rah_Tavasot_Daftar_Harim->value)
|
||||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||||
->with('expert_description');
|
|
||||||
$data = DataTableFacade::run(
|
$data = DataTableFacade::run(
|
||||||
$query,
|
$query,
|
||||||
$request,
|
$request,
|
||||||
@@ -81,6 +80,6 @@ class HarimOfficeController extends Controller
|
|||||||
}
|
}
|
||||||
public function show(Harim $harim): JsonResponse
|
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();
|
$user = auth()->user();
|
||||||
$query = Harim::query()
|
$query = Harim::query()
|
||||||
->where('state_id', '=', HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value)
|
->where('state_id', '=', HarimStates::Baresi_Imeni_Rah_Tavasot_Moaven->value)
|
||||||
->where('edareh_shahri_id', '=', $user->edarate_shahri_id)
|
->where('edareh_shahri_id', '=', $user->edarate_shahri_id);
|
||||||
->with('histories:expert_description');
|
|
||||||
|
|
||||||
$data = DataTableFacade::run(
|
$data = DataTableFacade::run(
|
||||||
$query,
|
$query,
|
||||||
@@ -62,7 +61,7 @@ class TechnicalDeputyController extends Controller
|
|||||||
$action = HarimAction::REJECT->value;
|
$action = HarimAction::REJECT->value;
|
||||||
|
|
||||||
$harim->histories()->create([
|
$harim->histories()->create([
|
||||||
'user_id' => auth()->user()->id,
|
'expert_id' => auth()->user()->id,
|
||||||
'previous_state_id' => $harim->state_id,
|
'previous_state_id' => $harim->state_id,
|
||||||
'previous_state_name' => $harim->state_name,
|
'previous_state_name' => $harim->state_name,
|
||||||
'expert_description' => $request->expert_description,
|
'expert_description' => $request->expert_description,
|
||||||
@@ -79,6 +78,6 @@ class TechnicalDeputyController extends Controller
|
|||||||
}
|
}
|
||||||
public function show(Harim $harim): JsonResponse
|
public function show(Harim $harim): JsonResponse
|
||||||
{
|
{
|
||||||
return $this->successResponse($harim);
|
return $this->successResponse($harim->load('histories'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use App\Http\Controllers\V3\Dashboard\Accident\AccidentReceiptReportController;
|
|||||||
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshController;
|
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshController;
|
||||||
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshSampleController;
|
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshSampleController;
|
||||||
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshTypeController;
|
use App\Http\Controllers\V3\Dashboard\Azmayesh\AzmayeshTypeController;
|
||||||
|
use App\Http\Controllers\V3\Dashboard\Harim\GeneralManagerController;
|
||||||
use App\Http\Controllers\V3\Dashboard\Harim\HarimOfficeController;
|
use App\Http\Controllers\V3\Dashboard\Harim\HarimOfficeController;
|
||||||
use App\Http\Controllers\V3\Dashboard\Harim\ProvinceOfficeController;
|
use App\Http\Controllers\V3\Dashboard\Harim\ProvinceOfficeController;
|
||||||
use App\Http\Controllers\V3\Dashboard\Harim\TechnicalDeputyController;
|
use App\Http\Controllers\V3\Dashboard\Harim\TechnicalDeputyController;
|
||||||
@@ -538,5 +539,14 @@ Route::prefix('harim')
|
|||||||
Route::post('/reject/{harim}', 'reject')->name('reject');
|
Route::post('/reject/{harim}', 'reject')->name('reject');
|
||||||
Route::get('/{harim}', 'show')->name('show');
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
});
|
});
|
||||||
|
Route::prefix('general_manager')
|
||||||
|
->name('general_manager.')
|
||||||
|
->controller(GeneralManagerController::class)
|
||||||
|
->group(function () {
|
||||||
|
Route::get('/', 'index')->name('index');
|
||||||
|
Route::post('/conform/{harim}', 'conform')->name('conform');
|
||||||
|
Route::post('/reject/{harim}', 'reject')->name('reject');
|
||||||
|
Route::get('/{harim}', 'show')->name('show');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user