mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 02:32:15 +01:00
move multiselect components, week start and timezon functions to ui package
This commit is contained in:
@@ -10,16 +10,6 @@ function getCurrentUserId() {
|
||||
return page.props.auth.user.id;
|
||||
}
|
||||
|
||||
function getWeekStart() {
|
||||
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() {
|
||||
return page.props.auth.user.current_team_id;
|
||||
@@ -37,21 +27,11 @@ function getCurrentRole() {
|
||||
)?.membership.role;
|
||||
}
|
||||
|
||||
function getUserTimezone() {
|
||||
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 {
|
||||
getCurrentOrganizationId,
|
||||
getCurrentUserId,
|
||||
getUserTimezone,
|
||||
getWeekStart,
|
||||
getCurrentMembershipId,
|
||||
getCurrentRole,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user