mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-28 14:03:55 +03:00
Fix Vacancy Archive item presenting (#1901)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
868e349fdb
commit
a7b2f3d5ad
@ -134,6 +134,10 @@ export function createModel (builder: Builder): void {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
builder.mixin(core.class.Space, core.class.Class, view.mixin.AttributePresenter, {
|
||||||
|
presenter: recruit.component.VacancyItemPresenter
|
||||||
|
})
|
||||||
|
|
||||||
builder.mixin(recruit.class.Applicant, core.class.Class, view.mixin.CollectionEditor, {
|
builder.mixin(recruit.class.Applicant, core.class.Class, view.mixin.CollectionEditor, {
|
||||||
editor: recruit.component.Applications
|
editor: recruit.component.Applications
|
||||||
})
|
})
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
export let value: Vacancy
|
export let value: Vacancy
|
||||||
export let inline: boolean = false
|
export let inline: boolean = false
|
||||||
export let action: (item: Ref<Vacancy>) => void
|
export let action: ((item: Ref<Vacancy>) => void) | undefined = undefined
|
||||||
|
|
||||||
function editVacancy (): void {
|
function editVacancy (): void {
|
||||||
showPanel(recruit.component.EditVacancy, value._id, value._class, 'content')
|
showPanel(recruit.component.EditVacancy, value._id, value._class, 'content')
|
||||||
@ -28,13 +28,25 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if value}
|
{#if value}
|
||||||
<div class="flex-presenter" class:inline-presenter={inline} on:click={() => action(value._id)}>
|
<div
|
||||||
|
class="flex-presenter"
|
||||||
|
class:inline-presenter={inline}
|
||||||
|
on:click={() => {
|
||||||
|
if (action !== undefined) {
|
||||||
|
action(value._id)
|
||||||
|
} else {
|
||||||
|
editVacancy()
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<Icon icon={recruit.icon.Vacancy} size={'small'} />
|
<Icon icon={recruit.icon.Vacancy} size={'small'} />
|
||||||
</div>
|
</div>
|
||||||
<span class="label">{value.name}</span>
|
<span class="label">{value.name}</span>
|
||||||
<div class="action">
|
{#if action !== undefined}
|
||||||
<ActionIcon label={recruit.string.Edit} size={'small'} icon={IconEdit} action={editVacancy} />
|
<div class="action">
|
||||||
</div>
|
<ActionIcon label={recruit.string.Edit} size={'small'} icon={IconEdit} action={editVacancy} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user