TSK-833 Доработка Таблицы Vacations TSK-817 Click on Employee is broken, it should open Edit Contact TSK-805 Открывать задачу в новой вкладке при клике колесиком TSK-794 Прикрепление ссылки на вакансию/аппликейшн в чате (#2734)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-03-15 20:06:03 +06:00
committed by GitHub
parent 6b534e1a3d
commit ae86bfdacd
83 changed files with 1515 additions and 878 deletions
@@ -16,7 +16,8 @@
import { Ref, WithLookup } from '@hcengineering/core'
import { createQuery } from '@hcengineering/presentation'
import type { Issue, Team } from '@hcengineering/tracker'
import { Icon, showPanel, tooltip } from '@hcengineering/ui'
import { Icon, tooltip } from '@hcengineering/ui'
import { DocNavLink } from '@hcengineering/view-resources'
import tracker from '../../plugin'
export let value: WithLookup<Issue>
@@ -29,18 +30,6 @@
// Extra properties
export let teams: Map<Ref<Team>, Team> | undefined = undefined
function handleIssueEditorOpened () {
if (disableClick) {
return
}
if (onClick) {
onClick()
}
showPanel(tracker.component.EditIssue, value._id, value._class, 'content')
}
const spaceQuery = createQuery()
let currentTeam: Team | undefined = value?.$lookup?.space
@@ -58,23 +47,18 @@
</script>
{#if value}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<span
class="issuePresenterRoot"
class:noPointer={disableClick}
class:noUnderline
class:inline
on:click={handleIssueEditorOpened}
>
{#if withIcon}
<div class="icon" use:tooltip={{ label: tracker.string.Issue }}>
<Icon icon={tracker.icon.Issues} size={'small'} />
</div>
{/if}
<span class="select-text" title={value?.title}>
{title}
<DocNavLink object={value} {onClick} {disableClick} {noUnderline} {inline} component={tracker.component.EditIssue}>
<span class="issuePresenterRoot" class:inline>
{#if withIcon}
<div class="icon" use:tooltip={{ label: tracker.string.Issue }}>
<Icon icon={tracker.icon.Issues} size={'small'} />
</div>
{/if}
<span class="select-text" title={value?.title}>
{title}
</span>
</span>
</span>
</DocNavLink>
{/if}
<style lang="scss">
@@ -106,28 +90,5 @@
color: var(--accent-color);
}
}
&.noPointer {
cursor: default;
}
&.noUnderline {
color: var(--caption-color);
font-weight: 500;
}
&:not(.noUnderline) {
&:hover {
color: var(--caption-color);
text-decoration: underline;
.icon {
color: var(--caption-color);
}
}
}
&:active {
color: var(--accent-color);
}
}
</style>
@@ -13,59 +13,44 @@
// limitations under the License.
-->
<script lang="ts">
import { WithLookup } from '@hcengineering/core'
import type { Issue } from '@hcengineering/tracker'
import { showPanel } from '@hcengineering/ui'
import { DocNavLink } from '@hcengineering/view-resources'
import tracker from '../../plugin'
import ParentNamesPresenter from './ParentNamesPresenter.svelte'
export let value: Issue
export let value: WithLookup<Issue>
export let shouldUseMargin: boolean = false
export let showParent = true
export let onClick: (() => void) | undefined = undefined
function handleIssueEditorOpened () {
if (onClick) {
onClick()
}
showPanel(tracker.component.EditIssue, value._id, value._class, 'content')
}
</script>
{#if value}
<span class="titlePresenter-container" class:with-margin={shouldUseMargin} title={value.title}>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<DocNavLink object={value} {onClick} component={tracker.component.EditIssue}>
<span
class="name overflow-label cursor-pointer select-text"
style:max-width={showParent ? `${value.parents.length !== 0 ? 95 : 100}%` : '100%'}
on:click={handleIssueEditorOpened}>{value.title}</span
class="name overflow-label select-text"
class:with-margin={shouldUseMargin}
style:max-width={showParent ? `${value.parents.length !== 0 ? 95 : 100}%` : '100%'}>{value.title}</span
>
{#if showParent}
<ParentNamesPresenter {value} />
{/if}
</span>
</DocNavLink>
{/if}
<style lang="scss">
.titlePresenter-container {
display: flex;
flex-grow: 0;
min-width: 1.5rem;
// flex-shrink: 10;
.name {
flex-shrink: 0;
&:hover {
text-decoration: underline;
}
&:active {
color: var(--accent-color);
}
.name {
flex-shrink: 0;
&:hover {
text-decoration: underline;
}
&.with-margin {
margin-left: 0.5rem;
&:active {
color: var(--accent-color);
}
}
.with-margin {
margin-left: 0.5rem;
}
</style>