TSK-1007: Add comments in talent editor (#2922)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-04-07 23:59:18 +07:00 committed by GitHub
parent 1ad84330cd
commit 650e65a7f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
74 changed files with 148 additions and 25 deletions

View File

@ -415,6 +415,18 @@ export function createModel (builder: Builder): void {
recruit.viewlet.VacancyApplicationsShort
)
builder.createDoc(
view.class.Viewlet,
core.space.Model,
{
attachTo: recruit.class.Applicant,
descriptor: view.viewlet.Table,
config: ['', '$lookup.space.name', '$lookup.space.$lookup.company', 'state', 'comments', 'doneState'],
variant: 'short'
},
recruit.viewlet.VacancyApplicationsEmbeddeed
)
builder.createDoc(
view.class.Viewlet,
core.space.Model,

View File

@ -39,6 +39,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox placeholder={linkPlaceholder} bind:value={link} focus />
</Card>

View File

@ -36,6 +36,7 @@
okLabel={presentation.string.Save}
okAction={save}
canSave={icon !== undefined}
on:changeContent
on:close={() => {
dispatch('close')
}}

View File

@ -141,6 +141,7 @@
okLabel={presentation.string.Ok}
on:close={() => dispatch('close')}
fullSize={true}
on:changeContent
>
<svelte:fragment slot="header">
{#if profile}

View File

@ -38,6 +38,7 @@
canSave={true}
okLabel={presentation.string.Ok}
on:close={() => dispatch('close')}
on:changeContent
>
<EditBox label={bitrix.string.BitrixTokenUrl} bind:value={url} />
<svelte:fragment slot="pool" />

View File

@ -51,6 +51,7 @@
}}
okLabel={getEmbeddedLabel('Close')}
on:close
on:changeContent
>
{#if integration && bitrixClient}
{#each mappings as mapping}

View File

@ -55,7 +55,7 @@
)
</script>
<Card label={bitrix.string.AddMapping} canSave={type !== ''} okAction={save} on:close>
<Card label={bitrix.string.AddMapping} canSave={type !== ''} okAction={save} on:close on:changeContent>
<div class="flex">
<DropdownLabels label={bitrix.string.BitrixEntityType} {items} bind:selected={type} />
<ObjectBox

View File

@ -32,6 +32,7 @@
okAction={save}
okLabel={presentation.string.Save}
on:close
on:changeContent
>
<svelte:fragment slot="header">
<Label label={attribute.label} />

View File

@ -77,6 +77,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector _class={board.class.Board} label={board.string.BoardName} bind:space={_space} />

View File

@ -95,6 +95,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox bind:value={title} placeholder={calendar.string.Title} kind={'large-style'} focus />
<svelte:fragment slot="pool">

View File

@ -67,6 +67,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox bind:value={title} placeholder={calendar.string.Title} kind={'large-style'} focus />
<svelte:fragment slot="pool">

View File

@ -59,6 +59,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid column={1} rowGap={1.75}>
<div class="antiComponentBox">

View File

@ -59,6 +59,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox
label={chunter.string.ChannelName}

View File

@ -122,6 +122,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="error">
{#if matches.length > 0}

View File

@ -55,6 +55,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<!-- <div class="mr-3">

View File

@ -84,6 +84,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -78,6 +78,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="error">
{#if matches.length > 0}

View File

@ -41,6 +41,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid column={1} rowGap={1}>
<EditBox bind:value={statusName} />

View File

@ -210,6 +210,7 @@
okAction={merge}
canSave={targetEmp !== undefined}
onCancel={() => dispatch('close')}
on:changeContent
>
<div class="flex-row flex-between">
<div class="flex-row-center">

View File

@ -159,6 +159,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center">
<Label label={contact.string.AvatarProvider} />

View File

@ -104,6 +104,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -52,6 +52,7 @@
fullSize
okLabel={presentation.string.Ok}
on:close={() => dispatch('close')}
on:changeContent
>
<div style="width: 25rem;">
<Grid rowGap={1}>

View File

@ -58,6 +58,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -87,6 +87,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<EmployeeBox

View File

@ -60,6 +60,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="mr-3">
{#if typesToChange !== undefined}

View File

@ -67,6 +67,7 @@
okLabel={existingHoliday ? presentation.string.Save : presentation.string.Ok}
okAction={() => saveHoliday()}
canSave={true}
on:changeContent
>
<div class="flex-grow mt-4">
<EditBox placeholder={hr.string.Title} bind:value={title} kind={'large-style'} focus focusIndex={1} />

View File

@ -45,6 +45,7 @@
on:changeContent
okAction={() => {}}
okLabel={presentation.string.Ok}
on:changeContent
>
<svelte:fragment slot="header">
<EmployeePresenter value={employee} disableClick />

View File

@ -62,6 +62,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<StatusControl slot="error" {status} />
<div class="flex-row-center clear-mins">

View File

@ -74,6 +74,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -63,6 +63,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid column={1} rowGap={1.75}>
<EditBox label={inventory.string.Variant} bind:value={doc.name} placeholder={inventory.string.Variant} focus />

View File

@ -165,6 +165,7 @@
dispatch('close')
}}
bind:createMore
on:changeContent
>
<svelte:fragment slot="header">
<Button

View File

@ -108,6 +108,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector

View File

@ -14,9 +14,10 @@
-->
<script lang="ts">
import type { Doc, Ref } from '@hcengineering/core'
import { createQuery } from '@hcengineering/presentation'
import { Button, Icon, IconAdd, Label, resizeObserver, Scroller, showPopup } from '@hcengineering/ui'
import { BuildModelKey } from '@hcengineering/view'
import { Table } from '@hcengineering/view-resources'
import view, { Viewlet, ViewletPreference } from '@hcengineering/view'
import { getViewOptions, Table, ViewletSettingButton, viewOptionStore } from '@hcengineering/view-resources'
import recruit from '../plugin'
import CreateApplication from './CreateApplication.svelte'
import IconApplication from './icons/Application.svelte'
@ -29,13 +30,33 @@
const createApp = (ev: MouseEvent): void => {
showPopup(CreateApplication, { candidate: objectId, preserveCandidate: true }, ev.target as HTMLElement)
}
const config: (BuildModelKey | string)[] = [
'',
'$lookup.space.name',
'$lookup.space.$lookup.company',
'state',
'doneState'
]
let viewlet: Viewlet | undefined
let preference: ViewletPreference | undefined
let loading = true
const viewletQuery = createQuery()
$: viewletQuery.query(view.class.Viewlet, { _id: recruit.viewlet.VacancyApplicationsEmbeddeed }, (res) => {
;[viewlet] = res
})
$: viewOptions = viewlet !== undefined ? getViewOptions(viewlet, $viewOptionStore) : undefined
const preferenceQuery = createQuery()
$: viewlet &&
preferenceQuery.query(
view.class.ViewletPreference,
{
attachedTo: viewlet._id
},
(res) => {
preference = res[0]
loading = false
},
{ limit: 1 }
)
let wSection: number
</script>
@ -47,14 +68,17 @@
<span class="antiSection-header__title">
<Label label={recruit.string.Applications} />
</span>
{#if viewlet && viewOptions}
<ViewletSettingButton bind:viewOptions {viewlet} kind={'transparent'} />
{/if}
<Button id="appls.add" icon={IconAdd} kind={'transparent'} shape={'circle'} on:click={createApp} />
</div>
{#if applications > 0}
{#if applications > 0 && viewlet && !loading}
{#if wSection < 640}
<Scroller horizontal>
<Table
_class={recruit.class.Applicant}
{config}
config={preference?.config ?? viewlet.config}
query={{ attachedTo: objectId }}
loadingProps={{ length: applications }}
/>
@ -62,7 +86,7 @@
{:else}
<Table
_class={recruit.class.Applicant}
{config}
config={preference?.config ?? viewlet.config}
query={{ attachedTo: objectId }}
loadingProps={{ length: applications }}
/>
@ -75,6 +99,7 @@
<span class="dark-color">
<Label label={recruit.string.NoApplicationsForTalent} />
</span>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<span class="over-underline content-accent-color" on:click={createApp}>
<Label label={recruit.string.CreateAnApplication} />
</span>

View File

@ -30,9 +30,18 @@
<ObjectPresenter _class={value._class} objectId={value._id} {value} />
</DocNavLink>
</div>
<Table
_class={recruit.class.Applicant}
config={['', '$lookup.space.name', '$lookup.space.company', 'state', 'doneState']}
query={{ attachedTo: value._id }}
loadingProps={{ length: value.applications ?? 0 }}
/>
<div class="popup-table">
<Table
_class={recruit.class.Applicant}
config={['', '$lookup.space.name', '$lookup.space.company', 'state', 'doneState']}
query={{ attachedTo: value._id }}
loadingProps={{ length: value.applications ?? 0 }}
/>
</div>
<style lang="scss">
.popup-table {
overflow: auto;
max-height: 30rem;
}
</style>

View File

@ -302,6 +302,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="title">
<div class="flex-row-center gap-2">

View File

@ -504,6 +504,7 @@
}}
onCancel={showConfirmationDialog}
bind:createMore
on:changeContent
>
<svelte:fragment slot="header">
<Button

View File

@ -240,6 +240,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -19,9 +19,10 @@
import { Avatar } from '@hcengineering/contact-resources'
import { Hierarchy, WithLookup } from '@hcengineering/core'
import notification from '@hcengineering/notification'
import { getClient } from '@hcengineering/presentation'
import type { Applicant, Candidate } from '@hcengineering/recruit'
import recruit from '@hcengineering/recruit'
import { AssigneePresenter } from '@hcengineering/task-resources'
import { AssigneePresenter, StateRefPresenter } from '@hcengineering/task-resources'
import tracker from '@hcengineering/tracker'
import { Component, showPanel } from '@hcengineering/ui'
import view from '@hcengineering/view'
@ -30,6 +31,9 @@
export let object: WithLookup<Applicant>
export let dragged: boolean
export let groupByKey: string
const client = getClient()
function showCandidate () {
showPanel(view.component.EditDoc, object._id, Hierarchy.mixinOrClass(object), 'content')
@ -109,4 +113,12 @@
currentSpace={object.space}
/>
</div>
{#if groupByKey !== 'state'}
<StateRefPresenter
value={object.state}
onChange={(state) => {
client.update(object, { state })
}}
/>
{/if}
</div>

View File

@ -150,6 +150,7 @@
on:close
okAction={() => {}}
canSave={true}
on:changeContent
>
<Scroller horizontal>
<div

View File

@ -127,6 +127,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="title">
<div class="flex-row-center gap-2">

View File

@ -86,6 +86,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<StatusControl slot="error" {status} />
<EditBox

View File

@ -152,6 +152,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<StatusControl slot="error" {status} />
<EditBox placeholder={recruit.string.Title} bind:value={title} kind={'large-style'} focus />

View File

@ -66,6 +66,7 @@
dispatch('close')
}}
okLabel={recruit.string.OpinionSave}
on:changeContent
>
<EditBox
label={recruit.string.OpinionValue}

View File

@ -24,7 +24,8 @@ import { FilterFunction, FilterMode, Viewlet } from '@hcengineering/view'
export default mergeIds(recruitId, recruit, {
viewlet: {
VacancyApplicationsShort: '' as Ref<Viewlet>
VacancyApplicationsShort: '' as Ref<Viewlet>,
VacancyApplicationsEmbeddeed: '' as Ref<Viewlet>
},
status: {
ApplicationExists: '' as StatusCode,

View File

@ -102,6 +102,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="mb-2"><EditBox bind:value={name} placeholder={core.string.Name} /></div>
<div class="flex-col mb-2">

View File

@ -49,6 +49,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<div class="flex-row-center">

View File

@ -99,6 +99,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="mb-2"><EditBox bind:value={name} placeholder={core.string.Name} /></div>
<div class="flex-col mb-2">

View File

@ -72,6 +72,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="mb-2">
<EditBox bind:value={name} placeholder={setting.string.NewClassName} />

View File

@ -171,6 +171,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div on:keydown={onKeydown}>
<div class="mb-2">

View File

@ -108,6 +108,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-top clear-mins">
<div class="mr-3">

View File

@ -98,6 +98,7 @@
dispatch('close')
}}
okLabel={tags.string.SaveLabel}
on:changeContent
>
<div class="flex-row-center">
<div class="flex-col">

View File

@ -257,7 +257,7 @@
</div>
</svelte:fragment>
<svelte:fragment slot="card" let:object let:dragged>
<svelte:component this={presenter} {object} {dragged} />
<svelte:component this={presenter} {object} {dragged} {groupByKey} />
</svelte:fragment>
// eslint-disable-next-line no-undef
<svelte:fragment slot="doneBar" let:onDone>

View File

@ -25,7 +25,7 @@
</script>
{#if value}
{@const state = $statusStore.get(typeof value === 'string' ? value : value.values[0]._id)}
{@const state = $statusStore.get(typeof value === 'string' ? value : value.values?.[0]?._id)}
{#if onChange !== undefined && state !== undefined}
<StateEditor value={state._id} space={state.space} {onChange} kind="link" size="medium" />
{:else}

View File

@ -73,6 +73,7 @@
dispatch('close')
}}
okLabel={plugin.string.TodoSave}
on:changeContent
>
<Grid column={1} rowGap={1.75}>
<EditBox

View File

@ -70,6 +70,7 @@
dispatch('close')
}}
okLabel={plugin.string.TodoSave}
on:changeContent
>
<Grid column={1} rowGap={1.75}>
<EditBox

View File

@ -40,6 +40,7 @@ import DoneStateRefPresenter from './components/state/DoneStateRefPresenter.svel
import StateRefPresenter from './components/state/StateRefPresenter.svelte'
export { default as AssigneePresenter } from './components/AssigneePresenter.svelte'
export { StateRefPresenter }
async function editStatuses (object: SpaceWithStates): Promise<void> {
showPopup(EditStatuses, { _id: object._id, spaceClass: object._class }, 'float')

View File

@ -41,6 +41,7 @@
on:close={() => dispatch('close')}
fullSize
canSave={space !== undefined && value.space !== space}
on:changeContent
>
<SpaceSelector bind:space _class={templates.class.TemplateCategory} label={templates.string.Copy} />
</Card>

View File

@ -47,6 +47,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid rowGap={1}>
<Label label={core.string.Name} />

View File

@ -41,6 +41,7 @@
fullSize
on:close={() => dispatch('close')}
canSave={space !== value.space}
on:changeContent
>
<SpaceSelector bind:space _class={templates.class.TemplateCategory} label={view.string.Move} />
</Card>

View File

@ -59,6 +59,7 @@
canSave={object.label !== ''}
okLabel={tracker.string.CreateComponent}
on:close={() => dispatch('close')}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector _class={tracker.class.Project} label={tracker.string.Project} bind:space />

View File

@ -22,5 +22,5 @@
</script>
{#if value}
<StatusPresenter value={$statusStore.get(typeof value === 'string' ? value : value.values[0]?._id)} {size} />
<StatusPresenter value={$statusStore.get(typeof value === 'string' ? value : value.values?.[0]?._id)} {size} />
{/if}

View File

@ -71,6 +71,7 @@
on:close={() => {
dispatch('close', null)
}}
on:changeContent
>
<svelte:fragment slot="title">
<div class="flex-row-center">

View File

@ -59,6 +59,7 @@
on:close
okAction={() => {}}
okLabel={presentation.string.Ok}
on:changeContent
>
<svelte:fragment slot="header">
<IssuePresenter value={issue} disableClick />

View File

@ -91,6 +91,7 @@
okAction={create}
on:close
okLabel={value === undefined ? presentation.string.Create : presentation.string.Save}
on:changeContent
>
<svelte:fragment slot="header">
{#if issue}

View File

@ -32,6 +32,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="float-left-box">
<div class="float-left p-2">

View File

@ -171,6 +171,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center flex-between">
<EditBox

View File

@ -23,6 +23,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="float-left-box">
{#each icons as obj}

View File

@ -65,6 +65,7 @@
{canSave}
okAction={onSave}
on:close={() => dispatch('close')}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector _class={tracker.class.Project} label={tracker.string.Project} bind:space />

View File

@ -38,6 +38,7 @@
okLabel={tracker.string.Delete}
okAction={() => moveAndDeleteSprint(selectedSprint)}
on:close
on:changeContent
>
<SprintPopup
_class={tracker.class.Sprint}

View File

@ -69,6 +69,7 @@
canSave={object.label !== ''}
okLabel={tracker.string.CreateSprint}
on:close={() => dispatch('close')}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector _class={tracker.class.Project} label={tracker.string.Project} bind:space />

View File

@ -129,6 +129,7 @@
dispatch('close')
}}
createMore={false}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector _class={tracker.class.Project} label={tracker.string.Project} bind:space={_space} />

View File

@ -303,6 +303,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
{#if loading}
<Loading />

View File

@ -41,6 +41,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">

View File

@ -26,5 +26,5 @@
</script>
{#if value}
<StatusPresenter value={$statusStore.get(typeof value === 'string' ? value : value.values[0]._id)} {size} {icon} />
<StatusPresenter value={$statusStore.get(typeof value === 'string' ? value : value.values?.[0]._id)} {size} {icon} />
{/if}