diff --git a/resources/js/Components/CurrentSidebarTimer.vue b/resources/js/Components/CurrentSidebarTimer.vue index b6a52c49..db2a3e3c 100644 --- a/resources/js/Components/CurrentSidebarTimer.vue +++ b/resources/js/Components/CurrentSidebarTimer.vue @@ -5,6 +5,9 @@ import { computed } from 'vue'; import dayjs from 'dayjs'; import { formatHumanReadableDuration } from '@/utils/time'; import TimeTrackerStartStop from '@/Components/Common/TimeTrackerStartStop.vue'; +import { getCurrentOrganizationId } from "@/utils/useUser"; +import { switchOrganization } from "@/utils/useOrganization"; +import SecondaryButton from "@/Components/SecondaryButton.vue"; const store = useCurrentTimeEntryStore(); const { currentTimeEntry, now, isActive } = storeToRefs(store); const { onToggleButtonPress } = store; @@ -18,10 +21,29 @@ const currentTime = computed(() => { } return formatHumanReadableDuration(0); }); + +const isRunningInDifferentOrganization = computed(() => { + return ( + currentTimeEntry.value.organization_id && + getCurrentOrganizationId() && + currentTimeEntry.value.organization_id !== getCurrentOrganizationId() + ); +});