2022-04-10 00:56:25 +02:00
|
|
|
<template>
|
|
|
|
<h1 class="title">Liste des séances</h1>
|
|
|
|
<ul class="list has-visible-pointer-controls">
|
|
|
|
<li v-for="film of films" :key="film.id" class="list-item">
|
2022-07-13 02:18:06 +02:00
|
|
|
<nuxt-link :to="`/admin/${film.id}`" class="list-item-content">
|
2022-04-10 00:56:25 +02:00
|
|
|
{{ film.projectionDate || "À planifier" }} - {{ film.title }}
|
|
|
|
<template v-if="film.director"> de {{ film.director }}</template>
|
|
|
|
</nuxt-link>
|
|
|
|
<div class="list-item-controls">
|
2022-07-13 02:18:06 +02:00
|
|
|
<nuxt-link :to="`/admin/${film.id}/edition`" class="button">
|
2022-04-10 00:56:25 +02:00
|
|
|
<span>Éditer</span>
|
|
|
|
</nuxt-link>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</template>
|
2022-04-09 02:52:50 +02:00
|
|
|
|
2022-04-10 00:56:25 +02:00
|
|
|
<script setup lang="ts">
|
|
|
|
import { ShortFilm } from "~/composables/types"
|
2022-04-09 02:52:50 +02:00
|
|
|
|
2022-04-10 00:56:25 +02:00
|
|
|
definePageMeta({
|
|
|
|
layout: "admin",
|
|
|
|
})
|
|
|
|
|
|
|
|
const films = reactive<ShortFilm[]>([])
|
|
|
|
|
2022-07-14 01:39:19 +02:00
|
|
|
Object.assign(films, (await apiGet("admin/films/")).data.value)
|
2022-04-10 00:56:25 +02:00
|
|
|
</script>
|