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

UBER-48: custom fields for organization in leads #3203

Merged
merged 4 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
/>
</div>
<svelte:fragment slot="pool">
<div class="flex-row-center flex-wrap">
<ChannelsDropdown
bind:value={channels}
focusIndex={10}
Expand All @@ -116,7 +115,6 @@
on:update
extraProps={{ showNavigate: false }}
/>
</div>
</svelte:fragment>
<svelte:fragment slot="footer">
{#if matches.length > 0}
Expand Down
13 changes: 11 additions & 2 deletions plugins/lead-resources/src/components/CreateCustomer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import contact from '@hcengineering/contact-resources/src/plugin'
import { AttachedData, Class, Data, Doc, generateId, MixinData, Ref, WithLookup } from '@hcengineering/core'
import type { Customer } from '@hcengineering/lead'
import { Card, getClient } from '@hcengineering/presentation'
import { Card, getClient, InlineAttributeBar } from '@hcengineering/presentation'
import {
Button,
createFocusManager,
Expand Down Expand Up @@ -71,7 +71,7 @@
description: object.description
}

const id = await client.createDoc(targetClass._id, contact.space.Contacts, candidate, customerId)
const id = await client.createDoc(targetClass._id, contact.space.Contacts, { ...candidate, ...object }, customerId)
await client.createMixin(
id as Ref<Contact>,
targetClass._id,
Expand Down Expand Up @@ -234,6 +234,15 @@
editable
highlighted={matchedChannels.map((it) => it.provider)}
/>
{#if targetClass._id === contact.class.Organization}
<InlineAttributeBar
_class={contact.class.Organization}
{object}
toClass={contact.class.Contact}
on:update
extraProps={{ showNavigate: false }}
/>
{/if}
</svelte:fragment>
<svelte:fragment slot="footer">
{#if matches.length > 0}
Expand Down