mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 10:42:16 +01:00
refactor tag components and tagCreate events, change global week_start and timezone settings, fix pie charts
This commit is contained in:
@@ -11,7 +11,14 @@ function getCurrentUserId() {
|
||||
}
|
||||
|
||||
function getWeekStart() {
|
||||
return page.props.auth.user.week_start;
|
||||
const weekStart = window?.getWeekStartSetting() as string;
|
||||
|
||||
if (!weekStart) {
|
||||
throw new Error(
|
||||
'Please make sure to provide the current user week start setting as a vue inject (week_start)'
|
||||
);
|
||||
}
|
||||
return weekStart;
|
||||
}
|
||||
|
||||
function getCurrentOrganizationId() {
|
||||
@@ -31,7 +38,13 @@ function getCurrentRole() {
|
||||
}
|
||||
|
||||
function getUserTimezone() {
|
||||
return page.props.auth.user.timezone;
|
||||
const timezone = window?.getTimezoneSetting() as string;
|
||||
if (!timezone) {
|
||||
throw new Error(
|
||||
'Please make sure to provide the current user timezone as a vue inject (timezone)'
|
||||
);
|
||||
}
|
||||
return timezone;
|
||||
}
|
||||
|
||||
export {
|
||||
|
||||
Reference in New Issue
Block a user