TicketItem.story.vue 927 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { TicketState } from '@shared/entities/ticket/types'
  4. import TicketItem from './TicketItem.vue'
  5. const ticket = {
  6. id: '54321',
  7. internalId: 1,
  8. number: '12345',
  9. state: { name: TicketState.Open },
  10. title: 'Test Ticket',
  11. owner: {
  12. fullname: 'Jane Doe',
  13. },
  14. }
  15. </script>
  16. <template>
  17. <Story title="TicketItem" group="modules">
  18. <Variant title="Default">
  19. <TicketItem
  20. :entity="{
  21. ...ticket,
  22. updatedAt: new Date(2022, 1, 2).toISOString(),
  23. updatedBy: {
  24. id: '456',
  25. fullname: 'Jane Doe',
  26. },
  27. priority: {
  28. name: 'HIGH',
  29. defaultCreate: false,
  30. },
  31. }"
  32. />
  33. </Variant>
  34. <Variant title="No Edit">
  35. <TicketItem :entity="ticket" />
  36. </Variant>
  37. </Story>
  38. </template>