feat(fe playlist): adding editor functionalities
This commit is contained in:
parent
4076b3c307
commit
6082267db5
1 changed files with 21 additions and 7 deletions
|
@ -1,12 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {playlist} from "@/composables/content/models/playlist.ts";
|
import {playlist} from "@/composables/content/models/playlist.ts";
|
||||||
import Sources from "@/components/content/partials/Sources.vue";
|
import Sources from "@/components/content/partials/Sources.vue";
|
||||||
|
import TrackList from "@/components/content/partials/TrackList.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: Object,
|
item: Object,
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log(props.item.id)
|
const tracks = props.item?.tracks
|
||||||
|
|
||||||
|
console.log(props.item)
|
||||||
|
console.log(tracks)
|
||||||
|
|
||||||
const item = (): object => {
|
const item = (): object => {
|
||||||
if (props.item.id === 0) {
|
if (props.item.id === 0) {
|
||||||
return {
|
return {
|
||||||
|
@ -14,6 +19,8 @@ const item = (): object => {
|
||||||
name: '',
|
name: '',
|
||||||
creator_id: 0,
|
creator_id: 0,
|
||||||
description: '',
|
description: '',
|
||||||
|
creator: {},
|
||||||
|
tracks: []
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return props.item
|
return props.item
|
||||||
|
@ -35,6 +42,8 @@ console.log(playlistFields())
|
||||||
:label="field.label"
|
:label="field.label"
|
||||||
:value="field.value"
|
:value="field.value"
|
||||||
:disabled="field.disabled"
|
:disabled="field.disabled"
|
||||||
|
:density="'compact'"
|
||||||
|
rows="2"
|
||||||
v-model="item()[key]"
|
v-model="item()[key]"
|
||||||
item-title="type_name"
|
item-title="type_name"
|
||||||
density="compact"
|
density="compact"
|
||||||
|
@ -45,19 +54,24 @@ console.log(playlistFields())
|
||||||
/>
|
/>
|
||||||
</v-form>
|
</v-form>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col></v-col>
|
<v-col>
|
||||||
|
<v-btn
|
||||||
|
color="accent"
|
||||||
|
@click="$emit('goBack')"
|
||||||
|
>Torna indietro</v-btn>
|
||||||
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col></v-col>
|
<v-col>
|
||||||
|
<TrackList
|
||||||
|
:tracks="item().tracks"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
<Sources />
|
<Sources />
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-btn
|
|
||||||
color="accent"
|
|
||||||
@click="$emit('goBack')"
|
|
||||||
>Torna indietro</v-btn>
|
|
||||||
</v-row>
|
</v-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue