fix(fe playlist): fixed table actions
This commit is contained in:
parent
cc61e69dfe
commit
207450ef0a
4 changed files with 55 additions and 29 deletions
30
resources/js/composables/content/models/playlist.ts
Normal file
30
resources/js/composables/content/models/playlist.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
import {VTextarea, VTextField} from "vuetify/components";
|
||||
|
||||
export function playlist(item) {
|
||||
const visibleFields = {
|
||||
name: 'Nome',
|
||||
description: 'Descrizione',
|
||||
}
|
||||
|
||||
return () => {
|
||||
const fields = {}
|
||||
Object.keys(visibleFields).forEach((key) => {
|
||||
fields[key] = {
|
||||
label: visibleFields[key],
|
||||
value: item !== null ? item[key] : '',
|
||||
component: VTextField
|
||||
}
|
||||
console.log(fields)
|
||||
switch (key) {
|
||||
case 'name':
|
||||
fields[key].component = VTextField
|
||||
break
|
||||
case 'description':
|
||||
fields[key].component = VTextarea
|
||||
break;
|
||||
}
|
||||
})
|
||||
console.log(fields)
|
||||
return fields
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ export function playlist_page() {
|
|||
{title: 'Creato da', value: 'creator'},
|
||||
{title: 'Durata', value: 'length'},
|
||||
{title: 'Ultima modifica', value: 'utime'},
|
||||
{title: 'Azioni', key: 'actions'}
|
||||
];
|
||||
|
||||
const getItems = async (page_info) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue