From b37c802aa7e37ec28e9f9a156b1a1c8a85882e3d Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 23 Dec 2021 20:30:19 +0700 Subject: [PATCH] XML Import related fixes (#724) Signed-off-by: Andrey Sobolev --- dev/tool/src/importer.ts | 2 +- .../src/components/AttachmentsPresenter.svelte | 2 +- .../src/components/CommentsPresenter.svelte | 2 +- .../src/components/ApplicationPresenter.svelte | 8 +++++--- .../src/components/state/StatePresenter.svelte | 8 +++++--- plugins/view-resources/src/components/Table.svelte | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dev/tool/src/importer.ts b/dev/tool/src/importer.ts index 98e4ebe0fc..8cc033c861 100644 --- a/dev/tool/src/importer.ts +++ b/dev/tool/src/importer.ts @@ -260,7 +260,7 @@ async function createCandidate (_name: string, pos: number, len: number, c: any, const { sourceFields, telegram, linkedin, github } = parseSocials(c) const data: Data = { - name: names.slice(1).join(' ') + ', ' + names[0], + name: names.slice(1).join(' ') + ',' + names[0], city: get(c, _.city) ?? '', title: [ get(c, _.vacancyKind), diff --git a/plugins/attachment-resources/src/components/AttachmentsPresenter.svelte b/plugins/attachment-resources/src/components/AttachmentsPresenter.svelte index cac40b2213..edd3e61005 100644 --- a/plugins/attachment-resources/src/components/AttachmentsPresenter.svelte +++ b/plugins/attachment-resources/src/components/AttachmentsPresenter.svelte @@ -23,7 +23,7 @@ -{#if value.attachments && value.attachments > 0} +{#if value && value.attachments && value.attachments > 0}
 {value.attachments} diff --git a/plugins/chunter-resources/src/components/CommentsPresenter.svelte b/plugins/chunter-resources/src/components/CommentsPresenter.svelte index 3a34e91ce7..5c3e47e676 100644 --- a/plugins/chunter-resources/src/components/CommentsPresenter.svelte +++ b/plugins/chunter-resources/src/components/CommentsPresenter.svelte @@ -23,7 +23,7 @@ export let value: Doc & { comments?: number } -{#if value.comments && value.comments > 0} +{#if value && value.comments && value.comments > 0}
 {value.comments} diff --git a/plugins/recruit-resources/src/components/ApplicationPresenter.svelte b/plugins/recruit-resources/src/components/ApplicationPresenter.svelte index 89c07c606e..b554b407fb 100644 --- a/plugins/recruit-resources/src/components/ApplicationPresenter.svelte +++ b/plugins/recruit-resources/src/components/ApplicationPresenter.svelte @@ -30,6 +30,8 @@ } -
-  {shortLabel}-{value.number} -
+{#if value && shortLabel} +
+  {shortLabel}-{value.number} +
+{/if} diff --git a/plugins/task-resources/src/components/state/StatePresenter.svelte b/plugins/task-resources/src/components/state/StatePresenter.svelte index 0330147439..2ed8f971a3 100644 --- a/plugins/task-resources/src/components/state/StatePresenter.svelte +++ b/plugins/task-resources/src/components/state/StatePresenter.svelte @@ -21,9 +21,11 @@ -
- {value.title} -
+{#if value} +
+ {value.title} +
+{/if}