forked from fahrPool/fahrPool
feat: Telefon/E-Mail in Standort-Formularen und -Tabelle
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HCHRPWuV3bd37NJhW2NK6P
This commit is contained in:
parent
bcaa545aaa
commit
9d03c6d68d
|
|
@ -97,6 +97,12 @@ export default async function NeuerAuftragPage({
|
|||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="Telefon (optional)" htmlFor="neuer_abholort_telefon">
|
||||
<input id="neuer_abholort_telefon" name="telefon" type="tel" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<FormField label="E-Mail (optional)" htmlFor="neuer_abholort_email">
|
||||
<input id="neuer_abholort_email" name="email" type="email" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<Button type="submit">Abholort anlegen</Button>
|
||||
</form>
|
||||
</Card>
|
||||
|
|
@ -123,6 +129,12 @@ export default async function NeuerAuftragPage({
|
|||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="Telefon (optional)" htmlFor="neuer_zielort_telefon">
|
||||
<input id="neuer_zielort_telefon" name="telefon" type="tel" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<FormField label="E-Mail (optional)" htmlFor="neuer_zielort_email">
|
||||
<input id="neuer_zielort_email" name="email" type="email" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<Button type="submit">Zielort anlegen</Button>
|
||||
</form>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ export function NeuerStandort() {
|
|||
<Card role="row" className="md:rounded-none md:border-0 md:border-b">
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
className="flex flex-col gap-3 md:grid md:grid-cols-[1fr_1fr_auto_auto] md:items-end md:gap-4"
|
||||
className="flex flex-col gap-3 md:grid md:grid-cols-[1fr_1fr_1fr_1fr_auto_auto] md:items-end md:gap-4"
|
||||
>
|
||||
{fehler && (
|
||||
<div className="md:col-span-4">
|
||||
<div className="md:col-span-6">
|
||||
<Alert>{fehler}</Alert>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -66,6 +66,12 @@ export function NeuerStandort() {
|
|||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="Telefon (optional)" htmlFor="neu-standort-telefon">
|
||||
<input id="neu-standort-telefon" name="telefon" type="tel" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<FormField label="E-Mail (optional)" htmlFor="neu-standort-email">
|
||||
<input id="neu-standort-email" name="email" type="email" className={FIELD_CLASSES} />
|
||||
</FormField>
|
||||
<Button type="submit" fullWidth={false} disabled={isPending}>
|
||||
Anlegen
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ export function StandortZeile({ ort }: { ort: Ort }) {
|
|||
<div role="cell" className="mt-2 md:mt-0">
|
||||
<span className="text-xs font-medium text-asphalt-grey md:hidden">Ansprechpartner</span>
|
||||
<p className="text-asphalt-grey">{ort.ansprechpartner}</p>
|
||||
{ort.telefon && <p className="text-xs text-asphalt-grey/70">{ort.telefon}</p>}
|
||||
{ort.email && <p className="text-xs text-asphalt-grey/70">{ort.email}</p>}
|
||||
</div>
|
||||
<div role="cell" className="mt-3 md:mt-0">
|
||||
<button
|
||||
|
|
@ -61,10 +63,10 @@ export function StandortZeile({ ort }: { ort: Ort }) {
|
|||
<Card role="row" className="md:rounded-none md:border-0 md:border-b">
|
||||
<form
|
||||
onSubmit={handleSubmit}
|
||||
className="flex flex-col gap-3 md:grid md:grid-cols-[1fr_1fr_auto_auto] md:items-end md:gap-4"
|
||||
className="flex flex-col gap-3 md:grid md:grid-cols-[1fr_1fr_1fr_1fr_auto_auto] md:items-end md:gap-4"
|
||||
>
|
||||
{fehler && (
|
||||
<div className="md:col-span-4">
|
||||
<div className="md:col-span-6">
|
||||
<Alert>{fehler}</Alert>
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -88,6 +90,24 @@ export function StandortZeile({ ort }: { ort: Ort }) {
|
|||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="Telefon (optional)" htmlFor={`telefon-${ort.id}`}>
|
||||
<input
|
||||
id={`telefon-${ort.id}`}
|
||||
name="telefon"
|
||||
type="tel"
|
||||
defaultValue={ort.telefon ?? ""}
|
||||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<FormField label="E-Mail (optional)" htmlFor={`email-${ort.id}`}>
|
||||
<input
|
||||
id={`email-${ort.id}`}
|
||||
name="email"
|
||||
type="email"
|
||||
defaultValue={ort.email ?? ""}
|
||||
className={FIELD_CLASSES}
|
||||
/>
|
||||
</FormField>
|
||||
<Button type="submit" fullWidth={false} disabled={isPending}>
|
||||
Speichern
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Reference in New Issue