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>
<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/>
</div>
</NavigationMenuWrapper>

View file

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

View file

@ -1,11 +1,16 @@
<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()">
<div class="flex gap-4 w-full <lg:flex-col">
<FieldWrapper class="flex-grow" label="Name" v-slot="{ inputId }">
<TextualInput v-model="data.name" type="normal" :id="inputId" :disabled="isLoading"/>
</FieldWrapper>
<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>
<TextButton class="lg:self-end" is-submit label="Save" :disabled="!isDirty || isLoading"/>
</form>
</template>