Skip to content

Remove option to convert incoming document to attachment #1036

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

eriksson-daniel
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings May 20, 2025 12:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the option to convert incoming documents to attachments by eliminating associated logic. Key changes include:

  • Removing drag‐and‐drop conversion logic for incoming documents in use-can-drop-on-document.ts.
  • Updating the SetParentDocument component by removing the parentDocument prop and isIncomingDocument logic.
  • Adjusting DocumentModalContent to pass the updated prop structure to SetParentDocument.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
frontend/src/hooks/use-can-document/use-can-drop-on-document.ts Removed conversion logic for incoming documents in drag/drop functionality.
frontend/src/components/documents/new-documents/modal/set-parent.tsx Eliminated unused parentDocument prop and cleaned up isIncomingDocument references in SetParentDocument.
frontend/src/components/documents/new-documents/modal/modal-content.tsx Updated SetParentDocument prop usage in accordance with component changes.
Comments suppressed due to low confidence (1)

frontend/src/hooks/use-can-document/use-can-drop-on-document.ts:63

  • Add test cases to validate the updated drag-and-drop behavior now that the conversion logic for incoming documents has been removed.
if (isTildeltSaksbehandler || hasOppgavestyringRole || (isFullfoert && hasSaksbehandlerRole)) {

@eriksson-daniel eriksson-daniel changed the title Remove option to convert incoming document to attachmentIsIncom Remove option to convert incoming document to attachment May 20, 2025
@eriksson-daniel eriksson-daniel force-pushed the dua-vedlegg branch 8 times, most recently from 06b327e to df9aa29 Compare May 20, 2025 14:08
@eriksson-daniel eriksson-daniel merged commit e48a943 into main May 20, 2025
5 checks passed
@eriksson-daniel eriksson-daniel deleted the dua-vedlegg branch May 20, 2025 14:13
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.

2 participants