Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UAT Release #2176

Merged
merged 29 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
406c2ab
pipfile updated
markj0hnst0n Sep 19, 2024
dab4b05
Merge branch 'dev' into LTD-5434-improve-out-of-date-content-on-the-s…
markj0hnst0n Sep 19, 2024
5933b4c
update package.json
markj0hnst0n Sep 19, 2024
59e1d32
Merge branch 'LTD-5434-improve-out-of-date-content-on-the-service-sta…
markj0hnst0n Sep 19, 2024
58f6832
update again
markj0hnst0n Sep 19, 2024
a63c362
update pipfile again
markj0hnst0n Sep 19, 2024
cdd3ca9
Merge branch 'dev' into LTD-5434-improve-out-of-date-content-on-the-s…
markj0hnst0n Sep 20, 2024
57b8d42
Ensure exporter frontend acts upon ALL CLEs
currycoder Sep 16, 2024
fee6e47
Remove legacy open general licences app
currycoder Sep 17, 2024
d02bf1f
Remove legacy flag/flagging rule views
currycoder Sep 17, 2024
d3ab62a
Switch caseworker app to use new caseworker GET CLEs endpoint
currycoder Sep 17, 2024
53691b9
Fix unit tests by mocking new CLE endpoints
currycoder Sep 18, 2024
dbdf523
Merge pull request #2162 from uktrade/LTD-5399-CLE-api-calls-visibility
currycoder Sep 23, 2024
0469544
copy changes
depsiatwal Sep 23, 2024
abcc618
Merge pull request #2175 from uktrade/LTD-5433-registration-confirm-c…
depsiatwal Sep 24, 2024
3487ffe
Make logout clear session for exporter mock sso
kevincarrogan Sep 20, 2024
464351f
Merge pull request #2171 from uktrade/exporter-mock-sso-logout
kevincarrogan Sep 24, 2024
371f119
Rename good to good_on_application in licences template
kevincarrogan Sep 20, 2024
5c8ad74
Remove checking for `good` when displaying CLEs
kevincarrogan Sep 20, 2024
5ab8c8e
Use the assessed control list entries to display on licences
kevincarrogan Sep 20, 2024
e293880
Use name instead of description for good on licences list
kevincarrogan Sep 20, 2024
dc86313
Add tests to check licence details table
kevincarrogan Sep 20, 2024
5f319e2
Update e2e test to validate correct good details on licence
kevincarrogan Sep 23, 2024
d7d635d
Remove legacy and skipped e2e tests
kevincarrogan Sep 23, 2024
c7f47af
Move BDD e2e fixtures to more relevant file
kevincarrogan Sep 23, 2024
086776c
Merge branch 'dev' into LTD-5434-improve-out-of-date-content-on-the-s…
markj0hnst0n Sep 24, 2024
41c74b7
Merge pull request #2169 from uktrade/LTD-5446-update-licences-list-i…
kevincarrogan Sep 24, 2024
f8c61bb
Merge branch 'dev' into LTD-5434-improve-out-of-date-content-on-the-s…
markj0hnst0n Sep 24, 2024
31de339
Merge pull request #2167 from uktrade/LTD-5434-improve-out-of-date-co…
markj0hnst0n Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ markdown = "~=3.4.1"
mohawk = ">=1.1.0"
munch = "~=2.5.0"
requests = {extras = ["security"], version = "~=2.21"}
sentry-sdk = "~=1.17.0"
sentry-sdk = "~=2.8.0"
whitenoise = "~=5.3.0"
crispy-forms-gds = "~=0.2.4"
notifications-python-client = "~=6.4.1"
python-magic = "~=0.4.27"
Authlib = "==0.15.5"
Authlib = "==1.3.1"
regex = "==2022.3.2"
deepmerge = "*"
phonenumbers = "~=8.12.57"
setuptools = "~=70.0.0"
rules="~=3.3.0"
djangorestframework = "~=3.14.0"
djangorestframework = "~=3.15.2"
django-chunk-upload-handlers = "~=0.0.13"
django-compressor = "~=2.4.1"
django-csp = "~=3.7"
Expand All @@ -82,6 +82,7 @@ django-extra-views = "~=0.14.0"
django = "~=4.2.15"
django-log-formatter-asim = "~=0.0.5"
dbt-copilot-python = "~=0.2.1"
cryptography = "~=43.0.1"

