fix Tooltip

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-09-27 18:17:50 +02:00
parent c542cca9cd
commit 98b79f2b08
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0
2 changed files with 11 additions and 3 deletions

View File

@ -29,7 +29,7 @@
<div <div
class="tooltip-trigger" class="tooltip-trigger"
bind:this={triggerHTML} bind:this={triggerHTML}
on:mousemove={() => { on:mouseenter={() => {
showTooltip(label, triggerHTML, direction, component, props) showTooltip(label, triggerHTML, direction, component, props)
}} }}
> >

View File

@ -17,14 +17,17 @@
<script lang="ts"> <script lang="ts">
import type { Applicant, Candidate } from '@anticrm/recruit' import type { Applicant, Candidate } from '@anticrm/recruit'
import { CircleButton, Label } from '@anticrm/ui' import { CircleButton, showPopup, closeTooltip } from '@anticrm/ui'
import Vacancy from './icons/Vacancy.svelte' import Vacancy from './icons/Vacancy.svelte'
import { getClient, createQuery } from '@anticrm/presentation' import { getClient, createQuery } from '@anticrm/presentation'
import EditApplication from './EditApplication.svelte'
import recruit from '@anticrm/recruit' import recruit from '@anticrm/recruit'
export let value: Candidate export let value: Candidate
console.log('POPPED UP')
let applications: Applicant[] = [] let applications: Applicant[] = []
const query = createQuery() const query = createQuery()
@ -36,11 +39,16 @@
return model.getObject(app.space).name return model.getObject(app.space).name
} }
function show(app: Applicant) {
closeTooltip()
showPopup(EditApplication, { _id: app._id }, 'full')
}
</script> </script>
<div class="flex-col"> <div class="flex-col">
{#each applications as app} {#each applications as app}
<div class="flex-row-center app"> <div class="flex-row-center app" on:click={() => show(app)}>
<div class="app-icon"><CircleButton icon={Vacancy} size={'large'} /></div> <div class="app-icon"><CircleButton icon={Vacancy} size={'large'} /></div>
<div class="flex-grow flex-col"> <div class="flex-grow flex-col">
<div class="overflow-label label">{getApplicationLabel(app)}</div> <div class="overflow-label label">{getApplicationLabel(app)}</div>