mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
22 lines
461 B
TypeScript
22 lines
461 B
TypeScript
import { usePage } from '@inertiajs/vue3';
|
|
import type { User } from '@/types/models';
|
|
|
|
const page = usePage<{
|
|
auth: {
|
|
user: User;
|
|
};
|
|
}>();
|
|
function getCurrentUserId() {
|
|
return page.props.auth.user.id;
|
|
}
|
|
|
|
function getCurrentOrganizationId() {
|
|
return page.props.auth.user.current_team_id;
|
|
}
|
|
|
|
function getUserTimezone() {
|
|
return page.props.auth.user.timezone;
|
|
}
|
|
|
|
export { getCurrentOrganizationId, getCurrentUserId, getUserTimezone };
|