Fix Edit Vacancy attributes (#1900)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-05-29 15:12:52 +07:00 committed by GitHub
parent a7b2f3d5ad
commit e6adabf627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -16,11 +16,13 @@
<script lang="ts">
import { Attachments } from '@anticrm/attachment-resources'
import type { Ref } from '@anticrm/core'
import core from '@anticrm/core'
import { Panel } from '@anticrm/panel'
import { AttributesBar, createQuery, getClient, Members } from '@anticrm/presentation'
import { createQuery, getClient, Members } from '@anticrm/presentation'
import { Vacancy } from '@anticrm/recruit'
import { StyledTextBox } from '@anticrm/text-editor'
import { EditBox, Label, Grid } from '@anticrm/ui'
import { EditBox, Grid, Label } from '@anticrm/ui'
import { ClassAttributeBar } from '@anticrm/view-resources'
import { createEventDispatcher } from 'svelte'
import recruit from '../plugin'
@ -43,8 +45,6 @@
$: updateObject(_id)
// const tabs: IntlString[] = [recruit.string.General, recruit.string.Members, activity.string.Activity]
function onChange (key: string, value: any): void {
client.updateDoc(object._class, object.space, object._id, { [key]: value })
}
@ -68,7 +68,13 @@
{#if dir === 'column'}
<div class="ac-subtitle">
<div class="ac-subtitle-content">
<AttributesBar {object} _class={object._class} keys={['dueTo', 'location', 'company']} vertical />
<ClassAttributeBar
{object}
_class={object._class}
ignoreKeys={['name', 'description', 'fullDescription']}
vertical
to={core.class.Space}
/>
</div>
</div>
{/if}

View File

@ -48,6 +48,7 @@ import ClassPresenter from './components/ClassPresenter.svelte'
import EditBoxPopup from './components/EditBoxPopup.svelte'
import BooleanTruePresenter from './components/BooleanTruePresenter.svelte'
import EnumEditor from './components/EnumEditor.svelte'
import ClassAttributeBar from './components/ClassAttributeBar.svelte'
function PositionElementAlignment (e?: Event): PopupAlignment | undefined {
return getEventPopupPositionElement(e)
@ -73,7 +74,8 @@ export {
Menu,
SpacePresenter,
UpDownNavigator,
ViewletSetting
ViewletSetting,
ClassAttributeBar
}
export default async (): Promise<Resources> => ({