Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSK-1007: Add comments in talent editor #2922

Merged
merged 1 commit into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions models/recruit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions packages/text-editor/src/components/LinkPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox placeholder={linkPlaceholder} bind:value={link} focus />
</Card>
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
okLabel={presentation.string.Save}
okAction={save}
canSave={icon !== undefined}
on:changeContent
on:close={() => {
dispatch('close')
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
okLabel={presentation.string.Ok}
on:close={() => dispatch('close')}
fullSize={true}
on:changeContent
>
<svelte:fragment slot="header">
{#if profile}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
}}
okLabel={getEmbeddedLabel('Close')}
on:close
on:changeContent
>
{#if integration && bitrixClient}
{#each mappings as mapping}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
okAction={save}
okLabel={presentation.string.Save}
on:close
on:changeContent
>
<svelte:fragment slot="header">
<Label label={attribute.label} />
Expand Down
1 change: 1 addition & 0 deletions plugins/board-resources/src/components/CreateCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid column={1} rowGap={1.75}>
<div class="antiComponentBox">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<EditBox
label={chunter.string.ChannelName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="error">
{#if matches.length > 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<!-- <div class="mr-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="error">
{#if matches.length > 0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<Grid column={1} rowGap={1}>
<EditBox bind:value={statusName} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center">
<Label label={contact.string.AvatarProvider} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">
Expand Down
1 change: 1 addition & 0 deletions plugins/gmail-resources/src/components/Configure.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
fullSize
okLabel={presentation.string.Ok}
on:close={() => dispatch('close')}
on:changeContent
>
<div style="width: 25rem;">
<Grid rowGap={1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">
Expand Down
1 change: 1 addition & 0 deletions plugins/hr-resources/src/components/CreateRequest.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<EmployeeBox
Expand Down
1 change: 1 addition & 0 deletions plugins/hr-resources/src/components/EditRequestType.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="mr-3">
{#if typesToChange !== undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
on:changeContent
okAction={() => {}}
okLabel={presentation.string.Ok}
on:changeContent
>
<svelte:fragment slot="header">
<EmployeePresenter value={employee} disableClick />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<StatusControl slot="error" {status} />
<div class="flex-row-center clear-mins">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<div class="flex-row-center clear-mins">
<div class="mr-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
dispatch('close')
}}
bind:createMore
on:changeContent
>
<svelte:fragment slot="header">
<Button
Expand Down
1 change: 1 addition & 0 deletions plugins/lead-resources/src/components/CreateLead.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="header">
<SpaceSelector
Expand Down
49 changes: 37 additions & 12 deletions plugins/recruit-resources/src/components/Applications.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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>

Expand All @@ -47,22 +68,25 @@
<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 }}
/>
</Scroller>
{:else}
<Table
_class={recruit.class.Applicant}
{config}
config={preference?.config ?? viewlet.config}
query={{ attachedTo: objectId }}
loadingProps={{ length: applications }}
/>
Expand All @@ -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>
Expand Down
21 changes: 15 additions & 6 deletions plugins/recruit-resources/src/components/ApplicationsPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@
on:close={() => {
dispatch('close')
}}
on:changeContent
>
<svelte:fragment slot="title">
<div class="flex-row-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@
}}
onCancel={showConfirmationDialog}
bind:createMore
on:changeContent
>
<svelte:fragment slot="header">
<Button
Expand Down
Loading