restricted action for a collection customers solely for customers that have registered orders. In our data models a customer hasMany orders.
The behavior observed above corresponds to this implementation in the file customers.js
This works only at the level of a records details view as we are looking to catch the query made to ensure that the action should be visible. This query is structured this way and allows us to implement the logic above by retrieving the record id present in the filter: