From 3c8f29beb2da289f4604993acd4ff908fedffe1a Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Thu, 23 Mar 2023 08:46:19 +0600 Subject: [PATCH] Fix vacancies query (#2810) Signed-off-by: Denis Bykhov --- .../recruit-resources/src/components/Vacancies.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/recruit-resources/src/components/Vacancies.svelte b/plugins/recruit-resources/src/components/Vacancies.svelte index 5c7dbd8c87..afbc58f079 100644 --- a/plugins/recruit-resources/src/components/Vacancies.svelte +++ b/plugins/recruit-resources/src/components/Vacancies.svelte @@ -45,6 +45,7 @@ recruit.class.Applicant, {}, (res) => { + applications.clear() for (const d of res) { const v = applications.get(d.space) ?? { count: 0, modifiedOn: 0 } v.count++ @@ -128,7 +129,11 @@ } }) - function createConfig (descr: Viewlet, preference: ViewletPreference | undefined): (string | BuildModelKey)[] { + function createConfig ( + descr: Viewlet, + preference: ViewletPreference | undefined, + applications: Map, ApplicationInfo> + ): (string | BuildModelKey)[] { const base = preference?.config ?? descr.config const result: (string | BuildModelKey)[] = [] for (const key of base) { @@ -185,7 +190,7 @@ {:else}