Restrict applications to vacany where the user is not a participant (#7481)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-12-16 17:15:03 +05:00 committed by GitHub
parent 102066ac19
commit 766eb53d10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -220,9 +220,10 @@
const spaceQuery = createQuery()
let vacancy: Vacancy | undefined
const me = getCurrentAccount()._id
$: if (_space) {
spaceQuery.query(recruit.class.Vacancy, { _id: _space }, (res) => {
spaceQuery.query(recruit.class.Vacancy, { _id: _space, members: me }, (res) => {
vacancy = res.shift()
})
}
@ -329,7 +330,11 @@
<div class="flex-grow">
<SpaceSelect
_class={recruit.class.Vacancy}
spaceQuery={{ archived: false, ...($selectedTypeStore !== undefined ? { type: $selectedTypeStore } : {}) }}
spaceQuery={{
archived: false,
members: me,
...($selectedTypeStore !== undefined ? { type: $selectedTypeStore } : {})
}}
spaceOptions={orgOptions}
readonly={preserveVacancy}
label={recruit.string.Vacancy}