yearMonth split into year + month

This commit is contained in:
2024-01-09 15:43:01 +01:00
parent 90edcf14e1
commit 46b65711a8
12 changed files with 73 additions and 88 deletions

View File

@@ -2,13 +2,15 @@ import { PlusCircleIcon } from "@heroicons/react/24/outline";
export interface AddLocationButtonProps {
/** year month at which the new billing location should be addes */
yyyymm: number
/** year at which the new billing location should be addes */
year: number
/** month at which the new billing location should be addes */
month: number
}
export const AddLocationButton:React.FC<AddLocationButtonProps> = ({yyyymm}) =>
export const AddLocationButton:React.FC<AddLocationButtonProps> = ({year,month}) =>
<div className="card card-compact card-bordered max-w-[36em] bg-base-100 shadow-s my-1">
<a href={`/location/${yyyymm}/add`} className="card-body tooltip self-center" data-tip="Add a new billing location">
<a href={`/location/${year}-${month<10?"0":""}${month}/add`} className="card-body tooltip self-center" data-tip="Add a new billing location">
<span className='grid self-center' data-tip="Add a new billing location">
<PlusCircleIcon className="h-[1em] w-[1em] cursor-pointer text-4xl" />
</span>