ArticleMetaWhatsappMessageStatus.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { toRef } from 'vue'
  4. import { useWhatsapp } from '#shared/entities/ticket/channel/composables/useWhatsapp.ts'
  5. import type { TicketArticle } from '#shared/entities/ticket/types.ts'
  6. interface Props {
  7. context: {
  8. article: TicketArticle
  9. }
  10. }
  11. const props = defineProps<Props>()
  12. const { articleDeliveryStatus } = useWhatsapp(toRef(props.context, 'article'))
  13. </script>
  14. <template>
  15. <div class="flex items-center gap-1.5">
  16. <CommonIcon
  17. text-neutral-950
  18. class="text-black dark:text-white"
  19. width="16"
  20. height="16"
  21. name="whatsapp"
  22. />
  23. <CommonLabel class="text-neutral-950 dark:text-white">
  24. {{ $t('whatsapp message') }}
  25. </CommonLabel>
  26. <CommonIcon
  27. v-if="articleDeliveryStatus?.icon"
  28. width="16"
  29. height="16"
  30. :name="articleDeliveryStatus?.icon"
  31. />
  32. <CommonLabel>{{ articleDeliveryStatus?.message }}</CommonLabel>
  33. </div>
  34. </template>