Add a notes field for types of tea

This commit is contained in:
Moritz Ruth 2024-06-17 14:52:56 +02:00
parent 95f8b7a8db
commit 868ef0ed59
Signed by: moritzruth
GPG key ID: C9BBAB79405EE56D
3 changed files with 13 additions and 10 deletions

View file

@ -3,7 +3,7 @@
<div class="absolute lg:fixed -top-20 -left-20 bg-orange-800 rounded-full w-100 h-50 filter blur-100px opacity-40"/> <div class="absolute lg:fixed -top-20 -left-20 bg-orange-800 rounded-full w-100 h-50 filter blur-100px opacity-40"/>
</div> </div>
<NavigationMenuWrapper> <NavigationMenuWrapper>
<div class="relative p-10 pt-15 flex-shrink-0 flex-grow-0"> <div class="relative p-5 lg:p-10 pt-15 flex-shrink-0 flex-grow-0">
<SuspenseRouterView/> <SuspenseRouterView/>
</div> </div>
</NavigationMenuWrapper> </NavigationMenuWrapper>

View file

@ -54,8 +54,6 @@ interface WireConfiguration {
feedback_timeout: number // seconds feedback_timeout: number // seconds
} }
const delay = () => new Promise(resolve => setTimeout(resolve, 1000))
export async function fetchConfiguration(): Promise<Configuration> { export async function fetchConfiguration(): Promise<Configuration> {
const result = await api.get("configuration").json<WireConfiguration>() const result = await api.get("configuration").json<WireConfiguration>()
@ -71,7 +69,7 @@ export async function updateConfiguration(data: Configuration) {
feedback_timeout: data.feedbackTimeout.total("seconds") feedback_timeout: data.feedbackTimeout.total("seconds")
} }
await api.post("configuration", { json: wireData }) await api.put("configuration", { json: wireData })
} }
export async function fetchBrewingEvents(): Promise<BrewingEvent[]> { export async function fetchBrewingEvents(): Promise<BrewingEvent[]> {

View file

@ -1,10 +1,15 @@
<template> <template>
<form class="flex gap-4 w-full <lg:flex-col" @submit.prevent="onSubmit()"> <form class="flex gap-4 w-full flex-col" @submit.prevent="onSubmit()">
<FieldWrapper class="flex-grow" label="Name" v-slot="{ inputId }"> <div class="flex gap-4 w-full <lg:flex-col">
<TextualInput v-model="data.name" type="normal" :id="inputId" :disabled="isLoading"/> <FieldWrapper class="flex-grow" label="Name" v-slot="{ inputId }">
</FieldWrapper> <TextualInput v-model="data.name" type="normal" :id="inputId" :disabled="isLoading"/>
<FieldWrapper label="Steeping time"> </FieldWrapper>
<DurationInput v-model="data.steepingTime" largest-unit="minutes" :minimum="Temporal.Duration.from({ seconds: 10 })" :disabled="isLoading"/> <FieldWrapper label="Steeping time">
<DurationInput v-model="data.steepingTime" largest-unit="minutes" :minimum="Temporal.Duration.from({ seconds: 10 })" :disabled="isLoading"/>
</FieldWrapper>
</div>
<FieldWrapper label="Note" v-slot="{ inputId }">
<TextualInput v-model="data.notes" type="area" :id="inputId" :disabled="isLoading"/>
</FieldWrapper> </FieldWrapper>
<TextButton class="lg:self-end" is-submit label="Save" :disabled="!isDirty || isLoading"/> <TextButton class="lg:self-end" is-submit label="Save" :disabled="!isDirty || isLoading"/>
</form> </form>