feat(dashboard): enhance appointment table and link to specific dates
This commit is contained in:
@@ -47,13 +47,16 @@ function ChartFrame({
|
||||
yWidth: number;
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// NOTE: styles.css ships an unlayered legacy `.flex { align-items: center }`
|
||||
// which beats Tailwind's layered `items-*` utilities, collapsing the plot
|
||||
// column to zero height. Inline `alignItems` is the only reliable override.
|
||||
return (
|
||||
<div className="h-[300px] w-full flex flex-col px-[20px] pb-[12px]">
|
||||
<div className="flex-1 flex min-h-0">
|
||||
<div className="h-[300px] w-full flex flex-col px-[20px] pb-[12px]" style={{ alignItems: 'stretch' }}>
|
||||
<div className="flex-1 flex min-h-0" style={{ alignItems: 'stretch' }}>
|
||||
{/* y-axis ticks, aligned to gridlines */}
|
||||
<div
|
||||
className="flex flex-col justify-between text-[14px] font-normal text-[#858D9D] text-left pl-[4px] shrink-0"
|
||||
style={{ width: yWidth }}
|
||||
style={{ width: yWidth, alignItems: 'flex-start' }}
|
||||
>
|
||||
{ticks.map((t, i) => (
|
||||
<span key={i} className="leading-none -translate-y-1/2 first:translate-y-0 last:translate-y-0">
|
||||
@@ -74,7 +77,7 @@ function ChartFrame({
|
||||
</div>
|
||||
</div>
|
||||
{/* x-axis labels */}
|
||||
<div className="flex pt-[8px]" style={{ paddingRight: yWidth }}>
|
||||
<div className="flex pt-[8px]" style={{ paddingRight: yWidth, alignItems: 'flex-start' }}>
|
||||
{labels.map((l, i) => (
|
||||
<span key={i} className="flex-1 text-center text-[10px] font-normal text-[#7E7E7E] whitespace-nowrap">
|
||||
{l}
|
||||
@@ -95,9 +98,9 @@ export function TauriBarChart({ data }: { data: ChartPoint[] }) {
|
||||
const top = ticks[0] || 1;
|
||||
return (
|
||||
<ChartFrame ticks={ticks} labels={data.map((d) => d.label)} yWidth={42}>
|
||||
<div className="absolute inset-0 flex items-stretch">
|
||||
<div className="absolute inset-0 flex items-stretch" style={{ alignItems: 'stretch' }}>
|
||||
{data.map((d, i) => (
|
||||
<div key={i} className="flex-1 flex items-end justify-center">
|
||||
<div key={i} className="flex-1 flex items-end justify-center" style={{ alignItems: 'flex-end' }}>
|
||||
<div
|
||||
title={faNum.format(d.value)}
|
||||
className="w-[24px] max-w-[30%] rounded-t-[3px] bg-[#5559CE]"
|
||||
|
||||
Reference in New Issue
Block a user