2018-07-05 20:40:53 +02:00
|
|
|
import { Component } from '@angular/core';
|
|
|
|
import { ActivatedRoute } from '@angular/router';
|
|
|
|
|
2021-06-07 20:13:58 +02:00
|
|
|
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
|
|
|
|
import { EventService } from 'jslib-common/abstractions/event.service';
|
|
|
|
import { ExportService } from 'jslib-common/abstractions/export.service';
|
|
|
|
import { I18nService } from 'jslib-common/abstractions/i18n.service';
|
2021-10-20 18:30:04 +02:00
|
|
|
import { LogService } from 'jslib-common/abstractions/log.service';
|
2021-06-07 20:13:58 +02:00
|
|
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
2021-09-15 21:05:02 +02:00
|
|
|
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
2018-07-05 20:40:53 +02:00
|
|
|
|
|
|
|
import { ExportComponent as BaseExportComponent } from '../../tools/export.component';
|
2019-08-09 17:14:46 +02:00
|
|
|
|
2018-07-05 20:40:53 +02:00
|
|
|
@Component({
|
|
|
|
selector: 'app-org-export',
|
|
|
|
templateUrl: '../../tools/export.component.html',
|
|
|
|
})
|
|
|
|
export class ExportComponent extends BaseExportComponent {
|
2018-10-03 16:33:04 +02:00
|
|
|
constructor(cryptoService: CryptoService, i18nService: I18nService,
|
2018-08-14 21:14:04 +02:00
|
|
|
platformUtilsService: PlatformUtilsService, exportService: ExportService,
|
2021-10-20 18:30:04 +02:00
|
|
|
eventService: EventService, private route: ActivatedRoute, policyService: PolicyService,
|
|
|
|
logService: LogService) {
|
|
|
|
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService,
|
|
|
|
logService);
|
2018-07-05 20:40:53 +02:00
|
|
|
}
|
|
|
|
|
2021-09-15 21:05:02 +02:00
|
|
|
async ngOnInit() {
|
|
|
|
await super.ngOnInit();
|
2021-02-03 18:41:33 +01:00
|
|
|
this.route.parent.parent.params.subscribe(async params => {
|
2018-07-05 20:40:53 +02:00
|
|
|
this.organizationId = params.organizationId;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-09-15 21:05:02 +02:00
|
|
|
async checkExportDisabled() {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-07-05 20:40:53 +02:00
|
|
|
getExportData() {
|
2018-12-17 16:54:18 +01:00
|
|
|
return this.exportService.getOrganizationExport(this.organizationId, this.format);
|
2018-07-05 20:40:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
getFileName() {
|
|
|
|
return super.getFileName('org');
|
|
|
|
}
|
2019-07-12 23:11:50 +02:00
|
|
|
|
|
|
|
async collectEvent(): Promise<any> {
|
|
|
|
// TODO
|
|
|
|
// await this.eventService.collect(EventType.Organization_ClientExportedVault);
|
|
|
|
}
|
2018-07-05 20:40:53 +02:00
|
|
|
}
|