Skip to content

Commit

Permalink
fix(web): cancel people merge selection: do not show "Change name suc…
Browse files Browse the repository at this point in the history
…cessfully" notification.
  • Loading branch information
afv committed Jan 28, 2025
1 parent 92dff83 commit 451c26e
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
let personMerge1: PersonResponseDto | undefined = $state();
let personMerge2: PersonResponseDto | undefined = $state();
let potentialMergePeople: PersonResponseDto[] = $state([]);
let isSuggestionSelectedByUser = $state(false);
let personName = '';
let suggestedPeople: PersonResponseDto[] = $state([]);
Expand Down Expand Up @@ -233,15 +234,22 @@
personName = person.name;
personMerge1 = person;
personMerge2 = person2;
isSuggestionSelectedByUser = true;
viewMode = PersonPageViewMode.SUGGEST_MERGE;
};
const changeName = async () => {
viewMode = PersonPageViewMode.VIEW_ASSETS;
person.name = personName;
try {
isEditingName = false;
isEditingName = false;
if (isSuggestionSelectedByUser) {
// User canceled the merge
isSuggestionSelectedByUser = false;
return;
}
try {
person = await updatePerson({ id: person.id, personUpdateDto: { name: personName } });
notificationController.show({
Expand Down

0 comments on commit 451c26e

Please sign in to comment.