diff --git a/packages/presentation/src/components/InlineAttributeBar.svelte b/packages/presentation/src/components/InlineAttributeBar.svelte
new file mode 100644
index 0000000000..2989c48d79
--- /dev/null
+++ b/packages/presentation/src/components/InlineAttributeBar.svelte
@@ -0,0 +1,30 @@
+
+
+{#each keys as key (typeof key === 'string' ? key : key.key)}
+
+{/each}
diff --git a/packages/presentation/src/components/InlineAttributeBarEditor.svelte b/packages/presentation/src/components/InlineAttributeBarEditor.svelte
new file mode 100644
index 0000000000..dac23301f2
--- /dev/null
+++ b/packages/presentation/src/components/InlineAttributeBarEditor.svelte
@@ -0,0 +1,79 @@
+
+
+
+{#if editor}
+ {#await editor then instance}
+ {#if instance}
+
+
+
+ {/if}
+ {/await}
+{/if}
diff --git a/packages/presentation/src/components/NavLink.svelte b/packages/presentation/src/components/NavLink.svelte
index 52da01a2e3..eaf32e226b 100644
--- a/packages/presentation/src/components/NavLink.svelte
+++ b/packages/presentation/src/components/NavLink.svelte
@@ -47,6 +47,7 @@
white-space: nowrap;
text-overflow: ellipsis;
cursor: pointer;
+ font-weight: inherit;
&.inline {
display: inline-flex;
diff --git a/packages/presentation/src/index.ts b/packages/presentation/src/index.ts
index 242c1fc769..770d094d7c 100644
--- a/packages/presentation/src/index.ts
+++ b/packages/presentation/src/index.ts
@@ -19,6 +19,8 @@ import { presentationId } from './plugin'
export * from './attributes'
export { default as AttributeBarEditor } from './components/AttributeBarEditor.svelte'
export { default as AttributeEditor } from './components/AttributeEditor.svelte'
+export { default as InlineAttributeBarEditor } from './components/InlineAttributeBarEditor.svelte'
+export { default as InlineAttributeBar } from './components/InlineAttributeBar.svelte'
export { default as AttributesBar } from './components/AttributesBar.svelte'
export { default as Avatar } from './components/Avatar.svelte'
export { default as AssigneeBox } from './components/AssigneeBox.svelte'
diff --git a/packages/presentation/src/utils.ts b/packages/presentation/src/utils.ts
index b19a78dce7..fff6196e11 100644
--- a/packages/presentation/src/utils.ts
+++ b/packages/presentation/src/utils.ts
@@ -402,3 +402,33 @@ export async function getAttributeEditor (
console.error(getAttributeEditorNotFoundError(_class, key, ex))
}
}
+
+function filterKeys (hierarchy: Hierarchy, keys: KeyedAttribute[], ignoreKeys: string[]): KeyedAttribute[] {
+ const docKeys: Set = new Set(hierarchy.getAllAttributes(core.class.AttachedDoc).keys())
+ keys = keys.filter((k) => !docKeys.has(k.key))
+ keys = keys.filter((k) => !ignoreKeys.includes(k.key))
+ return keys
+}
+
+/**
+ * @public
+ */
+export function getFiltredKeys (
+ hierarchy: Hierarchy,
+ objectClass: Ref>,
+ ignoreKeys: string[],
+ to?: Ref>
+): KeyedAttribute[] {
+ const keys = [...hierarchy.getAllAttributes(objectClass, to).entries()]
+ .filter(([, value]) => value.hidden !== true)
+ .map(([key, attr]) => ({ key, attr }))
+
+ return filterKeys(hierarchy, keys, ignoreKeys)
+}
+
+/**
+ * @public
+ */
+export function isCollectionAttr (hierarchy: Hierarchy, key: KeyedAttribute): boolean {
+ return hierarchy.isDerived(key.attr.type._class, core.class.Collection)
+}
diff --git a/plugins/contact-resources/src/components/CreateOrganization.svelte b/plugins/contact-resources/src/components/CreateOrganization.svelte
index 368625c235..d5018bb3de 100644
--- a/plugins/contact-resources/src/components/CreateOrganization.svelte
+++ b/plugins/contact-resources/src/components/CreateOrganization.svelte
@@ -14,8 +14,8 @@
-->
{
onChange(evt.detail)
}}
+ {showNavigate}
/>
diff --git a/plugins/contact-resources/src/index.ts b/plugins/contact-resources/src/index.ts
index e21c625418..5c6aca92f3 100644
--- a/plugins/contact-resources/src/index.ts
+++ b/plugins/contact-resources/src/index.ts
@@ -57,6 +57,7 @@ import PersonEditor from './components/PersonEditor.svelte'
import PersonPresenter from './components/PersonPresenter.svelte'
import PersonRefPresenter from './components/PersonRefPresenter.svelte'
import SocialEditor from './components/SocialEditor.svelte'
+import ExpandRightDouble from './components/icons/ExpandRightDouble.svelte'
import contact from './plugin'
import {
employeeSort,
@@ -86,7 +87,9 @@ export {
EditPerson,
EmployeeRefPresenter,
AccountArrayEditor,
- AccountBox
+ AccountBox,
+ CreateOrganization,
+ ExpandRightDouble
}
const toObjectSearchResult = (e: WithLookup): ObjectSearchResult => ({
diff --git a/plugins/hr-resources/src/components/CreateDepartment.svelte b/plugins/hr-resources/src/components/CreateDepartment.svelte
index 019d034c7d..f6f8d12f46 100644
--- a/plugins/hr-resources/src/components/CreateDepartment.svelte
+++ b/plugins/hr-resources/src/components/CreateDepartment.svelte
@@ -15,7 +15,7 @@
@@ -378,10 +382,11 @@
{#key doc}
{#if states.length > 0}
@@ -416,6 +421,16 @@
{/if}
+
+ {#if vacancy}
+
+ {/if}
{/key}
diff --git a/plugins/recruit-resources/src/components/CreateCandidate.svelte b/plugins/recruit-resources/src/components/CreateCandidate.svelte
index d48e55bd70..a6d9f2bde7 100644
--- a/plugins/recruit-resources/src/components/CreateCandidate.svelte
+++ b/plugins/recruit-resources/src/components/CreateCandidate.svelte
@@ -38,6 +38,7 @@
EditableAvatar,
getClient,
getUserDraft,
+ InlineAttributeBar,
KeyedAttribute,
MessageBox,
PDFViewer,
@@ -257,9 +258,22 @@
remote: object.remote
}
- const id = await client.createDoc(contact.class.Person, contact.space.Contacts, candidate, candidateId)
- await client.createMixin(
- id as Ref,
+ // Store all extra values.
+ for (const [k, v] of Object.entries(object)) {
+ if (v != null && k !== 'createOn' && k !== 'avatar') {
+ if (client.getHierarchy().getAttribute(recruit.mixin.Candidate, k).attributeOf === recruit.mixin.Candidate) {
+ ;(candidateData as any)[k] = v
+ } else {
+ ;(candidate as any)[k] = v
+ }
+ }
+ }
+
+ const applyOps = client.apply(candidateId)
+
+ await applyOps.createDoc(contact.class.Person, contact.space.Contacts, candidate, candidateId)
+ await applyOps.createMixin(
+ candidateId as Ref,
contact.class.Person,
contact.space.Contacts,
recruit.mixin.Candidate,
@@ -267,10 +281,10 @@
)
if (resume.uuid !== undefined) {
- client.addCollection(
+ applyOps.addCollection(
attachment.class.Attachment,
contact.space.Contacts,
- id,
+ candidateId,
contact.class.Person,
'attachments',
{
@@ -283,7 +297,7 @@
)
}
for (const channel of channels) {
- await client.addCollection(
+ await applyOps.addCollection(
contact.class.Channel,
contact.space.Contacts,
candidateId,
@@ -312,7 +326,7 @@
category: findTagCategory(skill.title, categories)
})
}
- await client.addCollection(skill._class, skill.space, candidateId, recruit.mixin.Candidate, 'skills', {
+ await applyOps.addCollection(skill._class, skill.space, candidateId, recruit.mixin.Candidate, 'skills', {
title: skill.title,
color: skill.color,
tag: skill.tag,
@@ -320,8 +334,10 @@
})
}
+ await applyOps.commit()
+
if (!createMore) {
- dispatch('close', id)
+ dispatch('close', candidateId)
}
resetObject()
saveDraft()
@@ -706,6 +722,15 @@
/>
{/if}
+
+
+
diff --git a/plugins/recruit-resources/src/components/CreateOrganization.svelte b/plugins/recruit-resources/src/components/CreateOrganization.svelte
new file mode 100644
index 0000000000..a08f98f253
--- /dev/null
+++ b/plugins/recruit-resources/src/components/CreateOrganization.svelte
@@ -0,0 +1,34 @@
+
+
+
+
diff --git a/plugins/recruit-resources/src/components/CreateVacancy.svelte b/plugins/recruit-resources/src/components/CreateVacancy.svelte
index 4024f29e3d..f6cf3cae4f 100644
--- a/plugins/recruit-resources/src/components/CreateVacancy.svelte
+++ b/plugins/recruit-resources/src/components/CreateVacancy.svelte
@@ -15,8 +15,8 @@
@@ -199,7 +240,7 @@
/>
- {#key template?.description}
+ {#key vacancyData?.fullDescription}
{
- templateId = evt.detail
- }}
+ on:change={handleTemplateChange}
+ />
+
+
+
+
diff --git a/plugins/recruit-resources/src/components/Organizations.svelte b/plugins/recruit-resources/src/components/Organizations.svelte
index d94ff3d15f..34f1fd7656 100644
--- a/plugins/recruit-resources/src/components/Organizations.svelte
+++ b/plugins/recruit-resources/src/components/Organizations.svelte
@@ -32,13 +32,13 @@
FilterBar,
FilterButton,
getViewOptions,
- viewOptionStore,
setActiveViewletId,
TableBrowser,
- ViewletSettingButton
+ ViewletSettingButton,
+ viewOptionStore
} from '@hcengineering/view-resources'
import recruit from '../plugin'
- import CreateVacancy from './CreateVacancy.svelte'
+ import CreateOrganization from './CreateOrganization.svelte'
import VacancyListApplicationsPopup from './organizations/VacancyListApplicationsPopup.svelte'
import VacancyListCountPresenter from './organizations/VacancyListCountPresenter.svelte'
import VacancyPopup from './organizations/VacancyPopup.svelte'
@@ -123,7 +123,7 @@
}
function showCreateDialog () {
- showPopup(CreateVacancy, { space: recruit.space.CandidatesPublic }, 'top')
+ showPopup(CreateOrganization, { space: recruit.space.CandidatesPublic }, 'top')
}
const applicationSorting = (a: Doc, b: Doc) =>
(applications?.get(b._id as Ref)?.count ?? 0) -
@@ -252,7 +252,7 @@
diff --git a/plugins/view-resources/src/components/DateEditor.svelte b/plugins/view-resources/src/components/DateEditor.svelte
index cfed0cb5ed..536439e739 100644
--- a/plugins/view-resources/src/components/DateEditor.svelte
+++ b/plugins/view-resources/src/components/DateEditor.svelte
@@ -14,18 +14,19 @@
-->
= new Set(hierarchy.getAllAttributes(core.class.AttachedDoc).keys())
- keys = keys.filter((k) => !docKeys.has(k.key))
- keys = keys.filter((k) => !ignoreKeys.includes(k.key))
- return keys
-}
-
-export function getFiltredKeys (
- hierarchy: Hierarchy,
- objectClass: Ref>,
- ignoreKeys: string[],
- to?: Ref>
-): KeyedAttribute[] {
- const keys = [...hierarchy.getAllAttributes(objectClass, to).entries()]
- .filter(([, value]) => value.hidden !== true)
- .map(([key, attr]) => ({ key, attr }))
-
- return filterKeys(hierarchy, keys, ignoreKeys)
-}
-
export interface CategoryKey {
key: KeyedAttribute
category: AttributeCategory
@@ -505,10 +487,6 @@ export function categorizeFields (
return result
}
-export function isCollectionAttr (hierarchy: Hierarchy, key: KeyedAttribute): boolean {
- return hierarchy.isDerived(key.attr.type._class, core.class.Collection)
-}
-
function makeViewletKey (loc?: Location): string {
loc = loc ?? getCurrentLocation()
loc.fragment = undefined