diff --git a/admin.py b/admin.py index 8f70e7f..445cfaa 100644 --- a/admin.py +++ b/admin.py @@ -25,7 +25,7 @@ def register_admin_routes(app): def admin_users(page=1): """Admin page to manage all users""" # Pagination settings - per_page = 25 + per_page = int(request.args.get('per_page', 25)) offset = (page - 1) * per_page # Get all users from Firestore diff --git a/app.py b/app.py index a6c1edc..dab4968 100644 --- a/app.py +++ b/app.py @@ -136,7 +136,7 @@ def dashboard(page=1): return abort(400, "Invalid email format") # Pagination settings - per_page = 25 + per_page = int(request.args.get('per_page', 25)) offset = (page - 1) * per_page query = None diff --git a/sync.py b/sync.py index 9d77b63..b40bbbe 100644 --- a/sync.py +++ b/sync.py @@ -40,7 +40,7 @@ def convert_to_pacific_time(date_str): pacific_time = utc_time.astimezone(pytz.timezone('America/Los_Angeles')) # Format as YYYY-MM-DD - return pacific_time.strftime('%d/%m/%Y') + return pacific_time.strftime('%m/%d/%Y') except (ValueError, AttributeError) as e: print(f"[WARN] Date conversion failed for '{date_str}': {e}") return '' diff --git a/templates/_pagination.html b/templates/_pagination.html index dbae9ac..c8610eb 100644 --- a/templates/_pagination.html +++ b/templates/_pagination.html @@ -1,7 +1,7 @@ {% if total_pages > 1 %}
{% if current_page > 1 %} - + Previous {% else %} @@ -12,7 +12,7 @@ {% if page == current_page %} {{ page }} {% elif page == 1 or page == total_pages or (page >= current_page - 2 and page <= current_page + 2) %} - + {{ page }} {% elif page == current_page - 3 or page == current_page + 3 %} @@ -21,7 +21,7 @@ {% endfor %} {% if current_page < total_pages %} - + Next {% else %} diff --git a/templates/admin_users.html b/templates/admin_users.html index 1e9f458..b0d7665 100644 --- a/templates/admin_users.html +++ b/templates/admin_users.html @@ -19,6 +19,17 @@ {% set _ = session.pop('reset_user_email', None) %} {% endif %}

Admin: User Management

+
+ + +
+
Create New User diff --git a/templates/dashboard.html b/templates/dashboard.html index a0a715f..a00b11f 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -14,6 +14,18 @@
{% endif %} + +
+ + +
+