UBERF-6091 (#5055)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2024-03-25 15:35:42 +07:00
committed by GitHub
parent 24f364e454
commit 6e8f4ab030
8 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -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
)
+1
View File
@@ -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'
-1
View File
@@ -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]
+1 -1
View File
@@ -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}
+1
View File
@@ -44,6 +44,7 @@ export interface Application extends Doc {
checkIsHeaderHidden?: Resource<() => Promise<boolean>>
checkIsHeaderDisabled?: Resource<() => Promise<boolean>>
navFooterComponent?: AnyComponent
modern?: boolean
}
/**
+5 -1
View File
@@ -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)
}