I currently manage a small group of employees with plans to expand in the future. To streamline operations, I am looking to implement a grouping feature that allows users to sort employees based on their assigned groups. Although I thought about using the reference field type in cloud Firestore to accomplish this, I am unsure of the most effective way to link employees to specific groups.
In my current database structure, each employee is stored under a unique document ID (e.g., 2569), with further sub-collections containing additional details.
You can see the structure here: https://i.stack.imgur.com/yP0Y5.png
And here: https://i.stack.imgur.com/XGHb4.png
My ultimate goal is to assign employees to groups and display them accordingly. Currently, I have the group name stored under articles/group -> groupName: "example".
I hope to display these groups dynamically without hard-coding the names, as they will be user-generated. Any suggestions on how to proceed from here would be greatly appreciated!