mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-29 03:34:31 +00:00
UBERF-9461 Add personId array presenter (#7979)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
c9caef506b
commit
753b8f4efb
@ -1226,7 +1226,8 @@ export function createModel (builder: Builder): void {
|
||||
})
|
||||
|
||||
builder.mixin(core.class.TypePersonId, core.class.Class, view.mixin.AttributePresenter, {
|
||||
presenter: view.component.PersonIdPresenter
|
||||
presenter: view.component.PersonIdPresenter,
|
||||
arrayPresenter: view.component.PersonArrayEditor
|
||||
})
|
||||
|
||||
builder.mixin(core.class.TypePersonId, core.class.Class, view.mixin.AttributeFilterPresenter, {
|
||||
|
@ -89,6 +89,7 @@ export default mergeIds(viewId, view, {
|
||||
EnumPresenter: '' as AnyComponent,
|
||||
StatusPresenter: '' as AnyComponent,
|
||||
StatusRefPresenter: '' as AnyComponent,
|
||||
PersonArrayEditor: '' as AnyComponent,
|
||||
PersonIdFilterValuePresenter: '' as AnyComponent,
|
||||
DateFilterPresenter: '' as AnyComponent,
|
||||
StringFilterPresenter: '' as AnyComponent,
|
||||
|
@ -37,7 +37,7 @@
|
||||
export let justify: 'left' | 'center' = 'center'
|
||||
export let width: string | undefined = undefined
|
||||
export let labelDirection: TooltipAlignment | undefined = undefined
|
||||
export let emptyLabel: IntlString = plugin.string.Members
|
||||
export let emptyLabel: IntlString = label ?? plugin.string.Members
|
||||
export let readonly: boolean = false
|
||||
export let create: ObjectCreate | undefined = undefined
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
||||
</div>
|
||||
<AccountArrayEditor
|
||||
value={rolesAssignment?.[role._id] ?? []}
|
||||
label={setting.string.Assignees}
|
||||
label={core.string.Members}
|
||||
onChange={(refs) => {
|
||||
handleRoleAssignmentChanged(role._id, refs)
|
||||
}}
|
||||
|
@ -0,0 +1,39 @@
|
||||
<!--
|
||||
// Copyright © 2025 Hardcore Engineering Inc.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { PersonId } from '@hcengineering/core'
|
||||
import contact from '@hcengineering/contact'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { ButtonKind, ButtonSize, Component } from '@hcengineering/ui'
|
||||
|
||||
export let label: IntlString
|
||||
export let value: PersonId[]
|
||||
export let readonly = false
|
||||
export let onChange: ((refs: PersonId[]) => void | Promise<void>) | undefined
|
||||
export let kind: ButtonKind = 'link'
|
||||
export let size: ButtonSize = 'large'
|
||||
</script>
|
||||
|
||||
<Component
|
||||
is={contact.component.AccountArrayEditor}
|
||||
props={{
|
||||
label,
|
||||
value,
|
||||
readonly,
|
||||
onChange,
|
||||
kind,
|
||||
size
|
||||
}}
|
||||
/>
|
@ -452,6 +452,7 @@
|
||||
this={attribute.presenter}
|
||||
value={getValue(attribute, object)}
|
||||
onChange={getOnChange(object, attribute)}
|
||||
label={attribute.label}
|
||||
{...joinProps(attribute, object, readonly || $restrictionStore.readonly)}
|
||||
/>
|
||||
</div>
|
||||
|
@ -96,6 +96,7 @@ import TreeItem from './components/navigator/TreeItem.svelte'
|
||||
import TreeNode from './components/navigator/TreeNode.svelte'
|
||||
import StatusPresenter from './components/status/StatusPresenter.svelte'
|
||||
import StatusRefPresenter from './components/status/StatusRefPresenter.svelte'
|
||||
import PersonArrayEditor from './components/PersonArrayEditor.svelte'
|
||||
import PersonIdPresenter from './components/PersonIdPresenter.svelte'
|
||||
import PersonIdFilterValuePresenter from './components/filter/PersonIdFilterValuePresenter.svelte'
|
||||
import AudioViewer from './components/viewer/AudioViewer.svelte'
|
||||
@ -299,6 +300,7 @@ export default async (): Promise<Resources> => ({
|
||||
FileSizePresenter,
|
||||
StatusPresenter,
|
||||
StatusRefPresenter,
|
||||
PersonArrayEditor,
|
||||
PersonIdPresenter,
|
||||
PersonIdFilterValuePresenter,
|
||||
DateFilterPresenter,
|
||||
|
Loading…
Reference in New Issue
Block a user