Skip to content

Commit

Permalink
refactor: remove isAdminChoice attribute from migration step
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubersilva committed Dec 18, 2023
1 parent 0d62470 commit 0313528
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/FormMigration/Steps/FundsAndDesignations.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ private function getFundsAndDesignationsAttributes(int $formId): array
];
}

$adminChoice = ['value' => $adminChoice, 'label' => $this->getFundLabel($adminChoice), 'checked' => true];

return [
'label' => $label,
'isAdminChoice' => $isAdminChoice,
'fund' => $adminChoice,
'fund' => $isAdminChoice ? [
'value' => $adminChoice,
'label' => $this->getFundLabel($adminChoice),
'checked' => true,
] : $options[0],
'options' => $options,
];
}
Expand Down

0 comments on commit 0313528

Please sign in to comment.