Merge pull request #38 from witelgroup/feature/ExcelDamage

create function excel and their dependency for damage
This commit is contained in:
Amir Ghasempoor
2025-09-22 09:19:52 +03:30
committed by GitHub
12 changed files with 599 additions and 17 deletions

View File

@@ -0,0 +1,67 @@
<?php
namespace App\Exports\V3\Damage;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithDrawings;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Events\AfterSheet;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
class DamageCartableReport implements FromView, WithEvents, ShouldAutoSize, WithDrawings
{
public function __construct(private $data){}
public function view(): View
{
return view('v3.Reports.Damage.DamageCartableReport', [
'data' => $this->data
]);
}
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
$event->sheet->getDelegate()->getStyle('A:U')->getFont()->setName('Arial');
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER);
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setVertical(Alignment::VERTICAL_CENTER);
}
];
}
public function drawings(): array
{
$drawing = new Drawing();
$drawing->setName('Logo');
$drawing->setDescription('This is my logo');
$drawing->setPath(public_path('/dist/logo.png'));
$drawing->setWidth(50);
$drawing->setHeight(50);
$drawing->setOffsetX(5);
$drawing->setOffsetY(5);
$drawing->setCoordinates('A1');
$drawing2 = new Drawing();
$drawing2->setName('Logo');
$drawing2->setDescription('This is my logo');
$drawing2->setPath(public_path('/dist/141icon.png'));
$drawing2->setWidth(50);
$drawing2->setHeight(50);
$drawing2->setOffsetX(5);
$drawing2->setOffsetY(5);
$drawing2->setCoordinates('f1');
return [$drawing, $drawing2];
}
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Exports\V3\RoadObservation;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithDrawings;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Events\AfterSheet;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
class CountryCartableReport implements FromView, ShouldAutoSize, WithEvents, WithDrawings
{
public function __construct(private Collection $data){}
public function view(): View
{
return view('v3.Reports.RoadObservation.CountryReport', [
'data' => $this->data,
]);
}
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
$event->sheet->getDelegate()->getStyle('A:U')->getFont()->setName('Arial');
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER);
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setVertical(Alignment::VERTICAL_CENTER);
}
];
}
public function drawings(): array
{
$drawing = new Drawing();
$drawing->setName('Logo');
$drawing->setDescription('This is my logo');
$drawing->setPath(public_path('/dist/logo.png'));
$drawing->setWidth(50);
$drawing->setHeight(50);
$drawing->setOffsetX(5);
$drawing->setOffsetY(5);
$drawing->setCoordinates('A1');
$drawing2 = new Drawing();
$drawing2->setName('Logo');
$drawing2->setDescription('This is my logo');
$drawing2->setPath(public_path('/dist/141icon.png'));
$drawing2->setWidth(50);
$drawing2->setHeight(50);
$drawing2->setOffsetX(5);
$drawing2->setOffsetY(5);
$drawing2->setCoordinates('j1');
return [$drawing, $drawing2];
}
}

View File

@@ -0,0 +1,70 @@
<?php
namespace App\Exports\V3\RoadObservation;
use Illuminate\Contracts\View\View;
use Illuminate\Database\Eloquent\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\FromView;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
use Maatwebsite\Excel\Concerns\WithDrawings;
use Maatwebsite\Excel\Concerns\WithEvents;
use Maatwebsite\Excel\Events\AfterSheet;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing;
class ProvinceCartableReport implements FromView, ShouldAutoSize, WithEvents, WithDrawings
{
public function __construct(private Collection $data){}
public function view(): View
{
return view('v3.Reports.RoadObservation.ProvinceReport', [
'data' => $this->data,
]);
}
public function registerEvents(): array
{
return [
AfterSheet::class => function (AfterSheet $event) {
$event->sheet->getDelegate()->setRightToLeft(true);
$event->sheet->getDelegate()->getStyle('A:U')->getFont()->setName('Arial');
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER);
$event->sheet->getDelegate()->getStyle('A:U')
->getAlignment()
->setVertical(Alignment::VERTICAL_CENTER);
}
];
}
public function drawings(): array
{
$drawing = new Drawing();
$drawing->setName('Logo');
$drawing->setDescription('This is my logo');
$drawing->setPath(public_path('/dist/logo.png'));
$drawing->setWidth(50);
$drawing->setHeight(50);
$drawing->setOffsetX(5);
$drawing->setOffsetY(5);
$drawing->setCoordinates('A1');
$drawing2 = new Drawing();
$drawing2->setName('Logo');
$drawing2->setDescription('This is my logo');
$drawing2->setPath(public_path('/dist/141icon.png'));
$drawing2->setWidth(50);
$drawing2->setHeight(50);
$drawing2->setOffsetX(5);
$drawing2->setOffsetY(5);
$drawing2->setCoordinates('j1');
return [$drawing, $drawing2];
}
}

