useTicketPreferences.ts 451 B

123456789101112131415
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { computed, type Ref } from 'vue'
  3. import { type TicketById } from '#shared/entities/ticket/types.ts'
  4. import type { JsonValue } from 'type-fest'
  5. export const useTicketPreferences = (ticket: Ref<TicketById | undefined>) => {
  6. const ticketPreferences = computed<Record<string, JsonValue>>(
  7. () => ticket.value?.preferences,
  8. )
  9. return { ticketPreferences }
  10. }