-
Notifications
You must be signed in to change notification settings - Fork 0
Volunteer Logging Tool #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlphaGameDeveloper
merged 9 commits into
master
from
feature/volunteer-logging-tool-demoready
Aug 6, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
013c1a7
feat: volunteer hour tracking
AlphaGameDeveloper f88ccf1
feat: volunteer page: show more information
AlphaGameDeveloper 6c68bf7
refactor: Put it all in reusable components
AlphaGameDeveloper b3f5ee2
feat: update user list upon tab change
AlphaGameDeveloper 4034b08
refactor: use window.location.hash instead
AlphaGameDeveloper 6682f3a
feat: better animations that make more sense
AlphaGameDeveloper f0ca19f
feat: you can now delete hour entires
AlphaGameDeveloper 1732d36
feat: can edit logs
AlphaGameDeveloper ad21a3d
feat: spinner on edit
AlphaGameDeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <!-- Card footer with API stats --> | ||
| <div class="card-footer bg-light text-end"> | ||
| <small class="volunteer-hours-footer text-muted"> | ||
| <span class="d-block">Backend v<span class="fw-bold" id="backendVersion{{ include.id }}">LOADING...</span></span> | ||
| <span class="d-block">API Requests: <span class="fw-bold" id="apiRequests{{ include.id }}">LOADING...</span></span> | ||
| <span class="d-block">POST: <span class="fw-bold" id="postRequests{{ include.id }}">0</span> | Failed: <span class="fw-bold" id="failedRequests{{ include.id }}">0</span></span> | ||
| </small> | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <!-- Create user form --> | ||
| <form id="createUserForm"> | ||
| <div class="mb-3"> | ||
| <label for="nameInput" class="form-label">Name</label> | ||
| <input type="text" class="form-control" id="nameInput" required> | ||
| </div> | ||
| <div class="mb-3"> | ||
| <label for="emailInput" class="form-label">Email</label> | ||
| <input type="email" class="form-control" id="emailInput" required> | ||
| </div> | ||
| <div class="mb-3"> | ||
| <label for="phoneInput" class="form-label">Phone (optional)</label> | ||
| <input type="tel" class="form-control" id="phoneInput"> | ||
| </div> | ||
| <div class="d-grid"> | ||
| <button type="submit" class="btn btn-success"> | ||
| <i class="fas fa-user-plus me-2"></i>Register Volunteer | ||
| </button> | ||
| </div> | ||
| </form> | ||
| <div class="alert alert-success mt-3 d-none" id="createUserSuccess"> | ||
| Volunteer registered successfully! | ||
| </div> | ||
| <div class="alert alert-danger mt-3 d-none" id="createUserError"> | ||
| Error registering volunteer. Please try again. | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <!-- Log hours form --> | ||
| <form id="logHoursForm"> | ||
| <div class="mb-3"> | ||
| <label for="userSelect" class="form-label">Volunteer</label> | ||
| <select class="form-select" id="userSelect" required> | ||
| <option value="">Select volunteer...</option> | ||
| <!-- Options will be populated dynamically --> | ||
| </select> | ||
| </div> | ||
| <div class="mb-3"> | ||
| <label for="dateInput" class="form-label">Date</label> | ||
| <input type="date" class="form-control" id="dateInput" required> | ||
| </div> | ||
| <div class="mb-3"> | ||
| <label for="hoursInput" class="form-label">Hours</label> | ||
| <input type="number" class="form-control" id="hoursInput" min="0.5" step="0.5" required> | ||
| </div> | ||
| <div class="mb-3"> | ||
| <label for="notesInput" class="form-label">Notes</label> | ||
| <textarea class="form-control" id="notesInput" rows="3"></textarea> | ||
| </div> | ||
| <div class="d-grid"> | ||
| <button type="submit" class="btn btn-primary"> | ||
| <i class="fas fa-save me-2"></i>Submit Hours | ||
| </button> | ||
| </div> | ||
| </form> | ||
| <div class="alert alert-success mt-3 d-none" id="logHoursSuccess"> | ||
| Hours logged successfully! | ||
| </div> | ||
| <div class="alert alert-danger mt-3 d-none" id="logHoursError"> | ||
| Error logging hours. Please try again. | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <!-- Tab card template with customizable header and content --> | ||
| <div class="card shadow-sm volunteer-hours-card"> | ||
| <div class="card-header {{ include.header_class }}" {% if include.header_style %}style="{{ include.header_style }}"{% endif %}> | ||
| <h5 class="mb-0"><i class="{{ include.icon_class }} me-2"></i>{{ include.title }}</h5> | ||
| </div> | ||
| <div class="card-body"> | ||
| {{ include.content }} | ||
| </div> | ||
| {% include volunteer-hours/card-footer.html id=include.footer_id %} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <!-- Volunteer hours navigation tabs --> | ||
| <ul class="nav nav-tabs mb-4 volunteer-hours-tabs" id="volunteerTabs" role="tablist"> | ||
| <li class="nav-item" role="presentation"> | ||
| <button class="nav-link active" id="log-hours-tab" data-bs-toggle="tab" data-bs-target="#log-hours" type="button" role="tab" aria-controls="log-hours" aria-selected="true"> | ||
| <i class="fas fa-clock me-2"></i>Log Hours | ||
| </button> | ||
| </li> | ||
| <li class="nav-item" role="presentation"> | ||
| <button class="nav-link" id="create-user-tab" data-bs-toggle="tab" data-bs-target="#create-user" type="button" role="tab" aria-controls="create-user" aria-selected="false"> | ||
| <i class="fas fa-user-plus me-2"></i>New Volunteer | ||
| </button> | ||
| </li> | ||
| <li class="nav-item" role="presentation"> | ||
| <button class="nav-link" id="view-hours-tab" data-bs-toggle="tab" data-bs-target="#view-hours" type="button" role="tab" aria-controls="view-hours" aria-selected="false"> | ||
| <i class="fas fa-table me-2"></i>View Hours | ||
| </button> | ||
| </li> | ||
| <li class="nav-item" role="presentation"> | ||
| <button class="nav-link" id="user-stats-tab" data-bs-toggle="tab" data-bs-target="#user-stats" type="button" role="tab" aria-controls="user-stats" aria-selected="false"> | ||
| <i class="fas fa-chart-bar me-2"></i>My Stats | ||
| </button> | ||
| </li> | ||
| </ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| <!-- User stats selector --> | ||
| <div class="mb-4"> | ||
| <label for="statsUserSelect" class="form-label">Select Volunteer</label> | ||
| <div class="input-group"> | ||
| <select class="form-select" id="statsUserSelect"> | ||
| <option value="">Choose volunteer...</option> | ||
| <!-- Options will be populated dynamically --> | ||
| </select> | ||
| <button class="btn btn-outline-secondary" type="button" id="loadStatsBtn"> | ||
| <i class="fas fa-search me-1"></i> View Stats | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
||
| <!-- Stats content (hidden until user is selected) --> | ||
| <div id="statsContent" class="d-none"> | ||
| <div class="row mb-4"> | ||
| <div class="col-md-6"> | ||
| <div class="card bg-light"> | ||
| <div class="card-body text-center"> | ||
| <h6 class="card-subtitle mb-1 text-muted">Volunteer Name</h6> | ||
| <h4 class="card-title" id="statsName">-</h4> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="col-md-6"> | ||
| <div class="card bg-light"> | ||
| <div class="card-body text-center"> | ||
| <h6 class="card-subtitle mb-1 text-muted">Total Hours</h6> | ||
| <h4 class="card-title" id="statsTotalHours">-</h4> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <h5 class="border-bottom pb-2 mb-3">Volunteer History</h5> | ||
| <div class="table-responsive"> | ||
| <table class="table table-striped table-hover" id="userHistoryTable"> | ||
| <thead> | ||
| <tr> | ||
| <th>Date</th> | ||
| <th>Hours</th> | ||
| <th>Notes</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <!-- Table will be populated dynamically --> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| </div> | ||
|
|
||
| <!-- Empty state (shown before selecting a user) --> | ||
| <div id="statsEmptyState" class="text-center py-4"> | ||
| <i class="fas fa-user-clock fa-3x mb-3 text-muted"></i> | ||
| <p>Select a volunteer to view their stats</p> | ||
| </div> | ||
|
|
||
| <!-- Loading spinner --> | ||
| <div id="statsLoading" class="text-center py-4 d-none"> | ||
| <div class="spinner-border text-primary" role="status"> | ||
| <span class="visually-hidden">Loading...</span> | ||
| </div> | ||
| <p class="mt-2">Loading volunteer stats...</p> | ||
| </div> | ||
|
|
||
| <!-- Error message --> | ||
| <div class="alert alert-danger mt-3 d-none" id="statsError"> | ||
| Error retrieving volunteer stats. Please try again. | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| <!-- View hours table --> | ||
| <div class="table-responsive"> | ||
| <table class="table table-striped table-hover" id="hoursTable"> | ||
| <thead> | ||
| <tr> | ||
| <th>Name</th> | ||
| <th>Date</th> | ||
| <th>Hours</th> | ||
| <th>Notes</th> | ||
| <th class="text-center">Actions</th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <!-- Table will be populated dynamically --> | ||
| </tbody> | ||
| </table> | ||
| </div> | ||
| <div class="alert alert-info mt-3 d-none" id="noHoursData"> | ||
| No volunteer hours have been logged yet. | ||
| </div> | ||
| <div class="alert alert-danger mt-3 d-none" id="viewHoursError"> | ||
| Error retrieving volunteer hours. Please try again. | ||
| </div> | ||
| <div class="alert alert-success mt-3 d-none" id="deleteHoursSuccess"> | ||
| Entry deleted successfully. | ||
| </div> | ||
| <div class="alert alert-danger mt-3 d-none" id="deleteHoursError"> | ||
| Error deleting entry. Please try again. | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented configuration contains a hardcoded IP address for local testing. This should be removed before merging to production as it could expose internal network information.