update snapthots + admin panel users

This commit is contained in:
Emily
2025-03-10 15:54:00 +01:00
parent 942d074f99
commit 45e9a9c6a7
7 changed files with 122 additions and 50 deletions

View File

@@ -88,7 +88,7 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
name: 'Last 30 days',
from: fns.startOfDay(fns.subDays(Date.now(), 30)),
to: fns.endOfDay(fns.subDays(Date.now(), 0)),
color: '#BC5090',
color: '#606c38',
default: true
}
@@ -98,7 +98,7 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
name: 'Last 60 days',
from: fns.startOfDay(fns.subDays(Date.now(), 60)),
to: fns.endOfDay(fns.subDays(Date.now(), 0)),
color: '#BC5090',
color: '#bc6c25',
default: true
}
@@ -108,15 +108,18 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
name: 'Last 90 days',
from: fns.startOfDay(fns.subDays(Date.now(), 90)),
to: fns.endOfDay(fns.subDays(Date.now(), 0)),
color: '#BC5090',
color: '#fefae0',
default: true
}
const snapshotList = [
lastDay, today, lastMonth, currentMonth,
lastWeek, currentWeek, allTime,
last30Days, last60Days, last90Days
allTime,
lastDay, today,
lastWeek, currentWeek,
lastMonth, currentMonth,
last30Days,
last60Days, last90Days,
]
return snapshotList;

View File

@@ -15,7 +15,7 @@ const remoteSnapshots = useFetch<TProjectSnapshot[]>('/api/project/snapshots', {
watch(project, async () => {
await remoteSnapshots.refresh();
snapshot.value = isLiveDemo.value ? snapshots.value[3] : snapshots.value[3];
snapshot.value = isLiveDemo.value ? snapshots.value[7] : snapshots.value[7];
});
const snapshots = computed<GenericSnapshot[]>(() => {