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

10255 - Bug fix for Account accessType change premium to GovN #1872

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

karthik-aot
Copy link
Contributor

Issue #:
bcgov/entity#10255

Description of changes:

  • Add conditions to display premium accounts

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the sbc-auth license (Apache 2.0).

@karthik-aot karthik-aot added the bug Something isn't working label Jan 7, 2022
@karthik-aot karthik-aot self-assigned this Jan 7, 2022
@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #1872 (d5af352) into main (6eda0b4) will decrease coverage by 0.55%.
The diff coverage is 55.10%.

@@            Coverage Diff             @@
##             main    #1872      +/-   ##
==========================================
- Coverage   79.70%   79.14%   -0.56%     
==========================================
  Files         276      283       +7     
  Lines        9603     9731     +128     
  Branches      449      304     -145     
==========================================
+ Hits         7654     7702      +48     
- Misses       1949     2029      +80     
Flag Coverage Δ
authweb 43.58% <40.74%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
auth-api/src/auth_api/exceptions/errors.py 100.00% <ø> (ø)
auth-api/src/auth_api/resources/user.py 88.30% <0.00%> (ø)
auth-api/src/auth_api/services/task.py 84.21% <0.00%> (ø)
...ount-settings/advance-settings/ExistingAPIKeys.vue 33.33% <ø> (ø)
...count-settings/team-management/InviteUsersForm.vue 33.33% <ø> (ø)
auth-web/src/components/auth/common/Product.vue 83.33% <ø> (ø)
...ponents/auth/create-account/AccountCreateBasic.vue 20.00% <ø> (ø)
...nents/auth/create-account/AccountCreatePremium.vue 16.66% <ø> (ø)
...th-web/src/components/auth/mixins/AccountMixin.vue 100.00% <ø> (ø)
...c/components/auth/staff/review-task/ProductFee.vue 60.00% <ø> (ø)
... and 56 more

@@ -20,7 +20,7 @@
<span data-test="txt-selected-access-type">{{ selectedAccessType === AccessType.GOVN ? 'Government agency (other than BC provincial)' : 'Regular Access'}}</span>
</div>
<div
v-if="canChangeAccessType"
v-if="canChangeAccessType && selectedAccessType !== AccessType.GOVN"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this condition to enable the Change button? If so, shouldn't this check for GOVM too ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored the code accordingly

@karthik-aot karthik-aot requested a review from sumesh-aot January 7, 2022 16:57
@@ -122,6 +122,25 @@ export default class AccountAccessType extends Vue {
return this.currentOrgPaymentType && this.currentOrgPaymentType === PaymentTypes.PAD
}

public get isChangeButtonEnabled (): boolean {
let isChangeButtonEnabled: boolean = this.organization.orgType === Account.PREMIUM // Only Premium accounts can be edited
Copy link
Contributor

Choose a reason for hiding this comment

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

use different name for function and variables

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@karthik-aot karthik-aot merged commit 98c8b4d into bcgov:main Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants