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

feat(auth-admin): Delete delegation UI #16073

Merged
merged 6 commits into from
Sep 20, 2024

Conversation

magnearun
Copy link
Contributor

What

Add delete button to Delegation Access card, call delete mutation

Why

Allow users to delete paper delegations

Screenshot 2024-09-19 at 10 31 44

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Copy link
Contributor

coderabbitai bot commented Sep 19, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@magnearun magnearun changed the title Feat/delete delegation UI feat(auth-admin): Delete delegation UI Sep 19, 2024
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 20.83333% with 19 lines in your changes missing coverage. Please review.

Project coverage is 36.48%. Comparing base (6518722) to head (ca2b33e).
Report is 96 commits behind head on feat/create-paper-delegation.

Files with missing lines Patch % Lines
...legations/admin/delegation-admin-custom.service.ts 10.52% 17 Missing ⚠️
apps/services/auth/admin-api/src/openApi.ts 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                        @@
##           feat/create-paper-delegation   #16073      +/-   ##
================================================================
- Coverage                         36.87%   36.48%   -0.39%     
================================================================
  Files                              6720     6753      +33     
  Lines                            137740   139660    +1920     
  Branches                          39151    39817     +666     
================================================================
+ Hits                              50792    50959     +167     
- Misses                            86948    88701    +1753     
Flag Coverage Δ
air-discount-scheme-backend 54.10% <ø> (+0.02%) ⬆️
air-discount-scheme-web 0.00% <ø> (ø)
api 3.39% <ø> (ø)
api-catalogue-services 77.85% <ø> (ø)
api-domains-air-discount-scheme 36.85% <ø> (-0.04%) ⬇️
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 49.89% <ø> (ø)
api-domains-communications 39.99% <ø> (-0.45%) ⬇️
api-domains-criminal-record 47.77% <ø> (-0.04%) ⬇️
api-domains-driving-license 44.32% <ø> (+0.03%) ⬆️
api-domains-education 31.32% <ø> (+0.07%) ⬆️
api-domains-health-insurance 34.58% <ø> (-0.05%) ⬇️
api-domains-mortgage-certificate 35.73% <ø> (-0.03%) ⬇️
api-domains-payment-schedule 41.14% <ø> (-0.03%) ⬇️
application-api-files 57.59% <ø> (+0.10%) ⬆️
application-core 71.62% <ø> (-0.71%) ⬇️
application-system-api 41.51% <ø> (-0.17%) ⬇️
application-template-api-modules 23.45% <ø> (-0.04%) ⬇️
application-templates-accident-notification 22.14% <ø> (-0.13%) ⬇️
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 26.63% <ø> (-0.33%) ⬇️
application-templates-driving-license 18.63% <ø> (-0.12%) ⬇️
application-templates-estate 12.34% <ø> (-0.21%) ⬇️
application-templates-example-payment 25.41% <ø> (-0.32%) ⬇️
application-templates-financial-aid 14.34% <ø> (-0.05%) ⬇️
application-templates-general-petition 23.68% <ø> (-0.28%) ⬇️
application-templates-health-insurance 26.62% <ø> (-0.26%) ⬇️
application-templates-inheritance-report 6.45% <ø> (-0.03%) ⬇️
application-templates-marriage-conditions 15.23% <ø> (-0.12%) ⬇️
application-templates-mortgage-certificate 43.96% <ø> (-0.19%) ⬇️
application-templates-parental-leave 30.15% <ø> (+0.84%) ⬆️
application-types 6.71% <ø> (-0.04%) ⬇️
application-ui-components 1.28% <ø> (-0.25%) ⬇️
application-ui-shell 21.29% <ø> (-0.46%) ⬇️
auth-admin-web 2.43% <ø> (ø)
auth-nest-tools 31.02% <ø> (+0.19%) ⬆️
auth-react 22.80% <ø> (-0.02%) ⬇️
auth-shared 75.00% <ø> (ø)
clients-charge-fjs-v2 24.11% <ø> (ø)
clients-driving-license 40.56% <ø> (-0.05%) ⬇️
clients-driving-license-book 43.85% <ø> (-0.03%) ⬇️
clients-financial-statements-inao 49.10% <ø> (-0.04%) ⬇️
clients-license-client 1.83% <ø> (ø)
clients-middlewares 72.58% <ø> (-0.17%) ⬇️
clients-regulations 42.54% <ø> (-0.05%) ⬇️
clients-rsk-company-registry 29.76% <ø> (ø)
clients-rsk-personal-tax-return 38.00% <ø> (ø)
clients-smartsolutions 12.77% <ø> (ø)
clients-syslumenn 49.75% <ø> (-0.03%) ⬇️
clients-zendesk 54.61% <ø> (ø)
cms 0.43% <ø> (+<0.01%) ⬆️
cms-translations 39.12% <ø> (-0.47%) ⬇️
content-search-index-manager 95.65% <ø> (ø)
content-search-toolkit 8.50% <ø> (ø)
contentful-apps 5.76% <ø> (-0.29%) ⬇️
dokobit-signing 62.85% <ø> (-0.09%) ⬇️
download-service 44.60% <ø> (+0.02%) ⬆️
email-service 60.65% <ø> (-0.09%) ⬇️
feature-flags 90.69% <ø> (-0.08%) ⬇️
file-storage 53.01% <ø> (-0.12%) ⬇️
financial-aid-backend 56.52% <ø> (-0.02%) ⬇️
financial-aid-shared 19.03% <ø> (ø)
icelandic-names-registry-backend 54.64% <ø> (ø)
infra-nest-server 48.95% <ø> (ø)
infra-tracing 43.24% <ø> (ø)
island-ui-core 28.57% <ø> (-0.02%) ⬇️
judicial-system-api 18.61% <ø> (-0.75%) ⬇️
judicial-system-audit-trail 68.78% <ø> (+0.16%) ⬆️
judicial-system-backend 54.71% <ø> (-1.01%) ⬇️
judicial-system-formatters 79.76% <ø> (-0.07%) ⬇️
judicial-system-message 66.86% <ø> (ø)
judicial-system-message-handler 47.71% <ø> (ø)
judicial-system-scheduler 69.06% <ø> (+0.05%) ⬆️
judicial-system-types 48.35% <ø> (+<0.01%) ⬆️
judicial-system-web 28.63% <ø> (-0.09%) ⬇️
license-api 42.50% <ø> (-0.43%) ⬇️
localization 10.15% <ø> (ø)
logging 48.43% <ø> (ø)
message-queue 68.50% <ø> (+0.78%) ⬆️
nest-audit 68.20% <ø> (ø)
nest-config 78.07% <ø> (-0.07%) ⬇️
nest-feature-flags 51.91% <ø> (-0.07%) ⬇️
nest-problem 46.48% <ø> (ø)
nest-sequelize 94.44% <ø> (ø)
nest-swagger 51.71% <ø> (ø)
nova-sms 62.18% <ø> (-0.10%) ⬇️
portals-admin-regulations-admin 1.95% <ø> (-0.02%) ⬇️
portals-core 16.17% <ø> (+0.02%) ⬆️
reference-backend 50.57% <ø> (ø)
regulations 16.78% <ø> (ø)
residence-history 85.00% <ø> (ø)
services-auth-admin-api 54.03% <20.83%> (+0.06%) ⬆️
services-auth-delegation-api 61.01% <19.04%> (-0.10%) ⬇️
services-auth-ids-api 53.81% <19.04%> (-0.10%) ⬇️
services-auth-personal-representative 47.83% <19.04%> (-0.09%) ⬇️
services-auth-personal-representative-public 43.71% <19.04%> (-0.08%) ⬇️
services-auth-public-api 51.59% <19.04%> (-0.12%) ⬇️
services-documents 61.26% <ø> (ø)
services-endorsements-api 55.10% <ø> (+0.11%) ⬆️
services-sessions 65.80% <ø> (ø)
services-university-gateway 48.48% <ø> (+0.04%) ⬆️
services-user-notification 47.13% <ø> (-0.49%) ⬇️
services-user-profile 62.28% <ø> (+0.02%) ⬆️
shared-components 27.68% <ø> (+0.03%) ⬆️
shared-form-fields 31.61% <ø> (+0.03%) ⬆️
shared-mocking 64.62% <ø> (ø)
shared-pii 92.85% <ø> (ø)
shared-problem 87.50% <ø> (ø)
shared-utils 28.91% <ø> (-0.36%) ⬇️
skilavottord-ws 24.34% <ø> (ø)
web 1.85% <ø> (ø)

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

