Show EMP skills for Row 5 classes

Row 4 EMP skills were not showing up, so you couldn't set Rage IV on Viking, for example
This commit is contained in:
Justin Edmund 2023-02-05 16:32:57 -08:00
parent e2c1639d8f
commit 158786b5a8

View file

@ -140,17 +140,27 @@ module Api
# Perform the query # Perform the query
skills = if search_params[:query].present? && search_params[:query].length >= 2 skills = if search_params[:query].present? && search_params[:query].length >= 2
JobSkill.method("#{locale}_search").call(search_params[:query]) JobSkill.joins(:job)
.method("#{locale}_search").call(search_params[:query])
.where(conditions) .where(conditions)
.where(job: job.id, main: false) .where(job: job.id, main: false)
.or( .or(
JobSkill.method("#{locale}_search").call(search_params[:query]) JobSkill.joins(:job)
.method("#{locale}_search").call(search_params[:query])
.where(conditions) .where(conditions)
.where(sub: true) .where(sub: true)
.where.not(job: job.id) .where.not(job: job.id)
) )
.or(
JobSkill.joins(:job)
.method("#{locale}_search").call(search_params[:query])
.where(conditions)
.where(job: { base_job: job.base_job.id }, emp: true)
.where.not(job: job.id)
)
else else
JobSkill.all JobSkill.all
.joins(:job)
.where(conditions) .where(conditions)
.where(job: job.id, main: false) .where(job: job.id, main: false)
.or( .or(
@ -165,6 +175,13 @@ module Api
.where(job: job.base_job.id, base: true) .where(job: job.base_job.id, base: true)
.where.not(job: job.id) .where.not(job: job.id)
) )
.or(
JobSkill.all
.where(conditions)
.joins(:job)
.where(job: { base_job: job.base_job.id }, emp: true)
.where.not(job: job.id)
)
end end
count = skills.length count = skills.length