diff --git a/app/controllers/main_routes/main_routes.py b/app/controllers/main_routes/main_routes.py index 0a2f21e4..62ad00b7 100755 --- a/app/controllers/main_routes/main_routes.py +++ b/app/controllers/main_routes/main_routes.py @@ -16,6 +16,7 @@ from app.login_manager import require_login, logout from app.logic.getTableData import getDatatableData from app.logic.banner import Banner +from app.logic.tracy import Tracy @main_bp.route('/logout', methods=['GET']) def triggerLogout(): @@ -55,17 +56,29 @@ def departmentPortal(org=None,account=None): dept = Department.get(Department.ORG == org, Department.ACCOUNT == account) except (NameError, DoesNotExist): dept = None - - - + if g.currentUser.isLaborAdmin: departments = list(Department.select().order_by(Department.isActive.desc(), Department.DEPT_NAME.asc())) else: departments = list(getDepartmentsForSupervisor(g.currentUser).order_by(Department.isActive.desc(), Department.DEPT_NAME.asc())) + + pos = Tracy().getPositionsFromDepartment(org, account) + positions = [] + for i in pos: + positions.append(i.POSN_TITLE + "" + "(" + i.WLS + ")") + + staff = Tracy().getSupervisors() + supervisors = [] + + for i in staff: + if i.ORG == org: + supervisors.append(i.FIRST_NAME + " " + i.LAST_NAME + " (" + i.EMAIL + ")") return render_template('main/departmentPortal.html', departments = departments, - department = dept) + department = dept, + positions = positions, + supervisors = supervisors) @main_bp.route('/supervisorPortal/addUserToDept', methods=['GET', 'POST']) def addUserToDept(): diff --git a/app/static/css/base.css b/app/static/css/base.css index 940f8d6e..03716cbb 100755 --- a/app/static/css/base.css +++ b/app/static/css/base.css @@ -205,8 +205,11 @@ a { word-wrap: break-word; background-color: #fff; background-clip: border-box; - border: 1px solid rgba(0, 0, 0, 0.125); + border: 1px solid black; border-radius: 0.25rem; + margin-right: 20px; + border-radius: 20px; + overflow: hidden; } .card-body { diff --git a/app/templates/main/departmentPortal.html b/app/templates/main/departmentPortal.html index 8ee01838..474c4fbe 100644 --- a/app/templates/main/departmentPortal.html +++ b/app/templates/main/departmentPortal.html @@ -3,11 +3,13 @@ {% block scripts %} {{super()}} + {% endblock %} - {% block app_content %}

{% if department %} {{department.DEPT_NAME}} Portal {% else %} Choose a Department: {% endif %}

+
-{% endblock %} + +{% if department %} +
+ +
+
+
+ + + + + Current Allocation +
+


AY 26/27 15/20 POSITIONS

Break Hours 0 of 200 hrs

+ Go somewhere +
+
+ +
+
+
+
+ +
+ +
+

Members

+
+
+

Labor Coordinator(s)

+

Dr. Jones

+ +

Supervisors

+ {% for s in supervisors %} + {% if 3 > loop.index0 %} +

{{ s }}

+ {% elif 4 > loop.index0 %} +

and {{ supervisors | length}} more...

+ {% endif %} + {% endfor %} +
+ + +
+ +
+
+

Positions

+ {% for p in positions %} + {% if 10 > loop.index0 %} +

{{ p }}

+ {% endif %} + {% endfor %} +
+ +
+
+ +{% endif %} +{% endblock %}\ + + + + diff --git a/app/templates/main/supervisorPortal.html b/app/templates/main/supervisorPortal.html index 78383566..3ab521a5 100644 --- a/app/templates/main/supervisorPortal.html +++ b/app/templates/main/supervisorPortal.html @@ -227,7 +227,7 @@

Form Search


-
+