Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix manual merge profile flow #1830

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions frontend/src/modules/member/components/member-merge-dialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<script setup>
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { MemberService } from '@/modules/member/member-service';
import Message from '@/shared/message/message';
Expand All @@ -83,6 +83,7 @@ const props = defineProps({
const emit = defineEmits(['update:modelValue']);
const route = useRoute();
const router = useRouter();
const { doFind } = mapActions('member');
const { fetchMembers } = useMemberStore();
Expand Down Expand Up @@ -124,7 +125,15 @@ const mergeSuggestion = () => {
emit('update:modelValue', null);
if (route.name === 'memberView') {
doFind((originalMemberPrimary.value ? props.modelValue : memberToMerge.value).id);
const { id } = originalMemberPrimary.value ? props.modelValue : memberToMerge.value;
doFind(id).then(() => {
router.replace({
params: {
id,
},
});
});
} else if (route.name === 'member') {
fetchMembers({ reload: true });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ const mergeSuggestion = () => {
emit('update:modelValue', null);
if (route.name === 'organizationView') {
const keepId = originalOrganizationPrimary.value ? props.modelValue?.id : organizationToMerge.value?.id;
fetchOrganization(keepId);
router.push({
name: 'organizationView',
params: {
id: keepId,
},
const { id } = originalOrganizationPrimary.value ? props.modelValue : organizationToMerge.value;
fetchOrganization(id).then(() => {
router.replace({
params: {
id,
},
});
});
} else if (route.name === 'organization') {
fetchOrganizations({ reload: true });
Expand Down
Loading