From fd60b2aa6f9d117c9b0513c711b864673ef4ff3b Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sat, 13 Jan 2024 13:34:18 -0800
Subject: [PATCH] Fix merge conflicts
---
src-ui/messages.xlf | 44 +++++++++----------
.../document-detail.component.spec.ts | 7 +--
.../document-detail.component.ts | 10 ++---
3 files changed, 29 insertions(+), 32 deletions(-)
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index b52e9d69e..b04f86ebc 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -1931,7 +1931,7 @@
src/app/components/document-detail/document-detail.component.ts
- 720
+ 716
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -1970,7 +1970,7 @@
src/app/components/document-detail/document-detail.component.ts
- 722
+ 718
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -4794,71 +4794,71 @@
Document changes detected
src/app/components/document-detail/document-detail.component.ts
- 309
+ 307
The version of this document in your browser session appears older than the existing version.
src/app/components/document-detail/document-detail.component.ts
- 310
+ 308
Saving the document here may overwrite other changes that were made. To restore the existing version, discard your changes or close the document.
src/app/components/document-detail/document-detail.component.ts
- 311
+ 309
Ok
src/app/components/document-detail/document-detail.component.ts
- 312
+ 311
Error retrieving metadata
src/app/components/document-detail/document-detail.component.ts
- 452
+ 448
Error retrieving suggestions.
src/app/components/document-detail/document-detail.component.ts
- 477
+ 473
Document saved successfully.
src/app/components/document-detail/document-detail.component.ts
- 595
+ 591
src/app/components/document-detail/document-detail.component.ts
- 604
+ 600
Error saving document
src/app/components/document-detail/document-detail.component.ts
- 608
+ 604
src/app/components/document-detail/document-detail.component.ts
- 649
+ 645
Confirm delete
src/app/components/document-detail/document-detail.component.ts
- 675
+ 671
src/app/components/manage/management-list/management-list.component.ts
@@ -4869,35 +4869,35 @@
Do you really want to delete document ""?
src/app/components/document-detail/document-detail.component.ts
- 676
+ 672
The files for this document will be deleted permanently. This operation cannot be undone.
src/app/components/document-detail/document-detail.component.ts
- 677
+ 673
Delete document
src/app/components/document-detail/document-detail.component.ts
- 679
+ 675
Error deleting document
src/app/components/document-detail/document-detail.component.ts
- 698
+ 694
Redo OCR confirm
src/app/components/document-detail/document-detail.component.ts
- 718
+ 714
src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -4908,28 +4908,28 @@
This operation will permanently redo OCR for this document.
src/app/components/document-detail/document-detail.component.ts
- 719
+ 715
Redo OCR operation will begin in the background. Close and re-open or reload this document after the operation has completed to see new content.
src/app/components/document-detail/document-detail.component.ts
- 730
+ 726
Error executing operation
src/app/components/document-detail/document-detail.component.ts
- 741
+ 737
Page Fit
src/app/components/document-detail/document-detail.component.ts
- 810
+ 806
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 f9d25c1e3..51a77fb91 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
@@ -972,6 +972,9 @@ describe('DocumentDetailComponent', () => {
const openDoc = Object.assign({}, doc)
// simulate a document being modified elsewhere and db updated
doc.modified = new Date()
+ jest
+ .spyOn(activatedRoute, 'paramMap', 'get')
+ .mockReturnValue(of(convertToParamMap({ id: 3, section: 'details' })))
jest.spyOn(documentService, 'get').mockReturnValueOnce(of(doc))
jest.spyOn(openDocumentsService, 'getOpenDocument').mockReturnValue(openDoc)
jest.spyOn(customFieldsService, 'listAll').mockReturnValue(
@@ -982,9 +985,7 @@ describe('DocumentDetailComponent', () => {
})
)
fixture.detectChanges() // calls ngOnInit
- expect(modalSpy).toHaveBeenCalledWith(ConfirmDialogComponent, {
- backdrop: 'static',
- })
+ expect(modalSpy).toHaveBeenCalledWith(ConfirmDialogComponent)
})
function initNormally() {
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 ac0dc2dc9..16eb9599c 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
@@ -303,15 +303,12 @@ export class DocumentDetailComponent
new Date(doc.modified) > new Date(openDocument.modified) &&
!this.modalService.hasOpenModals()
) {
- let modal = this.modalService.open(ConfirmDialogComponent, {
- backdrop: 'static',
- })
+ let modal = this.modalService.open(ConfirmDialogComponent)
modal.componentInstance.title = $localize`Document changes detected`
modal.componentInstance.messageBold = $localize`The version of this document in your browser session appears older than the existing version.`
modal.componentInstance.message = $localize`Saving the document here may overwrite other changes that were made. To restore the existing version, discard your changes or close the document.`
- modal.componentInstance.cancelBtnCaption = $localize`Ok`
- modal.componentInstance.cancelBtnClass = 'btn-primary'
- modal.componentInstance.btnClass = 'visually-hidden'
+ modal.componentInstance.cancelBtnClass = 'visually-hidden'
+ modal.componentInstance.btnCaption = $localize`Ok`
}
if (this.documentForm.dirty) {
@@ -433,7 +430,6 @@ export class DocumentDetailComponent
updateComponent(doc: Document) {
this.document = doc
this.requiresPassword = false
- // this.customFields = doc.custom_fields.concat([])
this.updateFormForCustomFields()
this.documentsService
.getMetadata(doc.id)