import { Component } from '@angular/core'; import { SpinnerService } from '@core/services/spinner.service'; import { UserExportService } from '@features/users/user-export.service'; import { Tab, TableDataDownloadFormat } from '@yourcause/common'; import { GrantManagerService } from '../grant-manager.service'; @Component({ selector: 'gc-grant-managers-wrapper', templateUrl: './grant-managers-wrapper.component.html', styleUrls: ['./grant-managers-wrapper.component.scss'] }) export class GrantManagersWrapperComponent { TableDataDownloadFormat = TableDataDownloadFormat; constructor ( private spinnerService: SpinnerService, private userExportService: UserExportService, private grantManagerService: GrantManagerService ) { } tabs: Tab[] = [{ link: '/platform/client-management/grant-managers/managers', labelKey: 'common:hdrGrantManagers', label: 'Grant Managers' }, { link: '/platform/client-management/grant-managers/impersonation-history', labelKey: 'ADMIN:hdrImpersonationHistory', label: 'Impersonation History' }]; async exportGrantManagersAdminPortal (format: TableDataDownloadFormat) { this.spinnerService.startSpinner(); await this.userExportService.exportGrantManagersAdminPortal(this.grantManagerService.grantManagerPaginationOptions, format); this.spinnerService.stopSpinner(); } }