debug the report tables
This commit is contained in:
@@ -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'],
|
||||
|
||||
Reference in New Issue
Block a user