feat(ui): alışveriş listeleri, akıllı öneri paneli ve alışveriş modu

- /alisveris, /alisveris/:id ve /alisveris/:id/mod sayfaları; odak ve 30 sn yenileme
- stok önerileri paneli, kalem ekle/düzenle/taşı, mağazaya gruplu kontrol listesi
- dashboard Alışveriş kartı, kenar menü, ürün tipi formunda hacimli işareti

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 23:28:54 +03:00
parent 8ab2244755
commit fa70168622
15 changed files with 1541 additions and 6 deletions
@@ -4,6 +4,7 @@ import { useState } from "react";
import { toast } from "sonner";
import { ResponsiveDialog } from "@/components/responsive-dialog";
import { Button } from "@/components/ui/button";
import { Checkbox } from "@/components/ui/checkbox";
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from "@/components/ui/field";
import { Input } from "@/components/ui/input";
import {
@@ -73,6 +74,7 @@ export function ProductTypeFormDialog({
step: item ? quantityInput(item.step) : "1",
countEveryDays: item?.countEveryDays ? String(item.countEveryDays) : "",
note: item?.note ?? "",
bulky: item?.bulky ?? false,
initialQuantity: "",
});
const [errors, setErrors] = useState<Errors>({});
@@ -93,6 +95,7 @@ export function ProductTypeFormDialog({
step: v.step,
countEveryDays: v.countEveryDays,
note: v.note,
bulky: v.bulky,
initialQuantity: item ? "" : v.initialQuantity,
});
setBusy(false);
@@ -285,6 +288,17 @@ export function ProductTypeFormDialog({
<FieldDescription className="-mt-2">
{f.stepHint} {f.countEveryDaysHint}
</FieldDescription>
<Field orientation="horizontal">
<Checkbox
id="pt-bulky"
checked={v.bulky}
onCheckedChange={(x) => set("bulky", x === true)}
/>
<div className="flex flex-col gap-0.5">
<FieldLabel htmlFor="pt-bulky">{f.bulky}</FieldLabel>
<FieldDescription>{f.bulkyHint}</FieldDescription>
</div>
</Field>
<Field>
<FieldLabel htmlFor="pt-note">{f.note}</FieldLabel>
<Input id="pt-note" value={v.note} onChange={(e) => set("note", e.target.value)} />
+6 -1
View File
@@ -216,7 +216,12 @@ export function StockView({ data, options }: { data: Data; options: StockOption[
<CardTitle className="text-base">{t.suggestions.title}</CardTitle>
<CardDescription>{t.suggestions.description}</CardDescription>
</CardHeader>
<CardContent>
<CardContent className="flex flex-col gap-3">
{data.suggestions.length ? (
<Link href="/alisveris" className="text-sm text-primary hover:underline">
{t.suggestions.toShopping}
</Link>
) : null}
{data.suggestions.length === 0 ? (
<p className="text-sm text-muted-foreground">{t.suggestions.empty}</p>
) : (