mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
Remove extra user status (#5578)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
77a8b2ce3e
commit
0daac29984
@ -446,7 +446,7 @@ export function createModel (builder: Builder): void {
|
||||
attachTo: contact.mixin.Employee,
|
||||
descriptor: view.viewlet.Table,
|
||||
config: [
|
||||
'',
|
||||
{ key: '', props: { showStatus: true } },
|
||||
'city',
|
||||
'attachments',
|
||||
'modifiedOn',
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { getClient, MessageViewer } from '@hcengineering/presentation'
|
||||
import contact, { Person, type PersonAccount } from '@hcengineering/contact'
|
||||
import { Person, type PersonAccount } from '@hcengineering/contact'
|
||||
import {
|
||||
Avatar,
|
||||
EmployeePresenter,
|
||||
@ -43,7 +43,6 @@
|
||||
export let header: IntlString | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
const limit = 300
|
||||
|
||||
let isActionsOpened = false
|
||||
@ -89,8 +88,6 @@
|
||||
} else {
|
||||
tooltipLabel = core.string.System
|
||||
}
|
||||
|
||||
$: showStatus = !!person && hierarchy.hasMixin(person, contact.mixin.Employee)
|
||||
</script>
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
@ -118,7 +115,7 @@
|
||||
{#if headerObject}
|
||||
<Icon icon={headerIcon ?? classIcon(client, headerObject._class) ?? activity.icon.Activity} size="small" />
|
||||
{:else if person}
|
||||
<Avatar size="card" avatar={person.avatar} name={person.name} {showStatus} {account} />
|
||||
<Avatar size="card" avatar={person.avatar} name={person.name} />
|
||||
{:else}
|
||||
<SystemAvatar size="card" />
|
||||
{/if}
|
||||
|
@ -103,6 +103,7 @@
|
||||
{
|
||||
okLabel: presentation.string.Add,
|
||||
disableDeselectFor: disabledRemoveFor,
|
||||
skipInactive: true,
|
||||
selected: members,
|
||||
showStatus: true
|
||||
},
|
||||
|
@ -115,6 +115,7 @@
|
||||
{
|
||||
okLabel: presentation.string.Next,
|
||||
skipCurrentAccount: false,
|
||||
skipInactive: true,
|
||||
selected: employeeIds,
|
||||
showStatus: true
|
||||
},
|
||||
|
@ -66,6 +66,7 @@
|
||||
export let shouldShowName: boolean = true
|
||||
export let id: string | undefined = undefined
|
||||
export let short: boolean = false
|
||||
export let showStatus = false
|
||||
|
||||
const icon = IconPerson
|
||||
|
||||
@ -147,6 +148,7 @@
|
||||
shouldShowName={false}
|
||||
shouldShowPlaceholder
|
||||
onEmployeeEdit={_click}
|
||||
{showStatus}
|
||||
/>
|
||||
{:else}
|
||||
<Button
|
||||
|
@ -22,7 +22,7 @@
|
||||
// export let element: HTMLElement | undefined = undefined
|
||||
export let noUnderline: boolean = false
|
||||
export let compact: boolean = false
|
||||
export let showStatus: boolean = true
|
||||
export let showStatus: boolean = false
|
||||
|
||||
$: employeeValue = typeof value === 'string' ? $personByIdStore.get(value) : value
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
{defaultName}
|
||||
{noUnderline}
|
||||
{compact}
|
||||
{showStatus}
|
||||
showStatus={showStatus && active}
|
||||
statusLabel={!active && shouldShowName && showStatus ? contact.string.Inactive : undefined}
|
||||
on:accent-color
|
||||
/>
|
||||
|
@ -42,7 +42,7 @@
|
||||
export let maxWidth = ''
|
||||
export let compact = false
|
||||
export let type: ObjectPresenterType = 'link'
|
||||
export let showStatus: boolean = true
|
||||
export let showStatus: boolean = false
|
||||
|
||||
const client = getClient()
|
||||
$: personValue = typeof value === 'string' ? $personByIdStore.get(value) : value
|
||||
|
@ -33,6 +33,7 @@
|
||||
export let skipCurrentAccount = false
|
||||
export let disableDeselectFor: Ref<Employee>[] = []
|
||||
export let showStatus = true
|
||||
export let skipInactive = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
@ -90,6 +91,7 @@
|
||||
{showStatus}
|
||||
{disableDeselectFor}
|
||||
{skipCurrentAccount}
|
||||
{skipInactive}
|
||||
on:select={handleSelectionChanged}
|
||||
/>
|
||||
</Scroller>
|
||||
|
@ -31,6 +31,7 @@
|
||||
export let skipCurrentAccount = false
|
||||
export let disableDeselectFor: Ref<Employee>[] = []
|
||||
export let showStatus = true
|
||||
export let skipInactive = false
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const query = createQuery()
|
||||
@ -54,7 +55,8 @@
|
||||
? { $search: search }
|
||||
: { [searchField]: { $like: '%' + search + '%' } }
|
||||
: {}),
|
||||
...(skipCurrentAccount && currentPerson ? { _id: { $ne: currentPerson._id as Ref<Employee> } } : {})
|
||||
...(skipCurrentAccount && currentPerson ? { _id: { $ne: currentPerson._id as Ref<Employee> } } : {}),
|
||||
...(skipInactive ? { active: true } : {})
|
||||
},
|
||||
(result) => {
|
||||
result.sort((a, b) => {
|
||||
|
@ -40,6 +40,7 @@
|
||||
export let shrink: number = 0
|
||||
export let isAction: boolean = false
|
||||
export let readonly: boolean = false
|
||||
export let showStatus = true
|
||||
|
||||
$: _object =
|
||||
(typeof object !== 'string' ? object : undefined) ?? (typeof value !== 'string' ? value : undefined) ?? []
|
||||
@ -189,6 +190,7 @@
|
||||
{shrink}
|
||||
{readonly}
|
||||
{shouldShowName}
|
||||
{showStatus}
|
||||
showNavigate={false}
|
||||
justify={'left'}
|
||||
showTooltip={{
|
||||
|
Loading…
Reference in New Issue
Block a user