UserItem.story.vue 737 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <!-- Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import UserItem from './UserItem.vue'
  4. const user = {
  5. id: '123',
  6. ticketsCount: {
  7. open: 2,
  8. closed: 0,
  9. },
  10. firstname: 'John',
  11. lastname: 'Doe',
  12. organization: {
  13. name: 'organization',
  14. },
  15. }
  16. </script>
  17. <template>
  18. <Story group="modules">
  19. <Variant title="Default">
  20. <UserItem
  21. :entity="{
  22. ...user,
  23. updatedAt: new Date(2022, 1, 2).toISOString(),
  24. updatedBy: {
  25. id: '456',
  26. fullname: 'Jane Doe',
  27. },
  28. }"
  29. />
  30. </Variant>
  31. <Variant title="No Edit">
  32. <UserItem :entity="user" />
  33. </Variant>
  34. </Story>
  35. </template>