Skip to content

Commit

Permalink
Bug fix: Number of Groups in Group list doesn't match with Groups cou… (
Browse files Browse the repository at this point in the history
#7168)

…nt in Dashboard

# Description & Issue number it closes 

#3985

## Screenshots (if appropriate)

### Before
#### Dashboard says 17 groups.
<img width="1188" alt="Screenshot 2024-09-27 at 4 20 05 PM"
src="https://github.com/user-attachments/assets/523e8989-29ef-4711-896a-6cd9a69f889c">

#### Group list says 23 entries.
<img width="1404" alt="Screenshot 2024-09-27 at 4 20 18 PM"
src="https://github.com/user-attachments/assets/ce74a7b7-a19e-4fee-997d-c836ba7b111d">

### After

<img width="990" alt="Screenshot 2024-09-27 at 10 59 50 AM"
src="https://github.com/user-attachments/assets/8f16ce69-a348-4b40-8cf6-06aee048ff2a">
<img width="1174" alt="Screenshot 2024-09-27 at 11 00 02 AM"
src="https://github.com/user-attachments/assets/d62ef9e3-b8ab-4f73-ba8a-1b94a7e23fae">
<img width="1164" alt="Screenshot 2024-09-27 at 11 00 13 AM"
src="https://github.com/user-attachments/assets/85b4515d-02c9-4839-b403-1ecaf6d66a54">

## How to test the changes?
Number of groups in the `Dashboard` and `Group List` should be the same
like the above screenshots.

## Type of change

- [X] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Docker

# Checklist:

- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [X] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
  • Loading branch information
DawoudIO authored Sep 28, 2024
2 parents 026f7c6 + 1a1e0b2 commit 1b3950d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
13 changes: 0 additions & 13 deletions src/GroupList.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,9 @@
<?php
}
?>

</div>

<script src="skin/js/GroupList.js"></script>
<script nonce="<?= SystemURLs::getCSPNonce() ?>">
$( document).ready(function() {
var gS = localStorage.getItem("groupSelect");
if (gS != null)
{
tf = document.getElementById("table-filter");
tf.selectedIndex = gS;

window.groupSelect = tf.value;
}
});

</script>
<?php
require 'Include/Footer.php';
2 changes: 1 addition & 1 deletion src/PeopleDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
<div class="small-box bg-red">
<div class="inner">
<h3>
<?= $groupStats['groups'] - $groupStats['sundaySchoolClasses'] ?>
<?= $groupStats['groups'] ?>
</h3>

<p>
Expand Down
1 change: 0 additions & 1 deletion src/v2/routes/root.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function viewDashboard(Request $request, Response $response, array $args): Respo
->count();

$dashboardCounts['Groups'] = GroupQuery::create()
->filterByType(4, Criteria::NOT_EQUAL)
->count();

$dashboardCounts['events'] = EventAttendQuery::create()
Expand Down

0 comments on commit 1b3950d

Please sign in to comment.