Support for changeable work contract types (#5069)

This commit is contained in:
Kevin Papst
2024-09-22 16:18:21 +02:00
committed by GitHub
parent 8de54e1fa7
commit 4076e1c3d3
23 changed files with 830 additions and 85 deletions

View File

@@ -15,6 +15,7 @@ use App\Entity\UserPreference;
use App\Event\PrepareUserEvent;
use App\Form\AccessTokenForm;
use App\Form\Model\TotpActivation;
use App\Form\Model\UserContractModel;
use App\Form\UserApiPasswordType;
use App\Form\UserContractType;
use App\Form\UserEditType;
@@ -267,7 +268,7 @@ final class ProfileController extends AbstractController
#[IsGranted('contract', 'profile')]
public function contractAction(User $profile, Request $request, UserRepository $userRepository): Response
{
$form = $this->createForm(UserContractType::class, $profile, [
$form = $this->createForm(UserContractType::class, new UserContractModel($profile), [
'action' => $this->generateUrl('user_profile_contract', ['username' => $profile->getUserIdentifier()]),
'method' => 'POST',
]);