146 lines
9.4 KiB
HTML
146 lines
9.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>FreeSched Admin - Manage Availability</title>
|
|
<!-- Bootstrap CSS -->
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="/css/styles.css">
|
|
<link rel="stylesheet" href="/css/timepicker.css">
|
|
<!-- Bootstrap Icons -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css">
|
|
</head>
|
|
<body>
|
|
<div class="container-fluid p-0">
|
|
<div class="row g-0">
|
|
<div class="col-md-4 sidebar bg-light border-end border-gray-300">
|
|
<div class="d-flex flex-column align-items-center p-4">
|
|
<img src="/avatar.jpg" alt="Doug Masiero" class="profile-pic rounded-circle mb-3 shadow-sm">
|
|
<h2 class="fs-5 text-dark fw-bold mb-2">Doug Masiero</h2>
|
|
<h3 class="fs-6 text-muted mb-2">30 Minute Meeting</h3>
|
|
<p class="text-muted fs-6">30 min</p>
|
|
|
|
<div class="d-grid gap-3 w-100 mt-4">
|
|
<button class="btn btn-success btn-lg rounded-pill fw-medium px-3 py-2" id="createUid" style="height: 50px; font-size: 1rem;"><i class="bi bi-plus-circle me-2"></i>Create</button>
|
|
<button class="btn btn-warning btn-lg rounded-pill fw-medium px-3 py-2" id="flushDatabase" disabled style="height: 50px; font-size: 1rem;"><i class="bi bi-eraser me-2"></i>Clear</button>
|
|
<button class="btn btn-danger btn-lg rounded-pill fw-medium px-3 py-2" id="deleteUid" disabled style="height: 50px; font-size: 1rem;"><i class="bi bi-x-circle me-2"></i>Delete</button>
|
|
<button class="btn btn-info btn-lg rounded-pill fw-medium px-3 py-2" id="devToolsBtn" style="height: 50px; font-size: 1rem;"><i class="bi bi-gear me-2"></i>Dev Tools</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-8 main-content p-4" style="min-height: 600px; position: relative;">
|
|
<div class="uid-section mb-4">
|
|
<h2 class="fs-4 text-dark fw-bold mb-3">Manage Schedule UIDs</h2>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-md-12">
|
|
<select class="form-select form-select-lg" id="uidSelect">
|
|
<option value="">Select a Schedule UID...</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-12">
|
|
<div class="form-control-lg bg-light p-3">
|
|
<small class="d-block text-muted mb-1">Public Access URL:</small>
|
|
<span id="uidPlaceholder" class="text-muted">Select a UID above</span>
|
|
<a id="uidUrl" href="#" target="_blank" class="text-decoration-none text-break text-primary d-none">Select a UID above</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="calendar-header d-flex justify-content-between align-items-center text-dark fs-5 mb-3 d-none" id="calendarSection">
|
|
<button id="adminPrevMonth" class="btn btn-link p-0 text-decoration-none"><i class="bi bi-chevron-left"></i></button>
|
|
<span id="adminMonthYear" class="fw-bold"></span>
|
|
<button id="adminNextMonth" class="btn btn-link p-0 text-decoration-none"><i class="bi bi-chevron-right"></i></button>
|
|
</div>
|
|
<div class="calendar mb-4 d-none" id="calendarDatesSection">
|
|
<div class="days-of-week d-grid gap-2 mb-2" style="grid-template-columns: repeat(7, 1fr);">
|
|
<span class="text-muted fw-bold text-center p-2">SUN</span>
|
|
<span class="text-muted fw-bold text-center p-2">MON</span>
|
|
<span class="text-muted fw-bold text-center p-2">TUE</span>
|
|
<span class="text-muted fw-bold text-center p-2">WED</span>
|
|
<span class="text-muted fw-bold text-center p-2">THU</span>
|
|
<span class="text-muted fw-bold text-center p-2">FRI</span>
|
|
<span class="text-muted fw-bold text-center p-2">SAT</span>
|
|
</div>
|
|
<div id="adminCalendarDates" class="dates d-grid gap-2" style="grid-template-columns: repeat(7, 1fr);">
|
|
<!-- Dates will be dynamically generated by JavaScript -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="availability-section d-none" id="availabilitySection">
|
|
<div id="selectedDateDisplay" class="mb-3 text-muted fs-6"></div>
|
|
<div class="time-grid mb-3">
|
|
<div id="timeSlots" class="time-slots mb-4">
|
|
<!-- Time slots will be dynamically populated here -->
|
|
<!-- The new time picker and time slot management UI will be inserted here -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="powered-by admin-powered-by">
|
|
<a href="https://github.com/moeny/freesched" target="_blank" class="text-decoration-none text-muted github-link">
|
|
<svg class="octocat-icon" height="16" viewBox="0 0 16 16" width="16" aria-hidden="true">
|
|
<path fill="currentColor" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
|
|
</svg>
|
|
Powered by FreeSched
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Dev Tools Modal -->
|
|
<div class="modal fade" id="devToolsModal" tabindex="-1" aria-labelledby="devToolsModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header bg-info text-white">
|
|
<h5 class="modal-title" id="devToolsModalLabel">Developer Tools</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="danger-zone border border-danger rounded p-4">
|
|
<h2 class="fs-4 text-danger fw-bold mb-3">⚠️ Danger Zone</h2>
|
|
<p class="text-muted mb-4">The actions in this section can cause irreversible changes to the database. Please proceed with caution.</p>
|
|
<button class="btn btn-outline-danger w-100 mb-2" id="resetDatabase">Reset Global Database</button>
|
|
<div class="text-muted">This will permanently delete all UIDs and their associated availability data.</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Create UID Modal -->
|
|
<div class="modal fade" id="createUidModal" tabindex="-1" aria-labelledby="createUidModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="createUidModalLabel">Create New UID</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="mb-3">
|
|
<label for="modalUidInput" class="form-label">Enter new UID</label>
|
|
<input type="text" class="form-control" id="modalUidInput" placeholder="e.g., john-1on1">
|
|
<div class="form-text">UIDs should be lowercase letters, numbers, and hyphens only</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
|
|
<button type="button" class="btn btn-success" id="confirmCreateUid">Create</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Bootstrap JS and Popper.js -->
|
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script>
|
|
|
|
<script type="module" src="/js/admin.js"></script>
|
|
</body>
|
|
</html> |