mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-28 19:08:01 +00:00
Fix vacancies query (#2810)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
4fd9539ef9
commit
3c8f29beb2
@ -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<Ref<Vacancy>, ApplicationInfo>
|
||||
): (string | BuildModelKey)[] {
|
||||
const base = preference?.config ?? descr.config
|
||||
const result: (string | BuildModelKey)[] = []
|
||||
for (const key of base) {
|
||||
@ -185,7 +190,7 @@
|
||||
{:else}
|
||||
<TableBrowser
|
||||
_class={recruit.class.Vacancy}
|
||||
config={createConfig(descr, preference)}
|
||||
config={createConfig(descr, preference, applications)}
|
||||
options={descr.options}
|
||||
query={{
|
||||
...resultQuery,
|
||||
|
Loading…
Reference in New Issue
Block a user