I currently have a structure where I can select a user and retrieve their information in a DataTable widget. However, I would like to extend this functionality by associating it with a subcollection that stores the user's attendance records. Specifically, I need to display today's attendance for each user within the same DataTable.
Currently, my structure is as shown in the attached image. I would like to understand how to properly fetch and display data from both the main collection (users) and its subcollections (attendances) for each document.
Key Requirements:
The DataTable widget must be used because it provides essential features like pagination, user selection, sorting, and filtering.
I do not want to use ListView, custom-built columns, or manually structured layouts—it must be implemented directly in a DataTable.
The solution should efficiently retrieve and associate the user's attendance record (specifically, today’s attendance) alongside their existing user data.