diff --git a/config/autoload/authx2.global.php b/config/autoload/authx2.global.php index 34051f3..0fe0c4a 100644 --- a/config/autoload/authx2.global.php +++ b/config/autoload/authx2.global.php @@ -48,7 +48,8 @@ return [ 'api.fault-attachment.post', 'api.fault-comment.post', 'api.fault-reject.post', - 'api.maintenance', + 'api.maintenance.list', + 'api.maintenance.get', 'api.maintenance.upcoming', 'api.maintenance.calendar', ], @@ -67,7 +68,8 @@ return [ 'api.report.post', 'api.fault-attachment.post', 'api.fault-comment.post', - 'api.maintenance', + 'api.maintenance.list', + 'api.maintenance.get', 'api.maintenance.put', 'api.maintenance.upcoming', 'api.maintenance.calendar', diff --git a/src/App/Service/MaintenanceManagerService.php b/src/App/Service/MaintenanceManagerService.php index 9f59571..8f2b58b 100644 --- a/src/App/Service/MaintenanceManagerService.php +++ b/src/App/Service/MaintenanceManagerService.php @@ -124,6 +124,9 @@ class MaintenanceManagerService // }); // $deviceGroup->setDevices($devices); } + usort($result, function($a, $b) { + return $a[0]['month'] <=> $b[0]['month']; + }); return array_values($result); } diff --git a/src/App/Service/XlsxParserService.php b/src/App/Service/XlsxParserService.php index e4c0622..f851a81 100644 --- a/src/App/Service/XlsxParserService.php +++ b/src/App/Service/XlsxParserService.php @@ -100,9 +100,9 @@ class XlsxParserService $totalRows = $sheet->getHighestRow(); $monthColumns = $year == 2018 - ? range(43, 58) + ? range(47, 58) : range(11, 58); - $rowCursor = 7; + $rowCursor = 6; $group = null; while ($rowCursor < $totalRows) {