Skip to content

Commit

Permalink
feat: add second level filter to fetch vessel layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwiniHerle committed Nov 8, 2024
1 parent 76b3314 commit 1d2ef67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/api/chemotion/profile_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ class ProfileAPI < Grape::API
data[ll.to_s] = layout[ll] if layout[ll].present? && data[ll.to_s].nil?
end

if (element_list = layout.dig(:layout))
element_list.each do |element, sorting|
data['layout'][element.to_s] = sorting if data['layout'][element.to_s].nil?
end
end

if current_user.matrix_check_by_name('genericElement')
available_elements = Labimotion::ElementKlass.where(is_active: true).pluck(:name)
new_layout = data['layout'] || {}
Expand Down

0 comments on commit 1d2ef67

Please sign in to comment.