feat: revenue tracking

* wip

* wip

* wip

* wip

* show revenue better on overview

* align realtime and overview counters

* update revenue docs

* always return device id

* add project settings, improve projects charts,

* fix: comments

* fixes

* fix migration

* ignore sql files

* fix comments
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-19 14:27:34 +01:00
committed by GitHub
parent d61cbf6f2c
commit 790801b728
58 changed files with 2191 additions and 23691 deletions

View File

@@ -1,3 +1,4 @@
import { cn } from '@/utils/cn';
import { createContext, useContext as useBaseContext } from 'react';
import { Tooltip as RechartsTooltip, type TooltipProps } from 'recharts';
@@ -21,11 +22,18 @@ export const ChartTooltipHeader = ({
export const ChartTooltipItem = ({
children,
color,
}: { children: React.ReactNode; color: string }) => {
className,
innerClassName,
}: {
children: React.ReactNode;
color: string;
className?: string;
innerClassName?: string;
}) => {
return (
<div className="flex gap-2">
<div className={cn('flex gap-2', className)}>
<div className="w-[3px] rounded-full" style={{ background: color }} />
<div className="col flex-1 gap-1">{children}</div>
<div className={cn('col flex-1 gap-1', innerClassName)}>{children}</div>
</div>
);
};

View File

@@ -77,6 +77,15 @@ export const BarShapeBlue = BarWithBorder({
fill: 'rgba(59, 121, 255, 0.4)',
},
});
export const BarShapeGreen = BarWithBorder({
borderHeight: 2,
border: 'rgba(59, 169, 116, 1)',
fill: 'rgba(59, 169, 116, 0.3)',
active: {
border: 'rgba(59, 169, 116, 1)',
fill: 'rgba(59, 169, 116, 0.4)',
},
});
export const BarShapeProps = BarWithBorder({
borderHeight: 2,
border: 'props',