platform/plugins/recruit-resources/src/components/SkillsView.svelte

28 lines
739 B
Svelte
Raw Normal View History

<script lang="ts">
import tags, { selectedTagElements, TagElement } from '@hcengineering/tags'
import { Component, getCurrentLocation, navigate } from '@hcengineering/ui'
import recruit from '../plugin'
2022-04-29 05:27:17 +00:00
function onTag (tag: TagElement): void {
selectedTagElements.set([tag._id])
const loc = getCurrentLocation()
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
}}
/>