mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
UBERF-6091 (#5055)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -320,7 +320,8 @@ export function createModel (builder: Builder): void {
|
||||
icon: setting.icon.Setting,
|
||||
alias: settingId,
|
||||
hidden: true,
|
||||
component: setting.component.Settings
|
||||
component: setting.component.Settings,
|
||||
modern: true
|
||||
},
|
||||
setting.ids.SettingApp
|
||||
)
|
||||
|
||||
@@ -194,6 +194,7 @@ export function createModel (builder: Builder): void {
|
||||
alias: timeId,
|
||||
hidden: false,
|
||||
position: 'top',
|
||||
modern: true,
|
||||
component: time.component.Me
|
||||
},
|
||||
time.app.Me
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
export let labelSize: 'medium' | 'large' = 'medium'
|
||||
export let labelIntl: IntlString | undefined = undefined
|
||||
export let labelParams: Record<string, any> | undefined = undefined
|
||||
export let action: () => void = () => {}
|
||||
export let action: (() => void) | (() => Promise<void>) = () => {}
|
||||
export let gap: 'large' | 'small' | 'medium' | 'none' = 'none'
|
||||
export let labelGap: 'large' | 'medium' = 'medium'
|
||||
export let kind: 'primary' | 'positive' | 'negative' | 'default' = 'default'
|
||||
|
||||
@@ -163,7 +163,6 @@ export const settingsSeparators: DefSeparators = [
|
||||
null,
|
||||
{ minSize: 19, size: 30, maxSize: 32, float: 'aside' }
|
||||
]
|
||||
export const loveSeparators: DefSeparators = [{ minSize: 26, size: 27, maxSize: 28, float: 'navigator' }, null]
|
||||
|
||||
export const secondNavSeparators: DefSeparators = [{ minSize: 7, size: 7.5, maxSize: 15, float: 'navigator' }, null]
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ export interface RadioItem {
|
||||
labelParams?: Record<string, any>
|
||||
value: any
|
||||
disabled?: boolean
|
||||
action?: () => void
|
||||
action?: (() => void) | (() => Promise<void>)
|
||||
}
|
||||
|
||||
export type ButtonBaseType = 'type-button' | 'type-button-icon'
|
||||
|
||||
@@ -616,7 +616,7 @@
|
||||
defineSeparators('workbench', workbenchSeparators)
|
||||
|
||||
let modern: boolean
|
||||
$: modern = ['setting', 'time', 'love'].some((app) => currentApplication?.alias === app)
|
||||
$: modern = currentApplication?.modern ?? false
|
||||
</script>
|
||||
|
||||
{#if employee && !employee.active}
|
||||
|
||||
@@ -44,6 +44,7 @@ export interface Application extends Doc {
|
||||
checkIsHeaderHidden?: Resource<() => Promise<boolean>>
|
||||
checkIsHeaderDisabled?: Resource<() => Promise<boolean>>
|
||||
navFooterComponent?: AnyComponent
|
||||
modern?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import {
|
||||
import core, {
|
||||
type Class,
|
||||
type Doc,
|
||||
type DocumentQuery,
|
||||
@@ -92,6 +92,10 @@ class InMemoryAdapter extends DummyDbAdapter implements DbAdapter {
|
||||
return await this.modeldb.findAll(_class, query, options)
|
||||
}
|
||||
|
||||
async load (domain: Domain, docs: Ref<Doc>[]): Promise<Doc[]> {
|
||||
return await this.modeldb.findAll(core.class.Doc, { _id: { $in: docs } })
|
||||
}
|
||||
|
||||
async tx (ctx: MeasureContext, ...tx: Tx[]): Promise<TxResult[]> {
|
||||
return await this.modeldb.tx(...tx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user