UBERF-5603 (#4754)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2024-02-23 15:39:49 +07:00
committed by GitHub
parent cc8a1d549a
commit ffc8d1dfac
184 changed files with 2755 additions and 561 deletions
@@ -21,8 +21,10 @@
import contact from '@hcengineering/contact'
import { createEventDispatcher, onMount } from 'svelte'
import lead from '../plugin'
import { restrictionStore } from '@hcengineering/view-resources'
export let object: Lead
export let readonly: boolean = false
const dispatch = createEventDispatcher()
const client = getClient()
@@ -49,6 +51,7 @@
bind:value={rawTitle}
placeholder={lead.string.LeadPlaceholder}
kind={'large-style'}
disabled={readonly}
focusable
on:blur={() => {
if (rawTitle !== object.title) change('title', rawTitle)
@@ -58,6 +61,8 @@
_class={contact.class.Contact}
label={lead.string.Customer}
placeholder={lead.string.SelectCustomer}
showNavigate={!$restrictionStore.disableNavigation}
{readonly}
kind={'link'}
size={'x-large'}
justify={'left'}
@@ -15,18 +15,18 @@
-->
<script lang="ts">
import { AttachmentsPresenter } from '@hcengineering/attachment-resources'
import { ChatMessagesPresenter } from '@hcengineering/chunter-resources'
import contact from '@hcengineering/contact'
import { ContactPresenter } from '@hcengineering/contact-resources'
import type { WithLookup } from '@hcengineering/core'
import type { Lead } from '@hcengineering/lead'
import notification from '@hcengineering/notification'
import { getClient } from '@hcengineering/presentation'
import { AssigneePresenter } from '@hcengineering/task-resources'
import { ActionIcon, Component, DueDatePresenter, IconMoreH, showPopup } from '@hcengineering/ui'
import { BuildModelKey } from '@hcengineering/view'
import { ContextMenu, enabledConfig, openDoc, statusStore } from '@hcengineering/view-resources'
import { ChatMessagesPresenter } from '@hcengineering/chunter-resources'
import task from '@hcengineering/task'
import { AssigneePresenter } from '@hcengineering/task-resources'
import { ActionIcon, Component, DueDatePresenter, IconMoreH } from '@hcengineering/ui'
import { BuildModelKey } from '@hcengineering/view'
import { enabledConfig, openDoc, showMenu, statusStore } from '@hcengineering/view-resources'
import lead from '../plugin'
import LeadPresenter from './LeadPresenter.svelte'
@@ -37,10 +37,6 @@
const client = getClient()
const assigneeAttribute = client.getHierarchy().getAttribute(lead.class.Lead, 'assignee')
function showMenu (ev?: Event): void {
showPopup(ContextMenu, { object }, (ev as MouseEvent).target as HTMLElement)
}
function showLead () {
openDoc(client.getHierarchy(), object)
}
@@ -61,7 +57,7 @@
<ActionIcon
label={lead.string.More}
action={(evt) => {
showMenu(evt)
showMenu(evt, { object })
}}
icon={IconMoreH}
size={'small'}