avo-hq/avo

Allow multiple records attach

Open

#2,116 opened on Dec 17, 2023

View on GitHub
 (2 comments) (3 reactions) (1 assignee)Ruby (308 forks)user submission
DSL-relatedDesignEnhancementFront endGood first issueHelp wantedHigh ImpactStale exempt😎 Cool

Repository metrics

Stars
 (1,778 stars)
PR merge metrics
 (Avg merge 1d 6h) (67 merged PRs in 30d)

Description

This will help with attaching multiple records from the same modal.

The suggestions could be added as a DSL option

field :memberships,
  as: :has_many,
  attach_suggestions: -> do
	# this would feed of the regular query that's being made to fetch the suggestions
    query.where.not(user_id: parent.id).or(query.where(user_id: nil))
  end
  • The results should be displayed using the title attribute set on the resource
  • If the resourse has the search description set, display that
  • same for avatar
  • when the user selects a few suggestions and clicks attach, we call to a new controller method to execute that logic

Image examples

Image

Contributor guide