kwartzlab / kos-base

KwartzlabOS
4 stars 1 forks source link

Update active member report to include back entrance #91

Open sarahjonesmilligan opened 3 days ago

sarahjonesmilligan commented 3 days ago

The board had a report created which lists all active members for a month (sends email to the board DL, listing the members who have scanned their fob 2+ times in a given calendar month).

This seems to be only reporting on the member entrance. Please update it to include any member that has scanned their fob at either the member entrance door or the back door.

azend commented 3 days ago
mysql> select id, name, type from gatekeepers where type = "doorway";
+----+--------------------------------+---------+
| id | name                           | type    |
+----+--------------------------------+---------+
|  1 | Front Door                     | doorway |
|  2 | Back Door                      | doorway |
| 11 | Members Entrance               | doorway |
| 12 | gk-testbed                     | doorway |
| 26 | Server Room                    | doorway |
| 28 | Members Entrance 2 - Back Door | doorway |
+----+--------------------------------+---------+
6 rows in set (0.00 sec)
sarahjonesmilligan commented 3 days ago

Is the "Active member visits for [month]" email report based on a specific ID or is it based on type=doorway?

azend commented 3 days ago

Is the "Active member visits for [month]" email report based on a specific ID or is it based on type=doorway?

It currently builds a report based off the "Member Entrance" with ID 11. I'm just putting up a PR that amends the line to include 28 as well but I believe counting by use of any door is more consistent with expected output.

https://github.com/kwartzlab/kos-base/blob/main/app/Console/Commands/SendActiveMembersEmail.php#L49