Some checks failed
Tests / Go Tests (push) Has been cancelled
Tests / Python Tests (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / Go Lint (push) Has been cancelled
Tests / Python Lint (push) Has been cancelled
Tests / Security Scan (push) Has been cancelled
Tests / All Checks Passed (push) Has been cancelled
Security Scanning / Secret Scanning (push) Has been cancelled
Security Scanning / Dependency Vulnerability Scan (push) Has been cancelled
Security Scanning / Go Security Scan (push) Has been cancelled
Security Scanning / Python Security Scan (push) Has been cancelled
Security Scanning / Node.js Security Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
CI/CD Pipeline / Go Tests (push) Has been cancelled
CI/CD Pipeline / Python Tests (push) Has been cancelled
CI/CD Pipeline / Website Tests (push) Has been cancelled
CI/CD Pipeline / Linting (push) Has been cancelled
CI/CD Pipeline / Security Scan (push) Has been cancelled
CI/CD Pipeline / Docker Build & Push (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
CI/CD Pipeline / CI Summary (push) Has been cancelled
ci/woodpecker/manual/build-ci-image Pipeline was successful
ci/woodpecker/manual/main Pipeline failed
All services: admin-v2, studio-v2, website, ai-compliance-sdk, consent-service, klausur-service, voice-service, and infrastructure. Large PDFs and compiled binaries excluded via .gitignore.
139 lines
4.8 KiB
Python
139 lines
4.8 KiB
Python
"""
|
|
Meetings Module - Quick Actions Pages
|
|
Quick meeting start and parent-teacher meeting creation
|
|
"""
|
|
|
|
import uuid
|
|
from ..templates import ICONS, render_base_page
|
|
|
|
|
|
def quick_meeting() -> str:
|
|
"""Start a quick meeting immediately"""
|
|
room_name = f"quick-{uuid.uuid4().hex[:8]}"
|
|
|
|
content = f'''
|
|
<div style="text-align: center; padding: 3rem;">
|
|
<h1 class="page-title">Sofort-Meeting wird gestartet...</h1>
|
|
<p class="page-subtitle">Sie werden in wenigen Sekunden weitergeleitet.</p>
|
|
<div style="margin-top: 2rem;">
|
|
<div class="card-icon primary" style="margin: 0 auto; width: 80px; height: 80px; font-size: 2rem;">
|
|
{ICONS['video']}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
setTimeout(() => {{
|
|
window.location.href = '/meetings/room/{room_name}';
|
|
}}, 1000);
|
|
</script>
|
|
'''
|
|
|
|
return render_base_page("Sofort-Meeting", content, "active")
|
|
|
|
|
|
def parent_teacher_meeting() -> str:
|
|
"""Create a parent-teacher meeting"""
|
|
content = f'''
|
|
<div class="page-header">
|
|
<div>
|
|
<h1 class="page-title">Elterngespräch planen</h1>
|
|
<p class="page-subtitle">Sicheres Meeting mit Warteraum und Passwort</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card" style="max-width: 600px;">
|
|
<div class="form-group">
|
|
<label class="form-label">Schüler/in</label>
|
|
<input type="text" class="form-input" id="studentName" placeholder="Name des Schülers/der Schülerin">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Elternteil</label>
|
|
<input type="text" class="form-input" id="parentName" placeholder="Name der Eltern">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">E-Mail (für Einladung)</label>
|
|
<input type="email" class="form-input" id="parentEmail" placeholder="eltern@example.com">
|
|
</div>
|
|
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
|
|
<div class="form-group">
|
|
<label class="form-label">Datum</label>
|
|
<input type="date" class="form-input" id="meetingDate">
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="form-label">Uhrzeit</label>
|
|
<input type="time" class="form-input" id="meetingTime">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">Anlass (optional)</label>
|
|
<textarea class="form-textarea" id="meetingReason" placeholder="Grund für das Gespräch..."></textarea>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="form-label">
|
|
<input type="checkbox" id="sendInvite" checked> Einladung per E-Mail senden
|
|
</label>
|
|
</div>
|
|
|
|
<div class="btn-group" style="margin-top: 1.5rem;">
|
|
<button class="btn btn-secondary" onclick="window.location.href='/meetings'">Abbrechen</button>
|
|
<button class="btn btn-primary" onclick="createParentTeacherMeeting()">Termin erstellen</button>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Set minimum date to today
|
|
document.getElementById('meetingDate').min = new Date().toISOString().split('T')[0];
|
|
|
|
async function createParentTeacherMeeting() {{
|
|
const studentName = document.getElementById('studentName').value;
|
|
const parentName = document.getElementById('parentName').value;
|
|
const parentEmail = document.getElementById('parentEmail').value;
|
|
const date = document.getElementById('meetingDate').value;
|
|
const time = document.getElementById('meetingTime').value;
|
|
const reason = document.getElementById('meetingReason').value;
|
|
const sendInvite = document.getElementById('sendInvite').checked;
|
|
|
|
if (!studentName || !parentName || !date || !time) {{
|
|
alert('Bitte füllen Sie alle Pflichtfelder aus.');
|
|
return;
|
|
}}
|
|
|
|
const payload = {{
|
|
type: 'parent-teacher',
|
|
student_name: studentName,
|
|
parent_name: parentName,
|
|
parent_email: parentEmail,
|
|
scheduled_at: `${{date}}T${{time}}`,
|
|
reason: reason,
|
|
send_invite: sendInvite,
|
|
duration: 30
|
|
}};
|
|
|
|
try {{
|
|
const response = await fetch('/api/meetings/parent-teacher', {{
|
|
method: 'POST',
|
|
headers: {{ 'Content-Type': 'application/json' }},
|
|
body: JSON.stringify(payload)
|
|
}});
|
|
|
|
if (response.ok) {{
|
|
const data = await response.json();
|
|
alert('Elterngespräch erfolgreich geplant!\\n\\nLink: ' + data.join_url + '\\nPasswort: ' + data.password);
|
|
window.location.href = '/meetings/schedule';
|
|
}}
|
|
}} catch (error) {{
|
|
console.error('Error:', error);
|
|
alert('Fehler beim Erstellen des Termins');
|
|
}}
|
|
}}
|
|
</script>
|
|
'''
|
|
|
|
return render_base_page("Elterngespräch", content, "schedule")
|