import { Component } from '@angular/core'; import { PolicyService } from '@core/services/policy.service'; import { UserService } from '@features/users/user.service'; import { CardItem } from '@yourcause/common'; @Component({ selector: 'gc-reporting-page', templateUrl: './reporting-page.component.html', styleUrls: ['./reporting-page.component.scss'] }) export class ReportingPageComponent { switchBoardItems: CardItem[] = []; topItems = [{ title: 'Ad Hoc and Data Feeds', description: 'Customize, share, send, and schedule custom reports', i18nTitleKey: 'GLOBAL:textAdHocAndDataFeeds', i18nDescriptionKey: 'GLOBAL:textAdHocDescSchedule', href: '/management/reporting/ad-hoc-data-feeds/ad-hoc', icon: 'table', disabled: !this.policyService.dataExport.canManageAdHoc() && !this.userService.get('user').hasReports }, { title: 'Data Hub', description: 'Export system data', i18nTitleKey: 'GLOBAL:textDataHub', i18nDescriptionKey: 'GLOBAL:textDataHubDesc', href: '/management/reporting/data-hub', icon: 'file-spreadsheet', disabled: !this.policyService.dataExport.canPullApplicationDetails() && !this.policyService.dataExport.canPullAwardExport() && !this.policyService.dataExport.canPullBudgetExport() && !this.policyService.dataExport.canPullFormExport() && !this.policyService.dataExport.canPullPaymentExport() && !this.policyService.dataExport.canPullProgramSummaryExport() }]; constructor ( private policyService: PolicyService, private userService: UserService ) { } }