Add mobile responsiveness and persistent reports feature

- Enhanced mobile responsiveness across entire site and admin panel
  - Optimized layouts, font sizes, and spacing for screens ≤768px and ≤480px
  - Made forms, tables, maps, and buttons touch-friendly
  - Added responsive breakpoints for better mobile experience

- Added persistent reports functionality
  - Added 'persistent' column to database with automatic migration
  - Updated cleanup logic to preserve persistent reports (no auto-expiration)
  - Added admin panel toggle for marking reports as persistent
  - Added persistent report count to admin dashboard stats
  - Visual indicators with lock/unlock icons for persistent status

- Improved admin panel UI
  - Standardized header button styling and sizing
  - Added 'Return to Homepage' button for better navigation
  - Enhanced mobile responsiveness for admin interface
  - Fixed table layouts and button arrangements for mobile devices

- Backend API enhancements
  - New PATCH endpoint for toggling persistent status
  - Updated admin routes to include persistent field
  - Backwards compatible database migration
This commit is contained in:
Deco Vander 2025-07-03 01:17:41 -04:00
parent 5e56d59bbd
commit a3b450de1a
4 changed files with 358 additions and 16 deletions

View file

@ -282,10 +282,53 @@ footer {
/* Responsive adjustments */
@media (max-width: 768px) {
.container {
padding: 10px;
}
header h1 {
font-size: 1.5em;
}
header p {
font-size: 0.9em;
}
.map-section, .form-section {
padding: 10px;
margin-bottom: 15px;
}
#map {
height: 400px;
}
.form-group {
margin-bottom: 15px;
}
input[type="text"], textarea {
font-size: 16px; /* Prevents zoom on iOS */
width: calc(100% - 16px);
padding: 12px 8px;
}
button[type="submit"] {
width: 100%;
padding: 15px;
font-size: 16px;
}
.reports-header {
flex-direction: column;
align-items: stretch;
gap: 15px;
text-align: center;
}
.reports-header h2 {
font-size: 1.3em;
margin-bottom: 0;
}
.view-toggle {
@ -294,6 +337,8 @@ footer {
.toggle-btn {
flex: 1;
font-size: 14px;
padding: 12px 8px;
}
.reports-table {
@ -302,14 +347,79 @@ footer {
.reports-table th,
.reports-table td {
padding: 8px;
padding: 8px 4px;
}
.location-cell {
max-width: 150px;
max-width: 120px;
font-size: 11px;
}
.details-cell {
max-width: 120px;
max-width: 100px;
font-size: 11px;
}
.time-cell {
font-size: 10px;
}
.remaining-cell {
font-size: 10px;
}
.autocomplete-list {
max-height: 150px;
}
.input-help {
font-size: 0.8em;
}
footer {
padding: 20px 10px;
font-size: 0.9em;
}
}
/* Extra small screens */
@media (max-width: 480px) {
.container {
padding: 5px;
}
header h1 {
font-size: 1.3em;
}
.map-section, .form-section {
padding: 8px;
}
#map {
height: 300px;
}
.reports-table th {
font-size: 10px;
padding: 6px 2px;
}
.reports-table td {
font-size: 10px;
padding: 6px 2px;
}
.location-cell {
max-width: 100px;
}
.details-cell {
max-width: 80px;
}
.toggle-btn {
font-size: 12px;
padding: 10px 6px;
}
}