class CreateUserDefaultsJob < ActiveJob::Base
  queue_as :default

  def perform(user)
    ActsAsTenant.with_tenant(user) do
      ProjectStatus.create([
        { slug: 'active', name: 'Active' },
        { slug: 'inactive', name: 'Inactive' },
        { slug: 'canceled', name: 'Canceled' },
        { slug: 'on-hold', name: 'On Hold' }
      ])
    end
  end
end

class CreateUserDefaultsJob < ActiveJob::Base
  queue_as :default

  def perform(user)
    ActsAsTenant.with_tenant(user) do
      ProjectStatus.create([
        { slug: 'active', name: 'Active' },
        { slug: 'inactive', name: 'Inactive' },
        { slug: 'canceled', name: 'Canceled' },
        { slug: 'on-hold', name: 'On Hold' }
      ])

      if user.developer?
        SkillCategory.create([
          { name: 'Languages' },
          { name: 'Web Development Frameworks' },
          { name: 'Database Servers' },
          { name: 'Development Utilities' },
          { name: 'Cloud Platforms' }
        ])
      end
    end
  end
end

Create default SkillCategories for new developers in CreateUserDefaultsJob
Create default SkillCategories for new developers in CreateUserDefaultsJob

Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
