diff --git a/langs/en/actions.json b/langs/en/actions.json
index c89d52d..51f5460 100644
--- a/langs/en/actions.json
+++ b/langs/en/actions.json
@@ -1,12 +1,13 @@
{
- "Add Family": "Add Family",
+ "Add Camper": "Add Camper",
"Edit": "Edit",
"View": "View",
"Save": "Save",
"Delete": "Delete",
"Cancel": "Cancel",
"Edit Family": "Edit Family",
- "View Families": "View Families",
+ "View Campers": "View Campers",
+ "View Volunteers": "View Volunteers",
"View Payments": "View Payments",
"Manual Entry": "Manual Entry",
"View Expiring": "View Expiring",
diff --git a/langs/en/labels.json b/langs/en/labels.json
index 10648c9..3a7c6af 100644
--- a/langs/en/labels.json
+++ b/langs/en/labels.json
@@ -1,8 +1,15 @@
{
"Name": "Name",
"Actions": "Actions",
- "Father": "Father",
- "Mother": "Mother",
+ "Campers": "Campers",
+ "Volunteers": "Volunteers",
+ "Card Payments": "Card Payments",
+ "First": "First",
+ "Last": "Last",
+ "Parent": "Parent",
+ "Unit": "Unit",
+ "Rank": "Rank",
+ "Sex": "Sex",
"Phone": "Phone",
"Email": "Email",
"Address": "Address",
@@ -10,7 +17,6 @@
"State": "State",
"ZIP Code": "ZIP Code",
"ZIP": "ZIP",
- "Photo Permission": "Photo Permission",
"Yes": "Yes",
"No": "No",
"Newsletter": "Newsletter",
diff --git a/pages.php b/pages.php
index 8210e5e..be169fa 100644
--- a/pages.php
+++ b/pages.php
@@ -11,17 +11,17 @@ define("PAGES", [
"navbar" => true,
"icon" => "fas fa-home"
],
- "families" => [
- "title" => "Families",
+ "campers" => [
+ "title" => "Campers",
"navbar" => true,
- "icon" => "fas fa-users",
+ "icon" => "fas fa-campground",
"styles" => [
"static/css/datatables.min.css",
"static/css/tables.css"
],
"scripts" => [
"static/js/datatables.min.js",
- "static/js/families.js"
+ "static/js/campers.js"
],
],
"viewfamily" => [
diff --git a/pages/campers.php b/pages/campers.php
new file mode 100644
index 0000000..71448a6
--- /dev/null
+++ b/pages/campers.php
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+ |
+ get('Actions'); ?> |
+ get('First'); ?> |
+ get('Last'); ?> |
+ get('Parent'); ?> |
+ get('Phone'); ?> |
+ get('Email'); ?> |
+ get('Unit'); ?> |
+ get('Rank'); ?> |
+ get('Sex'); ?> |
+
+
+
+ select(
+ "people", [
+ "[>]campers" => [
+ "camperid" => "camperid"
+ ]
+ ], [
+ 'personid (id)',
+ 'firstname',
+ 'lastname',
+ 'address',
+ 'zip',
+ 'phone1',
+ 'phone2',
+ 'email',
+ 'unit',
+ 'shirt',
+ 'sex',
+ 'parentname',
+ 'rank'
+ ], [
+ 'people.camperid[!]' => null
+ ]);
+
+ foreach ($campers as $person) {
+ ?>
+
+ |
+
+ get("View"); ?>
+ get("Edit"); ?>
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
+
+
+ |
+ get('Actions'); ?> |
+ get('First'); ?> |
+ get('Last'); ?> |
+ get('Parent'); ?> |
+ get('Phone'); ?> |
+ get('Email'); ?> |
+ get('Unit'); ?> |
+ get('Rank'); ?> |
+ get('Sex'); ?> |
+
+
+
\ No newline at end of file
diff --git a/pages/families.php b/pages/families.php
deleted file mode 100644
index 0e2ac51..0000000
--- a/pages/families.php
+++ /dev/null
@@ -1,91 +0,0 @@
-hasPermission("HACHEPORTAL_VIEW")) {
- header("Location: ./app.php?msg=no_permission");
- die();
-}
-
-$writeaccess = $user->hasPermission("HACHEPORTAL_EDIT");
-?>
-
-
-
-
-
-
- |
- get('Actions'); ?> |
- get('Name'); ?> |
- get('Father'); ?> |
- get('Mother'); ?> |
- get('Phone'); ?> |
- get('Email'); ?> |
- get('Expires'); ?> |
-
-
-
- date("Y-m-d", strtotime("+1 month"))];
- }
- $families = $database->select("families", ['familyid (id)', 'familyname', 'phone', 'email', 'father_name (father)', 'mother_name (mother)', 'expires'], $where);
-
- foreach ($families as $f) {
- ?>
-
- |
-
- get("View"); ?>
-
- get("Edit"); ?>
-
- |
- |
- |
- |
- |
- |
- "> |
-
-
-
-
-
- |
- get('Actions'); ?> |
- get('Name'); ?> |
- get('Father'); ?> |
- get('Mother'); ?> |
- get('Phone'); ?> |
- get('Email'); ?> |
- get('Expires'); ?> |
-
-
-
\ No newline at end of file
diff --git a/pages/home.php b/pages/home.php
index ef3b74e..a1dc72c 100644
--- a/pages/home.php
+++ b/pages/home.php
@@ -4,21 +4,31 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
?>
+
+
+
get("Campers") ?>
+ count('campers'); ?>
+
+
+
+
-
get("Families") ?>
- count('families'); ?>
+ get("Volunteers") ?>
+ count('adults'); ?>
-
get("Recent Payments") ?>
-
select("payments", "amount", ["AND" => ["paid" => 1, "date[>]" => date("Y-m-d H:i:s", strtotime("-30 days"))]]);
+ get("Card Payments") ?>
+ $select("payments", "amountpaid");
$total = 0.0;
foreach ($amounts as $amt) {
$total += $amt;
@@ -30,17 +40,4 @@
get("View Payments"); ?>
-
- count('families', ["expires[<]" => date("Y-m-d", strtotime("+1 month"))]);
- ?>
-
text-light">
-
-
get("Expiring Memberships") ?>
-
-
-
-
diff --git a/static/js/campers.js b/static/js/campers.js
new file mode 100644
index 0000000..c7c4807
--- /dev/null
+++ b/static/js/campers.js
@@ -0,0 +1,34 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+$('#campertable').DataTable({
+ responsive: {
+ details: {
+ display: $.fn.dataTable.Responsive.display.modal({
+ header: function (row) {
+ var data = row.data();
+ return " " + data[2];
+ }
+ }),
+ renderer: $.fn.dataTable.Responsive.renderer.tableAll({
+ tableClass: 'table'
+ }),
+ type: "column"
+ }
+ },
+ columnDefs: [
+ {
+ targets: 0,
+ className: 'control',
+ orderable: false
+ },
+ {
+ targets: 1,
+ orderable: false
+ }
+ ],
+ order: [
+ [2, 'asc']
+ ]
+});
\ No newline at end of file