Merge branch 'master' into feature/timeline

This commit is contained in:
Björn Fromme
2025-03-18 17:21:56 +01:00
12 changed files with 79 additions and 42 deletions
Generated
+6 -6
View File
@@ -2247,16 +2247,16 @@
}, },
{ {
"name": "nelmio/security-bundle", "name": "nelmio/security-bundle",
"version": "v3.4.2", "version": "v3.5.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nelmio/NelmioSecurityBundle.git", "url": "https://github.com/nelmio/NelmioSecurityBundle.git",
"reference": "3c4739628eafe886c001210aa0d97b33f3551599" "reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/3c4739628eafe886c001210aa0d97b33f3551599", "url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7",
"reference": "3c4739628eafe886c001210aa0d97b33f3551599", "reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2315,9 +2315,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nelmio/NelmioSecurityBundle/issues", "issues": "https://github.com/nelmio/NelmioSecurityBundle/issues",
"source": "https://github.com/nelmio/NelmioSecurityBundle/tree/v3.4.2" "source": "https://github.com/nelmio/NelmioSecurityBundle/tree/v3.5.1"
}, },
"time": "2024-09-10T13:22:26+00:00" "time": "2025-03-13T09:17:16+00:00"
}, },
{ {
"name": "nesbot/carbon", "name": "nesbot/carbon",
+33
View File
@@ -0,0 +1,33 @@
<?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 Version20250318105943 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 DROP cost_center');
$this->addSql('ALTER TABLE job_profile ADD cost_unit VARCHAR(255) DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE job_profile DROP cost_unit');
$this->addSql('ALTER TABLE assignment ADD cost_center VARCHAR(255) DEFAULT NULL');
}
}
-16
View File
@@ -43,10 +43,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
#[Assert\NotNull(message: 'Bitte gib die Destination an')] #[Assert\NotNull(message: 'Bitte gib die Destination an')]
private ?Destination $destination = null; private ?Destination $destination = null;
#[ORM\Column(nullable: true)]
#[Assert\NotBlank(message: 'Bitte gib den Konstenträger an')]
private ?string $costCenter = null;
#[ORM\ManyToOne] #[ORM\ManyToOne]
#[Assert\NotNull(message: 'Bitte gib das Jobprofil an')] #[Assert\NotNull(message: 'Bitte gib das Jobprofil an')]
private ?JobProfile $jobProfile = null; private ?JobProfile $jobProfile = null;
@@ -198,18 +194,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this; return $this;
} }
public function getCostCenter(): ?string
{
return $this->costCenter;
}
public function setCostCenter(?string $costCenter): static
{
$this->costCenter = $costCenter;
return $this;
}
public function getJobProfile(): ?JobProfile public function getJobProfile(): ?JobProfile
{ {
return $this->jobProfile; return $this->jobProfile;
+15
View File
@@ -43,6 +43,9 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa
#[Assert\NotNull(message: 'Bitte ordne eine Feedback-Vorlage zu')] #[Assert\NotNull(message: 'Bitte ordne eine Feedback-Vorlage zu')]
private ?FeedbackSet $feedbackSet = null; private ?FeedbackSet $feedbackSet = null;
#[ORM\Column(nullable: true)]
private ?string $costUnit = null;
public function __construct() public function __construct()
{ {
$this->uuid = Uuid::v4(); $this->uuid = Uuid::v4();
@@ -119,6 +122,18 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa
return $this; return $this;
} }
public function getCostUnit(): ?string
{
return $this->costUnit;
}
public function setCostUnit(?string $costUnit): static
{
$this->costUnit = $costUnit;
return $this;
}
public function isQualified(Teamer $teamer): bool public function isQualified(Teamer $teamer): bool
{ {
// Check licenses // Check licenses
-3
View File
@@ -58,9 +58,6 @@ class AssignmentType extends AbstractType
'hx-swap' => 'innerHTML', 'hx-swap' => 'innerHTML',
], ],
]) ])
->add('costCenter', TextType::class, [
'label' => 'Kostenträger',
])
->add('jobProfile', EntityType::class, [ ->add('jobProfile', EntityType::class, [
'label' => 'Jobprofil', 'label' => 'Jobprofil',
'class' => JobProfile::class, 'class' => JobProfile::class,
+4 -1
View File
@@ -52,6 +52,9 @@ class JobProfileType extends AbstractType
'choice_label' => 'name', 'choice_label' => 'name',
'placeholder' => 'Kein Feedback', 'placeholder' => 'Kein Feedback',
]) ])
->add('costUnit', TextType::class, [
'label' => 'Kostenstelle',
])
; ;
} }
@@ -62,4 +65,4 @@ class JobProfileType extends AbstractType
'anti_xss' => true, 'anti_xss' => true,
]); ]);
} }
} }
+12 -9
View File
@@ -22,26 +22,29 @@ class InvoiceApprover extends AbstractPdfRenderer
throw new \InvalidArgumentException('Expected PDF but got '.$invoice->getMimeType()); throw new \InvalidArgumentException('Expected PDF but got '.$invoice->getMimeType());
} }
// Load template
$filepath = sprintf('%s/uploads/invoice/%s', $this->config['project_dir'], $originalFilename);
if (false === file_exists($filepath)) {
throw new \InvalidArgumentException('Uploaded document not found at '.$filepath);
}
$pdf = new Pdf(); $pdf = new Pdf();
$pdf->SetAuthor($teamer->getFullName(), true); $pdf->SetAuthor($teamer->getFullName(), true);
$pdf->SetCreator($teamer->getFullName(), true); $pdf->SetCreator($teamer->getFullName(), true);
// Load template
$filepath = sprintf('%s/uploads/invoice/%s', $this->config['project_dir'], $originalFilename);
$pdf->appendPdf($filepath); $pdf->appendPdf($filepath);
$pdf->setPage(1); $pdf->setPage(1);
// Cost unit // Cost unit job profile
if (null !== $costUnit = $assignment->getDestination()->getCostUnit()) { if (null !== $costUnit = $assignment->getJobProfile()->getCostUnit()) {
$pdf->SetFont('Arial', '', 11); $pdf->SetFont('Arial', '', 11);
$pdf->Text(20,20, utf8_decode('Kostenstelle: '.$costUnit)); $pdf->Text(20,20, utf8_decode('Kostenstelle 1: '.$costUnit));
} }
// Cost center // Cost unit destination/hotel
if (null !== $costCenter = $assignment->getCostCenter()) { if (null !== $costUnit = $assignment->getDestination()->getCostUnit()) {
$pdf->SetFont('Arial', '', 11); $pdf->SetFont('Arial', '', 11);
$pdf->Text(20,25, utf8_decode('Kostenträger: '.$costCenter)); $pdf->Text(20,25, utf8_decode('Kostenstelle 2: '.$costUnit));
} }
// Approval // Approval
+3 -3
View File
@@ -200,7 +200,7 @@
<h2 class="flex justify-between pb-2"> <h2 class="flex justify-between pb-2">
<span class="font-bold text-lg">Überfällige Feedbacks</span> <span class="font-bold text-lg">Überfällige Feedbacks</span>
{% if overdueFeedbacksCount > 0 %} {% if overdueFeedbacksCount > 0 %}
<span>{{ overdueFeedbacksCount }} überfälllig</span> <span>{{ overdueFeedbacksCount }} überfällig</span>
{% endif %} {% endif %}
</h2> </h2>
<div class="max-h-64 overflow-y-scroll overflow-x-hidden"> <div class="max-h-64 overflow-y-scroll overflow-x-hidden">
@@ -235,7 +235,7 @@
<h2 class="flex justify-between pb-2"> <h2 class="flex justify-between pb-2">
<span class="font-bold text-lg">Überfällige Honorarverträge</span> <span class="font-bold text-lg">Überfällige Honorarverträge</span>
{% if overdueContractsCount > 0 %} {% if overdueContractsCount > 0 %}
<span>{{ overdueContractsCount }} überfälllig</span> <span>{{ overdueContractsCount }} überfällig</span>
{% endif %} {% endif %}
</h2> </h2>
<div class="max-h-64 overflow-y-scroll overflow-x-hidden"> <div class="max-h-64 overflow-y-scroll overflow-x-hidden">
@@ -262,4 +262,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
@@ -4,6 +4,7 @@
{{ form_row(form.feedbackSet) }} {{ form_row(form.feedbackSet) }}
{{ form_row(form.requiredTrainings) }} {{ form_row(form.requiredTrainings) }}
{{ form_row(form.requiredLicenses) }} {{ form_row(form.requiredLicenses) }}
{{ form_row(form.costUnit) }}
</div> </div>
<div class="flex items-center space-x-2"> <div class="flex items-center space-x-2">
<button type="submit" class="btn"> <button type="submit" class="btn">
@@ -27,7 +27,9 @@
{% for jobProfile in jobProfiles %} {% for jobProfile in jobProfiles %}
<tr> <tr>
<td> <td>
{{ jobProfile.name }} <a href="{{ path('app_admin_system_job_profile_edit', { 'id': jobProfile.id }) }}">
{{ jobProfile.name }}
</a>
</td> </td>
<td> <td>
<ul> <ul>
@@ -81,4 +83,4 @@
<a href="{{ path('app_admin_system_job_profile_create') }}" class="btn"> <a href="{{ path('app_admin_system_job_profile_create') }}" class="btn">
Neu Neu
</a> </a>
{% endblock %} {% endblock %}
@@ -34,7 +34,6 @@
<div class="grid grid-cols-1 gap-y-4"> <div class="grid grid-cols-1 gap-y-4">
{{ form_row(form.contact) }} {{ form_row(form.contact) }}
{{ form_row(form.remarks) }} {{ form_row(form.remarks) }}
{{ form_row(form.costCenter) }}
</div> </div>
</div> </div>
</div> </div>
+1 -1
View File
@@ -93,7 +93,7 @@
<h2 class="flex justify-between pb-2"> <h2 class="flex justify-between pb-2">
<span class="font-bold text-lg">Überfällige Feedbacks</span> <span class="font-bold text-lg">Überfällige Feedbacks</span>
{% if overdueFeedbacksCount > 0 %} {% if overdueFeedbacksCount > 0 %}
<span>{{ overdueFeedbacksCount }} überfälllig</span> <span>{{ overdueFeedbacksCount }} überfällig</span>
{% endif %} {% endif %}
</h2> </h2>
<div class="max-h-64 overflow-y-scroll overflow-x-hidden"> <div class="max-h-64 overflow-y-scroll overflow-x-hidden">