import {VSelect, VTextarea, VTextField} from "vuetify/components"; export function file(item) { const visibleFields = { track_title: 'Titolo traccia', artist_name: 'Artista', album_title: 'Titolo dell\'album', owner: 'Utente', track_type: 'Tipo di traccia', description: 'Descrizione', track_number: 'Numero della traccia', genre: 'Genere', year: 'Anno', label: 'Etichetta discografica', composer: 'Compositore', conductor: 'Direttore', mood: 'Mood', bpm: 'BPM', isrc_number: 'Numero ISRC', language: 'Lingua', cuein: 'Cue in', cueout: 'Cue out' } return () => { const fields = {} Object.keys(visibleFields).forEach((key) => { fields[key] = { label: visibleFields[key], value: item[key], disabled: false, component: VTextField } switch (key) { case 'owner': console.log(item.owner.login) fields[key].value = item.owner.login fields[key].disabled = true break case 'track_type': fields[key].component = VSelect break; case 'description': fields[key].component = VTextarea break; } }) return fields } }