Merge branch 'VM/DM-538' into 'master'
DM-538 - Components download should return result with includeDetails set to false Closes DM-538 See merge request redactmanager/red-ui!165
This commit is contained in:
commit
884acd3741
@ -11,11 +11,16 @@ import { mapEach } from '@common-ui/utils';
|
||||
export class ComponentLogService extends GenericService<void> {
|
||||
protected readonly _defaultModelPath = '';
|
||||
|
||||
#componentLogRequest(dossierTemplateId: string, dossierId: string, fileId: string): Observable<IComponentLogData> {
|
||||
#componentLogRequest(
|
||||
dossierTemplateId: string,
|
||||
dossierId: string,
|
||||
fileId: string,
|
||||
includeDetails = true,
|
||||
): Observable<IComponentLogData> {
|
||||
return this._http.get<IComponentLogData>(
|
||||
`/api/dossier-templates/${dossierTemplateId}/dossiers/${dossierId}/files/${fileId}/components`,
|
||||
{
|
||||
params: { includeDetails: true },
|
||||
params: { includeDetails },
|
||||
},
|
||||
);
|
||||
}
|
||||
@ -38,7 +43,7 @@ export class ComponentLogService extends GenericService<void> {
|
||||
}
|
||||
|
||||
exportJSON(dossierTemplateId: string, dossierId: string, fileId: string, name: string): Observable<IComponentLogData> {
|
||||
return this.#componentLogRequest(dossierTemplateId, dossierId, fileId).pipe(
|
||||
return this.#componentLogRequest(dossierTemplateId, dossierId, fileId, false).pipe(
|
||||
tap(data => {
|
||||
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
||||
saveAs(blob, name + '.component_log.json');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user