feat(T07): Warenkorb & Mietanfrage frontend – cart store, drawer, pages, form, tests

This commit is contained in:
Implementation Engineer
2026-07-10 01:32:19 +02:00
parent e220ff7db9
commit a1bba48cd7
19 changed files with 1874 additions and 92 deletions
+9 -2
View File
@@ -239,9 +239,16 @@ function resetFilters() {
currentPage.value = 1;
}
const { addItemByFields } = useCart();
function onAddToCart(item: { id: number; name: string }) {
// Emit handled by parent app / cart composable
console.log("Add to cart:", item);
const equipment = data.value?.items.find((e) => e.id === item.id);
addItemByFields({
equipment_id: item.id,
name: item.name,
rental_price: equipment?.rental_price ?? null,
image_url: equipment?.image_url ?? null,
});
}
useHead({