歌曲 vocal,enable 加入修改權限 20250506

This commit is contained in:
allen.yan 2025-05-06 13:19:04 +08:00
parent 2a7d6fd9aa
commit 0821b16ac6

View File

@ -155,7 +155,7 @@ final class SongTable extends PowerGridComponent
$column[]=Column::make(__('songs.categorys'), 'song_categories');
$column[]=Column::make('Db change', 'db_change')
->editOnClick(hasPermission: $this->canEdit, dataField: 'db_change', fallback: 'N/A', saveOnMouseOut: true);
$column[]=Column::make(__('songs.vocal'), 'vocal')->toggleable(hasPermission: true, trueLabel: 'yes', falseLabel: 'no');
$column[]=Column::make(__('songs.vocal'), 'vocal')->toggleable(hasPermission: $this->canEdit, trueLabel: 'yes', falseLabel: 'no');
$column[]=Column::make(__('songs.situation'), 'situation_str','songs.situation')->searchable();
$column[]=Column::make(__('songs.copyright01'), 'copyright01')->sortable()->searchable()
->editOnClick(hasPermission: $this->canEdit, dataField: 'copyright01', fallback: 'N/A', saveOnMouseOut: true);
@ -169,7 +169,7 @@ final class SongTable extends PowerGridComponent
->editOnClick(hasPermission: $this->canEdit, dataField: 'note03', fallback: 'N/A', saveOnMouseOut: true);
$column[]=Column::make(__('songs.note04'), 'note04')->sortable()->searchable()->hidden(true, false)
->editOnClick(hasPermission: $this->canEdit, dataField: 'note04', fallback: 'N/A', saveOnMouseOut: true);
$column[]=Column::make(__('songs.enable'), 'enable')->toggleable(hasPermission: true, trueLabel: 'yes', falseLabel: 'no');
$column[]=Column::make(__('songs.enable'), 'enable')->toggleable(hasPermission: $this->canEdit, trueLabel: 'yes', falseLabel: 'no');
$column[]=Column::make('Created at', 'created_at_formatted', 'created_at')->sortable()->hidden(true, false);
$column[]=Column::action(__('songs.actions'));
return $column;