Skip to content
Snippets Groups Projects
Commit dea0a38d authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #11158 TIME 0:40 fix format in edit attachment

parent 670b3c2e
No related branches found
No related tags found
No related merge requests found
......@@ -196,7 +196,7 @@
</ng-template>
<app-document-viewer #appAttachmentViewer style="height:100%;width:100%;" [editMode]="editMode"
[resId]="data.resId" [resIdMaster]="attachment['resIdMaster'].value" [mode]="'attachment'"
[attachType]="attachment['type'].value" [infoPanel]="snavLeft"
[format]="attachment['format'].value" [attachType]="attachment['type'].value" [infoPanel]="snavLeft"
(triggerEvent)="setDatasViewer($event)"
[title]="attachment.chrono.value + ' - ' + attachment.title.value">
</app-document-viewer>
......@@ -205,7 +205,7 @@
*ngFor="let version of versions">
<ng-template matTabContent>
<app-document-viewer #appDocumentViewer style="height:100%;width:100%;" [editMode]="false"
[resId]="version.resId" [mode]="'attachment'"
[resId]="version.resId" [mode]="'attachment'" [format]="attachment['format'].value"
[title]="attachment.chrono.value + ' - ' + attachment.title.value + ' (' + version.relation + ')'">
</app-document-viewer>
</ng-template>
......
......@@ -98,7 +98,7 @@ export class AttachmentPageComponent implements OnInit {
validationDate: new FormControl({ value: data.validationDate !== null ? new Date(data.validationDate) : null, disabled: !this.editMode }),
signedResponse: new FormControl({ value: data.signedResponse, disabled: false }),
encodedFile: new FormControl({ value: '_CURRENT_FILE', disabled: !this.editMode }, [Validators.required]),
format: new FormControl({ value: '', disabled: true }, [Validators.required])
format: new FormControl({ value: data.format, disabled: true }, [Validators.required])
};
this.versions = data.versions;
......
......@@ -67,6 +67,7 @@ export class DocumentViewerComponent implements OnInit {
@Input('title') title: string = '';
@Input('mode') mode: string = 'mainDocument';
@Input('attachType') attachType: string = null;
@Input('format') format: string = null;
@Output('triggerEvent') triggerEvent = new EventEmitter<string>();
......@@ -605,7 +606,7 @@ export class DocumentViewerComponent implements OnInit {
this.http.post('../../rest/jnlp', this.editor.options).pipe(
tap((data: any) => {
window.location.href = '../../rest/jnlp/' + data.generatedJnlp;
this.checkLockFile(data.jnlpUniqueId, 'odt');
this.checkLockFile(data.jnlpUniqueId, this.format);
})
).subscribe();
}
......
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