mongo projekcija proširena property-em "hasAttachment"

This commit is contained in:
2025-01-13 16:05:15 +01:00
parent 6ceff261fb
commit 103e371d5f
3 changed files with 40 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ export interface BillBadgeProps {
bill: Bill
};
export const BillBadge:FC<BillBadgeProps> = ({ locationId, bill: { _id: billId, name, paid, attachment }}) =>
<Link href={`/bill/${locationId}-${billId}/edit`} className={`badge badge-lg ${paid?"badge-success":" badge-outline"} ${ !paid && !!attachment ? "btn-outline btn-success" : "" } cursor-pointer`}>
export const BillBadge:FC<BillBadgeProps> = ({ locationId, bill: { _id: billId, name, paid, hasAttachment }}) =>
<Link href={`/bill/${locationId}-${billId}/edit`} className={`badge badge-lg ${paid?"badge-success":" badge-outline"} ${ !paid && hasAttachment ? "btn-outline btn-success" : "" } cursor-pointer`}>
{name}
</Link>;