mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
[NOT READY] fix dates + charts + ui
This commit is contained in:
@@ -14,50 +14,20 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
|
||||
name: 'Today',
|
||||
from: fns.startOfDay(Date.now()),
|
||||
to: fns.endOfDay(Date.now()),
|
||||
color: '#CC11CC',
|
||||
color: '#FFA600',
|
||||
default: true
|
||||
}
|
||||
|
||||
const lastDay: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___lastDay' as any,
|
||||
name: 'Last Day',
|
||||
name: 'Yesterday',
|
||||
from: fns.startOfDay(fns.subDays(Date.now(), 1)),
|
||||
to: fns.endOfDay(fns.subDays(Date.now(), 1)),
|
||||
color: '#CC11CC',
|
||||
default: true
|
||||
}
|
||||
|
||||
const currentWeek: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___currentWeek' as any,
|
||||
name: 'Current Week',
|
||||
from: fns.startOfWeek(Date.now()),
|
||||
to: fns.endOfWeek(Date.now()),
|
||||
color: '#CC11CC',
|
||||
default: true
|
||||
}
|
||||
|
||||
const lastWeek: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___lastWeek' as any,
|
||||
name: 'Last Week',
|
||||
from: fns.startOfWeek(fns.subWeeks(Date.now(), 1)),
|
||||
to: fns.endOfWeek(fns.subWeeks(Date.now(), 1)),
|
||||
color: '#CC11CC',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
const currentMonth: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___currentMonth' as any,
|
||||
name: 'Current Month',
|
||||
from: fns.startOfMonth(Date.now()),
|
||||
to: fns.endOfMonth(Date.now()),
|
||||
color: '#CC11CC',
|
||||
color: '#FF8531',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
const lastMonth: DefaultSnapshot = {
|
||||
project_id,
|
||||
@@ -65,9 +35,41 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
|
||||
name: 'Last Month',
|
||||
from: fns.startOfMonth(fns.subMonths(Date.now(), 1)),
|
||||
to: fns.endOfMonth(fns.subMonths(Date.now(), 1)),
|
||||
color: '#CC11CC',
|
||||
color: '#BC5090',
|
||||
default: true
|
||||
}
|
||||
const currentMonth: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___currentMonth' as any,
|
||||
name: 'Current Month',
|
||||
from: fns.startOfMonth(Date.now()),
|
||||
to: fns.endOfMonth(Date.now()),
|
||||
color: '#58508D',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
const lastWeek: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___lastWeek' as any,
|
||||
name: 'Last Week',
|
||||
from: fns.startOfWeek(fns.subWeeks(Date.now(), 1)),
|
||||
to: fns.endOfWeek(fns.subWeeks(Date.now(), 1)),
|
||||
color: '#3E909D',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
const currentWeek: DefaultSnapshot = {
|
||||
project_id,
|
||||
_id: '___currentWeek' as any,
|
||||
name: 'Current Week',
|
||||
from: fns.startOfWeek(Date.now()),
|
||||
to: fns.endOfWeek(Date.now()),
|
||||
color: '#007896',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
|
||||
const allTime: DefaultSnapshot = {
|
||||
@@ -76,7 +78,7 @@ export function getDefaultSnapshots(project_id: TProjectSnapshot['project_id'],
|
||||
name: 'All Time',
|
||||
from: new Date(project_created_at.toString()),
|
||||
to: new Date(Date.now()),
|
||||
color: '#CC11CC',
|
||||
color: '#9362FF',
|
||||
default: true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user