overview.rb 826 B

1234567891011121314151617181920212223242526272829303132333435
  1. FactoryBot.define do
  2. factory :overview do
  3. sequence(:name) { |n| "Test Overview #{n}" }
  4. prio { 1 }
  5. role_ids { Role.where(name: %w[Customer Agent Admin]).pluck(:id) }
  6. out_of_office { false }
  7. updated_by_id { 1 }
  8. created_by_id { 1 }
  9. condition do
  10. {
  11. 'ticket.state_id' => {
  12. operator: 'is',
  13. value: Ticket::State.where(name: %w[new open]).pluck(:id),
  14. },
  15. }
  16. end
  17. order do
  18. {
  19. by: 'created_at',
  20. direction: 'DESC',
  21. }
  22. end
  23. view do
  24. {
  25. d: %w[title customer state created_at],
  26. s: %w[number title state created_at],
  27. m: %w[number title state created_at],
  28. view_mode_default: 's',
  29. }
  30. end
  31. end
  32. end