Vacancy card fix (#1177)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov 2022-03-19 22:17:23 +06:00 committed by GitHub
parent c3ff3db99f
commit 66581854f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 7 deletions

View File

@ -18,10 +18,11 @@
import { ChannelsView } from '@anticrm/contact-resources'
import { Avatar, createQuery } from '@anticrm/presentation'
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 chunter from '@anticrm/chunter'
import attachment from '@anticrm/attachment'
import recruit from '../plugin'
export let candidate: Candidate
@ -39,7 +40,7 @@
</script>
<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'} />
{#if candidate}
<div class="name lines-limit-2 over-underline" on:click={() => {

View File

@ -15,16 +15,32 @@
<script lang="ts">
import type { Vacancy } from '@anticrm/recruit'
import { closePanel, closePopup, closeTooltip, getCurrentLocation, navigate } from '@anticrm/ui'
import Company from './icons/Company.svelte'
import { closePanel, closePopup, closeTooltip, getCurrentLocation, Label, navigate } from '@anticrm/ui'
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
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>
<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">
<Company size={'large'} />
<VacancyIcon size={'large'} />
</div>
{#if vacancy}
<div class="name lines-limit-2 over-underline" on:click={() => {
@ -36,6 +52,9 @@
loc.path.length = 3
navigate(loc)
}}>{vacancy.name}</div>
{#if company}
<span class="label">{company.name}</span>
{/if}
<div class="description lines-limit-2">{vacancy.description ?? ''}</div>
{/if}
</div>

View File

@ -2,6 +2,11 @@ import { test, expect } from '@playwright/test'
test.describe('login test', () => {
test('check login', async ({ page }) => {
page.on('pageerror', exception => {
console.log('Uncaught exception:')
console.log(exception.message)
})
// Create user and workspace
await page.goto('http://localhost:8083/login%3Acomponent%3ALoginApp/login')

View File

@ -53,7 +53,7 @@ test.describe('recruit tests', () => {
await page.click('text=Create Cancel >> button')
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")')
})

View File

@ -1,6 +1,11 @@
import { Page } from '@playwright/test'
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.evaluate(() => {