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

[MDS-5712] AMS Application Purpose #3036

Merged
merged 22 commits into from
Apr 5, 2024
Merged

Conversation

taraepp
Copy link
Collaborator

@taraepp taraepp commented Apr 4, 2024

Objective

  • Authorizations Involved page on MS
  • change data shape- make necessary updates on CORE

MDS-5712

Why are you making this change? Provide a short explanation and/or screenshots
This is what it looks like when one of the required fields is missing on the BE:
image

Tech debt:

  • did not update BE tests
  • styling is a bit off
  • CORE has an edit and a view mode- there is no view mode implemented for authorizations involved

elif authorization.get('project_summary_authorization_type') == 'OTHER':
v = Validator(other_schema, purge_unknown=True)

if not v.validate(authorization):
Copy link
Collaborator Author

@taraepp taraepp Apr 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors aren't terribly pretty (by default...) but they get the job done. I found it easier to use this than to do all the if's and len's and not in's I'd be doing otherwise. It's not specific about which authorization is causing the issue, for the reason that I didn't want to cause a 500 trying to get an attribute that may be causing the 400, so just logged the whole record on the BE if it's invalid.

Documentation: https://docs.python-cerberus.org/validation-rules.html

Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_minespace-web'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_common'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-web'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

Copy link

sonarqubecloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed for 'bcgov-sonarcloud_mds_core-api'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@taraepp taraepp marked this pull request as ready for review April 5, 2024 16:45
@taraepp taraepp requested review from isuru-aot and asinn134 April 5, 2024 16:47
import { BaseInputProps, getFormItemLabel } from "./BaseInput";

/**
* Just can't conform the UI to play nice with redux-form?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆 Love it. Reminds me of an infomercial. "Has this ever happened to you!?"

Copy link
Contributor

@henryoforeh-dev henryoforeh-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol the PR needs sizing for reviewing too. Nice work.

Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks some fancy dancy SQL. Nice work!

other_types text[];
type_count integer;
delete_guids uuid[];
BEGIN
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with the sql scrip here 👍

Copy link
Collaborator

@asinn134 asinn134 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of work done, great job!

@taraepp taraepp merged commit e79a288 into develop Apr 5, 2024
20 of 24 checks passed
@taraepp taraepp deleted the mds-5712-ams-application-purpose branch April 5, 2024 18:31
simensma-fresh pushed a commit that referenced this pull request Jun 12, 2024
* change around authorizations involved, convert to TS, fix some issues in Callout, GroupCheckbox

* add 'help' text to radio buttons, make authorizations form section mostly match mockup

* make field names closer to mappings, tooltip

* migration to separate out AMS amended authorizations into their own rows, add new columns

* update BE response to include new fields, format a bit differently when received on the FE, and update the form accordingly. Fix some validation, radio button, checkbox label that is a form section issues

* fix issue with label and with radio buttons, process & validate on BE, transform payload on FE

* move authorizations involved into common, put in CORE, change 'OTHER' and 'MINES ACT PERMIT' UI according to AC/mockups, make the list of checkboxes be validated

* make a hidden field component to handle most of the redux-y stuff, update authorization interface, update data mocks

* fix style issues on CORE

* fix issues with multiselect changing value onBlur, fix issues with saving on CORE, and bug on new records

* add loading indicator on multiselect, remove console log, snaps

* remove failing line from cypress test

* fill in an authorization for cypress test

* make required fields consistent and also don't show an empty item in multiselect

* rename migration for order, and update data with 'OTHER' type to use authorization description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants