2022-05-12 07:05:26 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { Employee } from '@anticrm/contact'
|
|
|
|
import EmployeeStatusPresenter from './EmployeeStatusPresenter.svelte'
|
|
|
|
import PersonPresenter from '../components/PersonPresenter.svelte'
|
|
|
|
import { showPopup } from '@anticrm/ui'
|
|
|
|
import EmployeePreviewPopup from './EmployeePreviewPopup.svelte'
|
|
|
|
|
|
|
|
export let value: Employee
|
|
|
|
export let shouldShowAvatar: boolean = true
|
|
|
|
|
|
|
|
let container: HTMLElement
|
|
|
|
|
2022-05-14 09:47:00 +00:00
|
|
|
function onEdit () {
|
2022-05-12 07:05:26 +00:00
|
|
|
showPopup(
|
|
|
|
EmployeePreviewPopup,
|
|
|
|
{
|
|
|
|
employeeId: value._id,
|
|
|
|
space: value.space
|
|
|
|
},
|
|
|
|
container
|
|
|
|
)
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2022-05-13 17:31:57 +00:00
|
|
|
<div bind:this={container} class="flex-center container">
|
2022-05-12 07:05:26 +00:00
|
|
|
<div class="pr-2 over-underline">
|
|
|
|
<PersonPresenter {value} {onEdit} {shouldShowAvatar} />
|
|
|
|
</div>
|
2022-05-13 17:31:57 +00:00
|
|
|
<div class="status content-color">
|
2022-05-12 07:05:26 +00:00
|
|
|
<EmployeeStatusPresenter employeeId={value._id} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.container {
|
|
|
|
width: fit-content;
|
|
|
|
margin-bottom: 0.25rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.status {
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 0.875rem;
|
|
|
|
}
|
|
|
|
</style>
|