feat(ui): mağazalar sayfası, ürün kataloğu ve ürün tipi detayında ürünler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 11:48:04 +03:00
parent f0b570284e
commit d52f41ab0c
14 changed files with 1228 additions and 8 deletions
@@ -38,11 +38,17 @@ export function AttachmentPicker({
onChange,
allowedKinds,
onBusyChange,
hint,
addLabel,
}: {
value: AttachmentInfo[];
onChange: (items: AttachmentInfo[]) => void;
allowedKinds: readonly AttachmentKind[];
onBusyChange?: (busy: boolean) => void;
/** Boşken gösterilen ipucu (varsayılan: fiş/fatura). */
hint?: string;
/** Düğme metni (varsayılan: "Ek ekle"). */
addLabel?: string;
}) {
const inputRef = useRef<HTMLInputElement>(null);
const [uploading, setUploading] = useState(0);
@@ -91,14 +97,16 @@ export function AttachmentPicker({
disabled={room <= 0 || uploading > 0}
>
{uploading > 0 ? <Loader2 className="animate-spin" /> : <Paperclip />}
{uploading > 0 ? t.uploading : t.add}
{uploading > 0 ? t.uploading : (addLabel ?? t.add)}
</Button>
<span className="text-xs text-muted-foreground">
{value.length
? t.count(value.length)
: allowedKinds.includes("pdf")
? t.addHint.imagePdf
: t.addHint.image}
: hint
? hint
: allowedKinds.includes("pdf")
? t.addHint.imagePdf
: t.addHint.image}
</span>
<input
ref={inputRef}