View File

@@ -2,14 +2,19 @@
namespace App\Http\Controllers\V3;
use App\Exports\V3\Damage\DamageCartableReport;
use App\Facades\DataTable\DataTableFacade;
use App\Http\Controllers\Controller;
use App\Http\Requests\V3\Damage\StoreRequest;
use App\Http\Requests\V3\Damage\UpdateRequest;
use App\Http\Traits\ApiResponse;
use App\Models\Damage;
use App\Services\Cartables\Damage\DamageService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Excel;
use PhpOffice\PhpSpreadsheet\Exception;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
class DamageManagementController extends Controller
{
@@ -17,20 +22,9 @@ class DamageManagementController extends Controller
/**
* Display a listing of the resource.
*/
public function index(Request $request): JsonResponse
public function index(Request $request ,DamageService $damageService): JsonResponse
{
$allowedFilters = ['*'];
$allowedSortings = ['*'];
$query = Damage::query();
$data = DataTableFacade::run(
$query,
$request,
allowedFilters: $allowedFilters,
allowedSortings: $allowedSortings);
$data = $damageService->dataTable($request);
return response()->json($data);
}
@@ -71,7 +65,6 @@ class DamageManagementController extends Controller
*/
public function update(UpdateRequest $request, Damage $damage): JsonResponse
{
$damage->update([
'title' => $request->title,
@@ -92,4 +85,15 @@ class DamageManagementController extends Controller
return $this->successResponse();
}
/**
* @throws Exception
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
*/
public function excel(Request $request, DamageService $damageService): BinaryFileResponse
{
$name = 'آیتم خسارات وارده بر ابنیه فنی' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
$data = $damageService->datatable($request);
return Excel::download(new DamageCartableReport($data['data']), $name);
}
}

View File

@@ -3,10 +3,14 @@
namespace App\Http\Controllers\V3\Dashboard\RoadObservation;
use App\Exports\V2\RoadObservation\ReportComplaintsExport;
use App\Exports\V3\RoadObservation\CountryCartableReport;
use App\Exports\V3\RoadObservation\ProvinceCartableReport;
use App\Facades\DataTable\DataTableFacade;
use App\Http\Traits\ApiResponse;
use App\Models\EdarateShahri;
use App\Models\RoadObserved;
use App\Services\Cartables\RoadObservation\ReportService;
use App\Services\Cartables\SafetyAndPrivacy\OperatorService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Maatwebsite\Excel\Facades\Excel;
@@ -39,4 +43,39 @@ class ReportController
allowedSelects: ['id', 'lat', 'lng', 'status']
));
}
}
public function countryActivity(Request $request, ReportService $reportService): JsonResponse
{
$data = $reportService->countryActivity($request);
return response()->json($data['data']);
}
public function provinceActivity(Request $request, ReportService $reportService): JsonResponse
{
$data = $reportService->provinceActivity(
province_id: $request->input('province_id')
);
return $this->successResponse([
'activities' => $data,
'edarateShahri' => EdarateShahri::where('province_id', $request->province_id)->get(['id', 'name_fa']),
]);
}
public function countryActivityExcel(Request $request, OperatorService $operatorService): BinaryFileResponse
{
$data = $operatorService->countryActivity();
$name = 'گزارش رسیدگی به شکایات واکنش سریع' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
return Excel::download(new CountryCartableReport($data), $name);
}
public function provinceActivityExcel(Request $request, OperatorService $operatorService): BinaryFileResponse
{
$data = $operatorService->provinceActivity(
province_id: $request->input('province_id')
);
$name = 'گزارش رسیدگی به شکایات واکنش سریع' . verta()->now()->format('Y-m-d H-i') . '.xlsx';
return Excel::download(new ProvinceCartableReport($data, $request), $name);
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Services\Cartables\Damage;
use App\Exceptions\ProhibitedAction;
use App\Facades\DataTable\DataTableFacade;
use App\Models\Damage;
use App\Models\SafetyAndPrivacy;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class DamageService
{
public function dataTable(Request $request)
{
return DataTableFacade::run(
Damage::query(),
$request,
allowedFilters: ['*'],
allowedSortings: ['*'],
allowedSelects: ['title', 'unit', 'base_price', 'status', 'update_time']
);
}
}

View File

@@ -5,6 +5,7 @@ namespace App\Services\Cartables\RoadObservation;
use App\Facades\DataTable\DataTableFacade;
use App\Models\RoadObserved;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ReportService
{
@@ -50,4 +51,94 @@ class ReportService
'toDate' => $toDate,
];
}
public function countryActivity(Request $request): array
{
return DB::select("
SELECT
p.id AS province_id,
p.name_fa AS province_name,
SUM(t.rms_status = 0 ) AS residegiShode,
SUM(t.rms_status = 1 ) AS egdamshode,
SUM(t.rms_status = 2) AS egdamnashodeh,
SUM(t.status = 0 ) AS darhalbarasi,
SUM(t.status = 1 ) AS taayidshode,
SUM(t.status = 2 ) AS adamtaayid,
SUM(t.rms_status = 0 ) + SUM(t.rms_status = 1) + SUM(t.rms_status = 2) AS total
FROM
provinces p
LEFT JOIN
road_observeds t ON t.province_id = p.id
GROUP BY
p.id, p.name_fa
UNION ALL
SELECT
-1 AS province_id,
'کل کشور' AS province_name,
SUM(t.rms_status = 0 ) AS residegiShode,
SUM(t.rms_status = 1 ) AS egdamshode,
SUM(t.rms_status = 2) AS egdamnashodeh,
SUM(t.status = 0 ) AS darhalbarasi,
SUM(t.status = 1 ) AS taayidshode,
SUM(t.status = 2 ) AS adamtaayid,
SUM(t.rms_status = 0 ) + SUM(t.rms_status = 1) + SUM(t.rms_status = 2) AS total
FROM
provinces p
LEFT JOIN
road_observeds t ON t.province_id = p.id
ORDER BY
province_id
");
}
public function provinceActivity(int $province_id): array
{
return DB::select("
SELECT
e.id AS edare_id,
e.name_fa AS edare_name,
COALESCE(SUM(t.rms_status = 0 ),0) AS residegiShode,
COALESCE(SUM(t.rms_status = 1),0) AS egdamshode,
COALESCE(SUM(t.rms_status = 2),0) AS egdamnashodeh,
COALESCE(SUM(t.status = 0 ),0) AS darhalbarasi,
COALESCE(SUM(t.status = 1 ),0) AS taayidshode,
COALESCE(SUM(t.status = 2 ),0) AS adamtaayid,
COALESCE(SUM(t.rms_status = 0 ) + SUM(t.rms_status = 1) + SUM(t.rms_status = 2),0)AS total
FROM
edarate_shahri e
LEFT JOIN
road_observeds t ON t.edarate_shahri_id = e.id AND t.province_id = e.province_id
WHERE
e.province_id = :provinceId
GROUP BY
e.id, e.name_fa
UNION ALL
SELECT
-1 AS edare_id,
'کل استان' AS edare_name,
COALESCE(SUM(t.rms_status = 0 ),0) AS residegiShode,
COALESCE(SUM(t.rms_status = 1),0) AS egdamshode,
COALESCE(SUM(t.rms_status = 2),0) AS egdamnashodeh,
COALESCE(SUM(t.status = 0 ),0) AS darhalbarasi,
COALESCE(SUM(t.status = 1 ),0) AS taayidshode,
COALESCE(SUM(t.status = 2 ),0) AS adamtaayid,
COALESCE(SUM(t.rms_status = 0 ) + SUM(t.rms_status = 1) + SUM(t.rms_status = 2),0)AS total
FROM
edarate_shahri e
LEFT JOIN
road_observeds t ON t.edarate_shahri_id = e.id AND t.province_id = e.province_id
WHERE
e.province_id = :provinceId
ORDER BY
edare_id
", [
'provinceId' => $province_id,
]);
}
}

