Skip to content

Commit a2fff91

Browse files
more ecommerce related dashboard items
1 parent 82ac1c6 commit a2fff91

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

app/base/controllers/Admin/Commerce/OrderPayments.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,4 @@ protected function beforeRender(): BasePage|Response
286286
}
287287
return parent::beforeRender();
288288
}
289-
290-
public static function exposeDataToDashboard() : mixed
291-
{
292-
return null;
293-
}
294289
}

app/base/controllers/Admin/Commerce/ProductStocks.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,4 @@ protected function beforeRender(): BasePage|Response
296296
}
297297
return parent::beforeRender();
298298
}
299-
300-
public static function exposeDataToDashboard() : mixed
301-
{
302-
return null;
303-
}
304299
}

app/base/controllers/Admin/Dashboard.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public function getTemplateData(): array
131131
'route_name' => $pageLink['route_name'],
132132
'section' => $pageLink['section'],
133133
'data' => $dashboardData,
134+
'order' => $pageLink['order'] ?? 0,
134135
];
135136
}
136137
}

templates/admin/dashboard.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@
4949
}
5050
$bySectionLinks[$section][] = $link;
5151
}
52+
53+
foreach ($bySectionLinks as $sectionName => $chunk) {
54+
usort($bySectionLinks[$sectionName], function($a, $b) {
55+
$orderA = $a['order'] ?? 0;
56+
$orderB = $b['order'] ?? 0;
57+
return $orderA <=> $orderB;
58+
});
59+
}
60+
5261
ksort($bySectionLinks);
5362
?>
5463
<?php foreach ($bySectionLinks as $sectionName => $chunk) : ?>

0 commit comments

Comments
 (0)