diff --git a/models/lead/src/index.ts b/models/lead/src/index.ts index 4208af945d..c64fa48af8 100644 --- a/models/lead/src/index.ts +++ b/models/lead/src/index.ts @@ -17,7 +17,7 @@ import type { Employee } from '@anticrm/contact' import { Class, Doc, FindOptions, IndexKind, Ref } from '@anticrm/core' import type { Customer, Funnel, Lead } from '@anticrm/lead' -import { Builder, Collection, Index, Mixin, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model' +import { Builder, Collection, Index, Mixin, Model, Prop, TypeRef, TypeString, TypeMarkup, UX } from '@anticrm/model' import attachment from '@anticrm/model-attachment' import chunter from '@anticrm/model-chunter' import contact, { TContact } from '@anticrm/model-contact' @@ -30,7 +30,17 @@ import lead from './plugin' @Model(lead.class.Funnel, task.class.SpaceWithStates) @UX(lead.string.Funnel, lead.icon.Funnel) -export class TFunnel extends TSpaceWithStates implements Funnel {} +export class TFunnel extends TSpaceWithStates implements Funnel { + @Prop(TypeMarkup(), lead.string.FullDescription) + @Index(IndexKind.FullText) + fullDescription?: string + + @Prop(Collection(attachment.class.Attachment), attachment.string.Attachments, undefined, attachment.string.Files) + attachments?: number + + @Prop(Collection(chunter.class.Comment), chunter.string.Comments) + comments?: number +} @Model(lead.class.Lead, task.class.Task) @UX(lead.string.Lead, lead.icon.Lead, undefined, 'title') @@ -79,6 +89,10 @@ export function createModel (builder: Builder): void { } }) + builder.mixin(lead.class.Funnel, core.class.Class, view.mixin.ObjectEditor, { + editor: lead.component.EditFunnel + }) + builder.mixin(lead.class.Lead, core.class.Class, setting.mixin.Editable, {}) builder.createDoc( diff --git a/models/recruit/src/plugin.ts b/models/recruit/src/plugin.ts index 60333d0d74..f470ea095f 100644 --- a/models/recruit/src/plugin.ts +++ b/models/recruit/src/plugin.ts @@ -42,7 +42,6 @@ export default mergeIds(recruitId, recruit, { SearchApplication: '' as IntlString, Application: '' as IntlString, AssignedRecruiter: '' as IntlString, - FullDescription: '' as IntlString, Due: '' as IntlString, Source: '' as IntlString, ManageVacancyStatuses: '' as IntlString, diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index 029475e524..2c07109a48 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -102,7 +102,7 @@ {:else} -
+
diff --git a/packages/presentation/src/components/Members.svelte b/packages/presentation/src/components/Members.svelte index 0a74b3a3b9..b1dd646b1e 100644 --- a/packages/presentation/src/components/Members.svelte +++ b/packages/presentation/src/components/Members.svelte @@ -69,61 +69,59 @@ } -
-
- {#await getUsers(space.members, search) then users} - {@const current = users.filter((p) => members.has(p._id))} - {@const foreign = users.filter((p) => !members.has(p._id))} - {#if isSearch && !foreign.length && !current.length} -
-
- {:else} - {#if isSearch} -
- {#if !current.length} -
-
- {/if} - {/if} - {#if !isSearch && withAddButton} -
-
dispatch('addMembers')}> -
-
-
-
-
- {/if} - {#each current as person} -
- {/each} - {#if foreign.length} -
-
-
- {#each foreign as person} -
-
-
add(person._id)}> -
-
- {/each} +
+{#await getUsers(space.members, search) then users} + {@const current = users.filter((p) => members.has(p._id))} + {@const foreign = users.filter((p) => !members.has(p._id))} + {#if isSearch && !foreign.length && !current.length} +
+
+ {:else} + {#if isSearch} +
+ {#if !current.length} +
+
{/if} {/if} - {/await} - {#if withInviteWorkspaceButton} -
-
-
+ {/if} + {#each current as person} +
+ {/each} + {#if foreign.length} +
+
+
+ {#each foreign as person} +
+
+
add(person._id)}> +
+
+ {/each} +
+ {/if} {/if} -
+{/await} +{#if withInviteWorkspaceButton} +
+
+
+
+{/if} diff --git a/packages/text-editor/src/components/StyledTextEditor.svelte b/packages/text-editor/src/components/StyledTextEditor.svelte index 04fab5cd9d..39e5abe161 100644 --- a/packages/text-editor/src/components/StyledTextEditor.svelte +++ b/packages/text-editor/src/components/StyledTextEditor.svelte @@ -28,8 +28,9 @@ export let content: string = '' export let placeholder: IntlString = textEditorPlugin.string.EditorPlaceholder - export let showButtons = true - export let isScrollable = true + export let showButtons: boolean = true + export let isScrollable: boolean = true + export let focusable: boolean = false export let maxHeight: 'max' | 'card' | string = 'max' let textEditor: TextEditor @@ -51,7 +52,7 @@
-
+
{#if isScrollable} @@ -132,6 +133,17 @@ max-height: var(--texteditor-maxheight); } } + + &.focusable { + margin: -0.25rem -0.5rem; + padding: 0.25rem 0.5rem; + border: 1px solid transparent; + border-radius: 0.25rem; + + &:focus-within { + border-color: var(--primary-edit-border-color); + } + } } .buttons { margin: 10px 0 0 8px; diff --git a/packages/text-editor/src/components/icons/Description.svelte b/packages/text-editor/src/components/icons/Description.svelte new file mode 100644 index 0000000000..c0bcba832a --- /dev/null +++ b/packages/text-editor/src/components/icons/Description.svelte @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/packages/text-editor/src/index.ts b/packages/text-editor/src/index.ts index 090beb01b1..73d74d8c98 100644 --- a/packages/text-editor/src/index.ts +++ b/packages/text-editor/src/index.ts @@ -24,6 +24,7 @@ export { default as StyledTextArea } from './components/StyledTextArea.svelte' export { default as StyledTextEditor } from './components/StyledTextEditor.svelte' export { default as TextEditor } from './components/TextEditor.svelte' export { default as EmojiPopup } from './components/EmojiPopup.svelte' +export { default as FullDescriptionBox } from './components/FullDescriptionBox.svelte' export { default } from './plugin' export * from './types' diff --git a/packages/text-editor/src/plugin.ts b/packages/text-editor/src/plugin.ts index 2cc680feee..30ea4ec5aa 100644 --- a/packages/text-editor/src/plugin.ts +++ b/packages/text-editor/src/plugin.ts @@ -52,6 +52,8 @@ export default plugin(textEditorId, { Symbols: '' as IntlString, TravelAndPlaces: '' as IntlString, Food: '' as IntlString, - Objects: '' as IntlString + Objects: '' as IntlString, + FullDescription: '' as IntlString, + NoFullDescription: '' as IntlString } }) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 4074524fa8..4f336d7c21 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -376,6 +376,7 @@ input.search { .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; } +.mt-8 { margin-top: 2rem; } .mt-9 { margin-top: 2.25rem; } .mt-10 { margin-top: 2.5rem; } .mt-14 { margin-top: 3.5rem; } @@ -406,6 +407,7 @@ input.search { .pt-2 { padding-top: .5rem; } .pt-3 { padding-top: .75rem; } .pt-4 { padding-top: 1rem; } +.pt-6 { padding-top: 1.5rem; } .pb-2 { padding-bottom: .5rem; } .pb-3 { padding-bottom: .75rem; } .pb-4 { padding-bottom: 1rem; } @@ -416,6 +418,7 @@ input.search { .px-4 { padding: 0 1rem; } .py-1 { padding: 0.25rem 0; } .py-4 { padding: 1rem 0; } +.py-8 { padding: 2rem 0; } .py-10 { padding: 2.5rem 0; } .p-1 { padding: .25rem; } diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index de1757b9f3..a6a79b8cf5 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -260,6 +260,58 @@ background-color: var(--divider-color); } +.antiSection { + display: flex; + flex-direction: column; + flex-shrink: 0; + min-height: 0; + + &-header { + display: flex; + align-items: center; + height: 2.5rem; + min-height: 2.5rem; + border-bottom: 1px solid var(--divider-color); + + &__icon { + display: flex; + justify-content: center; + align-items: center; + margin-right: .5rem; + height: 2rem; + color: var(--caption-color); + } + &__title { + flex-grow: 1; + min-width: 0; + font-weight: 500; + font-size: 1rem; + color: var(--caption-color); + } + } + &-empty { + display: flex; + justify-content: center; + align-items: center; + padding: 1rem; + font-size: .75rem; + color: var(--dark-color); + border: 1px dashed var(--divider-color); + border-radius: 0.75rem; + + &.solid { border-style: solid; } + &.items { + justify-content: start; + padding: .75rem; + } + &.solid.attachments { + background-color: var(--accent-bg-color); + + .item { border-style: solid; } + } + } +} + // Button on selected card in Kanban .card-container.checked .button.inline.link-bordered { background-color: var(--highlight-select); diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index 9be224ba7d..436ad6b190 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -70,13 +70,13 @@ .ac-header__icon { margin-right: 0.5rem; - color: var(--theme-content-color); + color: var(--content-color); } .ac-header__title { min-width: 0; font-weight: 500; font-size: 1rem; - color: var(--theme-caption-color); + color: var(--caption-color); overflow: hidden; text-overflow: ellipsis; @@ -86,7 +86,7 @@ .ac-header__description { min-width: 0; font-size: 0.75rem; - color: var(--theme-content-dark-color); + color: var(--dark-color); overflow: hidden; visibility: visible; diff --git a/packages/ui/src/components/Button.svelte b/packages/ui/src/components/Button.svelte index b70443b0b1..25cebd7ac3 100644 --- a/packages/ui/src/components/Button.svelte +++ b/packages/ui/src/components/Button.svelte @@ -328,7 +328,7 @@ } } &.primary { - padding: 0 1rem; + padding: 0 0.75rem; color: var(--white-color); background-color: var(--primary-bg-color); border-color: var(--primary-bg-color); diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index bf2c52bda8..ea37ca6a85 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -31,6 +31,7 @@ export let format: 'text' | 'password' | 'number' = 'text' export let kind: EditStyle = 'editbox' export let focus: boolean = false + export let focusable: boolean = false const dispatch = createEventDispatcher() @@ -50,6 +51,8 @@ text.innerHTML = (value === '' ? phTraslate : value).replaceAll(' ', ' ') if (format === 'number') { target.style.width = maxWidth ?? '5rem' + } else if (kind === 'underline') { + target.style.width = `calc(${text.clientWidth}px + 1.125rem)` } else { target.style.width = text.clientWidth + 'px' } @@ -87,18 +90,27 @@ $: if (input) { input.addEventListener('focus', updateFocus, { once: true }) } + + export function focused (): void { + input.focus() + }
{ input.focus() }} >
- {#if label}
{/if} -
+ {#if label} +
+
+ {/if} +
{#if icon}
@@ -151,15 +163,6 @@ flex-direction: column; align-items: flex-start; - .label { - margin-bottom: 0.25rem; - font-size: 0.75rem; - font-weight: 500; - color: var(--theme-content-accent-color); - pointer-events: none; - user-select: none; - } - .large-style { font-weight: 500; font-size: 1.125rem; @@ -172,6 +175,32 @@ font-weight: 400; padding: 0.625rem 0.75rem; } + .underline { + font-weight: 500; + + input { + padding: 0.25rem 0.5rem; + background-color: var(--accent-bg-color); + border: 1px solid transparent; + border-radius: 0.25rem; + + &:focus { + border: 1px solid var(--primary-edit-border-color); + } + } + } + .focusable { + margin: 0 -0.75rem; + padding: 0.625rem 0.75rem; + width: calc(100% + 1.5rem); + border: 1px solid transparent; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out; + + &:focus-within { + border-color: var(--primary-edit-border-color); + } + } input { margin: 0; diff --git a/packages/ui/src/components/icons/Activity.svelte b/packages/ui/src/components/icons/Activity.svelte index a4999e6325..ff8361fe73 100644 --- a/packages/ui/src/components/icons/Activity.svelte +++ b/packages/ui/src/components/icons/Activity.svelte @@ -5,12 +5,12 @@ diff --git a/packages/ui/src/types.ts b/packages/ui/src/types.ts index 6ebc5a67c1..91bc72bfe0 100644 --- a/packages/ui/src/types.ts +++ b/packages/ui/src/types.ts @@ -91,7 +91,7 @@ export type ButtonKind = | 'list' export type ButtonSize = 'inline' | 'small' | 'medium' | 'large' | 'x-large' export type ButtonShape = 'rectangle' | 'rectangle-left' | 'rectangle-right' | 'circle' | 'round' | undefined -export type EditStyle = 'editbox' | 'large-style' | 'small-style' | 'search-style' +export type EditStyle = 'editbox' | 'large-style' | 'small-style' | 'search-style' | 'underline' export interface PopupPositionElement { getBoundingClientRect: () => DOMRect position?: { diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index 41bda77c12..8cb65d1d02 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -113,12 +113,10 @@
{:else} -
-
-
-
- -
+ +
+
+
{#if showCommenInput}
@@ -137,15 +135,6 @@ {/if} diff --git a/plugins/attachment-resources/src/components/Photos.svelte b/plugins/attachment-resources/src/components/Photos.svelte index ff6eac0ae6..ff20022214 100644 --- a/plugins/attachment-resources/src/components/Photos.svelte +++ b/plugins/attachment-resources/src/components/Photos.svelte @@ -18,7 +18,7 @@ import { Class, Doc, Ref, Space } from '@anticrm/core' import { setPlatformStatus, unknownError } from '@anticrm/platform' import { createQuery, getClient, getFileUrl, PDFViewer } from '@anticrm/presentation' - import { CircleButton, IconAdd, Label, showPopup, Spinner } from '@anticrm/ui' + import { Button, IconAdd, Label, showPopup, Spinner } from '@anticrm/ui' import attachment from '../plugin' import { uploadFile } from '../utils' import UploadDuo from './icons/UploadDuo.svelte' @@ -94,16 +94,18 @@ } -
-
- +
+
+ + {#if loading} {:else} - { inputFile.click() }} @@ -122,7 +124,7 @@
{ dragover = true @@ -149,47 +151,26 @@
diff --git a/plugins/attachment-resources/src/components/icons/Attachment.svelte b/plugins/attachment-resources/src/components/icons/Attachment.svelte new file mode 100644 index 0000000000..705d2bdc9d --- /dev/null +++ b/plugins/attachment-resources/src/components/icons/Attachment.svelte @@ -0,0 +1,24 @@ + + + + + + diff --git a/plugins/contact-resources/src/components/Members.svelte b/plugins/contact-resources/src/components/Members.svelte index 1485c20fb6..625279e017 100644 --- a/plugins/contact-resources/src/components/Members.svelte +++ b/plugins/contact-resources/src/components/Members.svelte @@ -15,8 +15,8 @@ -
-
-
- -
+
+
+
+ +
+ + +
+
{#if members > 0 && descr} @@ -109,35 +114,13 @@ loadingProps={{ length: members }} /> {:else} -
-
+
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/hr-resources/src/components/DepartmentStaff.svelte b/plugins/hr-resources/src/components/DepartmentStaff.svelte index 5b52cacf5e..6c73e804c1 100644 --- a/plugins/hr-resources/src/components/DepartmentStaff.svelte +++ b/plugins/hr-resources/src/components/DepartmentStaff.svelte @@ -19,7 +19,7 @@ import { Ref, SortingOrder, WithLookup } from '@anticrm/core' import { Department, DepartmentMember, Staff } from '@anticrm/hr' import { createQuery, getClient, MessageBox, UsersPopup } from '@anticrm/presentation' - import { CircleButton, eventToHTMLElement, IconAdd, Label, Scroller, showPopup } from '@anticrm/ui' + import { Button, eventToHTMLElement, IconAdd, Label, Scroller, showPopup } from '@anticrm/ui' import hr from '../plugin' export let objectId: Ref | undefined @@ -129,10 +129,12 @@ } -
-
-
- +
+
+ + +
{#if employees.length > 0} @@ -158,35 +160,13 @@ {:else} -
-
+
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/inventory-resources/src/components/Variants.svelte b/plugins/inventory-resources/src/components/Variants.svelte index cf27603376..944c7b9272 100644 --- a/plugins/inventory-resources/src/components/Variants.svelte +++ b/plugins/inventory-resources/src/components/Variants.svelte @@ -14,7 +14,7 @@ --> -
-
-
- +
+
+ + +
{#if variants > 0} {:else} -
- -
+
+
+ +
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/lead-assets/lang/en.json b/plugins/lead-assets/lang/en.json index 149b65922b..4e88c24c17 100644 --- a/plugins/lead-assets/lang/en.json +++ b/plugins/lead-assets/lang/en.json @@ -26,6 +26,10 @@ "IssueDescriptionPlaceholder": "Add description...", "CreateCustomer": "Create Customer", "CreateCustomerLabel": "New Customer", - "NoLeadsForDocument": "No leads for document" + "NoLeadsForDocument": "No leads for document", + "Description": "Description", + "FullDescription": "Full description", + "FunnelPlaceholder": "The simple funnel", + "Members": "Members" } } \ No newline at end of file diff --git a/plugins/lead-assets/lang/ru.json b/plugins/lead-assets/lang/ru.json index 0253972c64..cb2a8cd3d4 100644 --- a/plugins/lead-assets/lang/ru.json +++ b/plugins/lead-assets/lang/ru.json @@ -26,6 +26,10 @@ "IssueDescriptionPlaceholder": "Добавить описание...", "CreateCustomer": "Добавить Клиента", "CreateCustomerLabel": "Новый Клиент", - "NoLeadsForDocument": "Нет потенциальных клиентов для документа" + "NoLeadsForDocument": "Нет потенциальных клиентов для документа", + "Description": "Описание", + "FullDescription": "Детальное описание", + "FunnelPlaceholder": "Простая воронка", + "Members": "Пользователи" } } \ No newline at end of file diff --git a/plugins/lead-resources/src/components/EditFunnel.svelte b/plugins/lead-resources/src/components/EditFunnel.svelte new file mode 100644 index 0000000000..5098655f80 --- /dev/null +++ b/plugins/lead-resources/src/components/EditFunnel.svelte @@ -0,0 +1,122 @@ + + + +{#if object} + { + dispatch('close') + }} + > + + {#if dir === 'column'} +
+
+ +
+
+ {/if} +
+ + + { + if (object.name.trim().length > 0) { + onChange('name', object.name) + } else { + // Revert previos object.name + updateObject(_id) + } + }} + /> + { + onChange('description', object.description) + }} + /> + { + if (result.detail !== undefined) onChange('fullDescription', result.detail) + }} + /> + + + +
+{/if} diff --git a/plugins/lead-resources/src/components/EditLead.svelte b/plugins/lead-resources/src/components/EditLead.svelte index 315911834d..8d23ca96fb 100644 --- a/plugins/lead-resources/src/components/EditLead.svelte +++ b/plugins/lead-resources/src/components/EditLead.svelte @@ -38,12 +38,11 @@ {#if object !== undefined} change('title', object.title)} /> import type { Ref } from '@anticrm/core' import type { Customer } from '@anticrm/lead' - import { CircleButton, IconAdd, Label, showPopup } from '@anticrm/ui' + import { Button, IconAdd, Label, showPopup } from '@anticrm/ui' import { Table } from '@anticrm/view-resources' import lead from '../plugin' import CreateLead from './CreateLead.svelte' @@ -29,10 +29,12 @@ } -
-
-
- +
+
+ + +
{#if leads !== undefined && leads > 0}
{:else} -
-
+
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/lead-resources/src/index.ts b/plugins/lead-resources/src/index.ts index da14882062..318bcf396f 100644 --- a/plugins/lead-resources/src/index.ts +++ b/plugins/lead-resources/src/index.ts @@ -26,6 +26,7 @@ import TemplatesIcon from './components/TemplatesIcon.svelte' import CreateCustomer from './components/CreateCustomer.svelte' import NewItemsHeader from './components/NewItemsHeader.svelte' import { getLeadTitle } from './utils' +import EditFunnel from './components/EditFunnel.svelte' export default async (): Promise => ({ component: { @@ -38,7 +39,8 @@ export default async (): Promise => ({ LeadsPresenter, Leads, CreateCustomer, - NewItemsHeader + NewItemsHeader, + EditFunnel }, function: { LeadTitleProvider: getLeadTitle diff --git a/plugins/lead-resources/src/plugin.ts b/plugins/lead-resources/src/plugin.ts index 0d11554298..698fc31d64 100644 --- a/plugins/lead-resources/src/plugin.ts +++ b/plugins/lead-resources/src/plugin.ts @@ -37,12 +37,17 @@ export default mergeIds(leadId, lead, { LeadPlaceholder: '' as IntlString, CreateCustomer: '' as IntlString, IssueDescriptionPlaceholder: '' as IntlString, - CreateCustomerLabel: '' as IntlString + CreateCustomerLabel: '' as IntlString, + Description: '' as IntlString, + FullDescription: '' as IntlString, + FunnelPlaceholder: '' as IntlString, + Members: '' as IntlString }, component: { CreateCustomer: '' as AnyComponent, LeadsPresenter: '' as AnyComponent, - CreateFunnel: '' as AnyComponent + CreateFunnel: '' as AnyComponent, + EditFunnel: '' as AnyComponent }, function: { LeadTitleProvider: '' as Resource<(client: Client, ref: Ref) => Promise> diff --git a/plugins/lead/src/index.ts b/plugins/lead/src/index.ts index c9edc1c5b6..a900c7621e 100644 --- a/plugins/lead/src/index.ts +++ b/plugins/lead/src/index.ts @@ -24,7 +24,10 @@ import type { KanbanTemplateSpace, SpaceWithStates, Task } from '@anticrm/task' /** * @public */ -export interface Funnel extends SpaceWithStates {} +export interface Funnel extends SpaceWithStates { + fullDescription?: string + attachments?: number +} /** * @public diff --git a/plugins/recruit-resources/src/components/Applications.svelte b/plugins/recruit-resources/src/components/Applications.svelte index 9612fe58d8..0cb5f9829d 100644 --- a/plugins/recruit-resources/src/components/Applications.svelte +++ b/plugins/recruit-resources/src/components/Applications.svelte @@ -14,12 +14,13 @@ --> -
-
-
- +
+
+
+ +
+ + +
{#if applications > 0}
{:else} -
- -
+
+
+ +
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/recruit-resources/src/components/EditVacancy.svelte b/plugins/recruit-resources/src/components/EditVacancy.svelte index 3470c27a53..48a1a42602 100644 --- a/plugins/recruit-resources/src/components/EditVacancy.svelte +++ b/plugins/recruit-resources/src/components/EditVacancy.svelte @@ -18,10 +18,10 @@ import type { Ref } from '@anticrm/core' import core from '@anticrm/core' import { Panel } from '@anticrm/panel' - import { createQuery, getClient, Members } from '@anticrm/presentation' + import { createQuery, getClient, MembersBox } from '@anticrm/presentation' import { Vacancy } from '@anticrm/recruit' - import { StyledTextBox } from '@anticrm/text-editor' - import { EditBox, Grid, Label } from '@anticrm/ui' + import { FullDescriptionBox } from '@anticrm/text-editor' + import { EditBox, Grid } from '@anticrm/ui' import { ClassAttributeBar } from '@anticrm/view-resources' import { createEventDispatcher } from 'svelte' import recruit from '../plugin' @@ -52,9 +52,9 @@ {#if object} @@ -80,11 +79,12 @@ { if (object.name.trim().length > 0) { onChange('name', object.name) @@ -95,52 +95,28 @@ }} /> { onChange('description', object.description) }} /> - -
- Details -
- { - onChange('fullDescription', evt.detail) - }} - /> -
-
-
+ { + if (result.detail !== undefined) onChange('fullDescription', result.detail) + }} + /> -
-
- - - -
+ +
{/if} - - diff --git a/plugins/recruit-resources/src/components/icons/Application.svelte b/plugins/recruit-resources/src/components/icons/Application.svelte new file mode 100644 index 0000000000..edece00833 --- /dev/null +++ b/plugins/recruit-resources/src/components/icons/Application.svelte @@ -0,0 +1,34 @@ + + + + + + + + + + + diff --git a/plugins/recruit-resources/src/components/review/EditReview.svelte b/plugins/recruit-resources/src/components/review/EditReview.svelte index ca26b5554d..42ee843c1a 100644 --- a/plugins/recruit-resources/src/components/review/EditReview.svelte +++ b/plugins/recruit-resources/src/components/review/EditReview.svelte @@ -18,8 +18,8 @@ import contact, { Contact } from '@anticrm/contact' import { getClient, UserBox } from '@anticrm/presentation' import type { Review } from '@anticrm/recruit' - import { StyledTextBox } from '@anticrm/text-editor' - import { EditBox, Grid, showPanel, StylishEdit } from '@anticrm/ui' + import { FullDescriptionBox } from '@anticrm/text-editor' + import { EditBox, Grid, showPanel } from '@anticrm/ui' import view from '@anticrm/view' import { createEventDispatcher, onMount } from 'svelte' import recruit from '../../plugin' @@ -46,48 +46,51 @@ {#if object !== undefined} - - client.update(object, { title: object.title })} - /> -
{ - if (candidate !== undefined) { - showPanel(view.component.EditDoc, candidate._id, candidate._class, 'content') - } - }} - > - + + client.update(object, { title: object.title })} /> -
-
-
- { + if (candidate !== undefined) { + showPanel(view.component.EditDoc, candidate._id, candidate._class, 'content') + } + }} + > + +
+ + { client.update(object, { description: evt.detail }) }} /> - - client.update(object, { verdict: object.verdict })} - /> + client.update(object, { verdict: object.verdict })} + /> + {/if} diff --git a/plugins/recruit-resources/src/components/review/Opinions.svelte b/plugins/recruit-resources/src/components/review/Opinions.svelte index 0d36c34a2d..827dd55f6c 100644 --- a/plugins/recruit-resources/src/components/review/Opinions.svelte +++ b/plugins/recruit-resources/src/components/review/Opinions.svelte @@ -14,7 +14,7 @@ --> -
-
-
- +
+
+ + +
{#if opinions > 0}
{:else} -
- -
+
+
+ +
+
-
-
-
-
+ +
{/if}
- - diff --git a/plugins/recruit-resources/src/components/review/Reviews.svelte b/plugins/recruit-resources/src/components/review/Reviews.svelte index 96ca362af2..1fc3ce3f8a 100644 --- a/plugins/recruit-resources/src/components/review/Reviews.svelte +++ b/plugins/recruit-resources/src/components/review/Reviews.svelte @@ -17,7 +17,7 @@ import core from '@anticrm/core' import { IntlString } from '@anticrm/platform' import calendar from '@anticrm/calendar' - import { CircleButton, IconAdd, Label, showPopup } from '@anticrm/ui' + import { Button, IconAdd, Label, showPopup } from '@anticrm/ui' import { Table } from '@anticrm/view-resources' import recruit from '../../plugin' import FileDuo from '../icons/FileDuo.svelte' @@ -32,10 +32,12 @@ } -
-
-
- +
+
+ + +
{#if reviews > 0}
{:else} -
- -
+
+
+ +
+
-
-
-
+ + +
{/if}
- - diff --git a/plugins/recruit-resources/src/plugin.ts b/plugins/recruit-resources/src/plugin.ts index 67178581c5..48d6793641 100644 --- a/plugins/recruit-resources/src/plugin.ts +++ b/plugins/recruit-resources/src/plugin.ts @@ -97,7 +97,8 @@ export default mergeIds(recruitId, recruit, { AddDescription: '' as IntlString, NumberSkills: '' as IntlString, AddDropHere: '' as IntlString, - TalentSelect: '' as IntlString + TalentSelect: '' as IntlString, + FullDescription: '' as IntlString }, space: { CandidatesPublic: '' as Ref diff --git a/plugins/tags-resources/src/components/TagsEditor.svelte b/plugins/tags-resources/src/components/TagsEditor.svelte index 0635c049ae..2d93dfba95 100644 --- a/plugins/tags-resources/src/components/TagsEditor.svelte +++ b/plugins/tags-resources/src/components/TagsEditor.svelte @@ -17,7 +17,7 @@ import { translate } from '@anticrm/platform' import { KeyedAttribute } from '@anticrm/presentation' import { TagElement, TagReference } from '@anticrm/tags' - import { CircleButton, IconAdd, IconClose, Label, ShowMore, showPopup, Tooltip } from '@anticrm/ui' + import { Button, IconAdd, IconClose, Label, ShowMore, showPopup } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' import tags from '../plugin' import TagItem from './TagItem.svelte' @@ -67,25 +67,30 @@ } -
+
{#if showTitle} -
-
+
+
-
- - - + +
+
{/if} -
+
{#if items.length === 0} {#if keyLabel} -
+
{/if} @@ -106,18 +111,16 @@
diff --git a/plugins/task-resources/src/components/todos/Todos.svelte b/plugins/task-resources/src/components/todos/Todos.svelte index 6f8ff5c40c..b1e5773400 100644 --- a/plugins/task-resources/src/components/todos/Todos.svelte +++ b/plugins/task-resources/src/components/todos/Todos.svelte @@ -16,7 +16,7 @@ import type { Ref, Space, Doc, Class } from '@anticrm/core' import type { TodoItem } from '@anticrm/task' import { createQuery } from '@anticrm/presentation' - import { CircleButton, IconAdd, showPopup, Label } from '@anticrm/ui' + import { Button, IconAdd, showPopup, Label } from '@anticrm/ui' import CreateTodo from './CreateTodo.svelte' import { Table } from '@anticrm/view-resources' @@ -39,10 +39,12 @@ } -
-
-
- +
+
+ + +
{#if todos.length > 0}
{:else} -
-
-
-
+
+ +
{/if}
- - diff --git a/tests/sanity/tests/recruit.spec.ts b/tests/sanity/tests/recruit.spec.ts index dd4139ea07..3bfd09d4cc 100644 --- a/tests/sanity/tests/recruit.spec.ts +++ b/tests/sanity/tests/recruit.spec.ts @@ -77,7 +77,8 @@ test.describe('recruit tests', () => { await page.click('text=Andrey P.') // Click on Add button - await page.click('.applications-container .flex-row-center .flex-center') + // await page.click('.applications-container .flex-row-center .flex-center') + await page.click('text=Applications There are no applications for this talent. New Application >> button') await page.click('button:has-text("Vacancy")')