ticketCreate.ts 815 B

12345678910111213141516171819202122232425
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { EnumTaskbarEntity } from '#shared/graphql/types.ts'
  3. import type { ObjectWithUid } from '#shared/types/utils.ts'
  4. import type { UserTaskbarTabPlugin } from '#desktop/components/UserTaskbarTabs/types.ts'
  5. import TicketCreate from '../Ticket/TicketCreate.vue'
  6. export default <UserTaskbarTabPlugin>{
  7. type: EnumTaskbarEntity.TicketCreate,
  8. component: TicketCreate,
  9. buildEntityTabKey: (entityInternalId: string) =>
  10. `TicketCreateScreen-${entityInternalId}`,
  11. buildTaskbarTabParams: (entityInternalId: string) => {
  12. return {
  13. id: entityInternalId,
  14. }
  15. },
  16. buildTaskbarTabLink: (entity?: ObjectWithUid) => {
  17. if (!entity?.uid) return
  18. return `/tickets/create/${entity.uid}`
  19. },
  20. confirmTabRemove: true,
  21. }