From c108616747da5d078af691eddbe329f70b8b8cfb Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 10:19:22 +0200 Subject: [PATCH] =?UTF-8?q?feat(form-group-component):=20FormGroup=20wrapp?= =?UTF-8?q?er=20f=C3=BCr=20Label/Input/Error=20[tsc:fail]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .phase40-state.json | 5 ++-- GENERATION_LOG.md | 18 +++++++++++ apps/web/src/components/FormGroup.tsx | 43 +++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/FormGroup.tsx diff --git a/.phase40-state.json b/.phase40-state.json index f0c610c..8bca7e8 100644 --- a/.phase40-state.json +++ b/.phase40-state.json @@ -1,8 +1,9 @@ { "completed_features": [], - "current_feature": "logo-component", + "current_feature": "form-group-component", "started_at": "2026-05-23T10:18:26.780535", "attempted_features": [ - "sidebar-component" + "sidebar-component", + "logo-component" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index a50fe30..9f8df7b 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -4229,3 +4229,21 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, +- `10:19:10` **INFO** Committed feature logo-component +- `10:19:11` **INFO** Pushed: rc=0 + +## Phase-3 Feature: form-group-component (2026-05-23 10:19:11) + +- `10:19:11` **INFO** Description: FormGroup wrapper für Label/Input/Error +- `10:19:11` **INFO** Generating apps/web/src/components/FormGroup.tsx (FormGroup-Component. Props: label, htmlFor?, error?, helpText?, requir…) +- `10:19:20` **INFO** wrote 938 chars in 9.0s (attempt 1) +- `10:19:20` **INFO** Running tsc --noEmit on api… +- `10:19:22` **WARN** tsc errors: +src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(45,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/db/schema.ts(49,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(53,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, diff --git a/apps/web/src/components/FormGroup.tsx b/apps/web/src/components/FormGroup.tsx new file mode 100644 index 0000000..a9e6dc8 --- /dev/null +++ b/apps/web/src/components/FormGroup.tsx @@ -0,0 +1,43 @@ +import React, { ReactNode } from 'react'; + +interface FormGroupProps { + label: string; + htmlFor?: string; + error?: string; + helpText?: string; + required?: boolean; + children: ReactNode; +} + +export default function FormGroup({ + label, + htmlFor, + error, + helpText, + required, + children, +}: FormGroupProps) { + return ( +
+ {htmlFor && ( + + )} + +
+ {children} +
+ + {error ? ( +

{error}

+ ) : helpText ? ( +

{helpText}

+ ) : null} +
+ ); +} \ No newline at end of file