DM-536 - Extraction output bulk download for dossiers
This commit is contained in:
parent
d11700f8c4
commit
e44a7a3ec4
@ -11,17 +11,18 @@
|
|||||||
[attr.help-mode-key]="'editor_scm'"
|
[attr.help-mode-key]="'editor_scm'"
|
||||||
[icon]="'red:extract'"
|
[icon]="'red:extract'"
|
||||||
[tooltip]="
|
[tooltip]="
|
||||||
((this.entitiesService.allLength$ | async) === 0 ? 'component-download.disabled-tooltip' : 'component-download.tooltip')
|
((downloadComponentLogsDisabled$ | async) ? 'component-download.disabled-tooltip' : 'component-download.tooltip')
|
||||||
| translate
|
| translate
|
||||||
"
|
"
|
||||||
[matMenuTriggerFor]="bulkComponentDownloadMenu"
|
[matMenuTriggerFor]="bulkComponentDownloadMenu"
|
||||||
[disabled]="(this.entitiesService.allLength$ | async) === 0"
|
[disabled]="downloadComponentLogsDisabled$ | async"
|
||||||
|
[dropdownButton]="true"
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
|
|
||||||
<redaction-file-download-btn
|
<redaction-file-download-btn
|
||||||
[attr.help-mode-key]="'download_dossier_in_dossier'"
|
[attr.help-mode-key]="'download_dossier_in_dossier'"
|
||||||
[buttonId]="'download-files-btn'"
|
[buttonId]="'download-files-btn'"
|
||||||
[disabled]="downloadBtnDisabled$ | async"
|
[disabled]="downloadFilesDisabled$ | async"
|
||||||
[dossier]="dossier"
|
[dossier]="dossier"
|
||||||
[files]="entitiesService.all$ | async"
|
[files]="entitiesService.all$ | async"
|
||||||
></redaction-file-download-btn>
|
></redaction-file-download-btn>
|
||||||
|
|||||||
@ -26,7 +26,8 @@ export class DossierOverviewScreenHeaderComponent implements OnInit {
|
|||||||
readonly circleButtonTypes = CircleButtonTypes;
|
readonly circleButtonTypes = CircleButtonTypes;
|
||||||
readonly roles = Roles;
|
readonly roles = Roles;
|
||||||
actionConfigs: List<ActionConfig>;
|
actionConfigs: List<ActionConfig>;
|
||||||
readonly downloadBtnDisabled$: Observable<boolean>;
|
readonly downloadFilesDisabled$: Observable<boolean>;
|
||||||
|
readonly downloadComponentLogsDisabled$: Observable<boolean>;
|
||||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@ -45,9 +46,12 @@ export class DossierOverviewScreenHeaderComponent implements OnInit {
|
|||||||
private readonly _componentLogService: ComponentLogService,
|
private readonly _componentLogService: ComponentLogService,
|
||||||
) {
|
) {
|
||||||
const someNotProcessed$ = this.entitiesService.all$.pipe(some(file => !file.lastProcessed));
|
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),
|
map(([someSelected, someNotProcessed]) => someSelected || someNotProcessed),
|
||||||
);
|
);
|
||||||
|
this.downloadComponentLogsDisabled$ = combineLatest([this.entitiesService.allLength$, someNotProcessed$]).pipe(
|
||||||
|
map(([length, someNotProcessed]) => !length || someNotProcessed),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|||||||
@ -494,7 +494,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component-download": {
|
"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",
|
"json": "Download as JSON",
|
||||||
"tooltip": "Component Download",
|
"tooltip": "Component Download",
|
||||||
"xml": "Download as XML"
|
"xml": "Download as XML"
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit 052bf3a5d76fa5bb1697a01a532af553c96922b1
|
Subproject commit 63df71a6aa5a4e3984c2b7807750098b5fe74e87
|
||||||
Loading…
x
Reference in New Issue
Block a user