mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Ready for release soon.
This commit is contained in:
@@ -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,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
@@ -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====");
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user