feat: add mandatory tag support to frontend and update ItemsPage to display mandatory tags
This commit is contained in:
parent
22a34d7ad8
commit
1cfaf70803
2 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
export interface Tag {
|
||||
id: string;
|
||||
name: string;
|
||||
mandatory: boolean;
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
|
|
|
|||
|
|
@ -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 && (
|
||||
<span className="ml-1 text-yellow-500 font-bold" title="Pflicht-Tag">*</span>
|
||||
)}
|
||||
</span>
|
||||
))}
|
||||
<button
|
||||
|
|
|
|||
Loading…
Reference in a new issue