mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-15 19:52:15 +01:00
reload stores after new team is created and data imported
This commit is contained in:
@@ -6,6 +6,7 @@ import InputLabel from '@/Components/InputLabel.vue';
|
|||||||
import PrimaryButton from '@/Components/PrimaryButton.vue';
|
import PrimaryButton from '@/Components/PrimaryButton.vue';
|
||||||
import TextInput from '@/Components/TextInput.vue';
|
import TextInput from '@/Components/TextInput.vue';
|
||||||
import type { User } from '@/types/models';
|
import type { User } from '@/types/models';
|
||||||
|
import { initializeStores } from '@/utils/init';
|
||||||
|
|
||||||
const form = useForm({
|
const form = useForm({
|
||||||
name: '',
|
name: '',
|
||||||
@@ -15,6 +16,9 @@ const createTeam = () => {
|
|||||||
form.post(route('teams.store'), {
|
form.post(route('teams.store'), {
|
||||||
errorBag: 'createTeam',
|
errorBag: 'createTeam',
|
||||||
preserveScroll: true,
|
preserveScroll: true,
|
||||||
|
onSuccess: () => {
|
||||||
|
initializeStores();
|
||||||
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const page = usePage<{
|
const page = usePage<{
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ async function importData() {
|
|||||||
reject('Import type is null');
|
reject('Import type is null');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
initializeStores();
|
||||||
if (reportResult.value) {
|
if (reportResult.value) {
|
||||||
showResultModal.value = true;
|
showResultModal.value = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user