mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-30 04:05:39 +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,
|
recruit.class.Applicant,
|
||||||
{},
|
{},
|
||||||
(res) => {
|
(res) => {
|
||||||
|
applications.clear()
|
||||||
for (const d of res) {
|
for (const d of res) {
|
||||||
const v = applications.get(d.space) ?? { count: 0, modifiedOn: 0 }
|
const v = applications.get(d.space) ?? { count: 0, modifiedOn: 0 }
|
||||||
v.count++
|
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 base = preference?.config ?? descr.config
|
||||||
const result: (string | BuildModelKey)[] = []
|
const result: (string | BuildModelKey)[] = []
|
||||||
for (const key of base) {
|
for (const key of base) {
|
||||||
@ -185,7 +190,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<TableBrowser
|
<TableBrowser
|
||||||
_class={recruit.class.Vacancy}
|
_class={recruit.class.Vacancy}
|
||||||
config={createConfig(descr, preference)}
|
config={createConfig(descr, preference, applications)}
|
||||||
options={descr.options}
|
options={descr.options}
|
||||||
query={{
|
query={{
|
||||||
...resultQuery,
|
...resultQuery,
|
||||||
|
Loading…
Reference in New Issue
Block a user