@hed-hog/finance 0.0.285 → 0.0.291
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -166,7 +166,7 @@ function useFinanceReportQuery<T>(
|
|
|
166
166
|
const querySuffix = buildQuery(params);
|
|
167
167
|
const url = querySuffix ? `${path}?${querySuffix}` : path;
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
const query = useQuery<T>({
|
|
170
170
|
queryKey: [queryKey, querySuffix || 'default'],
|
|
171
171
|
staleTime: 0,
|
|
172
172
|
refetchOnMount: 'always',
|
|
@@ -187,6 +187,11 @@ function useFinanceReportQuery<T>(
|
|
|
187
187
|
},
|
|
188
188
|
initialData,
|
|
189
189
|
});
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
...query,
|
|
193
|
+
data: query.data ?? initialData,
|
|
194
|
+
};
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
export function useOverviewResultsReport(filters: {
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
import { Crown, PieChartIcon, Users } from 'lucide-react';
|
|
30
30
|
import { useTranslations } from 'next-intl';
|
|
31
31
|
import { type FormEvent, useState } from 'react';
|
|
32
|
+
import type { TooltipProps } from 'recharts';
|
|
32
33
|
import {
|
|
33
34
|
Bar,
|
|
34
35
|
BarChart,
|
|
@@ -93,16 +94,7 @@ export default function TopCustomersReportPage() {
|
|
|
93
94
|
active,
|
|
94
95
|
payload,
|
|
95
96
|
label,
|
|
96
|
-
}: {
|
|
97
|
-
active?: boolean;
|
|
98
|
-
payload?: Array<{
|
|
99
|
-
name?: string;
|
|
100
|
-
value?: number | string;
|
|
101
|
-
color?: string;
|
|
102
|
-
dataKey?: string;
|
|
103
|
-
}>;
|
|
104
|
-
label?: string | number;
|
|
105
|
-
}) => {
|
|
97
|
+
}: TooltipProps<string | number, string>) => {
|
|
106
98
|
if (!active || !payload || payload.length === 0) {
|
|
107
99
|
return null;
|
|
108
100
|
}
|
|
@@ -114,7 +106,7 @@ export default function TopCustomersReportPage() {
|
|
|
114
106
|
</p>
|
|
115
107
|
{payload.map((row, index) => (
|
|
116
108
|
<div
|
|
117
|
-
key={`${row.dataKey ?? row.name ?? 'item'}-${index}`}
|
|
109
|
+
key={`${String(row.dataKey ?? row.name ?? 'item')}-${index}`}
|
|
118
110
|
className="flex items-center justify-between gap-3 text-sm"
|
|
119
111
|
>
|
|
120
112
|
<div className="flex items-center gap-2 text-popover-foreground">
|
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
import { Building2, CircleDollarSign, TriangleAlert } from 'lucide-react';
|
|
30
30
|
import { useTranslations } from 'next-intl';
|
|
31
31
|
import { type FormEvent, useState } from 'react';
|
|
32
|
+
import type { TooltipProps } from 'recharts';
|
|
32
33
|
import {
|
|
33
34
|
Bar,
|
|
34
35
|
BarChart,
|
|
@@ -91,16 +92,7 @@ export default function TopOperationalExpensesReportPage() {
|
|
|
91
92
|
active,
|
|
92
93
|
payload,
|
|
93
94
|
label,
|
|
94
|
-
}: {
|
|
95
|
-
active?: boolean;
|
|
96
|
-
payload?: Array<{
|
|
97
|
-
name?: string;
|
|
98
|
-
value?: number | string;
|
|
99
|
-
color?: string;
|
|
100
|
-
dataKey?: string;
|
|
101
|
-
}>;
|
|
102
|
-
label?: string | number;
|
|
103
|
-
}) => {
|
|
95
|
+
}: TooltipProps<string | number, string>) => {
|
|
104
96
|
if (!active || !payload || payload.length === 0) {
|
|
105
97
|
return null;
|
|
106
98
|
}
|
|
@@ -112,7 +104,7 @@ export default function TopOperationalExpensesReportPage() {
|
|
|
112
104
|
</p>
|
|
113
105
|
{payload.map((row, index) => (
|
|
114
106
|
<div
|
|
115
|
-
key={`${row.dataKey ?? row.name ?? 'item'}-${index}`}
|
|
107
|
+
key={`${String(row.dataKey ?? row.name ?? 'item')}-${index}`}
|
|
116
108
|
className="flex items-center justify-between gap-3 text-sm"
|
|
117
109
|
>
|
|
118
110
|
<div className="flex items-center gap-2 text-popover-foreground">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hed-hog/finance",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.291",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"@nestjs/core": "^11",
|
|
10
10
|
"@nestjs/jwt": "^11",
|
|
11
11
|
"@nestjs/mapped-types": "*",
|
|
12
|
-
"@hed-hog/api-prisma": "0.0.5",
|
|
13
12
|
"@hed-hog/api": "0.0.4",
|
|
14
|
-
"@hed-hog/
|
|
15
|
-
"@hed-hog/
|
|
16
|
-
"@hed-hog/contact": "0.0.285",
|
|
13
|
+
"@hed-hog/contact": "0.0.291",
|
|
14
|
+
"@hed-hog/tag": "0.0.291",
|
|
17
15
|
"@hed-hog/api-locale": "0.0.13",
|
|
18
16
|
"@hed-hog/api-pagination": "0.0.6",
|
|
19
|
-
"@hed-hog/
|
|
17
|
+
"@hed-hog/api-prisma": "0.0.5",
|
|
18
|
+
"@hed-hog/core": "0.0.291",
|
|
19
|
+
"@hed-hog/api-types": "0.0.1"
|
|
20
20
|
},
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|