web: add previous/compare values for all charts
This commit is contained in:
@@ -57,6 +57,7 @@ export default function ReportEditor({
|
||||
</div>
|
||||
</SheetTrigger>
|
||||
<div className="grid grid-cols-2 md:grid-cols-4 gap-2 col-span-4">
|
||||
<ReportChartType className="min-w-0 flex-1" />
|
||||
<Combobox
|
||||
className="min-w-0 flex-1"
|
||||
placeholder="Range"
|
||||
@@ -70,7 +71,6 @@ export default function ReportEditor({
|
||||
}))}
|
||||
/>
|
||||
<ReportInterval className="min-w-0 flex-1" />
|
||||
<ReportChartType className="min-w-0 flex-1" />
|
||||
<ReportLineType className="min-w-0 flex-1" />
|
||||
</div>
|
||||
<div className="col-start-2 md:col-start-6 row-start-1 text-right">
|
||||
|
||||
@@ -21,6 +21,7 @@ export type RouterInputs = inferRouterInputs<AppRouter>;
|
||||
*/
|
||||
export type RouterOutputs = inferRouterOutputs<AppRouter>;
|
||||
export type IChartData = RouterOutputs['chart']['chart'];
|
||||
export type IChartSerieDataItem = IChartData['series'][number]['data'][number];
|
||||
|
||||
export function handleError(error: TRPCClientErrorBase<any>) {
|
||||
toast({
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { cn } from '@/utils/cn';
|
||||
import { Space_Grotesk } from 'next/font/google';
|
||||
|
||||
import Providers from './providers';
|
||||
|
||||
@@ -7,18 +6,9 @@ import '@/styles/globals.css';
|
||||
|
||||
import { getSession } from '@/server/auth';
|
||||
import { cookies } from 'next/headers';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
import Auth from './auth';
|
||||
|
||||
// import { cookies } from 'next/headers';
|
||||
|
||||
const font = Space_Grotesk({
|
||||
subsets: ['latin'],
|
||||
display: 'swap',
|
||||
variable: '--text',
|
||||
});
|
||||
|
||||
export const metadata = {};
|
||||
|
||||
export const viewport = {
|
||||
@@ -38,10 +28,7 @@ export default async function RootLayout({
|
||||
return (
|
||||
<html lang="en" className="light">
|
||||
<body
|
||||
className={cn(
|
||||
'min-h-screen font-sans antialiased grainy bg-slate-50',
|
||||
font.className
|
||||
)}
|
||||
className={cn('min-h-screen font-sans antialiased grainy bg-slate-50')}
|
||||
>
|
||||
<Providers cookies={cookies().getAll()} session={session}>
|
||||
{session ? children : <Auth />}
|
||||
|
||||
Reference in New Issue
Block a user