Skip to content

Commit

Permalink
Removed unused parameters from event and camp participan export
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 15, 2023
1 parent e8d8f11 commit 3c45a2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Model\Cashbook\ReadModel\Queries\CampParticipantListQuery;
use Model\DTO\Participant\NonMemberParticipant;
use Model\DTO\Participant\Participant;
use Model\DTO\Participant\ParticipatingPerson;
use Model\DTO\Participant\UpdateParticipant;
use Model\Event\Commands\Camp\ActivateAutocomputedParticipants;
use Model\Event\SkautisCampId;
Expand Down Expand Up @@ -101,10 +100,8 @@ public function handleActivateAutocomputedParticipants(int $aid): void
$this->redirect('this');
}

public function actionExportExcel(int $aid, string $exportType): void
public function actionExportExcel(int $aid): void
{
assert($exportType === ParticipatingPerson::PARTICIPANT);

try {
$participantsDTO = $this->campParticipants();
$spreadsheet = $this->excelService->getCampParticipants($participantsDTO);
Expand Down Expand Up @@ -168,10 +165,8 @@ protected function createComponentParticipantList(): ParticipantList
return $control;
}

public function actionExport(int $aid, string $exportType): void
public function actionExport(int $aid): void
{
assert($exportType === ParticipatingPerson::PARTICIPANT);

try {
$template = $this->exportService->getParticipants($aid, EventType::CAMP);
$this->pdf->render($template, 'seznam-ucastniku.pdf', true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Model\Cashbook\ReadModel\Queries\EventParticipantListQuery;
use Model\DTO\Participant\NonMemberParticipant;
use Model\DTO\Participant\Participant;
use Model\DTO\Participant\ParticipatingPerson;
use Model\DTO\Participant\UpdateParticipant;
use Model\ExcelService;
use Model\ExportService;
Expand Down Expand Up @@ -90,10 +89,8 @@ public function renderDefault(int $aid): void
$this->redrawControl('contentSnip');
}

public function actionExportExcel(int $aid, string $exportType): void
public function actionExportExcel(int $aid): void
{
assert($exportType === ParticipatingPerson::PARTICIPANT);

try {
$participantsDTO = $this->eventParticipants();
$spreadsheet = $this->excelService->getGeneralParticipants($participantsDTO, $this->event->getStartDate());
Expand Down Expand Up @@ -158,10 +155,8 @@ protected function createComponentParticipantList(): ParticipantList
return $control;
}

public function actionExport(int $aid, string $exportType): void
public function actionExport(int $aid): void
{
assert($exportType === ParticipatingPerson::PARTICIPANT);

try {
$template = $this->exportService->getParticipants($aid, EventType::GENERAL);
$this->pdf->render($template, 'seznam-ucastniku.pdf', false);
Expand Down

0 comments on commit 3c45a2d

Please sign in to comment.