UBER-56: check if title is hidden for Candidate (Talent) in Kanban and Application. Fix Talent card width in Application (#3196)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov 2023-05-16 17:22:47 +05:00 committed by GitHub
parent 1b9b25e0a8
commit 57b0975404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -55,7 +55,10 @@
</DocNavLink>
{#if client.getHierarchy().hasMixin(candidate, recruit.mixin.Candidate)}
{@const cand = client.getHierarchy().as(candidate, recruit.mixin.Candidate)}
<div class="description lines-limit-2">{cand.title ?? ''}</div>
{@const titleAttribute = client.getHierarchy().getAttribute(recruit.mixin.Candidate, 'title')}
{#if !titleAttribute.hidden}
<div class="description lines-limit-2">{cand.title ?? ''}</div>
{/if}
{/if}
<div class="description overflow-label">{candidate.city ?? ''}</div>
<div class="footer flex flex-reverse flex-grow">
@ -95,6 +98,7 @@
user-select: text;
min-width: 15rem;
min-height: 15rem;
max-width: 25rem;
&:hover {
background-color: var(--theme-button-hovered);

View File

@ -35,6 +35,7 @@
const client = getClient()
const hierarchy = client.getHierarchy()
const assigneeAttribute = hierarchy.getAttribute(recruit.class.Applicant, 'assignee')
const isTitleHidden = client.getHierarchy().getAttribute(recruit.mixin.Candidate, 'title').hidden
function showCandidate () {
showPanel(view.component.EditDoc, object._id, Hierarchy.mixinOrClass(object), 'content')
@ -62,7 +63,9 @@
<div class="fs-title over-underline lines-limit-2">
{object.$lookup?.attachedTo ? getName(object.$lookup.attachedTo) : ''}
</div>
<div class="text-sm lines-limit-2">{object.$lookup?.attachedTo?.title ?? ''}</div>
{#if !isTitleHidden}
<div class="text-sm lines-limit-2">{object.$lookup?.attachedTo?.title ?? ''}</div>
{/if}
</div>
</div>
<div class="tool mr-1 flex-row-center">