Files with missing lines Coverage Δ
...in-api/src/app/v2/clients/me-clients.controller.ts 95.34% <100.00%> (ø)
...h-api-lib/src/lib/delegations/constants/zendesk.ts 100.00% <100.00%> (ø)
libs/clients/zendesk/src/lib/zendesk.service.ts 70.00% <ø> (ø)
apps/services/auth/admin-api/src/openApi.ts 0.00% <0.00%> (ø)
...legations/admin/delegation-admin-custom.service.ts 55.88% <10.52%> (-8.41%) ⬇️

... and 193 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6518722...ca2b33e. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Sep 19, 2024

Datadog Report

All test runs 1fce513 🔗

101 Total Test Services: 0 Failed, 99 Passed
🔻 Test Sessions change in coverage: 6 decreased, 3 increased, 191 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 81 0 31.64s N/A Link
air-discount-scheme-web 0 0 0 2 0 8.5s N/A Link
api 0 0 0 4 0 3.17s N/A Link
api-catalogue-services 0 0 0 23 0 12.69s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 20.27s N/A Link
api-domains-assets 0 0 0 3 0 13.11s N/A Link
api-domains-auth-admin 0 0 0 18 0 14.6s N/A Link
api-domains-communications 0 0 0 5 0 34.82s N/A Link
api-domains-criminal-record 0 0 0 5 0 11s N/A Link
api-domains-driving-license 0 0 0 23 0 30.01s N/A Link

