diff --git a/dev/prod/package.json b/dev/prod/package.json index 69f506288a5..94d2f02f950 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -8,6 +8,7 @@ "analyze": "cross-env NODE_ENV=production webpack --json > stats.json", "show": "webpack-bundle-analyzer stats.json dist", "dev-server": "cross-env CLIENT_TYPE=dev-server webpack serve", + "dev-production": "cross-env CLIENT_TYPE=dev-production webpack serve", "start": "cross-env NODE_ENV=production webpack serve", "preformat-svelte": "prettier -w src/**/*.svelte", "lint": "", diff --git a/dev/prod/public/config-dev.json b/dev/prod/public/config-dev.json index 0186e8c0d18..066cfe1c76d 100644 --- a/dev/prod/public/config-dev.json +++ b/dev/prod/public/config-dev.json @@ -2,5 +2,8 @@ "ACCOUNTS_URL":"https://account.hc.engineering", "COLLABORATOR_URL": "wss://collaborator.hc.engineering", "UPLOAD_URL":"/files", - "MODEL_VERSION": null + "MODEL_VERSION": null, + "TELEGRAM_URL": "https://telegram.hc.engineering", + "GMAIL_URL": "https://gmail.hc.engineering", + "REKONI_URL": "https://rekoni.hc.engineering" } \ No newline at end of file diff --git a/dev/prod/src/main-dev.ts b/dev/prod/src/main-dev.ts index 84d9b7a9099..ed53b66be82 100644 --- a/dev/prod/src/main-dev.ts +++ b/dev/prod/src/main-dev.ts @@ -19,7 +19,7 @@ import { configurePlatform } from './platform' import { configurePlatformDevServer } from './platform-dev' configurePlatform().then(() => { - if (process.env.CLIENT_TYPE === 'dev-server') { + if (process.env.CLIENT_TYPE === 'dev-server' || process.env.CLIENT_TYPE === 'dev-production') { configurePlatformDevServer() } diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index 120132fbee9..82e6d1c1615 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -89,8 +89,10 @@ interface Config { GMAIL_URL: string } +const devConfig = process.env.CLIENT_TYPE === 'dev-production' + export async function configurePlatform() { - const config: Config = await (await fetch('/config.json')).json() + const config: Config = await (await fetch(devConfig? '/config-dev.json' : '/config.json')).json() console.log('loading configuration', config) setMetadata(login.metadata.AccountsUrl, config.ACCOUNTS_URL) setMetadata(presentation.metadata.UploadURL, config.UPLOAD_URL) diff --git a/dev/prod/webpack.config.js b/dev/prod/webpack.config.js index c4bce04d022..0415ef2bb10 100644 --- a/dev/prod/webpack.config.js +++ b/dev/prod/webpack.config.js @@ -26,7 +26,8 @@ const { Configuration } = require('webpack') const mode = process.env.NODE_ENV || 'development' const prod = mode === 'production' const devServer = (process.env.CLIENT_TYPE ?? '') === 'dev-server' -const dev = (process.env.CLIENT_TYPE ?? '') === 'dev' || devServer +const devProduction = (process.env.CLIENT_TYPE ?? '') === 'dev-production' +const dev = (process.env.CLIENT_TYPE ?? '') === 'dev' || devServer || devProduction const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); /** @@ -228,7 +229,7 @@ module.exports = { overlay: true, progress: false, }, - proxy: devServer ? { + proxy: (devServer && !devProduction) ? { '/account': { target: 'http://localhost:3000', changeOrigin: true, @@ -247,15 +248,12 @@ module.exports = { }, } : { '/account': { - // target: 'https://ftwm71rwag.execute-api.us-west-2.amazonaws.com/stage/', target: 'https://account.hc.engineering/', changeOrigin: true, pathRewrite: { '^/account': '' }, logLevel: 'debug' }, '/files': { - // target: 'https://anticrm-upload.herokuapp.com/', - // target: 'http://localhost:3000/', target: 'https://front.hc.engineering/files', changeOrigin: true, pathRewrite: { '^/files': '' }, diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 536eb77171e..35317c3b913 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -281,10 +281,7 @@ export function createModel (builder: Builder): void { label: recruit.string.Applications, createLabel: recruit.string.ApplicationCreateLabel, createComponent: recruit.component.CreateApplication, - descriptors: [view.viewlet.Table, task.viewlet.Kanban, recruit.viewlet.ApplicantDashboard], - baseQuery: { - doneState: null - } + descriptors: [view.viewlet.Table, task.viewlet.Kanban, recruit.viewlet.ApplicantDashboard] }, position: 'vacancy' }, @@ -570,7 +567,10 @@ export function createModel (builder: Builder): void { } } }, - hiddenKeys: ['name', 'attachedTo'] + hiddenKeys: ['name', 'attachedTo'], + baseQuery: { + doneState: null + } }, recruit.viewlet.ApplicantTable ) @@ -582,7 +582,10 @@ export function createModel (builder: Builder): void { attachTo: recruit.class.ApplicantMatch, descriptor: view.viewlet.Table, config: ['', 'response', 'attachedTo', 'space', 'modifiedOn'], - hiddenKeys: [] + hiddenKeys: [], + baseQuery: { + doneState: null + } }, recruit.viewlet.TableApplicantMatch ) @@ -630,6 +633,9 @@ export function createModel (builder: Builder): void { attachTo: recruit.class.Applicant, descriptor: task.viewlet.Kanban, // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + baseQuery: { + doneState: null + }, viewOptions: { ...applicantViewOptions, groupDepth: 1 diff --git a/packages/presentation/src/components/IndexedDocumentContent.svelte b/packages/presentation/src/components/IndexedDocumentContent.svelte index a7990cb6f34..f8229837fa6 100644 --- a/packages/presentation/src/components/IndexedDocumentContent.svelte +++ b/packages/presentation/src/components/IndexedDocumentContent.svelte @@ -25,8 +25,8 @@ if (bb._class === undefined) { return a } - const attr = client.getHierarchy().getAttribute(bb._class, bb.attr) - if (!isFullTextAttribute(attr)) { + const attr = client.getHierarchy().findAttribute(bb._class, bb.attr) + if (attr === undefined || !isFullTextAttribute(attr)) { return a } const pos = a.findIndex((it) => it[0] === attr) diff --git a/packages/presentation/src/components/IndexedDocumentPreview.svelte b/packages/presentation/src/components/IndexedDocumentPreview.svelte index c8f5dfce950..1349b56200a 100644 --- a/packages/presentation/src/components/IndexedDocumentPreview.svelte +++ b/packages/presentation/src/components/IndexedDocumentPreview.svelte @@ -1,13 +1,15 @@ - - +{#if noPanel} +
+
{#if indexDoc} @@ -29,7 +34,18 @@ {/if}
-
+{:else} + + +
+
+ {#if indexDoc} + + {/if} +
+
+
+{/if}