mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 11:12:16 +01:00
add notice when time tracker is running in a different organization
This commit is contained in:
17
resources/js/utils/useOrganization.ts
Normal file
17
resources/js/utils/useOrganization.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { router } from '@inertiajs/vue3';
|
||||
import { initializeStores } from '@/utils/init';
|
||||
|
||||
export function switchOrganization(organizationId: string) {
|
||||
router.put(
|
||||
route('current-team.update'),
|
||||
{
|
||||
team_id: organizationId,
|
||||
},
|
||||
{
|
||||
preserveState: false,
|
||||
onSuccess: () => {
|
||||
initializeStores();
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user