I am working on an app and one of the features is allowing the user (Contractor) to build a complete list of the services that they provide.
I would like them to be able to build a list of Categories and Subcategories to place the Services Items under.
I have figured out how to build this where the is a limited / required number of Categories and subcategories.
I would like to be able to build it so there is no limit or required subcategories.
is this possible? If so, how do I do it?
Thanks in advance!
If I’ve understood this correctly I think the below might be what you’re looking for:
Create a button for the contractor to create a new category in the app (link this to a form perhaps where they can enter the relevant info). This should probably prefill the contractor name in a property in the categories collection.
Create a relationship between categories and subcategories in your database
Create another button for the contractor to create new subcategories (via a form again and because of the relationship created above they should be able to select the relevant category that it falls under). Again, I would set the form to automatically update a property such as ‘contractor name’ in the subcategory collection.
Then you can only display categories and subcategories where the contractor name is equal to current contractor.