This commit is contained in:
Emily
2024-11-14 18:23:56 +01:00
parent 9de299d841
commit 5ac43dec6b
5 changed files with 57 additions and 455 deletions

View File

@@ -1,5 +1,6 @@
import type { TProjectSnapshot } from "@schema/ProjectSnapshot";
import fns from 'date-fns';
const { projectId, project } = useProject();
@@ -31,9 +32,10 @@ const snapshots = computed(() => {
},
{
project_id: project.value?._id as any,
_id: 'default1' as any,
name: 'Last month',
from: new Date(Date.now() - 1000 * 60 * 60 * 24 * 30),
_id: 'current_month' as any,
name: 'Current month',
from: fns.startOfMonth()
new Date(Date.now() - 1000 * 60 * 60 * 24 * 30),
to: new Date(Date.now()),
color: '#00CC00'
},