* auth routes added

* xlsx parsing adjusted to reflect changes in xlsx schema
* calendar ordering by month now to fix disturbances in the xlsx data
This commit is contained in:
Danyi Dávid 2018-11-19 21:42:04 +01:00
parent 4d52d4b575
commit d3ba215338
3 changed files with 9 additions and 4 deletions

View File

@ -48,7 +48,8 @@ return [
'api.fault-attachment.post', 'api.fault-attachment.post',
'api.fault-comment.post', 'api.fault-comment.post',
'api.fault-reject.post', 'api.fault-reject.post',
'api.maintenance', 'api.maintenance.list',
'api.maintenance.get',
'api.maintenance.upcoming', 'api.maintenance.upcoming',
'api.maintenance.calendar', 'api.maintenance.calendar',
], ],
@ -67,7 +68,8 @@ return [
'api.report.post', 'api.report.post',
'api.fault-attachment.post', 'api.fault-attachment.post',
'api.fault-comment.post', 'api.fault-comment.post',
'api.maintenance', 'api.maintenance.list',
'api.maintenance.get',
'api.maintenance.put', 'api.maintenance.put',
'api.maintenance.upcoming', 'api.maintenance.upcoming',
'api.maintenance.calendar', 'api.maintenance.calendar',

View File

@ -124,6 +124,9 @@ class MaintenanceManagerService
// }); // });
// $deviceGroup->setDevices($devices); // $deviceGroup->setDevices($devices);
} }
usort($result, function($a, $b) {
return $a[0]['month'] <=> $b[0]['month'];
});
return array_values($result); return array_values($result);
} }

View File

@ -100,9 +100,9 @@ class XlsxParserService
$totalRows = $sheet->getHighestRow(); $totalRows = $sheet->getHighestRow();
$monthColumns = $year == 2018 $monthColumns = $year == 2018
? range(43, 58) ? range(47, 58)
: range(11, 58); : range(11, 58);
$rowCursor = 7; $rowCursor = 6;
$group = null; $group = null;
while ($rowCursor < $totalRows) { while ($rowCursor < $totalRows) {