View File

@@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void
{
Schema::table('road_items_projects', function (Blueprint $table) {
$table->foreignId('mission_id')->nullable()->constrained('missions');
$table->unsignedBigInteger('mission_id')->nullable();
});
}
@@ -22,7 +22,6 @@ return new class extends Migration
public function down(): void
{
Schema::table('road_items_projects', function (Blueprint $table) {
$table->dropForeign('road_items_projects_mission_id_foreign');
$table->dropColumn('mission_id');
});
}

View File

@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>مدریت سامانه</title>
<style>
table,
th,
td {
border: 1px solid black;
}
</style>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="6"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="6"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="6"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
آیتم خسارت وارده بر ابنیه فنی
</th>
</tr>
<tr>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد
یکتا</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
عنوان</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
واحد</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
فی(ریال)</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
وضعیت</th>
<th rowspan="1"
style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">
بروزرسانی</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['title'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['unit'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['base_price'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['status'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['update_time'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>گزارش واکنش سریع</title>
<style>
table,
th,
td {
border: 1px solid black;
}
</style>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
گزارش رسیدگی به شکایات واکنش سریع
</th>
</tr>
<tr>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد یکتا</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">جمع کل</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">رسیدگی نشده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">اقدام شده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;"> اقدام نشده </th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">درحال بررسی</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">تائید شده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">عدم تائید</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['total'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['resideginaShode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['egdamshode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['egdamnashodeh'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['darhalbarasi'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['taayidshode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['adamtaayid'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>گزارش واکنش سریع</title>
<style>
table,
th,
td {
border: 1px solid black;
}
</style>
</head>
<body dir="rtl" style="text-align: center;">
<table>
<thead>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right: 1px solid black;font-weight:bolder;">
تاریخ دریافت گزارش: {{ verta()->now()->format('Y/m/d H:i') }}
</th>
</tr>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;">
</th>
</tr>
<tr>
<th colspan="8"
style="background-color: #DAEEF3;text-align: center;border-right:1px solid black;font-weight:bolder;font-size: 13px;">
گزارش رسیدگی به شکایات واکنش سریع
</th>
</tr>
<tr>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">کد یکتا</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">جمع کل</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">رسیدگی نشده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">اقدام شده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;"> اقدام نشده </th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">درحال بررسی</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">تائید شده</th>
<th rowspan="1" style="text-align: center;border: 1px solid black;background-color: #EBF1DE;font-weight: bold;">عدم تائید</th>
</tr>
</thead>
<tbody>
@foreach ($data as $item)
<tr>
<td style="border: 1px solid black;text-align: center;">{{ $item['id'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['total'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['resideginaShode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['egdamshode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['egdamnashodeh'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['darhalbarasi'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['taayidshode'] ?? '-' }}</td>
<td style="border: 1px solid black;text-align: center;">{{ $item['adamtaayid'] ?? '-' }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>

View File

@@ -273,6 +273,7 @@ Route::prefix('damages')
Route::get('/{damage}', 'show')->name('show');
Route::post('/{damage}', 'update')->name('update');
Route::post('/activate/{damage}', 'activate')->name('activate');
Route::get('/excel', 'excel')->name('excel');
});
Route::prefix('receipts')
@@ -350,6 +351,10 @@ Route::prefix('road_observations')
Route::get('/index', 'index')->name('index')->middleware('permission:show-fast-react-province|show-fast-react');
Route::get('/excel', 'excel')->name('excel')->middleware('permission:show-fast-react-province|show-fast-react');
Route::get('/map', 'map')->name('map');
Route::get('/country_activity', 'countryActivity')->name('countryActivity');
Route::get('/province_activity', 'provinceActivity')->name('provinceActivity');
Route::get('/country_activity_excels', 'countryActivityExcel')->name('countryExcelActivity');
Route::get('/province_activity_excel', 'provinceActivityExcel')->name('provinceExcelActivity');
});
});