mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
UBER-505: Fix resolve errors in console (#3449)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
747de753ae
commit
ef3acfbf7c
47
.github/workflows/main.yml
vendored
47
.github/workflows/main.yml
vendored
@ -36,17 +36,19 @@ jobs:
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: ./common/temp
|
||||
path: |
|
||||
./common/temp
|
||||
!./common/temp/build-cache
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Cache PR common
|
||||
- name: Cache Build cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./common/temp
|
||||
key: ${{ runner.os }}-build-ref-${{ github.ref }}
|
||||
path: ./common/temp/build-cache
|
||||
key: build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-ref-${{ github.ref }}
|
||||
build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
|
||||
- name: Checking for mis-matching dependencies...
|
||||
run: node common/scripts/install-run-rush.js check
|
||||
@ -198,7 +200,13 @@ jobs:
|
||||
tools
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
||||
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
|
||||
|
||||
- name: Cache Build cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./common/temp/build-cache
|
||||
key: build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Start MongoDB
|
||||
uses: supercharge/mongodb-github-action@1.9.0
|
||||
with:
|
||||
@ -213,7 +221,13 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Build cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./common/temp/build-cache
|
||||
key: build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Cache build results
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
@ -270,6 +284,7 @@ jobs:
|
||||
# cd ./tests
|
||||
# ./update-snapshot-ci.sh ./tests/db_dump
|
||||
- name: "Store docker logs"
|
||||
if: always()
|
||||
run: |
|
||||
cd ./tests/sanity
|
||||
mkdir logs
|
||||
@ -281,9 +296,13 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: playwright-results
|
||||
path: |
|
||||
./tests/sanity/playwright-report/
|
||||
./tests/sanity/logs
|
||||
path: ./tests/sanity/playwright-report/
|
||||
- name: Upload Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: docker-logs
|
||||
path: ./tests/sanity/logs
|
||||
# - name: Upload DB snapshot
|
||||
# if: always()
|
||||
# uses: actions/upload-artifact@v3
|
||||
@ -298,7 +317,13 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache Build cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./common/temp/build-cache
|
||||
key: build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
build-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
- name: Cache build results
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
|
@ -84,6 +84,15 @@ type BuilderConfig = [(b: Builder) => void, Plugin] | [(b: Builder) => void, Plu
|
||||
export default function buildModel (enabled: string[] = ['*'], disabled: string[] = []): Builder {
|
||||
const builder = new Builder()
|
||||
|
||||
const defaultFilter = [
|
||||
workbench.class.Application,
|
||||
presentation.class.ObjectSearchCategory,
|
||||
notification.class.NotificationGroup,
|
||||
view.class.Action,
|
||||
contact.class.ChannelProvider,
|
||||
setting.class.IntegrationType
|
||||
]
|
||||
|
||||
const builders: BuilderConfig[] = [
|
||||
[coreModel, coreId],
|
||||
[activityModel, activityId],
|
||||
@ -100,11 +109,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: true,
|
||||
beta: false,
|
||||
icon: contact.icon.ContactApplication,
|
||||
classFilter: [
|
||||
workbench.class.Application,
|
||||
presentation.class.ObjectSearchCategory,
|
||||
notification.class.NotificationGroup
|
||||
]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -129,12 +134,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: true,
|
||||
beta: false,
|
||||
icon: recruit.icon.RecruitApplication,
|
||||
classFilter: [
|
||||
workbench.class.Application,
|
||||
view.class.Action,
|
||||
presentation.class.ObjectSearchCategory,
|
||||
notification.class.NotificationGroup
|
||||
]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[settingModel, settingId],
|
||||
@ -146,12 +146,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
description: telegram.string.ConfigDescription,
|
||||
enabled: true,
|
||||
beta: false,
|
||||
classFilter: [
|
||||
workbench.class.Application,
|
||||
view.class.Action,
|
||||
contact.class.ChannelProvider,
|
||||
setting.class.IntegrationType
|
||||
]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -162,7 +157,8 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
description: lead.string.ConfigDescription,
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: lead.icon.LeadApplication
|
||||
icon: lead.icon.LeadApplication,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -173,12 +169,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
description: gmail.string.ConfigDescription,
|
||||
enabled: true,
|
||||
beta: false,
|
||||
classFilter: [
|
||||
workbench.class.Application,
|
||||
view.class.Action,
|
||||
contact.class.ChannelProvider,
|
||||
setting.class.IntegrationType
|
||||
]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -190,7 +181,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: inventory.icon.InventoryApplication,
|
||||
classFilter: [workbench.class.Application, view.class.Action]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[presentationModel, presentationId],
|
||||
@ -207,7 +198,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: hr.icon.Structure,
|
||||
classFilter: [workbench.class.Application, view.class.Action]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -218,7 +209,8 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
description: document.string.ConfigDescription,
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: document.icon.DocumentApplication
|
||||
icon: document.icon.DocumentApplication,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -230,12 +222,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: true,
|
||||
beta: false,
|
||||
icon: tracker.icon.TrackerApplication,
|
||||
classFilter: [
|
||||
workbench.class.Application,
|
||||
view.class.Action,
|
||||
presentation.class.ObjectSearchCategory,
|
||||
notification.class.NotificationGroup
|
||||
]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -247,7 +234,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: board.icon.Board,
|
||||
classFilter: [workbench.class.Application, view.class.Action]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -259,7 +246,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: calendar.icon.Calendar,
|
||||
classFilter: [workbench.class.Application]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -270,7 +257,8 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
description: bitrix.string.ConfigDescription,
|
||||
enabled: false,
|
||||
beta: true,
|
||||
icon: bitrix.icon.Bitrix
|
||||
icon: bitrix.icon.Bitrix,
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -281,7 +269,7 @@ export default function buildModel (enabled: string[] = ['*'], disabled: string[
|
||||
// description: request.string.ConfigDescription,
|
||||
enabled: false,
|
||||
beta: true,
|
||||
classFilter: [workbench.class.Application, view.class.Action]
|
||||
classFilter: defaultFilter
|
||||
}
|
||||
],
|
||||
[automationModel, automationId],
|
||||
|
@ -5,7 +5,7 @@
|
||||
// import { applicationShortcutKey } from '../../utils'
|
||||
import { getCurrentLocation, location, navigate } from '../../location'
|
||||
|
||||
import { Theme, themeStore } from '@hcengineering/theme'
|
||||
import { Theme } from '@hcengineering/theme'
|
||||
import Component from '../Component.svelte'
|
||||
|
||||
import StatusComponent from '../Status.svelte'
|
||||
@ -108,7 +108,6 @@
|
||||
<div id="ui-root">
|
||||
<div class="antiStatusBar">
|
||||
<div class="flex-row-center h-full content-color">
|
||||
{$themeStore.language}
|
||||
<div
|
||||
class="status-info"
|
||||
style:margin-left={(isPortrait && docWidth <= 480) || (!isPortrait && docHeight <= 480) ? '1.5rem' : '0'}
|
||||
|
@ -63,7 +63,7 @@
|
||||
export let object: any
|
||||
export let ignoreInitialValidation: boolean = false
|
||||
|
||||
async function validate (language: string) {
|
||||
async function validate (language: string): Promise<boolean> {
|
||||
if (ignoreInitialValidation) return
|
||||
for (const field of fields) {
|
||||
const v = object[field.name]
|
||||
@ -72,7 +72,7 @@
|
||||
status = new Status(Severity.INFO, login.status.RequiredField, {
|
||||
field: await translate(field.i18n, {}, language)
|
||||
})
|
||||
return
|
||||
return false
|
||||
}
|
||||
if (f.id !== undefined) {
|
||||
const sameFields = fields.filter((f) => f.id === field.id)
|
||||
@ -83,7 +83,7 @@
|
||||
field: await translate(field.i18n, {}, language),
|
||||
field2: await translate(f.i18n, {}, language)
|
||||
})
|
||||
return
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,11 +93,12 @@
|
||||
field: await translate(field.i18n, {}),
|
||||
descr: field.ruleDescr ? await translate(field.ruleDescr, {}, language) : ''
|
||||
})
|
||||
return
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
status = OK
|
||||
return true
|
||||
}
|
||||
validate($themeStore.language)
|
||||
|
||||
@ -131,6 +132,15 @@
|
||||
class="container"
|
||||
style:padding={$deviceInfo.docWidth <= 480 ? '.25rem 1.25rem' : '4rem 5rem'}
|
||||
style:min-height={$deviceInfo.docHeight > 720 ? '42rem' : '0'}
|
||||
on:keydown={(evt) => {
|
||||
if (evt.key === 'Enter' && !inAction) {
|
||||
validate().then((res) => {
|
||||
if (res) {
|
||||
performAction(action)
|
||||
}
|
||||
})
|
||||
}
|
||||
}}
|
||||
>
|
||||
{#if loginState !== 'none'}
|
||||
<div class="flex-row-center caption">
|
||||
|
@ -271,7 +271,11 @@
|
||||
async function syncLoc (loc: Location): Promise<void> {
|
||||
const originalLoc = JSON.stringify(loc)
|
||||
// resolve short links
|
||||
const resolvedLoc = await resolveShortLink(loc)
|
||||
let resolvedLoc: ResolvedLocation | undefined
|
||||
if (loc.path.length > 3 && getSpecialComponent(loc.path[3]) === undefined) {
|
||||
resolvedLoc = await resolveShortLink(loc)
|
||||
}
|
||||
|
||||
if (resolvedLoc && !areLocationsEqual(loc, resolvedLoc.loc)) {
|
||||
loc = mergeLoc(loc, resolvedLoc)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user