diff --git a/langs/en/actions.json b/langs/en/actions.json index d340a19..8ccd842 100644 --- a/langs/en/actions.json +++ b/langs/en/actions.json @@ -1,4 +1,6 @@ { + "New": "New", + "Add Person": "Add Person", "Add Camper": "Add Camper", "Add Adult": "Add Adult", "Add Youth": "Add Youth", @@ -15,5 +17,6 @@ "View Payments": "View Payments", "Manual Entry": "Manual Entry", "View Expiring": "View Expiring", + "Filter": "Filter", "Remove Filter": "Remove Filter" } diff --git a/langs/en/labels.json b/langs/en/labels.json index 26f9989..29225c0 100644 --- a/langs/en/labels.json +++ b/langs/en/labels.json @@ -7,6 +7,7 @@ "Adult": "Adult", "Adults": "Adults", "Youth": "Youth", + "All": "All", "Days": "Days", "Position": "Position", "Parent Phone": "Parent Phone", diff --git a/pages.php b/pages.php index de0a66a..81b55e2 100644 --- a/pages.php +++ b/pages.php @@ -17,7 +17,8 @@ define("PAGES", [ "icon" => "fas fa-user", "styles" => [ "static/css/datatables.min.css", - "static/css/tables.css" + "static/css/tables.css", + "static/css/people.css" ], "scripts" => [ "static/js/datatables.min.js", diff --git a/pages/people.php b/pages/people.php index 08707c2..c58bd45 100644 --- a/pages/people.php +++ b/pages/people.php @@ -7,23 +7,43 @@ redirectIfNotLoggedIn(); $user = new User($_SESSION['uid']); + +$where = []; +$filter = $Strings->get("Filter", false); +if (!empty($VARS['filter']) && preg_match("/(camper|adult|youth)/", $VARS['filter'])) { + $where = [ + $VARS['filter'] . 'id[!]' => null + ]; + $filter = $Strings->get(ucfirst($VARS['filter'] . ($VARS['filter'] == "youth" ? "" : "s")), false); +} ?> -