debug the report tables

This commit is contained in:
2025-03-03 15:38:06 +03:30
parent 3326ab326e
commit 9f08804454
14 changed files with 229 additions and 58 deletions

View File

@@ -19,6 +19,22 @@ class CountryActivityReport implements FromView, WithEvents, ShouldAutoSize, Wit
public function view(): View
{
$data = $this->data;
$existedProvinces = array_keys($data['activities']);
foreach (\App\Models\Province::all() as $value) {
$provinceId = $value->id;
if (!array_key_exists($provinceId, $existedProvinces)) {
$data['activities'][] = [
'province_id' => $provinceId,
'name_fa' => $value->name_fa,
'sum' => 0,
'89' => ['1' => 0, '2' => 0, '3' => 0],
'90' => ['1' => 0, '2' => 0, '3' => 0],
'91' => ['1' => 0, '2' => 0, '3' => 0],
];
}
}
return view('v3.Reports.SafetyAndPrivacy.CountryActivityReport', [
'data' => $data['activities'],