Feature/tsk 355 (#2350)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
Co-authored-by: Andrey Sobolev <haiodo@users.noreply.github.com>
This commit is contained in:
Ruslan Bayandinov 2022-11-03 15:13:25 +07:00 committed by GitHub
parent 9e9e05b8f3
commit b11ff86046
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 17 deletions

View File

@ -28,6 +28,7 @@
export let size: IconSize
export let direct: Blob | undefined = undefined
export let icon: Asset | AnySvelteComponent | undefined = undefined
export let disabled: boolean = false
const [schema, uri] = avatar?.split('://') || []
@ -62,7 +63,9 @@
const dispatch = createEventDispatcher()
async function showSelectionPopup (e: MouseEvent) {
showPopup(SelectAvatarPopup, { avatar, email, id, icon, onSubmit: handlePopupSubmit })
if (!disabled) {
showPopup(SelectAvatarPopup, { avatar, email, id, icon, onSubmit: handlePopupSubmit })
}
}
</script>

View File

@ -33,6 +33,7 @@
export let kind: EditStyle = 'editbox'
export let focus: boolean = false
export let focusable: boolean = false
export let disabled: boolean = false
const dispatch = createEventDispatcher()
@ -128,6 +129,7 @@
{/if}
{#if format === 'password'}
<input
{disabled}
id="userPassword"
bind:this={input}
type="Password"
@ -142,6 +144,7 @@
/>
{:else if format === 'number'}
<input
{disabled}
bind:this={input}
type="number"
class="number"
@ -156,6 +159,7 @@
/>
{:else}
<input
{disabled}
bind:this={input}
type="text"
bind:value

View File

@ -88,6 +88,8 @@
"GotoApplicants": "Go to Applications",
"GotoRecruitApplication": "Switch to Recruit Application",
"AddDropHere": "Add or drop resume",
"Uploading": "Uploading...",
"Parsing": "Parsing...",
"CopyId": "Copy ID",
"CopyLink": "Copy link",
"HasActiveApplicant":"Active Only",

View File

@ -90,6 +90,8 @@
"GotoApplicants": "Перейти к кандидатам",
"GotoRecruitApplication": "Перейти к Приложению Рекрутинг",
"AddDropHere": "Добавить или перетянуть резюме",
"Uploading": "Загрузка...",
"Parsing": "Обработка...",
"CopyId": "Копировать ID",
"CopyLink": "Копировать ссылку",
"HasActiveApplicant":"Только активные",

View File

@ -404,7 +404,7 @@
<Card
label={recruit.string.CreateTalent}
okAction={createCandidate}
canSave={firstName.length > 0 && lastName.length > 0}
canSave={!loading && firstName.length > 0 && lastName.length > 0}
on:close={() => {
dispatch('close')
}}
@ -423,6 +423,7 @@
<div class="flex-between">
<div class="flex-col">
<EditBox
disabled={loading}
placeholder={recruit.string.PersonFirstNamePlaceholder}
bind:value={firstName}
kind={'large-style'}
@ -431,6 +432,7 @@
focusIndex={1}
/>
<EditBox
disabled={loading}
placeholder={recruit.string.PersonLastNamePlaceholder}
bind:value={lastName}
maxWidth={'30rem'}
@ -439,6 +441,7 @@
/>
<div class="mt-1">
<EditBox
disabled={loading}
placeholder={recruit.string.Title}
bind:value={object.title}
kind={'small-style'}
@ -447,6 +450,7 @@
/>
</div>
<EditBox
disabled={loading}
placeholder={recruit.string.Location}
bind:value={object.city}
kind={'small-style'}
@ -456,6 +460,7 @@
</div>
<div class="ml-4">
<EditableAvatar
disabled={loading}
bind:this={avatarEditor}
bind:direct={avatar}
avatar={object.avatar}
@ -466,18 +471,20 @@
</div>
<svelte:fragment slot="pool">
<ChannelsDropdown
editable={!loading}
focusIndex={10}
bind:value={channels}
editable
highlighted={matchedChannels.map((it) => it.provider)}
/>
<YesNo
disabled={loading}
focusIndex={100}
label={recruit.string.Onsite}
tooltip={recruit.string.WorkLocationPreferences}
bind:value={object.onsite}
/>
<YesNo
disabled={loading}
focusIndex={101}
label={recruit.string.Remote}
tooltip={recruit.string.WorkLocationPreferences}
@ -486,6 +493,7 @@
<Component
is={tags.component.TagsDropdownEditor}
props={{
disabled: loading,
focusIndex: 102,
items: skills,
key,
@ -515,22 +523,25 @@
}}
on:drop|preventDefault|stopPropagation={drop}
>
{#if resume.uuid}
<Button
kind={'transparent'}
focusIndex={103}
icon={FileIcon}
on:click={() => {
showPopup(PDFViewer, { file: resume.uuid, name: resume.name }, 'float')
}}
>
<svelte:fragment slot="content">
<span class="overflow-label disabled">{resume.name}</span>
</svelte:fragment>
</Button>
{#if loading && resume.uuid}
<Link label={recruit.string.Parsing} icon={Spinner} disabled />
{:else}
{#if loading}
<Link label={'Uploading...'} icon={Spinner} disabled />
<Link label={recruit.string.Uploading} icon={Spinner} disabled />
{:else if resume.uuid}
<Button
disabled={loading}
kind={'transparent'}
focusIndex={103}
icon={FileIcon}
on:click={() => {
showPopup(PDFViewer, { file: resume.uuid, name: resume.name }, 'float')
}}
>
<svelte:fragment slot="content">
<span class="overflow-label disabled">{resume.name}</span>
</svelte:fragment>
</Button>
{:else}
<Button
kind={'transparent'}

View File

@ -101,6 +101,8 @@ export default mergeIds(recruitId, recruit, {
AddDescription: '' as IntlString,
NumberSkills: '' as IntlString,
AddDropHere: '' as IntlString,
Uploading: '' as IntlString,
Parsing: '' as IntlString,
TalentSelect: '' as IntlString,
FullDescription: '' as IntlString,
HasActiveApplicant: '' as IntlString,

View File

@ -35,6 +35,8 @@
export let width: string | undefined = undefined
export let labelDirection: TooltipAlignment | undefined = undefined
export let disabled: boolean = false
const dispatch = createEventDispatcher()
let keyLabel: string = ''
@ -74,6 +76,7 @@
</script>
<Button
{disabled}
icon={key.attr.icon ?? tags.icon.Tags}
label={items.length > 0 ? undefined : key.attr.label}
width={width ?? 'min-content'}