From 90893d11341f195bbe6e119ba122976aeee9ba67 Mon Sep 17 00:00:00 2001 From: Mendo6472 Date: Wed, 8 May 2024 10:05:27 -0500 Subject: [PATCH 01/41] REF:BUILD: Fixed add schedule button not working --- .../request_creation/pos_request_form.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hiring_module/hiring_app/templates/request_creation/pos_request_form.html b/hiring_module/hiring_app/templates/request_creation/pos_request_form.html index 6430d3d..4561420 100644 --- a/hiring_module/hiring_app/templates/request_creation/pos_request_form.html +++ b/hiring_module/hiring_app/templates/request_creation/pos_request_form.html @@ -285,6 +285,23 @@ + + + - var dailySelect = document.getElementById('data_select'); + - + {% endblock %} \ No newline at end of file diff --git a/hiring_module/hiring_app/views/utilities.py b/hiring_module/hiring_app/views/utilities.py index 50d5585..9ddd7f1 100644 --- a/hiring_module/hiring_app/views/utilities.py +++ b/hiring_module/hiring_app/views/utilities.py @@ -100,12 +100,16 @@ def get_manager_metrics(): ) + pos_requests.filter(state='incomplete').count( ) + cancelled_requests = cex_requests.filter(state='cancelled').count( + ) + monitoring_requests.filter(state='cancelled').count( + ) + pos_requests.filter(state='cancelled').count( + ) data.append([(manager.first_name + ' ' + manager.last_name), approved_requests, - review_requests, for_validate_requests]) + review_requests, for_validate_requests,cancelled_requests]) - best_to_worse_manager.append([(manager.first_name + ' ' + manager.last_name), quality_calculator(approved_requests, review_requests, for_validate_requests)]) + best_to_worse_manager.append([(manager.first_name + ' ' + manager.last_name), quality_calculator(approved_requests, review_requests, for_validate_requests,cancelled_requests)]) best_to_worse_manager = sorted(best_to_worse_manager, key=lambda x: x[1], reverse=True) @@ -191,12 +195,17 @@ def get_leader_metrics(): ) + pos_requests.filter(state='incomplete').count( ) + cancelled_requests = cex_requests.filter(state='cancelled').count( + ) + monitoring_requests.filter(state='cancelled').count( + ) + pos_requests.filter(state='cancelled').count( + ) + data.append([(leader.first_name + ' ' + leader.last_name), approved_requests, - review_requests, for_validate_requests]) + review_requests, for_validate_requests,cancelled_requests]) - best_to_worse_leader.append([(leader.first_name + ' ' + leader.last_name), quality_calculator(approved_requests, review_requests, for_validate_requests)]) + best_to_worse_leader.append([(leader.first_name + ' ' + leader.last_name), quality_calculator(approved_requests, review_requests, for_validate_requests,cancelled_requests)]) best_to_worse_leader = sorted(best_to_worse_leader, key=lambda x: x[1], reverse=True) @@ -212,13 +221,13 @@ def get_leader_metrics(): } -def quality_calculator(aprobadas, en_revision, por_validar): - total = aprobadas + en_revision + por_validar +def quality_calculator(approved_requests, under_review_requests, for_validate_requests, cancelled_requests): + total = approved_requests + under_review_requests + for_validate_requests + cancelled_requests if total != 0: - porcentaje_aprobadas = (aprobadas / total) * 100 - porcentaje_aprobadas = round(porcentaje_aprobadas, 2) - return porcentaje_aprobadas + quality = ((approved_requests + cancelled_requests)/ total) * 100 + quality = round(quality, 2) + return quality else: return 0 From ce8a4c16f0ccdd2f57fc0cc5f536b954aa9e1eec Mon Sep 17 00:00:00 2001 From: "Sebastian._.411._" <84807030+Debug41@users.noreply.github.com> Date: Sun, 12 May 2024 00:23:34 -0500 Subject: [PATCH 04/41] REF: fixing ui and improving the gui --- .../components/user_element_container.html | 32 +- .../admin_user/components/user_list.html | 2 +- .../user_list_center_container.html | 2 +- hiring_module/hiring_app/templates/base.html | 149 +- .../templates/control_board/table.html | 2 +- .../request_creation/cex_request_form.html | 776 +++++++--- .../monitoring_request_form.html | 789 +++++++--- .../request_creation/pos_request_form.html | 1349 +++++++++++++---- .../request_hiring/cex_information.html | 369 +++-- .../monitoring_information.html | 342 +++-- .../request_creation/create_hiring_request.py | 218 ++- .../cex_contract_request_view.py | 20 +- .../pos_contract_request_view.py | 29 +- 13 files changed, 2889 insertions(+), 1190 deletions(-) diff --git a/hiring_module/hiring_app/templates/admin_user/components/user_element_container.html b/hiring_module/hiring_app/templates/admin_user/components/user_element_container.html index 287f86d..4afad35 100644 --- a/hiring_module/hiring_app/templates/admin_user/components/user_element_container.html +++ b/hiring_module/hiring_app/templates/admin_user/components/user_element_container.html @@ -1,17 +1,21 @@ -
-
-
-
-
-
- {{ status }} -
-
{{ count }} Usuarios
-
-
- -
-
+
+
+
+
+
+
+ {{ status }} +
+
+ {{ count }} Usuarios +
+
+ +
+
+
diff --git a/hiring_module/hiring_app/templates/admin_user/components/user_list.html b/hiring_module/hiring_app/templates/admin_user/components/user_list.html index 3e80753..00f9402 100644 --- a/hiring_module/hiring_app/templates/admin_user/components/user_list.html +++ b/hiring_module/hiring_app/templates/admin_user/components/user_list.html @@ -1,4 +1,4 @@ -
+

