From 3b9bfc0b9e41dc7061ff966e17053cfd8e868dfb Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Thu, 20 Aug 2026 04:16:20 +0300 Subject: [PATCH] Refactor openCard method in ApplicantsDialog to streamline error handling and remove redundant checks against selectedId. This improves code clarity and maintains state management consistency. --- src/HSchool.Client/src/ui/applicantsDialog.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/HSchool.Client/src/ui/applicantsDialog.ts b/src/HSchool.Client/src/ui/applicantsDialog.ts index 8ed4e0a..d8fdbf5 100644 --- a/src/HSchool.Client/src/ui/applicantsDialog.ts +++ b/src/HSchool.Client/src/ui/applicantsDialog.ts @@ -295,16 +295,8 @@ export class ApplicantsDialog { private async openCard(personId: string): Promise { try { const card = await fetchPerson(this.options.schoolId, personId, getLocale()); - if (personId !== this.selectedId) { - return; - } - this.paintCard(card); } catch { - if (personId !== this.selectedId) { - return; - } - clear(this.card); this.card.append(el('p', { class: 'panel__empty', text: t('peopleCardFailed') })); }