create new category for Road patrole service
This commit is contained in:
@@ -16,8 +16,8 @@ use App\Models\Mission;
|
||||
use App\Models\RoadItemsProject;
|
||||
use App\Models\RoadObserved;
|
||||
use App\Models\RoadPatrol;
|
||||
use App\Services\Cartables\RoadPatrol\ReportService;
|
||||
use App\Services\NominatimService;
|
||||
use App\Services\Cartables\RoadPatrolTableService;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -32,7 +32,7 @@ class RoadPatrolProjectController extends Controller
|
||||
{
|
||||
use ApiResponse;
|
||||
|
||||
public function supervisorIndex(Request $request, RoadPatrolTableService $roadPatrolTableService): JsonResponse
|
||||
public function supervisorIndex(Request $request, ReportService $roadPatrolTableService): JsonResponse
|
||||
{
|
||||
$data = $roadPatrolTableService->supervisorCartableReport($request);
|
||||
|
||||
@@ -82,14 +82,14 @@ class RoadPatrolProjectController extends Controller
|
||||
return $this->successResponse();
|
||||
}
|
||||
|
||||
public function supervisorCartableReport(Request $request, RoadPatrolTableService $roadPatrolTableService): BinaryFileResponse
|
||||
public function supervisorCartableReport(Request $request, ReportService $roadPatrolTableService): BinaryFileResponse
|
||||
{
|
||||
$name = 'گزارش از کارتابل ارزیابی گشت راهداری ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||
$data = $roadPatrolTableService->supervisorCartableReport($request, true);
|
||||
return Excel::download(new SupervisorCartableReport($data['data']), $name);
|
||||
}
|
||||
|
||||
public function operatorIndex(Request $request, RoadPatrolTableService $roadPatrolTableService): JsonResponse
|
||||
public function operatorIndex(Request $request, ReportService $roadPatrolTableService): JsonResponse
|
||||
{
|
||||
$data = $roadPatrolTableService->operatorCartableReport($request);
|
||||
return response()->json($data);
|
||||
@@ -331,7 +331,7 @@ class RoadPatrolProjectController extends Controller
|
||||
return $this->successResponse($roadPatrol);
|
||||
}
|
||||
|
||||
public function operatorCartableReport(Request $request, RoadPatrolTableService $roadPatrolTableService): BinaryFileResponse
|
||||
public function operatorCartableReport(Request $request, ReportService $roadPatrolTableService): BinaryFileResponse
|
||||
{
|
||||
$name = 'گزارش از کارتابل عملیات گشت راهداری ' . verta()->now()->format('Y-m-d H:i') . '.xlsx';
|
||||
$data = $roadPatrolTableService->operatorCartableReport($request, true);
|
||||
|
||||
Reference in New Issue
Block a user