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

[To Main] DESENG-643: Final changes for engagement loader optimizations #2558

Merged
merged 17 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 7 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
- Added new UI component to handle searching, selecting, and displaying users
- Minor tweaks to existing wizard functionality
- Minor backend change: don't throw error when setting an engagement's slug to its current value
- **Feature** Rerouted engagement components to use useRouteLoaderData instead of making direct calls to services. [🎟️ DESENG-643](https://citz-gdx.atlassian.net/browse/DESENG-643)
- Authorized engagement listing page is now working, complete with filter, search, and pagination
- Authorized view engagement is fully working with widgets
- Authorized edit engagement is fully working (including custom data)
- Authorized create engagement is mostly working, with the exception of edit updates
- TODO: Users should be redirected to edit page once engagement is created
- Unauthorized homepage is working with engagements

## July 11, 2024

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def update_summary_content(content_id, request_json):
"""Update engagement summary content."""
summary_content_list: EngagementSummaryModel = EngagementSummaryModel.get_summary_content(content_id)
if not summary_content_list:
raise KeyError('Engagement summary content ' + content_id + ' does not exist')
raise KeyError('Engagement summary content ' + str(content_id) + ' does not exist')

summary_content = summary_content_list[0]
eng_id = summary_content.engagement_id
Expand Down
23 changes: 12 additions & 11 deletions met-cron/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Flask-Caching==2.0.1
Flask-Cors==3.0.10
Flask-Mail==0.9.1
Flask-Mail==0.10.0
Flask-Migrate==2.7.0
Flask-Moment==1.0.5
Flask-Moment==1.0.6
Flask-SQLAlchemy==3.0.5
Flask-Script==2.0.5
Flask==2.2.5
Expand All @@ -12,45 +12,46 @@ MarkupSafe==2.1.5
SQLAlchemy-Utils==0.41.2
SQLAlchemy==1.4.52
Werkzeug==3.0.3
alembic==1.13.1
alembic==1.13.2
aniso8601==9.0.1
attrs==23.2.0
bcrypt==4.1.3
blinker==1.8.2
cachelib==0.13.0
certifi==2024.2.2
certifi==2024.7.4
charset-normalizer==3.3.2
click==8.1.7
ecdsa==0.19.0
flask-jwt-oidc==0.7.0
flask-marshmallow==1.0.0
flask-restx==1.3.0
greenlet==3.0.3
gunicorn==22.0.0
idna==3.7
importlib_metadata==8.0.0
importlib_resources==6.4.0
itsdangerous==2.0.1
jaeger-client==4.8.0
jsonschema-specifications==2023.12.1
jsonschema==4.22.0
marshmallow-sqlalchemy==1.0.0
marshmallow==3.21.2
marshmallow==3.21.3
opentracing==2.4.0
packaging==24.0
packaging==24.1
psycopg2-binary==2.9.9
pyasn1==0.6.0
python-dotenv==1.0.1
python-jose==3.3.0
pytz==2024.1
referencing==0.35.1
requests==2.32.2
requests==2.32.3
rpds-py==0.18.1
rsa==4.9
secure==0.3.0
six==1.16.0
threadloop==1.0.2
thrift==0.20.0
tornado==6.4
typing_extensions==4.11.0
urllib3==2.2.1
tornado==6.4.1
typing_extensions==4.12.2
urllib3==2.2.2
zipp==3.19.2
-e git+https://github.com/bcgov/met-public.git#egg=met-api&subdirectory=met-api
29 changes: 21 additions & 8 deletions met-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions met-web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ const App = () => {
return <MidScreenLoader />;
}

// If the tenant is not loaded and is not loading, display the "Not Found" page.
if (!tenant.isLoaded && !tenant.loading) {
return (
<Router>
Expand All @@ -201,6 +202,7 @@ const App = () => {
);
}

// Otherwise, if the user is not authenticated, show the public layout.
if (!isAuthenticated) {
const router = createBrowserRouter(
[
Expand All @@ -215,6 +217,7 @@ const App = () => {
return <RouterProvider router={router} />;
}

// Otherwise, if the user is authenticated but does not have a role, display the admin area with no access to children pages.
if (roles.length === 0) {
const router = createBrowserRouter(
[
Expand All @@ -233,6 +236,7 @@ const App = () => {
return <RouterProvider router={router} />;
}

// Otherwise, display the admin area.
const router = createBrowserRouter(
[
{
Expand Down
Loading
Loading