fix [front]: admin one-node page

This commit is contained in:
Alice 2022-08-27 16:53:52 +02:00
parent c12d6543c7
commit 95df86ef60
4 changed files with 86 additions and 77 deletions

View file

@ -1,6 +1,8 @@
<template>
<main>
<h1 class="title">Modifier la séance du {{ film.projectionDate }}</h1>
<AdminForm v-model="film" @save="saveDraft" @publish="publish" />
</main>
</template>
<script setup lang="ts">
@ -15,6 +17,7 @@ const id = route.params.id
const film = reactive<Film>({})
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
// TODO manage errors
async function save(publish: boolean) {

View file

@ -1,4 +1,5 @@
<template>
<main>
<div class="title is-2">
<div class="tag is-large">
{{ film.isConfirmed ? "Publié" : "Brouillon" }}
@ -64,6 +65,7 @@
/>
</div>
</div>
</main>
</template>
<script setup lang="ts">

View file

@ -1,4 +1,5 @@
<template>
<main>
<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">
@ -13,6 +14,7 @@
</div>
</li>
</ul>
</main>
</template>
<script setup lang="ts">

View file

@ -1,6 +1,8 @@
<template>
<main>
<h1 class="title">Nouvelle séance</h1>
<AdminForm v-model="film" @save="post" @publish="publish" />
</main>
</template>
<script setup lang="ts">