fix: backend syntax and frontend toast API
Some checks are pending
Test / backend-test (push) Waiting to run
Test / frontend-test (push) Waiting to run

This commit is contained in:
fullsizemalt 2026-01-01 22:49:33 -08:00
parent a13d6f6907
commit 2bc596c527
2 changed files with 547 additions and 551 deletions

File diff suppressed because it is too large Load diff

View file

@ -236,7 +236,7 @@ export function LayoutEditor({ floorId, className }: LayoutEditorProps) {
if (newTag && newTag !== selectedSlot.plant?.tagNumber) { if (newTag && newTag !== selectedSlot.plant?.tagNumber) {
layoutApi.updatePlant(selectedSlot.plant!.id, { tagNumber: newTag }) layoutApi.updatePlant(selectedSlot.plant!.id, { tagNumber: newTag })
.then(() => { .then(() => {
toast({ title: 'Tag Updated', description: newTag }); toast.info('Tag Updated', { description: newTag });
reloadFloorData(); reloadFloorData();
setSelectedSlot(prev => prev ? ({ ...prev, plant: { ...prev.plant!, tagNumber: newTag } }) : null); setSelectedSlot(prev => prev ? ({ ...prev, plant: { ...prev.plant!, tagNumber: newTag } }) : null);
}); });
@ -319,7 +319,7 @@ export function LayoutEditor({ floorId, className }: LayoutEditorProps) {
<div className="grid grid-cols-2 gap-3"> <div className="grid grid-cols-2 gap-3">
<button <button
className="py-2.5 bg-secondary hover:bg-secondary/80 text-foreground border border-border text-sm rounded-lg transition-colors font-medium flex items-center justify-center gap-2" className="py-2.5 bg-secondary hover:bg-secondary/80 text-foreground border border-border text-sm rounded-lg transition-colors font-medium flex items-center justify-center gap-2"
onClick={() => toast({ title: 'Move Plant', description: 'Drag and drop plants on the grid to move them.' })} onClick={() => toast.info('Move Plant', { description: 'Drag and drop plants on the grid to move them.' })}
> >
<Move className="w-4 h-4" /> Move <Move className="w-4 h-4" /> Move
</button> </button>
@ -362,7 +362,7 @@ export function LayoutEditor({ floorId, className }: LayoutEditorProps) {
)} )}
<button <button
className="col-span-2 py-2.5 bg-primary hover:bg-primary-hover text-primary-foreground font-medium text-sm rounded-lg shadow-sm transition-all flex items-center justify-center gap-2" className="col-span-2 py-2.5 bg-primary hover:bg-primary-hover text-primary-foreground font-medium text-sm rounded-lg shadow-sm transition-all flex items-center justify-center gap-2"
onClick={() => toast({ title: 'Compliance', description: 'Opening compliance manager...' })} onClick={() => toast.info('Compliance', { description: 'Opening compliance manager...' })}
> >
<ShieldCheck className="w-4 h-4" /> Manage Compliance <ShieldCheck className="w-4 h-4" /> Manage Compliance
</button> </button>