🔻 Code Coverage Decreases vs Default Branch (6)

This report shows up to 5 code coverage decreases.

  • services-auth-delegation-api - jest 59.83% (-0.19%) - Details
  • services-auth-public-api - jest 52.49% (-0.11%) - Details
  • services-auth-personal-representative-public - jest 45.8% (-0.11%) - Details
  • services-auth-personal-representative - jest 50% (-0.08%) - Details
  • services-auth-ids-api - jest 49.81% (-0.06%) - Details

GunnlaugurG
GunnlaugurG approved these changes Sep 19, 2024
Copy link
Member

@GunnlaugurG GunnlaugurG left a comment

Choose a reason for hiding this comment

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

@magnearun magnearun marked this pull request as ready for review September 20, 2024 10:11
@magnearun magnearun requested review from a team as code owners September 20, 2024 10:11
@magnearun magnearun added the automerge Merge this PR as soon as all checks pass label Sep 20, 2024
@GunnlaugurG GunnlaugurG merged commit 7796b06 into feat/create-paper-delegation Sep 20, 2024
268 checks passed
@GunnlaugurG GunnlaugurG deleted the feat/delete-delegation-ui branch September 20, 2024 12:26
kodiakhq bot added a commit that referenced this pull request Sep 25, 2024
* created new admin module for paper delegations and get route

* field resolver DelegationAdminModel

* lookup for delegations with detailed view

* Cleanup and rest and graphql for DeleteDelegation

* small cleanup

* chore: nx format:write update dirty files

* move delegationAdmin service to admin-api from delegation-api

* adds getTicket function to Zendesk service

Fetches Zendesk ticket by id

* Adds create delegation route

Form for creating delegation, wip form action

* chore: nx format:write update dirty files

* fix config value

* chore: charts update dirty files

* fix api build issues

* wip gql for create delegation

* fix pr comments

* delegation reference id added

* added back the spec files

* validate form data and show error messages

* fix get tests

* chore: nx format:write update dirty files

* test for delete

* post method to create delegation between two national id's

* zendesk integration complete

* remove console log

* merged with main

* chore: charts update dirty files

* chore: nx format:write update dirty files

* adds CreateDelegationConfirm modal and prefills Create form with values from search params

* chore: nx format:write update dirty files

* use identity resolver

fixes in response to comments

* chore: nx format:write update dirty files

* created delegation-delegation-type.model.ts and updated findAllScopesTo in delegation-scope.service.ts

* fix broken tests

* tests for findAllScopesTo

* added validTo to delegationDelegationType

* set general mandate as type in ids select account prompt

* Get general mandate to delegations-to on service-portal

* remove duplicate case

* small refactor

