Skip to content

Commit 50f4357

Browse files
scott graysonscott grayson
authored andcommitted
refactor: update column labels and make created by/size optional
- Change 'Updated By' to 'Modified By' - Change 'Updated At' to 'Modified At' - Make 'Created By' and 'Size' columns toggleable (optional) - Default columns now: name, modified by, modified at
1 parent 1fee23d commit 50f4357

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Resources/LibraryItemResource.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ public static function table(Table $table): Table
9999
->iconPosition('before')
100100
->extraAttributes(['class' => 'library-item-name-column']),
101101
Tables\Columns\TextColumn::make('updater.name')
102-
->label('Updated By')
102+
->label('Modified By')
103103
->searchable()
104104
->sortable(),
105105
Tables\Columns\TextColumn::make('updated_at')
106-
->label('Updated At')
106+
->label('Modified At')
107107
->dateTime()
108108
->sortable(),
109109
Tables\Columns\TextColumn::make('creator.name')
@@ -172,11 +172,11 @@ public static function getPages(): array
172172
public static function formatFileSize(int $bytes): string
173173
{
174174
$units = ['B', 'KB', 'MB', 'GB', 'TB'];
175-
175+
176176
for ($i = 0; $bytes > 1024 && $i < count($units) - 1; $i++) {
177177
$bytes /= 1024;
178178
}
179-
179+
180180
return round($bytes, 2) . ' ' . $units[$i];
181181
}
182182
}

0 commit comments

Comments
 (0)