-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from ICESI-PI1-2024A-G1/assignResponsiblesCont…
…rolBoard END:BUILD: Assign responsibles to contract requests since control boa…
- Loading branch information
Showing
14 changed files
with
83 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
hiring_module/hiring_app/templates/control_board/base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% extends 'base.html' %} | ||
{% load static %} | ||
{% block title %} | ||
Panel de control | ||
{% endblock %} | ||
{% block aditionalMetadata %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<main id="main" class="expanded"> | ||
{% include 'control_board/center_container.html' %} | ||
|
||
{% include 'control_board/table.html' with managers=managers leaders=leaders group=actualgroup%} | ||
|
||
|
||
<div> | ||
{% block control_board %} | ||
|
||
{% endblock %} | ||
</div> | ||
|
||
{% include 'control_board/state_change.html' %} | ||
</main> | ||
|
||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 12 additions & 18 deletions
30
hiring_module/hiring_app/templates/request_hiring/components/assign_leader.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
<form id="ChangeLeaderForm" method="post" action="{% url 'hiring_app:assign_leader' contract_request.id %}"> | ||
<form class="change-leader-form_{{ form_id_prefix }}{{ contract_request.id }}" method="post" action="{% url 'hiring_app:assign_leader' contract_request.id %}" style="margin-bottom: 1rem;"> | ||
{% csrf_token %} | ||
|
||
<select name="leader" id="leaderSelect" class="btn btn-white border border-2 border-dark text-dark dropdown-toggle col" | ||
{% if not is_admin %} | ||
disabled | ||
{% endif %} | ||
|
||
> | ||
<option class="col" disabled selected>Seleccionar</option> | ||
<select name="leader" class="leaderSelect btn btn-white border border-2 border-dark text-dark dropdown-toggle col" {% if actualgroup != 'admin' %} disabled {% endif %}> | ||
<option value="" class="col" selected>Seleccionar</option> | ||
{% for leader in leaders %} | ||
<option class="col" value="{{ leader.id }}" | ||
{% if leader.id == contract_request.leader_assigned_to.id %} | ||
selected | ||
{% endif %}> | ||
{{ leader.first_name }} {{ leader.last_name }} | ||
</option> | ||
<option value="{{ leader.id }}" class="col" {% if leader.id == contract_request.leader_assigned_to.id %} selected {% endif %}> {{ leader.first_name }} {{ leader.last_name }}</option> | ||
{% endfor %} | ||
</select> | ||
|
||
</form> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var selectElement = document.getElementById('leaderSelect'); | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var selectElements = document.querySelectorAll('.leaderSelect'); | ||
selectElements.forEach(function(selectElement) { | ||
selectElement.addEventListener('change', function () { | ||
document.getElementById('ChangeLeaderForm').submit(); | ||
var form = selectElement.closest('form'); | ||
form.submit(); | ||
}); | ||
}); | ||
</script> | ||
}); | ||
</script> |
26 changes: 10 additions & 16 deletions
26
hiring_module/hiring_app/templates/request_hiring/components/assign_manager.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
<form id="ChangeManagerForm" method="post" action="{% url 'hiring_app:assign_manager' contract_request.id %}" style="margin-bottom: 1rem;"> | ||
<form class="change-manager-form_{{ form_id_prefix }}{{ contract_request.id }}" method="post" action="{% url 'hiring_app:assign_manager' contract_request.id %}" style="margin-bottom: 1rem;"> | ||
{% csrf_token %} | ||
<select name="manager" id="managerSelect" | ||
class="btn btn-white border border-2 border-dark text-dark dropdown-toggle col" | ||
{% if not is_admin and not is_leader %} | ||
<select name="manager" class="managerSelect btn btn-white border border-2 border-dark text-dark dropdown-toggle col" {% if actualgroup != "admin" and actualgroup != 'leader' %} | ||
disabled | ||
{% endif %} | ||
|
||
> | ||
<option class="col" value="" disabled selected >Seleccionar</option> | ||
|
||
{% for manager in managers %} | ||
|
||
<option class="col" value="{{ manager.id }}" | ||
{% if manager.id == contract_request.manager_assigned_to.id %} | ||
selected | ||
{% endif %} | ||
> | ||
{{ manager.first_name }} {{ manager.last_name }} | ||
</option> | ||
|
||
|
||
<option value="{{ manager.id }}" class="col" {% if manager.id == contract_request.manager_assigned_to.id %}selected{% endif %} style="color: #4a5568;">{{ manager.first_name }} {{ manager.last_name }}</option> | ||
{% endfor %} | ||
|
||
</select> | ||
</form> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var selectElement = document.getElementById('managerSelect'); | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var selectElements = document.querySelectorAll('.managerSelect'); | ||
selectElements.forEach(function(selectElement) { | ||
selectElement.addEventListener('change', function () { | ||
document.getElementById('ChangeManagerForm').submit(); | ||
var form = selectElement.closest('form'); | ||
form.submit(); | ||
}); | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters