+
+
+
+
+
+
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
index 349e213aa..d9e74f881 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.spec.ts
@@ -1330,4 +1330,13 @@ describe('DocumentDetailComponent', () => {
expect(createSpy).toHaveBeenCalledWith('a')
expect(urlRevokeSpy).toHaveBeenCalled()
})
+
+ it('should support open share links and email modals', () => {
+ const modalSpy = jest.spyOn(modalService, 'open')
+ initNormally()
+ component.openShareLinks()
+ expect(modalSpy).toHaveBeenCalled()
+ component.openEmailDocument()
+ expect(modalSpy).toHaveBeenCalled()
+ })
})
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index 8a0b9a45c..ae09ed359 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -88,7 +88,7 @@ import { CorrespondentEditDialogComponent } from '../common/edit-dialog/correspo
import { DocumentTypeEditDialogComponent } from '../common/edit-dialog/document-type-edit-dialog/document-type-edit-dialog.component'
import { EditDialogMode } from '../common/edit-dialog/edit-dialog.component'
import { StoragePathEditDialogComponent } from '../common/edit-dialog/storage-path-edit-dialog/storage-path-edit-dialog.component'
-import { EmailDocumentDropdownComponent } from '../common/email-document-dropdown/email-document-dropdown.component'
+import { EmailDocumentDialogComponent } from '../common/email-document-dialog/email-document-dialog.component'
import { CheckComponent } from '../common/input/check/check.component'
import { DateComponent } from '../common/input/date/date.component'
import { DocumentLinkComponent } from '../common/input/document-link/document-link.component'
@@ -100,7 +100,7 @@ import { TagsComponent } from '../common/input/tags/tags.component'
import { TextComponent } from '../common/input/text/text.component'
import { UrlComponent } from '../common/input/url/url.component'
import { PageHeaderComponent } from '../common/page-header/page-header.component'
-import { ShareLinksDropdownComponent } from '../common/share-links-dropdown/share-links-dropdown.component'
+import { ShareLinksDialogComponent } from '../common/share-links-dialog/share-links-dialog.component'
import { DocumentHistoryComponent } from '../document-history/document-history.component'
import { DocumentNotesComponent } from '../document-notes/document-notes.component'
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
@@ -146,8 +146,6 @@ export enum ZoomSetting {
CustomFieldsDropdownComponent,
DocumentNotesComponent,
DocumentHistoryComponent,
- ShareLinksDropdownComponent,
- EmailDocumentDropdownComponent,
CheckComponent,
DateComponent,
DocumentLinkComponent,
@@ -1428,6 +1426,22 @@ export class DocumentDetailComponent
})
}
+ public openShareLinks() {
+ const modal = this.modalService.open(ShareLinksDialogComponent)
+ modal.componentInstance.documentId = this.document.id
+ modal.componentInstance.hasArchiveVersion =
+ !!this.document?.archived_file_name
+ }
+
+ public openEmailDocument() {
+ const modal = this.modalService.open(EmailDocumentDialogComponent, {
+ backdrop: 'static',
+ })
+ modal.componentInstance.documentId = this.document.id
+ modal.componentInstance.hasArchiveVersion =
+ !!this.document?.archived_file_name
+ }
+
private tryRenderTiff() {
this.http.get(this.previewUrl, { responseType: 'arraybuffer' }).subscribe({
next: (res) => {
diff --git a/src-ui/src/main.ts b/src-ui/src/main.ts
index a9d446891..dd31a6b1e 100644
--- a/src-ui/src/main.ts
+++ b/src-ui/src/main.ts
@@ -112,6 +112,7 @@ import {
questionCircle,
scissors,
search,
+ send,
slashCircle,
sliders2Vertical,
sortAlphaDown,
@@ -316,6 +317,7 @@ const icons = {
questionCircle,
scissors,
search,
+ send,
slashCircle,
sliders2Vertical,
sortAlphaDown,