https://avo.cool logo
Join Discord
Powered by
# avo-2
  • Releases
    f

    future-author-97799

    07/17/2023, 9:18 AM
    Hi, what's a good source to read about the releases notes. I have seen we have 2.36.2 (thanks a lot for the bug fix!) and 2.36.3, but could not find the release notes.
    l
    l
    • 3
    • 4
  • Edit Controls
    c

    curved-father-82134

    07/17/2023, 12:36 PM
    Greetings to all, @lemon-wall-20836 Is that feature is available in AVO 2.28.3? Because I haven't found anything related to ResourceControlsComponent for the index page on AVO Doc.

    https://cdn.discordapp.com/attachments/740893011994738751/1130478033174794370/Screenshot_2023-07-17_at_5.29.37_PM.pngโ–พ

    l
    • 2
    • 21
  • I m getting a strange 422 Unprocessable
    a

    acceptable-cartoon-88076

    07/17/2023, 4:42 PM
    I'm getting a strange 422 Unprocessable Entity error when adding to a has_many association. ๐Ÿงต
    l
    • 2
    • 33
  • I m looking at adding a custom field It
    a

    acceptable-cartoon-88076

    07/17/2023, 10:13 PM
    I'm looking at adding a custom field. It's a visual editor for workflows that accepts and outputs JSON, currently fully functional in a Stimulus controller. I'd like to be able to tie into the form submit so I can get the latest JSON out of the editor and put it into the field contents. Is there anything in place to let me do this?
    l
    • 2
    • 9
  • Police controls
    f

    future-author-97799

    07/18/2023, 10:46 AM
    Hi, is there a way to hide the edit/delete buttons on an index view?

    https://cdn.discordapp.com/attachments/740893011994738751/1130812947439034459/Screenshot_2023-07-18_at_12.46.14.pngโ–พ

    l
    l
    • 3
    • 32
  • Action visible block
    f

    future-author-97799

    07/18/2023, 2:45 PM
    I am looking to show a custom action only for some given models. The doc says:
    Copy code
    self.visible = -> do
        #   You have access to:
        #   block
        #   context
        #   current_user
        #   params
        #   parent_model
        #   parent_resource
        #   resource
        #   view
        #   view_context
      end
    But` self.visible = -> { view == :show && parent_model.user.nil? } ` fails with `undefined local variable or method
    parent_model'
    l
    • 2
    • 5
  • Is it possible to get the actions filter
    w

    white-piano-9142

    07/18/2023, 4:49 PM
    Is it possible to get the actions, filter and search options onto custom pages? I'm building out reporting pages for a client and those seem like slam dunk wins if I can pull them in.
    l
    a
    • 3
    • 9
  • a

    alert-toothbrush-24716

    07/18/2023, 5:53 PM
    also curious about this!
  • Hi i am building a URL based on the
    f

    future-author-97799

    07/19/2023, 12:50 PM
    Hi, i am building a URL based on the request host + port, is it possible to do so in the field block?
    l
    • 2
    • 5
  • Handling reporting features
    w

    white-piano-9142

    07/19/2023, 1:15 PM
    How are folks handling reporting features?
    l
    • 2
    • 4
  • Actions
    f

    future-author-97799

    07/20/2023, 6:56 AM
    Hi, I am adding some customer actions in an association
    rails g avo:action AddAvailability
    I am then registering the action in the resource (
    action AddAvailability
    ) and add a simple
    succeed 'ok'
    after the models loop. The action properly appears on top of the association block, but clicking on it has no effect. The associated resources is displayed within some tabs.
    l
    • 2
    • 34
  • Create on loop
    r

    rapid-psychiatrist-19805

    07/20/2023, 4:18 PM
    Hi there, currently adding avohq to build an admin portal, looking good so far! I'll be using it to input a lot of data. Is there a way to stay on the "create" page after adding a new record? I'm losing a lot of time having to click on "Create new item" again. I found this: https://docs.avohq.io/2.0/resources.html#customize-what-happens-after-a-record-is-created-edited but it looks like I can't redirect to the "new" page
    l
    l
    • 3
    • 7
  • Not sure if this is a bug or just a
    a

    adorable-france-99527

    07/20/2023, 8:44 PM
    Not sure if this is a bug or just a configuration issue, but I've got an object called an MSA which is inflected in the inflections.rb file. In the sidebar and breadcrumb it's showing as expected, but the title on the index is not.

    https://cdn.discordapp.com/attachments/740893011994738751/1131688167720894494/Screen_Shot_2023-07-20_at_4.43.20_PM.pngโ–พ

    l
    • 2
    • 12
  • Hi Adrian M I m new on AVO and I want to
    m

    most-gold-6444

    07/21/2023, 1:41 PM
    Hi @lemon-wall-20836 , I'm new on AVO and I want to changed the message "No record found" and the SVG in EmptyStateComponent. I had ejected empty_state_component. But I can't figure out how to do it.

    https://cdn.discordapp.com/attachments/740893011994738751/1131944059804582031/empty_state.pngโ–พ

    a
    l
    a
    • 4
    • 10
  • Dynamic sidebar
    a

    acceptable-cartoon-88076

    07/21/2023, 1:54 PM
    In a Resource Tool, I want to dynamically update the contents of a sidebar div based on click events inside of the tool. Basically, when I click on specific divs, I want to render a corresponding ViewComponent into that sidebar div. I have a couple stimulus controllers already on the page that I can use, or I can use a new one. Is there anything already in Avo for this, or does anyone know of existing controllers for this functionality? I didn't see anything, but thought I'd ask. Writing this functionality doesn't seem terribly complex, so no big deal if there's nothing there already.
    l
    • 2
    • 1
  • Has many scope
    n

    narrow-magazine-18722

    07/21/2023, 3:34 PM
    quick q, I have a
    field :posts, as: :has_many, through: :comments
    and I appear to be getting the same
    Post
    record in the list multiple times if there are multiple comments, can I dedupe this somehow?
    l
    • 2
    • 11
  • Clarification
    a

    adorable-france-99527

    07/21/2023, 6:29 PM
    Clarification question: on the Users page in the demo, can you clarify the difference between the "Search" bar, the "+ add filter" button on the left and the "filters" button on the right? https://main.avodemo.com/avo/resources/users
    l
    l
    • 3
    • 18
  • Hi On Community version could I
    f

    flat-painting-84798

    07/23/2023, 1:00 PM
    Hi, On Community version, could I implement own authorization?
    l
    • 2
    • 2
  • Tabs
    r

    rapid-psychiatrist-19805

    07/24/2023, 3:16 PM
    Can I hide tabs on some views? I only want the tabs on the "show" page. Unfortunately cannot find anything in the docs: https://docs.avohq.io/2.0/tabs.html
    l
    • 2
    • 8
  • Hello I am building a custom resource
    b

    billowy-easter-81499

    07/24/2023, 4:34 PM
    Hello, I am building a custom resource tool, and I am attempting to use the Avo Panel Component within a partial. I can successfully render the partial, however, when attepting to use TurboStream to append another instance of the partial I am getting an error
    Copy code
    Error performing Turbo::Streams::ActionBroadcastJob (Job ID: 194f3864-5724-4428-a444-90e7ead4d330) from Async(default) in 8.99ms: ActionView::Template::Error (undefined method `white_panel_classes' for #<ActionView::Base:0x000000000102e8>):
    l
    l
    • 3
    • 17
  • In a resource tool PanelComponent
    a

    acceptable-cartoon-88076

    07/24/2023, 7:49 PM
    In a resource tool PanelComponent sidebar, can we turn the background 'transparent'? Kinda like
    with_bare_content
    for the main body?
    l
    • 2
    • 9
  • Adrian M can I use Avo fields outside
    a

    acceptable-cartoon-88076

    07/25/2023, 4:47 PM
    @lemon-wall-20836 can I use Avo fields outside of forms, or in non-Resource forms, in order to have a consistent look and feel?
    l
    • 2
    • 5
  • Hi it seems the field files doesn t work
    f

    future-author-97799

    07/26/2023, 7:16 AM
    Hi, it seems the field :files doesn't work in an action.
    Copy code
    class AssetsUploadAction < Avo::BaseAction
      self.name = 'Upload Assets'
      self.standalone = true
      self.visible = -> { view == :index && !parent_resource.nil? }
      self.message = 'Import several assets at once'
    
      field :assets, as: :files
    Any idea?

    https://cdn.discordapp.com/attachments/740893011994738751/1133659139017551932/Screenshot_2023-07-26_at_09.15.56.pngโ–พ

    l
    • 2
    • 8
  • Hi everyone Adrian M
    c

    curved-father-82134

    07/26/2023, 12:18 PM
    Hi, @everyone @User I'm absolutely loving AVO 2.0! ๐ŸŒŸ I've got this brilliant idea of showing not just one, but two filters simultaneously. ๐ŸŽ‰ As you can see in the attached image, it would be fantastic if we could make it happen. ๐Ÿ˜Š Currently, the documentation mentions using only one filter, but I'm wondering if there's a way to embrace the magic of more than one filter at the same time?. ๐ŸŒˆ

    https://cdn.discordapp.com/attachments/740893011994738751/1133735041529294948/Screenshot_2023-07-26_at_4.53.39_PM.pngโ–พ

    l
    • 2
    • 23
  • Hey all is it possible to fire a
    a

    adorable-france-99527

    07/26/2023, 5:10 PM
    Hey all - is it possible to fire a stimulus event when clicking on an action button? The specific case we're looking for is to be able to click a button and have a value copied to the clipboard.
    a
    l
    • 3
    • 5
  • Hey with avo2 is it possible to have
    f

    future-author-97799

    07/27/2023, 6:01 AM
    Hey, with avo2, is it possible to have integer filters between two values? Also, does the DateFilter exit? Thanks
    l
    • 2
    • 8
  • Action icons
    f

    future-author-97799

    07/28/2023, 3:54 PM
    Hey, is there a way to customize the icon of an action.? Thanks
    l
    • 2
    • 2
  • Authorization
    m

    mammoth-notebook-46426

    07/28/2023, 6:24 PM
    Hey all! Noticing something strange with resource policies in v2.33 we have the following set up
    Copy code
    class ConversationPolicy < ApplicationPolicy
      def index?
        user.admin?
      end
    
      def show?
        user.admin?
      end
    end
    ApplicationPolicy
    Copy code
    class ApplicationPolicy
      attr_reader :user, :record
    
      def initialize(user, record)
        @user = user
        @record = record
      end
    
      def index?
        false
      end
    
      def show?
        false
      end
    
      def create?
        false
      end
    
      def new?
        create?
      end
    
      def update?
        false
      end
    
      def edit?
        update?
      end
    
      def destroy?
        false
      end
    
      class Scope # rubocop:disable Style/Documentation
        def initialize(user, scope)
          @user = user
          @scope = scope
        end
    
        def resolve
          raise NotImplementedError, "You must define #resolve in #{self.class}"
        end
    
        private
    
        attr_reader :user, :scope
      end
    end
    What's odd is that when I go to the index for that resource, I can still see the edit and delete icons. This is true in our production environment. In our staging/qa environment, we ONLY see the view icon. So for some reason our staging/qa is following the policy defined, whereas our production environment it's ignoring the policy set up in
    ApplicationPolicy
    . I guess I could try to define the `edit`/`update`/`destroy` policies in
    ConversationPolicy
    outright...but you would think I shouldn't have to. Any thoughts?
    l
    • 2
    • 7
  • Hey just wondering if anyone has
    l

    lively-piano-10453

    07/31/2023, 2:17 PM
    Hey, just wondering if anyone has encountered this weird issue? I've been building admin CMS on development and has been working fine, I deployed to staging environment and realized that avo is not working as expected. (Note: I have a PRO licence and my license key is set accordingly btw). I ran into
    Uncaught SyntaxError: Invalid or unexpected token (at avo.base.js:1:6418)
    error and as shown in the screenshot, it complained on line 1 column 6418. but I'm not able to figure out what's causing this issue. In the development environment this
    avo.base.js
    is not minified and not causing this error, but in staging it's minified and maybe what's causing this? Does anyone encounter this issue? and wondering if anyone has any pointers on how to resolve this issue? Thanks.

    https://cdn.discordapp.com/attachments/740893011994738751/1135576941785792643/image.pngโ–พ

    https://cdn.discordapp.com/attachments/740893011994738751/1135576942054223942/image.pngโ–พ

    l
    • 2
    • 5
  • Is there a way for us to display columns
    a

    adorable-france-99527

    07/31/2023, 4:35 PM
    Is there a way for us to display columns in the index view of a resource from an associated model, or does it have to be defined as an attribute on the resourced model?
    l
    • 2
    • 4
1...6061626364Latest