Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-18 07:34:06 +00:00
co-authored by renee-png
parent 340be32c93
commit 38a9a27551
@@ -267,15 +267,36 @@ export function ConvertToCollectionsDialog({
</>
)}
</div>
<div className="border rounded-md p-3 space-y-2 bg-muted/20">
<label className="flex items-center gap-2 text-sm cursor-pointer">
<Checkbox
checked={includeEmpty}
onCheckedChange={(v) => setIncludeEmpty(!!v)}
/>
<span>Also create one collection without an attached homeowner</span>
</label>
{includeEmpty && (
<Input
placeholder="Optional name (e.g. Unassigned ledger)"
value={emptyName}
onChange={(e) => setEmptyName(e.target.value)}
/>
)}
</div>
</div>
<DialogFooter>
<Button variant="outline" onClick={() => onOpenChange(false)}>
Cancel
</Button>
<Button onClick={submit} disabled={submitting || selected.size === 0}>
<Button
onClick={submit}
disabled={submitting || (selected.size === 0 && !includeEmpty)}
>
{submitting && <Loader2 className="h-4 w-4 mr-2 animate-spin" />}
Create {selected.size > 0 ? selected.size : ""} collection{selected.size === 1 ? "" : "s"}
Create {selected.size + (includeEmpty ? 1 : 0)} collection
{selected.size + (includeEmpty ? 1 : 0) === 1 ? "" : "s"}
</Button>
</DialogFooter>
</DialogContent>