Open netProphET opened 1 week ago
I think that this should likely be derived automatically based on configuration in the destination resource perhaps?
Something like:
label_field
on the destination resource, then we select with that label.label_field
then we can do the same thing.label_field
, that way we can do thisThis allows doing things on your users like
label_field :admin_label
....
calculate :admin_label, :string, expr("#{email} (#{id})")
A common pattern in admin UIs is to let the user select a foreign key value from a list of options from the related table. For example, when creating or editing an Item, the user might like to pick a Category from a list instead of copy/pasting a Category id from another view.
I've confirmed that this feature does not currently exist in ash_admin.
I have cooked up a naive solution which I'm happy to share via PR, but as I'm new to Ash (as well as Elixir) I suspect I don't have the configuration part well solved, or the feature set for that matter. It feels like with Ash it's important to get this part right first.
An example
In ash_admin:
Then my Resources look like this:
MyProject.Catalog.Item
MyProject.Catalog.Category
Things I'm unsure about:
I look forward to thoughts on this.