2021-09-11 09:32:01 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
// Copyright © 2021 Hardcore Engineering Inc.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2021-12-17 09:04:49 +00:00
|
|
|
import { getClient } from '@anticrm/presentation'
|
2022-02-04 09:03:24 +00:00
|
|
|
import type { Applicant } from '@anticrm/recruit'
|
2022-01-12 09:01:54 +00:00
|
|
|
import recruit from '@anticrm/recruit'
|
2022-02-23 16:10:11 +00:00
|
|
|
import { Icon, Label } from '@anticrm/ui'
|
2022-02-04 09:03:24 +00:00
|
|
|
import { showPanel } from '@anticrm/ui/src/panelup'
|
|
|
|
import view from '@anticrm/view'
|
2021-09-11 09:32:01 +00:00
|
|
|
|
2021-12-17 09:04:49 +00:00
|
|
|
export let value: Applicant
|
2022-03-17 06:07:38 +00:00
|
|
|
export let inline: boolean = false
|
2021-10-14 09:44:25 +00:00
|
|
|
|
2021-12-17 09:04:49 +00:00
|
|
|
const client = getClient()
|
|
|
|
const shortLabel = client.getHierarchy().getClass(value._class).shortLabel
|
2021-09-11 09:32:01 +00:00
|
|
|
|
2021-12-17 09:04:49 +00:00
|
|
|
function show () {
|
2022-02-04 09:03:24 +00:00
|
|
|
showPanel(view.component.EditDoc, value._id, value._class, 'full')
|
2021-12-17 09:04:49 +00:00
|
|
|
}
|
2021-09-11 09:32:01 +00:00
|
|
|
</script>
|
|
|
|
|
2021-12-23 13:30:19 +00:00
|
|
|
{#if value && shortLabel}
|
2022-03-17 06:07:38 +00:00
|
|
|
<div class="flex-presenter" class:inline-presenter={inline} on:click={show}>
|
|
|
|
<div class="icon">
|
|
|
|
<Icon icon={recruit.icon.Application} size={'small'} />
|
|
|
|
</div>
|
|
|
|
<span class="label nowrap">{#if shortLabel}<Label label={shortLabel} />-{/if}{value.number}</span>
|
2021-12-23 13:30:19 +00:00
|
|
|
</div>
|
|
|
|
{/if}
|