fix [front]: admin one-node page
This commit is contained in:
parent
c12d6543c7
commit
95df86ef60
4 changed files with 86 additions and 77 deletions
|
@ -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) {
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue