2021-12-06 10:07:08 +00:00
|
|
|
<!--
|
|
|
|
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
|
|
|
// Copyright © 2021 Hardcore Engineering Inc.
|
2021-12-07 09:05:52 +00:00
|
|
|
//
|
2021-12-06 10:07:08 +00:00
|
|
|
// 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
|
2021-12-07 09:05:52 +00:00
|
|
|
//
|
2021-12-06 10:07:08 +00:00
|
|
|
// 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.
|
2021-12-07 09:05:52 +00:00
|
|
|
//
|
2021-12-06 10:07:08 +00:00
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
-->
|
|
|
|
<script lang="ts">
|
2022-01-18 10:21:32 +00:00
|
|
|
import { Organization } from '@anticrm/contact'
|
2021-12-07 09:05:52 +00:00
|
|
|
import { showPopup } from '@anticrm/ui'
|
|
|
|
import Company from './icons/Company.svelte'
|
2022-01-18 10:21:32 +00:00
|
|
|
import { EditDoc } from '@anticrm/view-resources'
|
2021-12-06 10:07:08 +00:00
|
|
|
|
2022-01-18 10:21:32 +00:00
|
|
|
export let value: Organization
|
2021-12-06 10:07:08 +00:00
|
|
|
|
2021-12-07 09:05:52 +00:00
|
|
|
async function onClick () {
|
2022-01-18 10:21:32 +00:00
|
|
|
showPopup(EditDoc, { _id: value._id, _class: value._class }, 'full')
|
2021-12-07 09:05:52 +00:00
|
|
|
}
|
2021-12-06 10:07:08 +00:00
|
|
|
</script>
|
|
|
|
|
2022-01-12 09:18:50 +00:00
|
|
|
{#if value}
|
|
|
|
<div class="sm-tool-icon" on:click={onClick}>
|
|
|
|
<span class="icon small-size flex-center"><Company size={'small'} /></span> {value.name}
|
|
|
|
</div>
|
|
|
|
{/if}
|