mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
18 lines
410 B
TypeScript
18 lines
410 B
TypeScript
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();
|
|
},
|
|
}
|
|
);
|
|
}
|