DM-536 - Extraction output bulk download for dossiers

This commit is contained in:
Valentin Mihai 2023-11-10 20:09:15 +02:00
parent d11700f8c4
commit e44a7a3ec4
4 changed files with 12 additions and 7 deletions

View File

@ -11,17 +11,18 @@
[attr.help-mode-key]="'editor_scm'"
[icon]="'red:extract'"
[tooltip]="
((this.entitiesService.allLength$ | async) === 0 ? 'component-download.disabled-tooltip' : 'component-download.tooltip')
((downloadComponentLogsDisabled$ | async) ? 'component-download.disabled-tooltip' : 'component-download.tooltip')
| translate
"
[matMenuTriggerFor]="bulkComponentDownloadMenu"
[disabled]="(this.entitiesService.allLength$ | async) === 0"
[disabled]="downloadComponentLogsDisabled$ | async"
[dropdownButton]="true"
></iqser-circle-button>
<redaction-file-download-btn
[attr.help-mode-key]="'download_dossier_in_dossier'"
[buttonId]="'download-files-btn'"
[disabled]="downloadBtnDisabled$ | async"
[disabled]="downloadFilesDisabled$ | async"
[dossier]="dossier"
[files]="entitiesService.all$ | async"
></redaction-file-download-btn>

View File

@ -26,7 +26,8 @@ export class DossierOverviewScreenHeaderComponent implements OnInit {
readonly circleButtonTypes = CircleButtonTypes;
readonly roles = Roles;
actionConfigs: List<ActionConfig>;
readonly downloadBtnDisabled$: Observable<boolean>;
readonly downloadFilesDisabled$: Observable<boolean>;
readonly downloadComponentLogsDisabled$: Observable<boolean>;
readonly isDocumine = getConfig().IS_DOCUMINE;
constructor(
@ -45,9 +46,12 @@ export class DossierOverviewScreenHeaderComponent implements OnInit {
private readonly _componentLogService: ComponentLogService,
) {
const someNotProcessed$ = this.entitiesService.all$.pipe(some(file => !file.lastProcessed));
this.downloadBtnDisabled$ = combineLatest([this.listingService.areSomeSelected$, someNotProcessed$]).pipe(
this.downloadFilesDisabled$ = combineLatest([this.listingService.areSomeSelected$, someNotProcessed$]).pipe(
map(([someSelected, someNotProcessed]) => someSelected || someNotProcessed),
);
this.downloadComponentLogsDisabled$ = combineLatest([this.entitiesService.allLength$, someNotProcessed$]).pipe(
map(([length, someNotProcessed]) => !length || someNotProcessed),
);
}
ngOnInit() {

View File

@ -494,7 +494,7 @@
}
},
"component-download": {
"disabled-tooltip": "You need to upload at least one file to be able to export the components as JSON or XML",
"disabled-tooltip": "All files must be processed to be able to export the components as JSON or XML",
"json": "Download as JSON",
"tooltip": "Component Download",
"xml": "Download as XML"

@ -1 +1 @@
Subproject commit 052bf3a5d76fa5bb1697a01a532af553c96922b1
Subproject commit 63df71a6aa5a4e3984c2b7807750098b5fe74e87