CommonOrganizationAvatar.vue 680 B

123456789101112131415161718192021222324252627282930
  1. <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { computed } from 'vue'
  4. import CommonAvatar from '../CommonAvatar/CommonAvatar.vue'
  5. import type { AvatarSize } from '../CommonAvatar'
  6. import type { AvatarOrganization } from './types'
  7. export interface Props {
  8. entity: AvatarOrganization
  9. size?: AvatarSize
  10. }
  11. const props = defineProps<Props>()
  12. const icon = computed(() => {
  13. return props.entity.active
  14. ? 'mobile-organization'
  15. : 'mobile-inactive-organization'
  16. })
  17. </script>
  18. <template>
  19. <CommonAvatar
  20. class="bg-gray"
  21. :size="size"
  22. :icon="icon"
  23. :aria-label="entity.name"
  24. />
  25. </template>