fix [front]: admin one-node page
This commit is contained in:
parent
c12d6543c7
commit
95df86ef60
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
|
<main>
|
||||||
<h1 class="title">Modifier la séance du {{ film.projectionDate }}</h1>
|
<h1 class="title">Modifier la séance du {{ film.projectionDate }}</h1>
|
||||||
<AdminForm v-model="film" @save="saveDraft" @publish="publish" />
|
<AdminForm v-model="film" @save="saveDraft" @publish="publish" />
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
@ -15,6 +17,7 @@ const id = route.params.id
|
||||||
const film = reactive<Film>({})
|
const film = reactive<Film>({})
|
||||||
|
|
||||||
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
Object.assign(film, (await apiGet(`admin/films/${id}/`)).data.value)
|
||||||
|
|
||||||
// TODO manage errors
|
// TODO manage errors
|
||||||
|
|
||||||
async function save(publish: boolean) {
|
async function save(publish: boolean) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<main>
|
||||||
<div class="title is-2">
|
<div class="title is-2">
|
||||||
<div class="tag is-large">
|
<div class="tag is-large">
|
||||||
{{ film.isConfirmed ? "Publié" : "Brouillon" }}
|
{{ film.isConfirmed ? "Publié" : "Brouillon" }}
|
||||||
|
@ -64,6 +65,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
|
<main>
|
||||||
<h1 class="title">Liste des séances</h1>
|
<h1 class="title">Liste des séances</h1>
|
||||||
<ul class="list has-visible-pointer-controls">
|
<ul class="list has-visible-pointer-controls">
|
||||||
<li v-for="film of films" :key="film.id" class="list-item">
|
<li v-for="film of films" :key="film.id" class="list-item">
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
|
<main>
|
||||||
<h1 class="title">Nouvelle séance</h1>
|
<h1 class="title">Nouvelle séance</h1>
|
||||||
<AdminForm v-model="film" @save="post" @publish="publish" />
|
<AdminForm v-model="film" @save="post" @publish="publish" />
|
||||||
|
</main>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
Loading…
Reference in a new issue