Solicitudes de contratación

diff --git a/hiring_module/hiring_app/templates/admin_user/components/user_list_center_container.html b/hiring_module/hiring_app/templates/admin_user/components/user_list_center_container.html index 275d54e..798af45 100644 --- a/hiring_module/hiring_app/templates/admin_user/components/user_list_center_container.html +++ b/hiring_module/hiring_app/templates/admin_user/components/user_list_center_container.html @@ -1,4 +1,4 @@ -
+
{% include 'admin_user/components/user_element_container.html' with count=1 status='Administradores' %} {% include 'admin_user/components/user_element_container.html' with count=2 status='Lideres' %} {% include 'admin_user/components/user_element_container.html' with count=2 status='Gestores' %} diff --git a/hiring_module/hiring_app/templates/base.html b/hiring_module/hiring_app/templates/base.html index bc59a5b..428d391 100644 --- a/hiring_module/hiring_app/templates/base.html +++ b/hiring_module/hiring_app/templates/base.html @@ -2,83 +2,67 @@ - - + {% block title %}{% endblock %} - - - - - + + + + + - - + href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" + rel="stylesheet" + /> - - - - - - {% block metadata %} - - {% endblock %} - + + - + + + {% block metadata %} {% endblock %} + +
- - - {% include 'components/LeftSideMenu.html' %} - - - -
- - -
- - - {% include 'components/header.html' %} - - - - {% block content %} - - {% endblock %} - - -
- - - -
-
- -
-
- - + + {% include 'components/LeftSideMenu.html' %} + + + +
+ +
+ + {% include 'components/header.html' %} + + + + {% block content %} {% endblock %} +
- - + +
+
- + - - - @@ -94,37 +78,34 @@ - + - - - - - - \ No newline at end of file + + diff --git a/hiring_module/hiring_app/templates/control_board/table.html b/hiring_module/hiring_app/templates/control_board/table.html index da3c806..60d4b2f 100644 --- a/hiring_module/hiring_app/templates/control_board/table.html +++ b/hiring_module/hiring_app/templates/control_board/table.html @@ -4,7 +4,7 @@ } -
+

Solicitudes de contratación

diff --git a/hiring_module/hiring_app/templates/request_creation/cex_request_form.html b/hiring_module/hiring_app/templates/request_creation/cex_request_form.html index 5eef5cc..9bcded3 100644 --- a/hiring_module/hiring_app/templates/request_creation/cex_request_form.html +++ b/hiring_module/hiring_app/templates/request_creation/cex_request_form.html @@ -1,235 +1,627 @@ -{% extends 'base.html' %} -{% load static %} - -{% block title %} -Solicitudes de contratos CEX -{% endblock %} - -{% block content %} - -
-
- -

Solicitudes de contratos CEX

- -
- {% csrf_token %} - - -
- - -
- - -
- - -
- +{% extends 'base.html' %} {% load static %} {% block title %} Solicitudes de +contratos CEX {% endblock %} {% block content %} + + + {% csrf_token %} +
+

+ Solicitudes de contratos de CEX +

+
+ +
+
+ +
+
+ Información del contratado +
+
+ +
-
- - +
+ +
-
- - +
+ +
- -
- - +
+ +
-
- - +
+ +
- - -
- - + +
+ +
- -
- - + +
+ + +
+
+
+
+ + +
+
+ +
+
+ Información del financiera +
+
+ +
+ +
+ +
-
- - +
+ +
+
-
- - +
+ +
+
-
- - +
+ +
- - -
- - -
- +
-
- - +
+ +
- - -
- - +
+
+
+ + +
+
+ +
+
+ Información legal para el contrato +
+
+ +
+ +
+ + +
+ +
+ +
- -
- - +
+ +
- -
- - +
+ +
-
- - +
+ +
- - - - - +
+
+
-
+ + +
+ -