[requires]
python_version = "3.9"
1,304 changes: 702 additions & 602 deletions Pipfile.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion caseworker/bookmarks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AddBookmark(LoginRequiredMixin, CaseDataMixin, FormView):

@cached_property
def all_cles(self):
return get_control_list_entries(self.request, include_parent=True)
return get_control_list_entries(self.request, include_non_selectable_for_assessment=True)

@cached_property
def all_regimes(self):
Expand Down
14 changes: 1 addition & 13 deletions caseworker/core/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_new_mention_count,
get_user_role_name,
)
from lite_content.lite_internal_frontend import strings, open_general_licences
from lite_content.lite_internal_frontend import strings
from lite_content.lite_internal_frontend.flags import FlagsList
from lite_content.lite_internal_frontend.organisations import OrganisationsPage
from lite_content.lite_internal_frontend.queues import QueuesList
Expand Down Expand Up @@ -76,14 +76,6 @@ def lite_menu(request):
{"title": QueuesList.TITLE, "url": reverse_lazy("queues:manage"), "icon": "menu/queues"},
{"title": UsersPage.TITLE, "url": reverse_lazy("users:users"), "icon": "menu/users"},
{"title": FlagsList.TITLE, "url": reverse_lazy("flags:flags"), "icon": "menu/flags"},
conditional(
Permission.MAINTAIN_OGL.value in permissions,
{
"title": open_general_licences.List.TITLE,
"url": reverse_lazy("open_general_licences:open_general_licences"),
"icon": "menu/open-general-licences",
},
),
conditional(
Permission.CONFIGURE_TEMPLATES.value in permissions,
{
Expand All @@ -92,10 +84,6 @@ def lite_menu(request):
"icon": "menu/letter-templates",
},
),
conditional(
Permission.MANAGE_FLAGGING_RULES.value in permissions,
{"title": "Flagging rules", "url": reverse_lazy("flags:flagging_rules"), "icon": "menu/flags"},
),
conditional(
Permission.MANAGE_TEAM_ROUTING_RULES.value in permissions
or Permission.MANAGE_ALL_ROUTING_RULES.value in permissions,
Expand Down
38 changes: 6 additions & 32 deletions caseworker/core/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,40 +131,14 @@ def get_user_role_name(request):
return user["user"]["role"]["name"]


CLC_ENTRIES_CACHE = []


# Control List Entries
def get_control_list_entries( # noqa
request, convert_to_options=False, include_parent=False, clc_entries_cache=CLC_ENTRIES_CACHE # noqa
): # noqa
"""
Preliminary caching mechanism, requires service restart to repopulate control list entries
"""
if convert_to_options:
if clc_entries_cache:
return clc_entries_cache
else:
data = client.get(request, "/static/control-list-entries/")

for control_list_entry in data.json().get("control_list_entries"):
clc_entries_cache.append(
Option(
key=control_list_entry["rating"],
value=control_list_entry["rating"],
description=control_list_entry["text"],
)
)

return clc_entries_cache

if include_parent:
response = client.get(request, "/static/control-list-entries/?include_parent=True")
else:
response = client.get(request, "/static/control-list-entries/?group=True")
def get_control_list_entries(request, include_non_selectable_for_assessment=False):
url = "/caseworker/static/control-list-entries/"
if include_non_selectable_for_assessment:
url = f"{url}?include_non_selectable_for_assessment=True"

response = client.get(request, url)
response.raise_for_status()
return response.json().get("control_list_entries")
return response.json()


# Regime Entries
Expand Down
Loading