Organization.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!-- Copyright (C) 2012-2025 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { computed } from 'vue'
  4. import type { QuickSearchPluginProps } from '../types.ts'
  5. const props = defineProps<QuickSearchPluginProps>()
  6. const isOrganizationInactive = computed(() => !props.item.active)
  7. </script>
  8. <template>
  9. <CommonLink
  10. class="group/item flex grow gap-2 rounded-md px-2 py-3 text-neutral-400 hover:bg-blue-900 hover:no-underline!"
  11. :link="`/organizations/${item.internalId}`"
  12. :aria-description="
  13. isOrganizationInactive ? $t('Organization is inactive.') : undefined
  14. "
  15. internal
  16. >
  17. <CommonIcon
  18. class="shrink-0 text-neutral-500"
  19. :name="isOrganizationInactive ? 'buildings-slash' : 'buildings'"
  20. size="small"
  21. decorative
  22. />
  23. <CommonLabel
  24. class="block! truncate group-hover/item:text-white"
  25. :class="{
  26. 'text-neutral-500! group-hover/item:text-white!':
  27. isOrganizationInactive,
  28. }"
  29. >
  30. {{ item.name }}
  31. </CommonLabel>
  32. </CommonLink>
  33. </template>