From a9f2e54e42896a0d970f70aa016501d5d1c403bb Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 27 Oct 2021 17:18:00 +0300 Subject: [PATCH] Fix layout for CreateCandidate (#289) Signed-off-by: Alexander Platov --- packages/theme/styles/_layouts.scss | 2 + .../src/components/CreateCandidate.svelte | 103 +++++++++++------- 2 files changed, 63 insertions(+), 42 deletions(-) diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 29a8e54ab5..5f9e52df43 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -161,6 +161,8 @@ table { .step-tb75 + .step-tb75 { margin-top: .75rem; } .ml-2 { margin-left: .5rem; } +.mt-5 { margin-top: 1.25rem; } +.mb-1 { margin-bottom: .25rem; } /* --------- */ .relative { position: relative; } diff --git a/plugins/recruit-resources/src/components/CreateCandidate.svelte b/plugins/recruit-resources/src/components/CreateCandidate.svelte index 62412f5158..dde30cef6c 100644 --- a/plugins/recruit-resources/src/components/CreateCandidate.svelte +++ b/plugins/recruit-resources/src/components/CreateCandidate.svelte @@ -28,7 +28,7 @@ import type { Candidate } from '@anticrm/recruit' import type { Attachment } from '@anticrm/chunter' - import { EditBox, Link, showPopup, Component, CircleButton, IconFile as FileIcon, Spinner, Label, Status as StatusComponent } from '@anticrm/ui' + import { EditBox, Link, showPopup, Component, CircleButton, IconFile as FileIcon, IconAdd, Spinner, Label, Status as StatusComponent } from '@anticrm/ui' import FileUpload from './icons/FileUpload.svelte' import Avatar from './icons/Avatar.svelte' import Edit from './icons/Edit.svelte' @@ -133,6 +133,11 @@ if (file !== undefined) { createAttachment(file) } } + function saveChannels(result: any) { + object.channels = result + client.updateDoc(recruit.class.Candidate, object.space, object._id, { channels: result }) + } + let kl: number = 0 @@ -166,44 +171,56 @@ {#if kl === 0} {:else if kl === 1} - Avatar + Avatar {:else if kl === 2} - Avatar + Avatar {:else} - Avatar + Avatar {/if}
-
-
-
-
- +
+
+
+
+ +
+ {#if !object.channels || object.channels.length === 0} + showPopup(SocialEditor, { values: object.channels ?? [] }, ev.target, (result) => { saveChannels(result) })} /> + + {:else} + + showPopup(SocialEditor, { values: object.channels ?? [] }, ev.target, (result) => { saveChannels(result) })} /> + {/if} +
+ +
+ {#if resume.uuid} + { showPopup(PDFViewer, { file: resume.uuid }, 'right') } }/> + {:else} + {#if loading} + + {:else} + { inputFile.click() } } /> + {/if} + + {/if} +
+
- +