From aec1d96e66ee6a0c962aa2510c2643511f0649d1 Mon Sep 17 00:00:00 2001 From: "Dennis (via Claude+Gemma)" Date: Sat, 23 May 2026 09:53:55 +0200 Subject: [PATCH] feat(checkbox-component): Checkbox mit Label [tsc:fail] --- .phase35-state.json | 7 +++-- GENERATION_LOG.md | 18 +++++++++++++ apps/web/src/components/Checkbox.tsx | 40 ++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 apps/web/src/components/Checkbox.tsx diff --git a/.phase35-state.json b/.phase35-state.json index f9950d1..8f3fdff 100644 --- a/.phase35-state.json +++ b/.phase35-state.json @@ -1,5 +1,8 @@ { "completed_features": [], - "current_feature": "dropdown-menu-component", - "started_at": "2026-05-23T09:53:25.616963" + "current_feature": "checkbox-component", + "started_at": "2026-05-23T09:53:25.616963", + "attempted_features": [ + "dropdown-menu-component" + ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 0cd6176..e2a7fc7 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -3816,3 +3816,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, +- `09:53:44` **INFO** Committed feature dropdown-menu-component +- `09:53:44` **INFO** Pushed: rc=0 + +## Phase-3 Feature: checkbox-component (2026-05-23 09:53:44) + +- `09:53:44` **INFO** Description: Checkbox mit Label +- `09:53:44` **INFO** Generating apps/web/src/components/Checkbox.tsx (Checkbox-Component. Props: checked, onChange, label?, disabled?. Nativ…) +- `09:53:53` **INFO** wrote 989 chars in 9.0s (attempt 1) +- `09:53:53` **INFO** Running tsc --noEmit on api… +- `09:53:55` **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/Checkbox.tsx b/apps/web/src/components/Checkbox.tsx new file mode 100644 index 0000000..e937aef --- /dev/null +++ b/apps/web/src/components/Checkbox.tsx @@ -0,0 +1,40 @@ +import React from 'react'; + +interface CheckboxProps { + checked: boolean; + onChange: (checked: boolean) => void; + label?: string; + disabled?: boolean; + id?: string; +} + +export default function Checkbox({ + checked, + onChange, + label, + disabled = false, + id +}: CheckboxProps) { + const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`; + + return ( +
+ onChange(e.target.checked)} + className="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer" + /> + {label && ( + + )} +
+ ); +} \ No newline at end of file