Skip to content

Commit

Permalink
Merge pull request #1760 from RubenGeo/feature-export-available
Browse files Browse the repository at this point in the history
AB#5669 Make export list available in all phases
  • Loading branch information
RubenGeo authored Jan 19, 2021
2 parents 8b52caa + 93ca688 commit 59a0aa7
Showing 1 changed file with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,9 @@ export class ExportListComponent implements OnChanges {

public btnEnabled() {
const activePhase = this.programPhaseService.getActivePhase();

return (
this.exportType === ExportType.allPeopleAffected ||
((activePhase.name === ProgramPhase.reviewInclusion ||
activePhase.name === ProgramPhase.payment) &&
this.exportType === ExportType.included) ||
(activePhase.name === ProgramPhase.registrationValidation &&
this.exportType === ExportType.selectedForValidation) ||
(activePhase.name === ProgramPhase.payment &&
this.exportType === ExportType.payment &&
this.paymentExportAvailable) ||
(activePhase.name === ProgramPhase.payment &&
this.exportType === ExportType.unusedVouchers &&
this.userRole === UserRole.ProgramManager)
);
return this.userRole === UserRole.ProgramManager &&
(this.exportType !== ExportType.payment ||
this.paymentExportAvailable);
}

public getExportList() {
Expand Down

0 comments on commit 59a0aa7

Please sign in to comment.