changes in new-allocation-card#654
Conversation
|
Thanks for looking into this. I have fixed the comments you have made (removed code from other branches and added comments to logic) |
| break_hours = sumBreak, | ||
| ) | ||
| @main_bp.route('/department/<org>/<account>/managepositions', methods=['GET']) | ||
| def managePositions(org, account): |
There was a problem hiding this comment.
The manage positions page is not under the scope of this issue. Remove.
There was a problem hiding this comment.
We just remove the duplicated logic (if statement because it is suing the try and exception)
| "endDate": "2025-09-01" | ||
| } | ||
| ] | ||
| LaborStatusForm.insert_many(dummy_lsf).on_conflict_replace().execute() No newline at end of file |
|
No logic file and tests needed yet because the logic related to pulling allocations and allocation utilization will be standardized by another team, whereupon this will have to be modified to use those functions. |
…everything touching the 202500
…rvice. See #657 but beyond that we created allo files
| @@ -1,5 +1,6 @@ | |||
| from flask import render_template, request, json, redirect, url_for, send_file, g, flash, jsonify | |||
| from peewee import JOIN, DoesNotExist | |||
| from flask_bootstrap import forms | |||
There was a problem hiding this comment.
remove extra import line
| from app.login_manager import require_login, logout | ||
| from app.logic.getTableData import getDatatableData | ||
| from app.logic.banner import Banner | ||
| from app.logic.allocation_utilization import get_department_allocation_summary |
There was a problem hiding this comment.
getDepartmentAllocationSummary other logic files uses camel casing
| from app.logic.banner import Banner | ||
| from app.logic.allocation_utilization import get_department_allocation_summary | ||
| from app.models.allocation import Allocation | ||
| from app.logic.tracy import Tracy |
| try: | ||
| dept = Department.get(Department.ORG == org, Department.ACCOUNT == account) | ||
| except (NameError, DoesNotExist): | ||
| open_term = g.openTerm |
There was a problem hiding this comment.
camelcase and Dayton has talked to scott on not using term but we grab allocation but whenever we grab them we should sort them by most recent year so current term.
| open_term = g.openTerm | ||
| term_code = open_term.termCode | ||
|
|
||
| if org and account: |
There was a problem hiding this comment.
if org and account can be removed as it is working regardless
| mysql -u root -proot --execute="CREATE DATABASE IF NOT EXISTS \`lsf\`; CREATE USER IF NOT EXISTS 'lsf_user'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'lsf_user'@'%';" | ||
| mysql -u root -proot --execute="CREATE DATABASE IF NOT EXISTS \`UTE\`; CREATE USER IF NOT EXISTS 'tracy_user'@'%' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'tracy_user'@'%';" | ||
|
|
||
| cd database |
There was a problem hiding this comment.
we don't touch those files unless there is a separate PR on these
| <h1>Allocations</h1> | ||
| </div> | ||
| <div class="header-container"> | ||
| <h3>{{ term.termName }} <i class="bi bi-info-circle" data-toggle="tooltip" data-placement="top" title="All values are shown as Used/Given"></i></h3> <h3>{{used_allocation}}/{{total_allocation or 0}} Positions</h3> |
| </span> | ||
| </div> | ||
| <div class="media-body media-middle"> | ||
| <h1>Allocations</h1> |
| <h1>Allocations</h1> | ||
| </div> | ||
| <div class="header-container"> | ||
| <h3>{{ term.termName }} <i class="bi bi-info-circle" data-toggle="tooltip" data-placement="top" title="All values are shown as Used/Given"></i></h3> <h3>{{used_allocation}}/{{total_allocation or 0}} Positions</h3> |
There was a problem hiding this comment.
if we are planning to use the most recent as a way in peewee we should find a way to get the term name for this summary card too
| <h1>Allocations</h1> | ||
| </div> | ||
| <div class="header-container"> | ||
| <h3>{{ term.termName }} <i class="bi bi-info-circle" data-toggle="tooltip" data-placement="top" title="All values are shown as Used/Given"></i></h3> <h3>{{used_allocation}}/{{total_allocation or 0}} Positions</h3> |
There was a problem hiding this comment.
<h4> o
with something that has style changes

Allocation card revert merge
Changes
Testing