refactoring: renamed actions tp billActions

This commit is contained in:
2024-01-05 14:30:44 +01:00
parent b02eafa309
commit f26aae7d66
6 changed files with 15 additions and 13 deletions

View File

@@ -13,15 +13,17 @@ export interface LocationCardProps {
export const LocationCard:FC<LocationCardProps> = ({location: { _id, name, yearMonth, bills }}) =>
<div className="card card-compact card-bordered max-w-[36em] bg-base-100 shadow-s my-1">
<div className="card-body">
<Cog8ToothIcon className="h-[1em] w-[1em] absolute cursor-pointer top-3 right-3 text-2xl" />
<h2 className="card-title">{formatYearMonth(yearMonth)} {name}</h2>
<div className="card-actions">
{
bills.map(bill => <BillBadge key={`${bill._id}`} locationId={_id} bill={bill} />)
}
<a href={`/bill/${_id}/add`} className="tooltip" data-tip="Dodaj novi tip računa">
<PlusCircleIcon className="h-[1em] w-[1em] cursor-pointer text-2xl" />
<a href={`/location/${_id}/edit`} className="card-subtitle tooltip" data-tip="Edit Location">
<Cog8ToothIcon className="h-[1em] w-[1em] absolute cursor-pointer top-3 right-3 text-2xl" />
</a>
</div>
<h2 className="card-title">{formatYearMonth(yearMonth)} {name}</h2>
<div className="card-actions">
{
bills.map(bill => <BillBadge key={`${bill._id}`} locationId={_id} bill={bill} />)
}
<a href={`/bill/${_id}/add`} className="tooltip" data-tip="Add a new bull">
<PlusCircleIcon className="h-[1em] w-[1em] cursor-pointer text-2xl" />
</a>
</div>
</div>
</div>;