diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 219aaa6..3c90876 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -1,6 +1,7 @@ export interface Tag { id: string; name: string; + mandatory: boolean; } export interface Item { diff --git a/frontend/src/pages/ItemsPage.tsx b/frontend/src/pages/ItemsPage.tsx index 994509b..c8fcfbf 100644 --- a/frontend/src/pages/ItemsPage.tsx +++ b/frontend/src/pages/ItemsPage.tsx @@ -151,11 +151,16 @@ export default function ItemsPage() { "bg-gray-200 text-sm rounded px-1 py-0.5 flex items-center cursor-pointer " + (newItemTags.includes(tag.id) ? "bg-blue-200 text-blue-900 font-bold" - : "") + : "") + + (tag.mandatory ? " border-2 border-yellow-400" : "") } onClick={() => toggleNewItemTag(tag.id)} + title={tag.mandatory ? "Pflicht-Tag (mandatory)" : ""} > #{tag.name} + {tag.mandatory && ( + * + )} ))}