feat: additional jobprofile infotext
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace DoctrineMigrations;
|
||||||
|
|
||||||
|
use Doctrine\DBAL\Schema\Schema;
|
||||||
|
use Doctrine\Migrations\AbstractMigration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
|
*/
|
||||||
|
final class Version20240131185423 extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function getDescription(): string
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function up(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE assignment ADD job_profile_info LONGTEXT DEFAULT NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('ALTER TABLE assignment DROP job_profile_info');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,6 +41,9 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
|||||||
#[Assert\NotNull(message: 'Bitte gib das Jobprofil an')]
|
#[Assert\NotNull(message: 'Bitte gib das Jobprofil an')]
|
||||||
private ?JobProfile $jobProfile = null;
|
private ?JobProfile $jobProfile = null;
|
||||||
|
|
||||||
|
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||||
|
private ?string $jobProfileInfo = null;
|
||||||
|
|
||||||
#[ORM\Column(nullable: true)]
|
#[ORM\Column(nullable: true)]
|
||||||
#[Assert\Range(min: 1, minMessage: 'Die Mindestanzahl ist 1')]
|
#[Assert\Range(min: 1, minMessage: 'Die Mindestanzahl ist 1')]
|
||||||
private ?int $availableDispositions = 1;
|
private ?int $availableDispositions = 1;
|
||||||
@@ -119,10 +122,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
|||||||
$instance->addFee($fee);
|
$instance->addFee($fee);
|
||||||
});
|
});
|
||||||
|
|
||||||
$assignment->getDocuments()->map(function (Upload $document) use ($instance) {
|
|
||||||
$instance->addDocument($document);
|
|
||||||
});
|
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,6 +159,18 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getJobProfileInfo(): ?string
|
||||||
|
{
|
||||||
|
return $this->jobProfileInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setJobProfileInfo(?string $jobProfileInfo): static
|
||||||
|
{
|
||||||
|
$this->jobProfileInfo = $jobProfileInfo;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getAvailableDispositions(): ?int
|
public function getAvailableDispositions(): ?int
|
||||||
{
|
{
|
||||||
return $this->availableDispositions;
|
return $this->availableDispositions;
|
||||||
|
|||||||
@@ -66,6 +66,13 @@ class AssignmentType extends AbstractType
|
|||||||
->where('job_profile.deletedAt IS NULL');
|
->where('job_profile.deletedAt IS NULL');
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
->add('jobProfileInfo', TextareaType::class, [
|
||||||
|
'label' => 'Jobprofil Zusatzinfo',
|
||||||
|
'required' => false,
|
||||||
|
'attr' => [
|
||||||
|
'rows' => 3,
|
||||||
|
],
|
||||||
|
])
|
||||||
// ->add('dateFrom', DatepickerType::class, [
|
// ->add('dateFrom', DatepickerType::class, [
|
||||||
// 'label' => 'abweichender Einsatztermin von',
|
// 'label' => 'abweichender Einsatztermin von',
|
||||||
// 'required' => false,
|
// 'required' => false,
|
||||||
|
|||||||
@@ -5,6 +5,11 @@
|
|||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||||
{{ assignment.jobProfile.name }}
|
{{ assignment.jobProfile.name }}
|
||||||
|
{% if assignment.jobProfileInfo %}
|
||||||
|
<div class="pt-2">
|
||||||
|
{{ assignment.jobProfileInfo|nl2br }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
<dd class="mt-1 text-sm leading-6 text-gray-700 sm:col-span-2 sm:mt-0">
|
||||||
{{ assignment.jobProfile.name }}
|
{{ assignment.jobProfile.name }}
|
||||||
|
{% if assignment.jobProfileInfo %}
|
||||||
|
<div class="pt-2">
|
||||||
|
{{ assignment.jobProfileInfo|nl2br }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
<div class="py-6 first:pt-0 last:pb-0 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||||
|
|||||||
@@ -28,6 +28,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||||
{{ form_row(form.jobProfile) }}
|
{{ form_row(form.jobProfile) }}
|
||||||
|
{{ form_row(form.jobProfileInfo) }}
|
||||||
|
{{ form_row(form.benefits) }}
|
||||||
{{ form_row(form.contact) }}
|
{{ form_row(form.contact) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
@@ -39,7 +41,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
<div class="grid lg:grid-cols-2 gap-x-8 gap-y-4">
|
||||||
{{ form_row(form.benefits) }}
|
|
||||||
{{ form_row(form.fees) }}
|
{{ form_row(form.fees) }}
|
||||||
{{ form_row(form.remarks) }}
|
{{ form_row(form.remarks) }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user