Bestellschein-Tab, Favoriten je Benutzer (Scheine + Kabel), Kabelsuche, Loxone Link Kabel Cat.7
Build and Deploy / version (push) Successful in 1s
Build and Deploy / build (push) Successful in 14s
Build and Deploy / deploy (push) Successful in 1s

- Neuer Tab Bestellschein: gleiches Datenmodell/Funktionen wie Materialschein (Projekt.typ)
- Favoriten serverseitig pro Benutzer (Tabelle favoriten, /api/favoriten)
- Kabelauswahl mit Suchfeld + Favoriten (KabelSelect), Suche/Favoriten in der Referenztabelle
- Scheinsuche: mehrere Suchbegriffe, auch Notiz/Datum; Filter Favoriten

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Fidelis Huber
2026-10-09 20:04:52 +02:00
co-authored by Claude Sonnet 5.5
parent 9bd8ebeeb8
commit b6227eb4cf
20 changed files with 409 additions and 93 deletions
+24
View File
@@ -0,0 +1,24 @@
import type { MouseEvent } from 'react';
import { useFavoriten } from '../lib/favoriten';
import type { FavoritArt } from '../lib/types';
export default function FavStar({ art, refId, className = '' }: { art: FavoritArt; refId: string; className?: string }) {
const { isFav, toggle } = useFavoriten();
const fav = isFav(art, refId);
function onClick(e: MouseEvent) {
e.stopPropagation();
e.preventDefault();
toggle(art, refId);
}
return (
<button
type="button"
className={'fav-star' + (fav ? ' on' : '') + (className ? ' ' + className : '')}
onClick={onClick}
title={fav ? 'Aus Favoriten entfernen' : 'Zu meinen Favoriten'}
aria-pressed={fav}
>
{fav ? '★' : '☆'}
</button>
);
}