1

I need help/recommendation for creating an order like input form with MASTER inputs like (order no, date, customer name, address) along with DETAIL info in multiple rows like (Item no, Description, Qty, Rate, Amount).

I am using Admin-on-rest as front-end interface and Loopback for my backend api.

Being new to react/redux and still learning core concepts, I am getting a hard time in finding a good example/starting point to build this functionality. So far, I think this example based on redux-form can help in creating a custom component, but I am yet not competent enough to build this myself.

Any reference to a similar example or some simple code to get me started will be very helpful.

Ref. Image

Admin-on-rest Demo > Orders

Gagan
  • 163
  • 12

1 Answers1

0

I think you need this.

How to richly style AOR Edit page

The last answer on the page is a somewhat detailed guide on creating a custom edit component in AOR. Feel free to ask more questions here about how this will be done.

Looking at your design you will need to also think how this data will be updated at the API level. AOR itself will make a single request when you hit save. So how will your API handle updates to multiple models etc.

kunal pareek
  • 1,285
  • 10
  • 21
  • Yes, this gives me some idea but it looks more specific. I think I need a reusable component to which I can pass on fields from master table, the way its done with SimpleForm along with a Datagrid linked to the details table. I hope I am clear enough here, or maybe its too much to ask for at this time. Anyway, I am first trying to create a single use form and then later on generalise it. Thanks. :) – Gagan Dec 10 '17 at 13:39
  • well SimpleForm isn't really designed to create forms with the kind of styling you are looking at. It creates a ReduxForm and every field of that form is to be thus given a name etc. There is a lot of work going on behind the scenes that need to be somehow recreated. But the framework is evolving fast. Please document a solution when you find one. – kunal pareek Dec 11 '17 at 05:24