Drobny bugfixing

This commit is contained in:
Michal Kváček
2023-09-20 14:43:53 +02:00
parent 8c3c5ee48d
commit d1baec342f
3 changed files with 8 additions and 9 deletions
+2 -3
View File
@@ -10,7 +10,6 @@ export const fetchOrganization = (organizationId) => {
loading.value = true;
return useOrganizationsStore().fetchDetail(parseInt(organizationId))
.then(resp => {
console.log(resp);
organization.value = resp;
return resp;
})
@@ -28,14 +27,14 @@ export const isRequestPending = storeToRefs(useOrganizationsStore()).isMutationR
const loggedUser = storeToRefs(useUserStore()).user;
export const myOrganizationIds = computed(() => loggedUser.value.organizations?.map(o => o.id) || []);
export const addToOrganization = async () => {
export const addToOrganization = async (organizationId) => {
useOrganizationsStore().addUserToOrganization(organizationId).then((data) => {
organization.value.users = data.users;
useUserStore().fetchLoggedUserDetail();
});
};
export const removeFromOrganization = async () => {
export const removeFromOrganization = async (organizationId) => {
useOrganizationsStore().removeUserFromOrganization(organizationId).then((data) => {
organization.value.users = data.users;
useUserStore().fetchLoggedUserDetail();