Folder tree dynamic navigator

This commit is contained in:
Čarodej
2022-01-21 16:46:17 +01:00
parent 6cb2a1bb9a
commit e2cfdd5345
11 changed files with 68 additions and 1332 deletions

View File

@@ -134,13 +134,13 @@ class UserStorageResource extends JsonResource
->get();
$upload = $trafficRecords->map(fn($record) => [
'created_at' => format_date($record->created_at),
'created_at' => format_date($record->created_at, '%d. %B'),
'percentage' => $uploadMax !== 0 ? round(($record->upload / $uploadMax) * 100, 2) : 0,
'amount' => Metric::bytes($record->upload)->format(),
]);
$download = $trafficRecords->map(fn($record) => [
'created_at' => format_date($record->created_at),
'created_at' => format_date($record->created_at, '%d. %B'),
'percentage' => $downloadMax !== 0 ? round(($record->download / $downloadMax) * 100, 2) : 0,
'amount' => Metric::bytes($record->download)->format(),
]);