Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
1f244450b2
commit
4ef56fd368
@@ -811,48 +811,30 @@ export function CollectionDetail({
|
||||
</table>
|
||||
)}
|
||||
|
||||
{/* Quick-add row */}
|
||||
{/* Quick-add row — inline ledger entry shortcuts */}
|
||||
<div className="flex flex-wrap gap-2 p-3 border-t bg-muted/10">
|
||||
<Button variant="outline" size="sm" onClick={() => setChargeOpen(true)}>
|
||||
<Button variant="outline" size="sm" onClick={() => addBlankRow({ transaction_type: "assessment" })}>
|
||||
<Plus className="h-4 w-4 mr-1.5" /> Add Charge (Debit)
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" className="text-emerald-700 border-emerald-200 hover:bg-emerald-50 dark:text-emerald-400 dark:border-emerald-900" onClick={() => setPaymentOpen(true)}>
|
||||
<Button variant="outline" size="sm" className="text-emerald-700 border-emerald-200 hover:bg-emerald-50 dark:text-emerald-400 dark:border-emerald-900" onClick={() => addBlankRow({ transaction_type: "payment" })}>
|
||||
<Plus className="h-4 w-4 mr-1.5" /> Add Payment (AR Credit)
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" className="text-destructive border-destructive/30 hover:bg-destructive/10" onClick={() => setBankOpen(true)}>
|
||||
<Button variant="outline" size="sm" className="text-destructive border-destructive/30 hover:bg-destructive/10" onClick={() => addBlankRow({ transaction_type: "adjustment", description: "Bank fee" })}>
|
||||
<Plus className="h-4 w-4 mr-1.5" /> Add Bank Fee
|
||||
</Button>
|
||||
<Button variant="outline" size="sm" onClick={calcInterestRow} disabled={!effectiveRate || effectiveRate <= 0}>
|
||||
<Calculator className="h-4 w-4 mr-1.5" /> Calculate Interest Row
|
||||
</Button>
|
||||
<Button variant="ghost" size="sm" onClick={addBlankRow}>
|
||||
<Button variant="ghost" size="sm" onClick={() => addBlankRow()}>
|
||||
<Plus className="h-4 w-4 mr-1.5" /> Add Blank Row
|
||||
</Button>
|
||||
<p className="w-full text-[11px] text-muted-foreground mt-1">
|
||||
Tip: click any cell in the new row to enter the date, description, account, or amount directly.
|
||||
</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<AddChargeDialog
|
||||
open={chargeOpen}
|
||||
onOpenChange={setChargeOpen}
|
||||
collectionId={collection.id}
|
||||
userId={user?.id}
|
||||
onSaved={() => { load(); onChange(); }}
|
||||
/>
|
||||
<AddPaymentDialog
|
||||
open={paymentOpen}
|
||||
onOpenChange={setPaymentOpen}
|
||||
collectionId={collection.id}
|
||||
userId={user?.id}
|
||||
onSaved={() => { load(); onChange(); }}
|
||||
/>
|
||||
<AddBankFeeDialog
|
||||
open={bankOpen}
|
||||
onOpenChange={setBankOpen}
|
||||
collectionId={collection.id}
|
||||
userId={user?.id}
|
||||
onSaved={() => { load(); onChange(); }}
|
||||
/>
|
||||
<ImportCsvDialog
|
||||
open={importOpen}
|
||||
onOpenChange={setImportOpen}
|
||||
|
||||
Reference in New Issue
Block a user