mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 04:49:00 +00:00
Vacancy card fix (#1177)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
c3ff3db99f
commit
66581854f8
@ -18,10 +18,11 @@
|
|||||||
import { ChannelsView } from '@anticrm/contact-resources'
|
import { ChannelsView } from '@anticrm/contact-resources'
|
||||||
import { Avatar, createQuery } from '@anticrm/presentation'
|
import { Avatar, createQuery } from '@anticrm/presentation'
|
||||||
import type { Candidate } from '@anticrm/recruit'
|
import type { Candidate } from '@anticrm/recruit'
|
||||||
import { Component, showPanel } from '@anticrm/ui'
|
import { Component, Label, showPanel } from '@anticrm/ui'
|
||||||
import view from '@anticrm/view'
|
import view from '@anticrm/view'
|
||||||
import chunter from '@anticrm/chunter'
|
import chunter from '@anticrm/chunter'
|
||||||
import attachment from '@anticrm/attachment'
|
import attachment from '@anticrm/attachment'
|
||||||
|
import recruit from '../plugin'
|
||||||
|
|
||||||
export let candidate: Candidate
|
export let candidate: Candidate
|
||||||
|
|
||||||
@ -39,7 +40,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-col h-full card-container">
|
<div class="flex-col h-full card-container">
|
||||||
<div class="label">CANDIDATE</div>
|
<div class="label uppercase"><Label label={recruit.string.Candidate} /></div>
|
||||||
<Avatar avatar={candidate.avatar} size={'large'} />
|
<Avatar avatar={candidate.avatar} size={'large'} />
|
||||||
{#if candidate}
|
{#if candidate}
|
||||||
<div class="name lines-limit-2 over-underline" on:click={() => {
|
<div class="name lines-limit-2 over-underline" on:click={() => {
|
||||||
|
@ -15,16 +15,32 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Vacancy } from '@anticrm/recruit'
|
import type { Vacancy } from '@anticrm/recruit'
|
||||||
import { closePanel, closePopup, closeTooltip, getCurrentLocation, navigate } from '@anticrm/ui'
|
import { closePanel, closePopup, closeTooltip, getCurrentLocation, Label, navigate } from '@anticrm/ui'
|
||||||
import Company from './icons/Company.svelte'
|
import VacancyIcon from './icons/Vacancy.svelte'
|
||||||
|
import contact, { Organization } from '@anticrm/contact'
|
||||||
|
import recruit from '../plugin'
|
||||||
|
import { getClient } from '@anticrm/presentation'
|
||||||
|
import { Ref } from '@anticrm/core'
|
||||||
|
|
||||||
export let vacancy: Vacancy
|
export let vacancy: Vacancy
|
||||||
|
let company: Organization | undefined
|
||||||
|
|
||||||
|
$: getOrganization(vacancy?.company)
|
||||||
|
const client = getClient()
|
||||||
|
|
||||||
|
async function getOrganization (_id: Ref<Organization> | undefined): Promise<void> {
|
||||||
|
if (_id === undefined) {
|
||||||
|
company = undefined
|
||||||
|
} else {
|
||||||
|
company = await client.findOne(contact.class.Organization, { _id })
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex-col h-full card-container">
|
<div class="flex-col h-full card-container">
|
||||||
<div class="label">VACANCY</div>
|
<div class="label uppercase"><Label label={recruit.string.Vacancy} /></div>
|
||||||
<div class="flex-center logo">
|
<div class="flex-center logo">
|
||||||
<Company size={'large'} />
|
<VacancyIcon size={'large'} />
|
||||||
</div>
|
</div>
|
||||||
{#if vacancy}
|
{#if vacancy}
|
||||||
<div class="name lines-limit-2 over-underline" on:click={() => {
|
<div class="name lines-limit-2 over-underline" on:click={() => {
|
||||||
@ -36,6 +52,9 @@
|
|||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
navigate(loc)
|
navigate(loc)
|
||||||
}}>{vacancy.name}</div>
|
}}>{vacancy.name}</div>
|
||||||
|
{#if company}
|
||||||
|
<span class="label">{company.name}</span>
|
||||||
|
{/if}
|
||||||
<div class="description lines-limit-2">{vacancy.description ?? ''}</div>
|
<div class="description lines-limit-2">{vacancy.description ?? ''}</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,6 +2,11 @@ import { test, expect } from '@playwright/test'
|
|||||||
|
|
||||||
test.describe('login test', () => {
|
test.describe('login test', () => {
|
||||||
test('check login', async ({ page }) => {
|
test('check login', async ({ page }) => {
|
||||||
|
page.on('pageerror', exception => {
|
||||||
|
console.log('Uncaught exception:')
|
||||||
|
console.log(exception.message)
|
||||||
|
})
|
||||||
|
|
||||||
// Create user and workspace
|
// Create user and workspace
|
||||||
await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login')
|
await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login')
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ test.describe('recruit tests', () => {
|
|||||||
await page.click('text=Create Cancel >> button')
|
await page.click('text=Create Cancel >> button')
|
||||||
|
|
||||||
await page.click('text=APP-4')
|
await page.click('text=APP-4')
|
||||||
await page.click('text=Assigned recruiter Not selected >> span')
|
await page.click('text=Assigned recruiter Not selected')
|
||||||
await page.click('button:has-text("Rosamund Chen")')
|
await page.click('button:has-text("Rosamund Chen")')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
import { Page } from '@playwright/test'
|
import { Page } from '@playwright/test'
|
||||||
|
|
||||||
export async function openWorkbench (page: Page): Promise<void> {
|
export async function openWorkbench (page: Page): Promise<void> {
|
||||||
|
page.on('pageerror', exception => {
|
||||||
|
console.log('Uncaught exception:')
|
||||||
|
console.log(exception.message)
|
||||||
|
})
|
||||||
|
|
||||||
await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login')
|
await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login')
|
||||||
|
|
||||||
await page.evaluate(() => {
|
await page.evaluate(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user