Refactor openCard method in ApplicantsDialog to streamline error handling and remove redundant checks against selectedId. This improves code clarity and maintains state management consistency.
ci / server (push) Failing after 3m45s
ci / client (push) Failing after 13s

This commit is contained in:
Leonid Pershin
2026-08-20 04:16:20 +03:00
parent 03378793be
commit 3b9bfc0b9e
@@ -295,16 +295,8 @@ export class ApplicantsDialog {
private async openCard(personId: string): Promise<void> {
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') }));
}