2021-08-07 17:03:06 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// 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-09-07 08:36:50 +00:00
|
|
|
import { UserInfo, Avatar } from '@anticrm/presentation'
|
2021-10-13 20:04:18 +00:00
|
|
|
import { showPopup, Label, IconThread, ActionIcon, IconMoreH, IconFile } from '@anticrm/ui'
|
2021-09-07 08:36:50 +00:00
|
|
|
import type { WithLookup } from '@anticrm/core'
|
|
|
|
import type { Applicant } from '@anticrm/recruit'
|
2021-08-07 17:03:06 +00:00
|
|
|
|
2021-09-27 16:44:09 +00:00
|
|
|
import EditCandidate from './EditCandidate.svelte'
|
|
|
|
import EditApplication from './EditApplication.svelte'
|
2021-08-07 17:03:06 +00:00
|
|
|
|
2021-10-23 15:30:22 +00:00
|
|
|
import { AttachmentsPresenter } from '@anticrm/chunter-resources'
|
2021-10-01 12:28:52 +00:00
|
|
|
import { formatName } from '@anticrm/contact'
|
2021-09-27 17:24:15 +00:00
|
|
|
|
2021-09-07 08:36:50 +00:00
|
|
|
export let object: WithLookup<Applicant>
|
2021-08-07 17:03:06 +00:00
|
|
|
export let draggable: boolean
|
|
|
|
|
2021-09-27 16:44:09 +00:00
|
|
|
function showCandidate() {
|
2021-10-30 10:13:55 +00:00
|
|
|
showPopup(EditCandidate, { _id: object.attachedTo }, 'full')
|
2021-09-27 16:44:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function showApplication() {
|
|
|
|
showPopup(EditApplication, { _id: object._id }, 'full')
|
|
|
|
}
|
2021-08-07 17:03:06 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="card-container" {draggable} class:draggable on:dragstart on:dragend>
|
|
|
|
<div class="content">
|
2021-10-13 20:04:18 +00:00
|
|
|
<div class="flex-row-center">
|
2021-11-15 13:51:24 +00:00
|
|
|
<Avatar avatar={object.$lookup?.attachedTo?.avatar} size={'medium'} />
|
2021-10-13 20:04:18 +00:00
|
|
|
<div class="flex-col ml-2">
|
2021-10-30 10:13:55 +00:00
|
|
|
<div class="fs-title over-underline" on:click={showCandidate}><Label label={formatName(object.$lookup?.attachedTo?.name)} /></div>
|
2021-11-17 15:20:30 +00:00
|
|
|
<div class="small-text"><Label label={formatName(object.$lookup?.attachedTo?.title)} /></div>
|
2021-09-07 08:36:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-13 20:04:18 +00:00
|
|
|
<ActionIcon label={'More...'} icon={IconMoreH} size={'small'} />
|
2021-09-07 08:36:50 +00:00
|
|
|
</div>
|
2021-10-13 20:04:18 +00:00
|
|
|
<div class="flex-between">
|
2021-09-07 08:36:50 +00:00
|
|
|
<div class="flex-row-center">
|
2021-10-13 20:04:18 +00:00
|
|
|
<div class="sm-tool-icon step-lr75" on:click={showApplication}>
|
|
|
|
<span class="icon"><IconFile size={'small'} /></span>
|
|
|
|
APP-542
|
2021-09-07 08:36:50 +00:00
|
|
|
</div>
|
2021-10-13 20:04:18 +00:00
|
|
|
{#if object.attachments && Object.keys(object.attachments).length > 0}
|
2021-10-23 15:30:22 +00:00
|
|
|
<div class="step-lr75"><AttachmentsPresenter value={object} /></div>
|
2021-10-13 20:04:18 +00:00
|
|
|
{/if}
|
|
|
|
<div class="sm-tool-icon step-lr75">
|
2021-09-07 08:36:50 +00:00
|
|
|
<span class="icon"><IconThread size={'small'} /></span>
|
|
|
|
5
|
|
|
|
</div>
|
2021-08-07 17:03:06 +00:00
|
|
|
</div>
|
2021-10-13 20:04:18 +00:00
|
|
|
<Avatar size={'x-small'} />
|
2021-08-07 17:03:06 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.card-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-10-13 20:04:18 +00:00
|
|
|
padding: 1rem 1.25rem;
|
|
|
|
background-color: rgba(222, 222, 240, .06);
|
2021-08-17 14:46:06 +00:00
|
|
|
border-radius: .75rem;
|
2021-08-07 17:03:06 +00:00
|
|
|
user-select: none;
|
2021-10-13 20:04:18 +00:00
|
|
|
backdrop-filter: blur(10px);
|
2021-08-07 17:03:06 +00:00
|
|
|
|
|
|
|
.content {
|
2021-09-07 08:36:50 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
2021-10-13 20:04:18 +00:00
|
|
|
margin-bottom: 1rem;
|
2021-09-07 08:36:50 +00:00
|
|
|
}
|
2021-09-28 11:59:35 +00:00
|
|
|
&.draggable { cursor: grab; }
|
2021-08-07 17:03:06 +00:00
|
|
|
}
|
|
|
|
</style>
|