Skip to content
Snippets Groups Projects
Verified Commit ce56d176 authored by Damien's avatar Damien
Browse files

[REFACTORING] document ts

parent 1763802d
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ import { SuccessInfoValidBottomSheetComponent } from '../modal/success-info-vali ...@@ -16,6 +16,7 @@ import { SuccessInfoValidBottomSheetComponent } from '../modal/success-info-vali
import { SimplePdfViewerComponent } from 'simple-pdf-viewer'; import { SimplePdfViewerComponent } from 'simple-pdf-viewer';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
declare var PDFJS : any;
@Component({ @Component({
selector: 'app-document', selector: 'app-document',
...@@ -128,11 +129,7 @@ export class DocumentComponent implements OnInit { ...@@ -128,11 +129,7 @@ export class DocumentComponent implements OnInit {
.subscribe((dataActionsList: any) => { .subscribe((dataActionsList: any) => {
this.actionsList = dataActionsList.actions; this.actionsList = dataActionsList.actions;
this.actionsList.forEach((element: any) => { this.actionsList.forEach((element: any) => {
if (this.mainDocument.actionsAllowed.indexOf(element.id) > -1) { element.allowed = (this.mainDocument.actionsAllowed.indexOf(element.id) > -1);
element.allowed = true;
} else {
element.allowed = false;
}
}); });
}); });
} }
...@@ -196,7 +193,6 @@ export class DocumentComponent implements OnInit { ...@@ -196,7 +193,6 @@ export class DocumentComponent implements OnInit {
} }
pdfRendered() { pdfRendered() {
console.log('pdf rendered');
this.pdfViewer.setZoom(this.signaturesService.scale); this.pdfViewer.setZoom(this.signaturesService.scale);
this.signaturesService.workingAreaHeight = $('.page').height(); this.signaturesService.workingAreaHeight = $('.page').height();
this.signaturesService.workingAreaWidth = $('.page').width(); this.signaturesService.workingAreaWidth = $('.page').width();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment