diff --git a/.phase42-state.json b/.phase42-state.json index 0022ee7..0502ec6 100644 --- a/.phase42-state.json +++ b/.phase42-state.json @@ -1,9 +1,10 @@ { "completed_features": [], - "current_feature": "popover-component", + "current_feature": "tag-component", "started_at": "2026-05-23T10:28:27.180963", "attempted_features": [ "button-group-component", - "context-menu-component" + "context-menu-component", + "popover-component" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 7da1cc0..f9e02ed 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -4405,3 +4405,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:29:24` **INFO** Committed feature popover-component +- `10:29:24` **INFO** Pushed: rc=0 + +## Phase-3 Feature: tag-component (2026-05-23 10:29:24) + +- `10:29:24` **INFO** Description: Tag mit Color + Click-Handler +- `10:29:24` **INFO** Generating apps/web/src/components/Tag.tsx (Tag-Component. Props: label, color? (default 'gray'), onClick?, onRemo…) +- `10:29:42` **INFO** wrote 1698 chars in 18.3s (attempt 1) +- `10:29:42` **INFO** Running tsc --noEmit on api… +- `10:29:44` **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/Tag.tsx b/apps/web/src/components/Tag.tsx new file mode 100644 index 0000000..6e66091 --- /dev/null +++ b/apps/web/src/components/Tag.tsx @@ -0,0 +1,48 @@ +import React from 'react'; + +interface TagProps { + label: string; + color?: 'gray' | 'blue' | 'green' | 'red' | 'yellow' | 'purple' | 'indigo'; + onClick?: () => void; + onRemove?: () => void; +} + +const colorMap = { + gray: 'bg-gray-100 text-gray-800 border-gray-200 hover:bg-gray-200', + blue: 'bg-blue-100 text-blue-800 border-blue-200 hover:bg-blue-200', + green: 'bg-green-100 text-green-800 border-green-200 hover:bg-green-200', + red: 'bg-red-100 text-red-800 border-red-200 hover:bg-red-200', + yellow: 'bg-yellow-100 text-yellow-800 border-yellow-200 hover:bg-yellow-200', + purple: 'bg-purple-100 text-purple-800 border-purple-200 hover:bg-purple-200', + indigo: 'bg-indigo-100 text-indigo-800 border-indigo-200 hover:bg-indigo-200', +}; + +export default function Tag({ label, color = 'gray', onClick, onRemove }: TagProps) { + const colorClasses = colorMap[color] || colorMap.gray; + + return ( + + {label} + {onRemove && ( + + )} + + ); +} \ No newline at end of file