ositah 24.1.dev1__tar.gz → 24.4.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ositah-24.1.dev1/ositah.egg-info → ositah-24.4.dev1}/PKG-INFO +1 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/main.py +2 -4
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/ositah.example.cfg +1 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/exceptions.py +2 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/projects.py +1 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/utils.py +2 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1/ositah.egg-info}/PKG-INFO +1 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/pyproject.toml +1 -1
- {ositah-24.1.dev1 → ositah-24.4.dev1}/.gitignore +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/.gitlab-ci.yml +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/LICENSE +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/README.md +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/README.md +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/gunicorn.ositah +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/gunicorn@.service +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/gunicorn.config/ositah.conf.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/noxfile.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/__init__.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/app.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/__init__.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/analysis.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/__init__.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/callbacks.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/main.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/parameters.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/configuration/tools.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/export.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/__init__.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/callbacks.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/main.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/parameters.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/tables.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/apps/validation/tools.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/arrow_down_up.svg +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/ositah.css +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sort_ascending.svg +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sort_descending.svg +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/assets/sorttable.js +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/static/style.css +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/base.html +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/bootstrap_login.html +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/templates/login_form.html +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/__init__.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/agents.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/authentication.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/cache.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/core.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/hito_db.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/hito_db_model.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/menus.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/period.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah/utils/teams.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/SOURCES.txt +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/dependency_links.txt +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/entry_points.txt +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/requires.txt +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/ositah.egg-info/top_level.txt +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/setup.cfg +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/setup.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/README.md +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/accordion.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/authentication.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/checkbox.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/checklist.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/file-selector.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/file-upload.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/long_running_callback.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pandas_split.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pandas_split_bug_report.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/pattern-matching-callback.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/progess_bar.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/reset_table_checkboxes.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/sortable_table.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/sqlalchemy_test.py +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/templates/base.html +0 -0
- {ositah-24.1.dev1 → ositah-24.4.dev1}/test-dash/templates/login_form.html +0 -0
|
@@ -117,7 +117,7 @@ def url_not_found(path):
|
|
|
117
117
|
# valid role missing jumbotron
|
|
118
118
|
def valid_role_missing(msg):
|
|
119
119
|
return ositah_jumbotron(
|
|
120
|
-
"You don't
|
|
120
|
+
"You don't have a valid Hito role to OSITAH",
|
|
121
121
|
msg,
|
|
122
122
|
title_class="text-warning",
|
|
123
123
|
)
|
|
@@ -204,9 +204,7 @@ def render_page_content(pathname, login_menu):
|
|
|
204
204
|
if not user_session_data.agent_teams:
|
|
205
205
|
if role == HITO_ROLE_TEAM_MGR:
|
|
206
206
|
# For a team manager, show only the teams he/she is a manager
|
|
207
|
-
teams = Team.query.filter(
|
|
208
|
-
Team.managers.any(email_auth=session["user_email"])
|
|
209
|
-
).all()
|
|
207
|
+
teams = Team.query.filter(Team.managers.any(email=session["user_email"])).all()
|
|
210
208
|
if len(teams) == 0:
|
|
211
209
|
# A user with role ROLE_RESP but is not the manager of any team is degraded
|
|
212
210
|
# to ROLE_AGENT
|
|
@@ -85,7 +85,7 @@ server:
|
|
|
85
85
|
# Options related to declarations
|
|
86
86
|
declaration:
|
|
87
87
|
# Default date must be a date included into the selected validation period. It is a default, if no other explicitly select
|
|
88
|
-
default_date: 2021-07-01
|
|
88
|
+
#default_date: 2021-07-01
|
|
89
89
|
# max_hours specifies the upper valid value for activities declared in hours
|
|
90
90
|
max_hours: 400
|
|
91
91
|
# Agent statut whose declaration is not mandatory
|
|
@@ -24,7 +24,8 @@ class InvalidDataSource(Exception):
|
|
|
24
24
|
class InvalidHitoProjectName(Exception):
|
|
25
25
|
def __init__(self, projects):
|
|
26
26
|
self.msg = (
|
|
27
|
-
f"The following Hito
|
|
27
|
+
f"The following Hito project names don't match the format 'masterproject / project' :"
|
|
28
|
+
f" {', '.join(projects)}"
|
|
28
29
|
)
|
|
29
30
|
self.status = EXIT_STATUS_GENERAL_ERROR
|
|
30
31
|
|
|
@@ -425,7 +425,7 @@ def get_team_projects(
|
|
|
425
425
|
invalid_hito_projects = declarations.loc[declarations[columns["project"]].isnull()]
|
|
426
426
|
if not invalid_hito_projects.empty:
|
|
427
427
|
raise InvalidHitoProjectName(
|
|
428
|
-
pd.Series(invalid_hito_projects[columns["masterproject"]]).
|
|
428
|
+
pd.Series(invalid_hito_projects[columns["masterproject"]]).unique()
|
|
429
429
|
)
|
|
430
430
|
|
|
431
431
|
else:
|
|
@@ -5,6 +5,7 @@ from typing import List
|
|
|
5
5
|
|
|
6
6
|
import dash_bootstrap_components as dbc
|
|
7
7
|
from dash import html
|
|
8
|
+
from dateutil.relativedelta import relativedelta
|
|
8
9
|
from flask import session
|
|
9
10
|
from flask_sqlalchemy import SQLAlchemy
|
|
10
11
|
from hito_tools.exceptions import ConfigFileEmpty, ConfigMissingParam
|
|
@@ -388,7 +389,7 @@ def define_config_params(file):
|
|
|
388
389
|
config["declaration"]["thresholds"] = {"low": 50, "suspect": 75, "good": 100}
|
|
389
390
|
# Default declaration period date defaults to current day if not explicitly defined
|
|
390
391
|
if "default_date" not in config["declaration"]:
|
|
391
|
-
config["declaration"]["default_date"] = datetime.now()
|
|
392
|
+
config["declaration"]["default_date"] = datetime.now() - relativedelta(months=10)
|
|
392
393
|
global_params.declaration_options = config["declaration"]
|
|
393
394
|
|
|
394
395
|
if "validation" not in config:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|