mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-26 10:20:01 +00:00
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:
parent
9e9e05b8f3
commit
b11ff86046
@ -28,6 +28,7 @@
|
|||||||
export let size: IconSize
|
export let size: IconSize
|
||||||
export let direct: Blob | undefined = undefined
|
export let direct: Blob | undefined = undefined
|
||||||
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
export let icon: Asset | AnySvelteComponent | undefined = undefined
|
||||||
|
export let disabled: boolean = false
|
||||||
|
|
||||||
const [schema, uri] = avatar?.split('://') || []
|
const [schema, uri] = avatar?.split('://') || []
|
||||||
|
|
||||||
@ -62,7 +63,9 @@
|
|||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
async function showSelectionPopup (e: MouseEvent) {
|
async function showSelectionPopup (e: MouseEvent) {
|
||||||
showPopup(SelectAvatarPopup, { avatar, email, id, icon, onSubmit: handlePopupSubmit })
|
if (!disabled) {
|
||||||
|
showPopup(SelectAvatarPopup, { avatar, email, id, icon, onSubmit: handlePopupSubmit })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
export let kind: EditStyle = 'editbox'
|
export let kind: EditStyle = 'editbox'
|
||||||
export let focus: boolean = false
|
export let focus: boolean = false
|
||||||
export let focusable: boolean = false
|
export let focusable: boolean = false
|
||||||
|
export let disabled: boolean = false
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
@ -128,6 +129,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if format === 'password'}
|
{#if format === 'password'}
|
||||||
<input
|
<input
|
||||||
|
{disabled}
|
||||||
id="userPassword"
|
id="userPassword"
|
||||||
bind:this={input}
|
bind:this={input}
|
||||||
type="Password"
|
type="Password"
|
||||||
@ -142,6 +144,7 @@
|
|||||||
/>
|
/>
|
||||||
{:else if format === 'number'}
|
{:else if format === 'number'}
|
||||||
<input
|
<input
|
||||||
|
{disabled}
|
||||||
bind:this={input}
|
bind:this={input}
|
||||||
type="number"
|
type="number"
|
||||||
class="number"
|
class="number"
|
||||||
@ -156,6 +159,7 @@
|
|||||||
/>
|
/>
|
||||||
{:else}
|
{:else}
|
||||||
<input
|
<input
|
||||||
|
{disabled}
|
||||||
bind:this={input}
|
bind:this={input}
|
||||||
type="text"
|
type="text"
|
||||||
bind:value
|
bind:value
|
||||||
|
@ -88,6 +88,8 @@
|
|||||||
"GotoApplicants": "Go to Applications",
|
"GotoApplicants": "Go to Applications",
|
||||||
"GotoRecruitApplication": "Switch to Recruit Application",
|
"GotoRecruitApplication": "Switch to Recruit Application",
|
||||||
"AddDropHere": "Add or drop resume",
|
"AddDropHere": "Add or drop resume",
|
||||||
|
"Uploading": "Uploading...",
|
||||||
|
"Parsing": "Parsing...",
|
||||||
"CopyId": "Copy ID",
|
"CopyId": "Copy ID",
|
||||||
"CopyLink": "Copy link",
|
"CopyLink": "Copy link",
|
||||||
"HasActiveApplicant":"Active Only",
|
"HasActiveApplicant":"Active Only",
|
||||||
|
@ -90,6 +90,8 @@
|
|||||||
"GotoApplicants": "Перейти к кандидатам",
|
"GotoApplicants": "Перейти к кандидатам",
|
||||||
"GotoRecruitApplication": "Перейти к Приложению Рекрутинг",
|
"GotoRecruitApplication": "Перейти к Приложению Рекрутинг",
|
||||||
"AddDropHere": "Добавить или перетянуть резюме",
|
"AddDropHere": "Добавить или перетянуть резюме",
|
||||||
|
"Uploading": "Загрузка...",
|
||||||
|
"Parsing": "Обработка...",
|
||||||
"CopyId": "Копировать ID",
|
"CopyId": "Копировать ID",
|
||||||
"CopyLink": "Копировать ссылку",
|
"CopyLink": "Копировать ссылку",
|
||||||
"HasActiveApplicant":"Только активные",
|
"HasActiveApplicant":"Только активные",
|
||||||
|
@ -404,7 +404,7 @@
|
|||||||
<Card
|
<Card
|
||||||
label={recruit.string.CreateTalent}
|
label={recruit.string.CreateTalent}
|
||||||
okAction={createCandidate}
|
okAction={createCandidate}
|
||||||
canSave={firstName.length > 0 && lastName.length > 0}
|
canSave={!loading && firstName.length > 0 && lastName.length > 0}
|
||||||
on:close={() => {
|
on:close={() => {
|
||||||
dispatch('close')
|
dispatch('close')
|
||||||
}}
|
}}
|
||||||
@ -423,6 +423,7 @@
|
|||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<EditBox
|
<EditBox
|
||||||
|
disabled={loading}
|
||||||
placeholder={recruit.string.PersonFirstNamePlaceholder}
|
placeholder={recruit.string.PersonFirstNamePlaceholder}
|
||||||
bind:value={firstName}
|
bind:value={firstName}
|
||||||
kind={'large-style'}
|
kind={'large-style'}
|
||||||
@ -431,6 +432,7 @@
|
|||||||
focusIndex={1}
|
focusIndex={1}
|
||||||
/>
|
/>
|
||||||
<EditBox
|
<EditBox
|
||||||
|
disabled={loading}
|
||||||
placeholder={recruit.string.PersonLastNamePlaceholder}
|
placeholder={recruit.string.PersonLastNamePlaceholder}
|
||||||
bind:value={lastName}
|
bind:value={lastName}
|
||||||
maxWidth={'30rem'}
|
maxWidth={'30rem'}
|
||||||
@ -439,6 +441,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<EditBox
|
<EditBox
|
||||||
|
disabled={loading}
|
||||||
placeholder={recruit.string.Title}
|
placeholder={recruit.string.Title}
|
||||||
bind:value={object.title}
|
bind:value={object.title}
|
||||||
kind={'small-style'}
|
kind={'small-style'}
|
||||||
@ -447,6 +450,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<EditBox
|
<EditBox
|
||||||
|
disabled={loading}
|
||||||
placeholder={recruit.string.Location}
|
placeholder={recruit.string.Location}
|
||||||
bind:value={object.city}
|
bind:value={object.city}
|
||||||
kind={'small-style'}
|
kind={'small-style'}
|
||||||
@ -456,6 +460,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-4">
|
<div class="ml-4">
|
||||||
<EditableAvatar
|
<EditableAvatar
|
||||||
|
disabled={loading}
|
||||||
bind:this={avatarEditor}
|
bind:this={avatarEditor}
|
||||||
bind:direct={avatar}
|
bind:direct={avatar}
|
||||||
avatar={object.avatar}
|
avatar={object.avatar}
|
||||||
@ -466,18 +471,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<svelte:fragment slot="pool">
|
<svelte:fragment slot="pool">
|
||||||
<ChannelsDropdown
|
<ChannelsDropdown
|
||||||
|
editable={!loading}
|
||||||
focusIndex={10}
|
focusIndex={10}
|
||||||
bind:value={channels}
|
bind:value={channels}
|
||||||
editable
|
|
||||||
highlighted={matchedChannels.map((it) => it.provider)}
|
highlighted={matchedChannels.map((it) => it.provider)}
|
||||||
/>
|
/>
|
||||||
<YesNo
|
<YesNo
|
||||||
|
disabled={loading}
|
||||||
focusIndex={100}
|
focusIndex={100}
|
||||||
label={recruit.string.Onsite}
|
label={recruit.string.Onsite}
|
||||||
tooltip={recruit.string.WorkLocationPreferences}
|
tooltip={recruit.string.WorkLocationPreferences}
|
||||||
bind:value={object.onsite}
|
bind:value={object.onsite}
|
||||||
/>
|
/>
|
||||||
<YesNo
|
<YesNo
|
||||||
|
disabled={loading}
|
||||||
focusIndex={101}
|
focusIndex={101}
|
||||||
label={recruit.string.Remote}
|
label={recruit.string.Remote}
|
||||||
tooltip={recruit.string.WorkLocationPreferences}
|
tooltip={recruit.string.WorkLocationPreferences}
|
||||||
@ -486,6 +493,7 @@
|
|||||||
<Component
|
<Component
|
||||||
is={tags.component.TagsDropdownEditor}
|
is={tags.component.TagsDropdownEditor}
|
||||||
props={{
|
props={{
|
||||||
|
disabled: loading,
|
||||||
focusIndex: 102,
|
focusIndex: 102,
|
||||||
items: skills,
|
items: skills,
|
||||||
key,
|
key,
|
||||||
@ -515,22 +523,25 @@
|
|||||||
}}
|
}}
|
||||||
on:drop|preventDefault|stopPropagation={drop}
|
on:drop|preventDefault|stopPropagation={drop}
|
||||||
>
|
>
|
||||||
{#if resume.uuid}
|
{#if loading && resume.uuid}
|
||||||
<Button
|
<Link label={recruit.string.Parsing} icon={Spinner} disabled />
|
||||||
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}
|
{:else}
|
||||||
{#if loading}
|
{#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}
|
{:else}
|
||||||
<Button
|
<Button
|
||||||
kind={'transparent'}
|
kind={'transparent'}
|
||||||
|
@ -101,6 +101,8 @@ export default mergeIds(recruitId, recruit, {
|
|||||||
AddDescription: '' as IntlString,
|
AddDescription: '' as IntlString,
|
||||||
NumberSkills: '' as IntlString,
|
NumberSkills: '' as IntlString,
|
||||||
AddDropHere: '' as IntlString,
|
AddDropHere: '' as IntlString,
|
||||||
|
Uploading: '' as IntlString,
|
||||||
|
Parsing: '' as IntlString,
|
||||||
TalentSelect: '' as IntlString,
|
TalentSelect: '' as IntlString,
|
||||||
FullDescription: '' as IntlString,
|
FullDescription: '' as IntlString,
|
||||||
HasActiveApplicant: '' as IntlString,
|
HasActiveApplicant: '' as IntlString,
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
export let width: string | undefined = undefined
|
export let width: string | undefined = undefined
|
||||||
export let labelDirection: TooltipAlignment | undefined = undefined
|
export let labelDirection: TooltipAlignment | undefined = undefined
|
||||||
|
|
||||||
|
export let disabled: boolean = false
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
let keyLabel: string = ''
|
let keyLabel: string = ''
|
||||||
@ -74,6 +76,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
{disabled}
|
||||||
icon={key.attr.icon ?? tags.icon.Tags}
|
icon={key.attr.icon ?? tags.icon.Tags}
|
||||||
label={items.length > 0 ? undefined : key.attr.label}
|
label={items.length > 0 ? undefined : key.attr.label}
|
||||||
width={width ?? 'min-content'}
|
width={width ?? 'min-content'}
|
||||||
|
Loading…
Reference in New Issue
Block a user