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