mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 12:47:45 +02:00
UBERF-9062: Fix My applications for Recruit module (#7593)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import type { Class, Doc, DocumentQuery, FindOptions, Ref } from '@hcengineering/core'
|
||||
import { ActionContext } from '@hcengineering/presentation'
|
||||
import { FadeOptions, Scroller, tableSP } from '@hcengineering/ui'
|
||||
import { BuildModelKey, ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { BuildModelKey, ViewOptionModel, ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { onMount } from 'svelte'
|
||||
import { focusStore, ListSelectionProvider, SelectDirection } from '../selection'
|
||||
import { LoadingProps } from '../utils'
|
||||
@@ -35,6 +35,7 @@
|
||||
export let fade: FadeOptions = tableSP
|
||||
export let prefferedSorting: string = 'modifiedOn'
|
||||
export let viewOptions: ViewOptions | undefined = undefined
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
export let viewlet: Viewlet | undefined = undefined
|
||||
export let readonly = false
|
||||
|
||||
@@ -83,7 +84,7 @@
|
||||
{prefferedSorting}
|
||||
{tableId}
|
||||
{viewOptions}
|
||||
viewOptionsConfig={viewlet?.viewOptions?.other}
|
||||
viewOptionsConfig={viewOptionsConfig ?? viewlet?.viewOptions?.other}
|
||||
selection={listProvider.current($focusStore)}
|
||||
{readonly}
|
||||
on:row-focus={(evt) => {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<script lang="ts">
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { ButtonIcon, showPopup, closeTooltip, IconOptions } from '@hcengineering/ui'
|
||||
import { ViewOptions, ViewOptionsModel, Viewlet } from '@hcengineering/view'
|
||||
import { ViewOptionModel, ViewOptions, ViewOptionsModel, Viewlet } from '@hcengineering/view'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import view from '../plugin'
|
||||
import { focusStore } from '../selection'
|
||||
@@ -27,6 +27,7 @@
|
||||
export let kind: 'primary' | 'secondary' | 'tertiary' | 'negative' = 'secondary'
|
||||
export let viewOptions: ViewOptions
|
||||
export let disabled: boolean = false
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
@@ -89,6 +90,9 @@
|
||||
mergedModel.orderBy = mergedModel.orderBy.filter((it, idx, arr) => arr.findIndex((q) => it[0] === q[0]) === idx)
|
||||
mergedModel.other = mergedModel.other.filter((it, idx, arr) => arr.findIndex((q) => q.key === it.key) === idx)
|
||||
|
||||
if (viewOptionsConfig !== undefined) {
|
||||
mergedModel.other = viewOptionsConfig
|
||||
}
|
||||
showPopup(
|
||||
ViewOptionsEditor,
|
||||
{ viewlet, config: mergedModel, viewOptions: getClient().getHierarchy().clone(viewOptions) },
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { ButtonIcon, showPopup, closeTooltip } from '@hcengineering/ui'
|
||||
import { ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { ViewOptionModel, ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import view from '../plugin'
|
||||
import { getViewOptions, viewOptionStore } from '../viewOptions'
|
||||
import { getViewOptions, viewOptionStore, defaultOptions } from '../viewOptions'
|
||||
import ViewOptionsButton from './ViewOptionsButton.svelte'
|
||||
import ViewletSetting from './ViewletSetting.svelte'
|
||||
import { restrictionStore } from '../utils'
|
||||
@@ -25,6 +25,7 @@
|
||||
export let viewOptions: ViewOptions | undefined = undefined
|
||||
export let viewlet: Viewlet | undefined = undefined
|
||||
export let disabled: boolean = false
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
|
||||
let btn: HTMLButtonElement
|
||||
let pressed: boolean = false
|
||||
@@ -37,14 +38,14 @@
|
||||
})
|
||||
}
|
||||
|
||||
$: viewOptions = getViewOptions(viewlet, $viewOptionStore)
|
||||
$: viewOptions = getViewOptions(viewlet, $viewOptionStore, defaultOptions)
|
||||
|
||||
$: disabled = $restrictionStore.readonly
|
||||
</script>
|
||||
|
||||
{#if viewlet}
|
||||
{#if viewOptions}
|
||||
<ViewOptionsButton {viewlet} {kind} {viewOptions} />
|
||||
<ViewOptionsButton {viewlet} {kind} {viewOptions} {viewOptionsConfig} />
|
||||
{/if}
|
||||
<ButtonIcon
|
||||
icon={view.icon.Configure}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
export let level: number
|
||||
export let initIndex = 0
|
||||
export let newObjectProps: (doc: Doc | undefined) => Record<string, any> | undefined
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
export let dragItem: {
|
||||
doc?: Doc
|
||||
revert?: () => void
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
export let configurationsVersion: number
|
||||
export let viewOptions: ViewOptions
|
||||
export let newObjectProps: (doc: Doc | undefined) => Record<string, any> | undefined
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
export let dragItem: {
|
||||
doc?: Doc
|
||||
revert?: () => void
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { ActionContext } from '@hcengineering/presentation'
|
||||
import { AnyComponent, Scroller, resizeObserver } from '@hcengineering/ui'
|
||||
import { BuildModelKey, ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { BuildModelKey, ViewOptionModel, ViewOptions, Viewlet } from '@hcengineering/view'
|
||||
import { onMount } from 'svelte'
|
||||
import { ListSelectionProvider, SelectDirection, focusStore } from '../..'
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
export let createItemLabel: IntlString | undefined
|
||||
export let createItemEvent: string | undefined
|
||||
export let viewOptions: ViewOptions
|
||||
export let viewOptionsConfig: ViewOptionModel[] | undefined = undefined
|
||||
export let props: Record<string, any> = {}
|
||||
|
||||
let list: List
|
||||
@@ -94,7 +95,7 @@
|
||||
{props}
|
||||
{listProvider}
|
||||
compactMode={listWidth <= 800}
|
||||
viewOptionsConfig={viewlet.viewOptions?.other}
|
||||
viewOptionsConfig={viewOptionsConfig ?? viewlet.viewOptions?.other}
|
||||
selectedObjectIds={$selection ?? []}
|
||||
selection={listProvider.current($focusStore)}
|
||||
on:row-focus={(event) => {
|
||||
|
||||
Reference in New Issue
Block a user