implemente bill add

This commit is contained in:
2024-01-05 14:20:00 +01:00
parent 73029fb28a
commit 245cc38717
9 changed files with 69 additions and 46 deletions

View File

@@ -3,11 +3,11 @@
import { Cog8ToothIcon, PlusCircleIcon } from "@heroicons/react/24/outline";
import { FC } from "react";
import { BillBadge } from "./BillBadge";
import { Bill, Location } from "../lib/db-types";
import { BillingLocation } from "../lib/db-types";
import { formatYearMonth } from "../lib/format";
export interface LocationCardProps {
location: Location
location: BillingLocation
}
export const LocationCard:FC<LocationCardProps> = ({location: { _id, name, yearMonth, bills }}) =>
@@ -19,9 +19,9 @@ export const LocationCard:FC<LocationCardProps> = ({location: { _id, name, yearM
{
bills.map(bill => <BillBadge key={`${bill._id}`} locationId={_id} bill={bill} />)
}
<div className="tooltip" data-tip="Dodaj novi tip računa">
<a href={`/bill/${_id}/add`} className="tooltip" data-tip="Dodaj novi tip računa">
<PlusCircleIcon className="h-[1em] w-[1em] cursor-pointer text-2xl" />
</div>
</a>
</div>
</div>
</div>;