platform/plugins/recruit-resources/src/components/SkillsView.svelte
Denis Bykhov 52e57db99e
Fix resolved loc (#3046)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
2023-04-21 23:24:45 +07:00

28 lines
755 B
Svelte
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script lang="ts">
import tags, { selectedTagElements, TagElement } from '@hcengineering/tags'
import { Component, getCurrentResolvedLocation, navigate } from '@hcengineering/ui'
import recruit from '../plugin'
function onTag (tag: TagElement): void {
selectedTagElements.set([tag._id])
const loc = getCurrentResolvedLocation()
loc.path[2] = 'recruit'
loc.path[3] = 'candidates'
loc.path.length = 4
navigate(loc)
}
</script>
<Component
is={tags.component.TagsView}
props={{
targetClass: recruit.mixin.Candidate,
title: recruit.string.SkillsLabel,
icon: recruit.icon.Skills,
item: recruit.string.SkillLabel,
key: 'skills',
сreateItemLabel: recruit.string.SkillCreateLabel,
onTag
}}
/>