* chore: nx format:write update dirty files

* Mask nationalId in url

* format national id

* fix tests after merge with main

* chore: nx format:write update dirty files

* fix duplicate referenceId's

* fix import

* remove console log and unused variables

* chore: nx format:write update dirty files

* move general mandate tests to new file

* add zendesk validation

* feat(auth-admin): Delete delegation UI (#16073)

* Changes includeArchived from Param to Query

Fixes openapi.yaml error

* adds Oauth2 to openApi document builder

* validates Zendesk ticket when creating delegation

* Adds delete button to delegation access card and call delete mutation

* chore: nx format:write update dirty files

* add referenceId to delegation query

---------

Co-authored-by: andes-it <builders@andes.is>

* feat(auth-admin): Create paper delegation zendesk integration (#16074)

* Changes includeArchived from Param to Query

Fixes openapi.yaml error

* adds Oauth2 to openApi document builder

* validates Zendesk ticket when creating delegation

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>

* connect changes and modify incoming delegations for new ddt table

* fix comments from PR

* fix pr comment

* chore: nx format:write update dirty files

* chore: nx format:write update dirty files

* fix pr comment

* add tests for create

* fix pr comments

* simplify var names

* chore: nx format:write update dirty files

* add index for general mandate

* fix pr comments

* fix pr comments

---------

Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: Magnea Rún Vignisdóttir <magneavignisdottir@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
thoreyjona pushed a commit that referenced this pull request Oct 2, 2024
* created new admin module for paper delegations and get route

* field resolver DelegationAdminModel

* lookup for delegations with detailed view

* Cleanup and rest and graphql for DeleteDelegation

* small cleanup

* chore: nx format:write update dirty files

* move delegationAdmin service to admin-api from delegation-api

* adds getTicket function to Zendesk service

Fetches Zendesk ticket by id

* Adds create delegation route

Form for creating delegation, wip form action

* chore: nx format:write update dirty files

* fix config value

* chore: charts update dirty files

* fix api build issues

* wip gql for create delegation

* fix pr comments

* delegation reference id added

* added back the spec files

* validate form data and show error messages

* fix get tests

* chore: nx format:write update dirty files

* test for delete

* post method to create delegation between two national id's

* zendesk integration complete

* remove console log

* merged with main

* chore: charts update dirty files

* chore: nx format:write update dirty files

* adds CreateDelegationConfirm modal and prefills Create form with values from search params

* chore: nx format:write update dirty files

* use identity resolver

fixes in response to comments

* chore: nx format:write update dirty files

* created delegation-delegation-type.model.ts and updated findAllScopesTo in delegation-scope.service.ts

* fix broken tests

* tests for findAllScopesTo

* added validTo to delegationDelegationType

* set general mandate as type in ids select account prompt

* Get general mandate to delegations-to on service-portal

* remove duplicate case

* small refactor

* chore: nx format:write update dirty files

* Mask nationalId in url

* format national id

* fix tests after merge with main

* chore: nx format:write update dirty files

* fix duplicate referenceId's

* fix import

* remove console log and unused variables

* chore: nx format:write update dirty files

* move general mandate tests to new file

* add zendesk validation

* feat(auth-admin): Delete delegation UI (#16073)

* Changes includeArchived from Param to Query

Fixes openapi.yaml error

* adds Oauth2 to openApi document builder

* validates Zendesk ticket when creating delegation

* Adds delete button to delegation access card and call delete mutation

* chore: nx format:write update dirty files

* add referenceId to delegation query

---------

Co-authored-by: andes-it <builders@andes.is>

* feat(auth-admin): Create paper delegation zendesk integration (#16074)

* Changes includeArchived from Param to Query

Fixes openapi.yaml error

* adds Oauth2 to openApi document builder

* validates Zendesk ticket when creating delegation

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <builders@andes.is>

* connect changes and modify incoming delegations for new ddt table

* fix comments from PR

* fix pr comment

* chore: nx format:write update dirty files

* chore: nx format:write update dirty files

* fix pr comment

* add tests for create

* fix pr comments

* simplify var names

* chore: nx format:write update dirty files

* add index for general mandate

* fix pr comments

* fix pr comments

---------

Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: Magnea Rún Vignisdóttir <magneavignisdottir@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants