Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Commit

Permalink
VATMEX acquisition.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRomaa committed Apr 1, 2021
1 parent f2caac8 commit 89b5457
Show file tree
Hide file tree
Showing 28 changed files with 192 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/beta_zhuartcc_org.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/zhuartcc.org.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions apps/administration/templates/admin_panel.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@
<div class="col-12 col-lg-6 col-xl-4 mx-auto">
<div class="card">
<div class="card-header bg-secondary">
<h5 class="mb-0">User Management</h5>
<h5 class="mb-0">Gestión de Usuarios</h5>
</div>
<div class="card-body text-center">
<a data-action="find-user" data-redirect="profile"><button class="btn btn-secondary">Find User</button></a>
<a href="{% url 'roster_tidy' %}"><button class="btn btn-secondary">Roster Tidy</button></a>
<a href="{% url 'visit_requests' %}"><button class="btn btn-secondary">Visiting Requests</button> {% if notifications.visit %}<div class="notification">{{ notifications.visit }}</div>{% endif %}</a>
<a href="{% url 'transfer_requests' %}"><button class="btn btn-secondary">Transfer Requests</button></a>
<a data-action="find-user" data-redirect="event"><button class="btn btn-secondary">Event Score</button></a>
<a data-action="find-user" data-redirect="profile"><button class="btn btn-secondary">Encontrar Usuario</button></a>
<a href="{% url 'roster_tidy' %}"><button class="btn btn-secondary">Lista Ordenada</button></a>
<a href="{% url 'visit_requests' %}"><button class="btn btn-secondary">Solicitudes de Visita</button> {% if notifications.visit %}<div class="notification">{{ notifications.visit }}</div>{% endif %}</a>
<a href="{% url 'transfer_requests' %}"><button class="btn btn-secondary">Solicitudes de Transferencia</button></a>
<a data-action="find-user" data-redirect="event"><button class="btn btn-secondary">Puntuación del Evento</button></a>
</div>
</div>
</div>
{% endif %}
<div class="col-12 col-lg-6 col-xl-4 mx-auto">
<div class="card">
<div class="card-header bg-secondary">
<h5 class="mb-0">Training Management</h5>
<h5 class="mb-0">Gestión de Formación</h5>
</div>
<div class="card-body text-center">
<a href="{% url 'training_requests' %}"><button class="btn btn-secondary">Training Requests</button> {% if notifications.training %}<div class="notification">{{ notifications.training }}</div>{% endif %}</a>
<a href="{% url 'mentor_history' %}"><button class="btn btn-secondary">Mentor History</button></a>
<a data-action="find-user" data-redirect="training"><button class="btn btn-secondary">Student Profile</button></a>
<a href="{% url 'scheduled_sessions' %}"><button class="btn btn-secondary">Scheduled Sessions</button></a>
<a href="{% url 'training_requests' %}"><button class="btn btn-secondary">Solicitudes de Formación</button> {% if notifications.training %}<div class="notification">{{ notifications.training }}</div>{% endif %}</a>
<a href="{% url 'mentor_history' %}"><button class="btn btn-secondary">Historia del Mentor</button></a>
<a data-action="find-user" data-redirect="training"><button class="btn btn-secondary">Perfil de Estudiante</button></a>
<a href="{% url 'scheduled_sessions' %}"><button class="btn btn-secondary">Sesiones Programadas</button></a>
</div>
</div>
</div>
{% if request.user_obj.is_staff %}
<div class="col-12 col-lg-6 col-xl-4 mx-auto">
<div class="card">
<div class="card-header bg-secondary">
<h5 class="mb-0">Website Management</h5>
<h5 class="mb-0">Gestión de Sitios Web</h5>
</div>
<div class="card-body text-center">
<a href="{% url 'broadcast' %}"><button class="btn btn-secondary">Broadcast Email</button></a>
<a href="{% url 'log' %}"><button class="btn btn-secondary">Action Log</button></a>
<a href="{% url 'announcement' %}"><button class="btn btn-secondary">Create Announcement</button></a>
<a href="{% url 'feedback_approval' %}"><button class="btn btn-secondary">Feedback Approval</button> {% if notifications.feedback %}<div class="notification">{{ notifications.feedback }}</div>{% endif %}</a>
<a href="{% url 'broadcast' %}"><button class="btn btn-secondary">Correo Electrónico de Difusión</button></a>
<a href="{% url 'log' %}"><button class="btn btn-secondary">Registro de Acción</button></a>
<a href="{% url 'announcement' %}"><button class="btn btn-secondary">Crear Anuncio</button></a>
<a href="{% url 'feedback_approval' %}"><button class="btn btn-secondary">Aprobación de Comentarios</button> {% if notifications.feedback %}<div class="notification">{{ notifications.feedback }}</div>{% endif %}</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/administration/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@require_staff_or_mentor
def view_admin_panel(request):
return render(request, 'admin_panel.html', {
'page_title': 'Admin Panel',
'page_title': 'Panel de Administrador',
'controllers': User.objects.all().order_by('first_name'),
'notifications': {
'visit': Visit.objects.count(),
Expand Down
30 changes: 15 additions & 15 deletions apps/api/templates/statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
<div class="col-12 col-lg-4">
<div class="card">
<div class="card-body text-center">
<h2 style="font-size: 25px">{% now 'F' %} Hours</h2>
<h2 style="font-size: 25px">{% now 'F' %} Horas</h2>
<h1 style="font-size: 50px" class="text-primary">{{ main_stats.month|duration|default:'<span class="text-muted">N/A</span>'|safe }}</h1>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="card">
<div class="card-body text-center">
<h2 style="font-size: 25px">{% now 'Y' %} Hours</h2>
<h2 style="font-size: 25px">{% now 'Y' %} Horas</h2>
<h1 style="font-size: 50px" class="text-primary">{{ main_stats.year|duration|default:'<span class="text-muted">N/A</span>'|safe }}</h1>
</div>
</div>
</div>
<div class="col-12 col-lg-4">
<div class="card">
<div class="card-body text-center">
<h2 style="font-size: 25px">Total Hours</h2>
<h2 style="font-size: 25px">Horas Totales</h2>
<h1 style="font-size: 50px" class="text-primary">{{ main_stats.total|duration|default:'<span class="text-muted">N/A</span>'|safe }}</h1>
</div>
</div>
Expand All @@ -32,14 +32,14 @@ <h1 style="font-size: 50px" class="text-primary">{{ main_stats.total|duration|de
<div class="col-12">
<div class="card">
<div class="card-body p-5">
<h3>Activity Requirements</h3>
<h3>Requisitos de Actividad</h3>
<ul>
<li>Any person holding a staff position shall complete at least 5 hours of controlling or instruction time each calendar month.</li>
<li>Any controller with at least one endorsement within the ARTCC shall complete at least 2 hours of controlling time each calendar month.</li>
<li>Any controller who does not hold a S2 or greater, or an S1 without any endorsements to control within the ARTCC shall complete at least 1 hour of training time each calendar month.</li>
<li>Any controller from an ARTCC participating in the Mutual Automatic Visiting Privileges (MAVP) agreement is exempt from the non-MAVP activity requirement.</li>
<li>Cualquier persona que ocupe un puesto de personal deberá completar al menos 5 horas de control o tiempo de instrucción cada mes calendario.</li>
<li>Cualquier controlador con al menos un endoso dentro de ARTCC deberá completar al menos 2 horas de tiempo de control cada mes calendario.</li>
<li>Cualquier controlador que no tenga un S2 o más, o un S1 sin ningún endoso para controlar dentro del ARTCC deberá completar al menos 1 hora de tiempo de capacitación cada mes calendario.</li>
<li>Cualquier controlador de un ARTCC que participe en el acuerdo de Privilegios de Visita Automática Mutua (MAVP) está exento del requisito de actividad no MAVP.</li>
</ul>
<p><b>Note:</b> An exempt status does not exempt you from monthly activity requirements, rather it prevents you from being automatically put up for removal from the roster.</p>
<p><b>Nota:</b> Un estado de exención no lo exime de los requisitos de actividad mensual, sino que evita que se lo ponga automáticamente para ser eliminado de la lista.</p>
<table class="table table-striped">
<colgroup>
<col style="width: 15%">
Expand All @@ -55,19 +55,19 @@ <h3>Activity Requirements</h3>
</colgroup>
<thead>
<tr>
<th class="border-0">Name</th>
<th class="border-0">Nombre</th>
<th class="border-0 text-center">CID</th>
<th class="border-0 text-center">Rating</th>
{% for month in months %}
<th class="border-0 text-center" colspan="2">{{ month }} Hours</th>
<th class="border-0 text-center" colspan="2">{{ month }} Horas</th>
{% endfor %}
<th class="border-0 text-center">Exempt</th>
<th class="border-0 text-center">Exento</th>
</tr>
</thead>
<tbody>
{% for user in main_users %}
<tr>
<td>{{ user.user_obj.full_name }} {% if user.user_obj.main_role == 'VC' %}<span class="badge badge-sm badge-info">Visitor from {{ user.user_obj.home_facility }}</span>{% endif %}</td>
<td>{{ user.user_obj.full_name }} {% if user.user_obj.main_role == 'VC' %}<span class="badge badge-sm badge-info">Visitante de {{ user.user_obj.home_facility }}</span>{% endif %}</td>
<td class="text-center">{{ user.user_obj.cid }}</td>
<td class="text-center">{{ user.user_obj.rating }}</td>
<td class="text-right pr-0 border-left" style="width: 2%">
Expand All @@ -84,9 +84,9 @@ <h3>Activity Requirements</h3>
<td>{{ user.hours.current|duration|default:'<span class="text-muted">N/A</span>'|safe }}</td>
<td class="border-left">
{% if user.user_obj.is_staff %}
<i class="far fa-lg fa-check text-success"></i>&nbsp; Staff
<i class="far fa-lg fa-check text-success"></i>&nbsp; Personal
{% elif user.user_obj.activity_exempt %}
<i class="far fa-lg fa-check text-success"></i>&nbsp; Exempt
<i class="far fa-lg fa-check text-success"></i>&nbsp; Exento
{% elif user.user_obj.status == 1 or user.user_obj.loa_last_month %}
<i class="far fa-lg fa-check text-success"></i>&nbsp; LOA
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion apps/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def view_statistics(request):
]

return render(request, 'statistics.html', {
'page_title': 'Statistics',
'page_title': 'Estadísticas',
'main_stats': main_stats,
'main_users': main_users,
'months': months,
Expand Down
2 changes: 1 addition & 1 deletion apps/event/templates/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block body %}
{% if request.user_obj.is_staff %}
<div class="text-center">
<a href="{% url 'new_event' %}"><button class="btn btn-lg btn-primary mb-4"><i class="far fa-plus"></i> Create New Event</button></a>
<a href="{% url 'new_event' %}"><button class="btn btn-lg btn-primary mb-4"><i class="far fa-plus"></i> Crear Nuevo Evento</button></a>
</div>
{% endif %}
<div class="row">
Expand Down
27 changes: 10 additions & 17 deletions apps/event/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def view_all_events(request):
for event in events
})
return render(request, 'events.html', {
'page_title': 'Events',
'page_title': 'Eventos',
'events': events,
'events_json': json_events,
})
Expand All @@ -57,7 +57,7 @@ def view_archived_events(request):
for event in events
})
return render(request, 'archived_events.html', {
'page_title': 'Archived Events',
'page_title': 'Eventos Archivados',
'events': events,
'events_json': json_events,
})
Expand Down Expand Up @@ -241,22 +241,7 @@ def unrequest_position(request, request_id):
def assign_position(request, request_id):
position_request = get_object_or_404(EventPositionRequest, id=request_id)
if position_request.position.user != position_request.user:
if position_request.position.user is not None:
send_mail(
'Event Position Unassigned',
render_to_string('emails/position_unassigned.html', {'position': position_request.position}),
os.getenv('NO_REPLY'),
[position_request.position.user.email],
)
position_request.assign()

send_mail(
'Event Position Assigned!',
render_to_string('emails/position_assigned.html', {'position': position_request.position}),
os.getenv('NO_REPLY'),
[position_request.user.email],
)

position_request.user.event_requests.filter(position__event=position_request.position.event).delete()

return HttpResponse(status=200)
Expand Down Expand Up @@ -328,6 +313,14 @@ def embed_positions(request, event_id):
name=position.name,
value=position.user.full_name if position.user is not None else 'Unassigned',
)
if position.user is not None:
send_mail(
'Event Position Assigned!',
render_to_string('emails/position_assigned.html', {'position': position}),
os.getenv('NO_REPLY'),
[position.user.email],
)

embed.set_image(url=request.build_absolute_uri(event.banner))
webhook.add_embed(embed)
webhook.execute()
Expand Down
2 changes: 1 addition & 1 deletion apps/pilots/templates/scenery.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block body %}
{% if request.user_obj.is_staff %}
<div class="text-center mb-4">
<button class="btn btn-lg btn-primary" data-action="add-scenery"><i class="far fa-plus"></i> Add Scenery</button>
<button class="btn btn-lg btn-primary" data-action="add-scenery"><i class="far fa-plus"></i> Agregar Paisaje</button>
</div>
{% endif %}
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion apps/pilots/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def view_scenery(request):
scenery_sorted = {k: list(g) for k, g in groupby(sceneries, key=lambda scenery: scenery.get_simulator_display())}
simulators = Scenery._meta.get_field('simulator').choices
return render(request, 'scenery.html', {
'page_title': 'Scenery',
'page_title': 'Paisaje',
'sceneries': scenery_sorted,
'simulators': simulators
})
Expand Down
10 changes: 5 additions & 5 deletions apps/resource/templates/resources.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block body %}
{% if request.user_obj.is_staff %}
<div class="text-center mb-4">
<button class="btn btn-lg btn-primary" data-action="add-resource"><i class="far fa-plus"></i> Add Resource</button>
<button class="btn btn-lg btn-primary" data-action="add-resource"><i class="far fa-plus"></i> Agregar Recurso</button>
</div>
{% endif %}
<div class="row">
Expand All @@ -14,7 +14,7 @@
<div class="card-header bg-secondary">
<a class="float-right mt-3" data-toggle="collapse" href="#collapse-{{ category.0 }}"><i class="far fa-lg fa-plus"></i></a>
<h5 class="mb-0">{{ category.0 }}</h5>
<p class="mb-0">{{ resources|get_value_from_dict:category.0|length }} Resource{{ resources|get_value_from_dict:category.0|length|pluralize }}</p>
<p class="mb-0">{{ resources|get_value_from_dict:category.0|length }} Recurso{{ resources|get_value_from_dict:category.0|length|pluralize }}</p>
</div>
<div class="collapse" id="collapse-{{ category.0 }}">
<div class="card-body">
Expand All @@ -23,8 +23,8 @@ <h5 class="mb-0">{{ category.0 }}</h5>
{% if request.user_obj.is_staff %}
<th style="width: 7%"></th>
{% endif %}
<th style="width: 23%">Updated</th>
<th style="width: 70%">File</th>
<th style="width: 23%">Actualizado</th>
<th style="width: 70%">Archivo</th>
</thead>
<tbody>
{% for resource in resources|get_value_from_dict:category.0 %}
Expand All @@ -36,7 +36,7 @@ <h5 class="mb-0">{{ category.0 }}</h5>
<td><a href="{{ resource.path.url }}" target="_blank" download>{{ resource.name }}</a></td>
</tr>
{% empty %}
<td class="text-center" colspan="3">No resources found!</td>
<td class="text-center" colspan="3">¡No se encontraron recursos!</td>
{% endfor %}
</tbody>
</table>
Expand Down
Loading

0 comments on commit 89b5457

Please sign in to comment.