Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relationship add value if not exists #1080

Closed
MatFluor opened this issue Aug 12, 2019 · 4 comments
Closed

Relationship add value if not exists #1080

MatFluor opened this issue Aug 12, 2019 · 4 comments
Labels

Comments

@MatFluor
Copy link

Hi,

I'm using FAB for multiple small or medium projects, but I couldn't find out to ease some workflow:

As example: Let's say I have 3 tables. Table A holds e.g. manufacturers, Table B holds harddrives, Table C holds materials (like metal, composite whatever)
The current Workflow would be to first add a Manufacturer, then add a Material and then add a Harddrive from that manufacturer with that material. It gets more complex the more of those tables are there.
The Question is - is it possible to create those table entries "on demand"? Thinking of a mechanic like e.g. Tags, which either already exists, or get added if not. The Table can be prepared to only take a name (and fill more info later).

In my case, I have 5 such tables + an additional many-to-many relationship for tags. Often I add something new, where I have to go back and add all the surrounding stuff first before I can input my "real" object.

I hope that makes sense - and if you have any pointers, I'm glad to know.

@dpgaspar
Copy link
Owner

Hi @MatFluor,

Has you probably already know, FAB does not "offer" that out of the box. So you have to develop it by yourself. If I understood correctly, you need to develop an Add/Edit Form for your main table, probably with select boxes that will support adding new values, you can investigate how to do this using ModelRestApi to quickly implement a CRUD REST API for your 5 tables and back the select boxes new value addition.

@MatFluor
Copy link
Author

Thanks for the idea! Just wanted to make sure I didn't overlook something.

Would that (the original idea) be something for future enhancement, or rather a "case by case do it yourself" thing?

@dpgaspar
Copy link
Owner

I would say it's an reasonable common feature. Right now I would like to start building a modern frontend backed by the new API, took a first stab at it on: #1071. The idea would be to develop an npm package with React components that would replace the current MVC views.

So, any help on this direction would be very welcome.

@stale
Copy link

stale bot commented Nov 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Feel free to reopen it if it's still relevant to you. Thank you

@stale stale bot added the stale label Nov 11, 2019
@stale stale bot closed this as completed Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants