Ready for release soon.

This commit is contained in:
charlesgauthereau
2025-07-16 20:34:28 +02:00
parent 5e704ec18a
commit 7abdcd57f9
6 changed files with 18 additions and 13 deletions
@@ -33,6 +33,8 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
[] as { date: string; count: number }[]
);
console.log(cumulativeData);
const chartConfig = {
date: {
label: "Date",
@@ -48,7 +50,7 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
<ChartContainer config={chartConfig}>
<LineChart
accessibilityLayer
data={data}
data={cumulativeData}
margin={{
left: 12,
right: 12,
@@ -60,7 +62,9 @@ export function EvolutionLineChart(props: evolutionLineChartProps) {
tickLine={false}
axisLine={false}
tickMargin={8}
tickFormatter={(value) => humanReadableDate(new Date(value)).split(" ")[0]}
tickFormatter={(value) => {
return humanReadableDate(new Date(value)).split(" ")[0]
}}
/>
<YAxis />
<ChartTooltip cursor={false} content={<ChartTooltipContent hideLabel />} />
@@ -37,8 +37,8 @@ export function PercentageLineChart(props: percentageLineChartProps) {
acc[date] = { success: 0, failed: 0, total: 0 };
}
acc[date][status === "success" ? "success" : "failed"] += backup._count.id;
acc[date].total += backup._count.id;
acc[date][status === "success" ? "success" : "failed"] += backup._count;
acc[date].total += backup._count;
return acc;
},
+1 -1
View File
@@ -1,7 +1,7 @@
import {format} from "date-fns";
export function humanReadableDate(rawDate: string | number | Date) {
return format(new Date(rawDate), 'dd/MM/yyyy HH:mm')
return formatFrenchDate(rawDate);
}
export function timeAgo(rawDate: string | number | Date) {
+5 -6
View File
@@ -1,16 +1,15 @@
import { env } from "@/env.mjs";
import { db } from "@/db";
import {db, makeMigration} from "@/db";
import { eq } from "drizzle-orm";
import * as drizzleDb from "@/db";
export function init() {
export async function init() {
consoleAscii();
console.log("====Init Functions====");
createDefaultOrganization().then(() => {});
createSettingsIfNotExist()
await makeMigration();
await createDefaultOrganization();
await createSettingsIfNotExist()
.then(() => {
console.log("====Initialization completed====");
})