feat: implementacion de dashboards por rol, soporte de clases virtuales concurrentes en importador de sheets y cartelera del dia

This commit is contained in:
2026-09-18 23:04:48 -03:00
parent 47b50ede7e
commit 1080acd43a
240 changed files with 8354 additions and 8886 deletions
+110
View File
@@ -0,0 +1,110 @@
{% extends "base.html" %}
{% block title %}{% if user %}Edit User: {{ user.name }}{% else %}New User{% endif %} - Edu-Space Admin{% endblock %}
{% block content %}
<div class="container-fluid pt-5 mt-4">
<!-- Header -->
<div class="d-flex justify-content-between align-items-center mb-4">
<div>
<h1 class="h3 mb-1">
<i class="bi bi-person-gear text-primary me-2"></i>
{% if user %}Edit User Account{% else %}Create User Account{% endif %}
</h1>
<p class="text-muted small mb-0">Configure user credentials, profile information, and role assignment.</p>
</div>
<div>
<a href="/admin/users_list" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left me-1"></i>Back to Users
</a>
</div>
</div>
<div class="row">
<div class="col-lg-6 mx-auto">
<div class="card border-0 shadow-sm">
<div class="card-header bg-body-tertiary py-3">
<h5 class="card-title h6 mb-0">
<i class="bi bi-person-vcard text-primary me-2"></i>Account Details
</h5>
</div>
<div class="card-body p-4">
<form method="POST">
{% if user %}
<input type="hidden" name="id" value="{{ user.id }}">
{% endif %}
<div class="mb-3">
<label for="name" class="form-label fw-semibold">Full Name <span class="text-danger">*</span></label>
<input type="text" class="form-control" id="name" name="name"
value="{{ user.name if user else '' }}" required
placeholder="e.g. María González">
</div>
<div class="mb-3">
<label for="email" class="form-label fw-semibold">Email Address <span class="text-danger">*</span></label>
<input type="email" class="form-control" id="email" name="email"
value="{{ user.email if user else '' }}" required
placeholder="e.g. mgonzalez@edu-space.com">
</div>
<div class="mb-3">
<label for="password" class="form-label fw-semibold">
Password {% if not user %}<span class="text-danger">*</span>{% endif %}
</label>
<input type="password" class="form-control" id="password" name="password"
{% if not user %}required{% endif %}
placeholder="{% if user %}Leave empty to keep current password{% else %}At least 6 characters{% endif %}">
{% if user %}
<small class="text-muted d-block mt-1">
Only fill this in if you want to reset this user's password.
</small>
{% endif %}
</div>
<div class="mb-3">
<label for="role_id" class="form-label fw-semibold">Role / Access Group <span class="text-danger">*</span></label>
<select class="form-select" id="role_id" name="role_id" required>
<option value="" disabled {% if not user or not user.role_id %}selected{% endif %}>Select a role...</option>
{% for r in roles %}
<option value="{{ r.id }}" {% if user and user.role_id == r.id %}selected{% endif %}>
{{ r.name }} - {{ r.description or '' }}
</option>
{% endfor %}
</select>
<small class="text-muted d-block mt-1">
<a href="/admin/roles_list" target="_blank" class="text-decoration-none">
<i class="bi bi-box-arrow-up-right me-1"></i>View or manage roles and permissions
</a>
</small>
</div>
<div class="mb-4 form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="is_active" name="is_active"
{% if not user or user.is_active %}checked{% endif %}
{% if user and user.id == user.id %}disabled{% endif %}>
<label class="form-check-label fw-semibold" for="is_active">
Active Account
</label>
<small class="text-muted d-block">
Inactive users are prevented from signing in to the platform.
</small>
{% if user and user.id == user.id %}
<input type="hidden" name="is_active" value="on">
{% endif %}
</div>
<div class="d-flex justify-content-between align-items-center pt-2">
<a href="/admin/users_list" class="btn btn-outline-secondary">
Cancel
</a>
<button type="submit" class="btn btn-primary px-4 fw-semibold">
<i class="bi bi-check-lg me-1"></i>Save User
</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}