Merge branch 'master' into feature/timeline
This commit is contained in:
Generated
+6
-6
@@ -2247,16 +2247,16 @@
|
||||
},
|
||||
{
|
||||
"name": "nelmio/security-bundle",
|
||||
"version": "v3.4.2",
|
||||
"version": "v3.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nelmio/NelmioSecurityBundle.git",
|
||||
"reference": "3c4739628eafe886c001210aa0d97b33f3551599"
|
||||
"reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/3c4739628eafe886c001210aa0d97b33f3551599",
|
||||
"reference": "3c4739628eafe886c001210aa0d97b33f3551599",
|
||||
"url": "https://api.github.com/repos/nelmio/NelmioSecurityBundle/zipball/b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7",
|
||||
"reference": "b1c5e323d71152bc1a61a4f8fbf7d88c6fa3e2e7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2315,9 +2315,9 @@
|
||||
],
|
||||
"support": {
|
||||
"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",
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
#[Assert\NotNull(message: 'Bitte gib die Destination an')]
|
||||
private ?Destination $destination = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
#[Assert\NotBlank(message: 'Bitte gib den Konstenträger an')]
|
||||
private ?string $costCenter = null;
|
||||
|
||||
#[ORM\ManyToOne]
|
||||
#[Assert\NotNull(message: 'Bitte gib das Jobprofil an')]
|
||||
private ?JobProfile $jobProfile = null;
|
||||
@@ -198,18 +194,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCostCenter(): ?string
|
||||
{
|
||||
return $this->costCenter;
|
||||
}
|
||||
|
||||
public function setCostCenter(?string $costCenter): static
|
||||
{
|
||||
$this->costCenter = $costCenter;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getJobProfile(): ?JobProfile
|
||||
{
|
||||
return $this->jobProfile;
|
||||
|
||||
@@ -43,6 +43,9 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
#[Assert\NotNull(message: 'Bitte ordne eine Feedback-Vorlage zu')]
|
||||
private ?FeedbackSet $feedbackSet = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?string $costUnit = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->uuid = Uuid::v4();
|
||||
@@ -119,6 +122,18 @@ class JobProfile implements BlameableEntityInterface, TimestampableEntityInterfa
|
||||
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
|
||||
{
|
||||
// Check licenses
|
||||
|
||||
@@ -58,9 +58,6 @@ class AssignmentType extends AbstractType
|
||||
'hx-swap' => 'innerHTML',
|
||||
],
|
||||
])
|
||||
->add('costCenter', TextType::class, [
|
||||
'label' => 'Kostenträger',
|
||||
])
|
||||
->add('jobProfile', EntityType::class, [
|
||||
'label' => 'Jobprofil',
|
||||
'class' => JobProfile::class,
|
||||
|
||||
@@ -52,6 +52,9 @@ class JobProfileType extends AbstractType
|
||||
'choice_label' => 'name',
|
||||
'placeholder' => 'Kein Feedback',
|
||||
])
|
||||
->add('costUnit', TextType::class, [
|
||||
'label' => 'Kostenstelle',
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -62,4 +65,4 @@ class JobProfileType extends AbstractType
|
||||
'anti_xss' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,26 +22,29 @@ class InvoiceApprover extends AbstractPdfRenderer
|
||||
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->SetAuthor($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->setPage(1);
|
||||
|
||||
// Cost unit
|
||||
if (null !== $costUnit = $assignment->getDestination()->getCostUnit()) {
|
||||
// Cost unit job profile
|
||||
if (null !== $costUnit = $assignment->getJobProfile()->getCostUnit()) {
|
||||
$pdf->SetFont('Arial', '', 11);
|
||||
$pdf->Text(20,20, utf8_decode('Kostenstelle: '.$costUnit));
|
||||
$pdf->Text(20,20, utf8_decode('Kostenstelle 1: '.$costUnit));
|
||||
}
|
||||
|
||||
// Cost center
|
||||
if (null !== $costCenter = $assignment->getCostCenter()) {
|
||||
// Cost unit destination/hotel
|
||||
if (null !== $costUnit = $assignment->getDestination()->getCostUnit()) {
|
||||
$pdf->SetFont('Arial', '', 11);
|
||||
$pdf->Text(20,25, utf8_decode('Kostenträger: '.$costCenter));
|
||||
$pdf->Text(20,25, utf8_decode('Kostenstelle 2: '.$costUnit));
|
||||
}
|
||||
|
||||
// Approval
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
<h2 class="flex justify-between pb-2">
|
||||
<span class="font-bold text-lg">Überfällige Feedbacks</span>
|
||||
{% if overdueFeedbacksCount > 0 %}
|
||||
<span>{{ overdueFeedbacksCount }} überfälllig</span>
|
||||
<span>{{ overdueFeedbacksCount }} überfällig</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="max-h-64 overflow-y-scroll overflow-x-hidden">
|
||||
@@ -235,7 +235,7 @@
|
||||
<h2 class="flex justify-between pb-2">
|
||||
<span class="font-bold text-lg">Überfällige Honorarverträge</span>
|
||||
{% if overdueContractsCount > 0 %}
|
||||
<span>{{ overdueContractsCount }} überfälllig</span>
|
||||
<span>{{ overdueContractsCount }} überfällig</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="max-h-64 overflow-y-scroll overflow-x-hidden">
|
||||
@@ -262,4 +262,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
{{ form_row(form.feedbackSet) }}
|
||||
{{ form_row(form.requiredTrainings) }}
|
||||
{{ form_row(form.requiredLicenses) }}
|
||||
{{ form_row(form.costUnit) }}
|
||||
</div>
|
||||
<div class="flex items-center space-x-2">
|
||||
<button type="submit" class="btn">
|
||||
|
||||
@@ -27,7 +27,9 @@
|
||||
{% for jobProfile in jobProfiles %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ jobProfile.name }}
|
||||
<a href="{{ path('app_admin_system_job_profile_edit', { 'id': jobProfile.id }) }}">
|
||||
{{ jobProfile.name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
@@ -81,4 +83,4 @@
|
||||
<a href="{{ path('app_admin_system_job_profile_create') }}" class="btn">
|
||||
Neu
|
||||
</a>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<div class="grid grid-cols-1 gap-y-4">
|
||||
{{ form_row(form.contact) }}
|
||||
{{ form_row(form.remarks) }}
|
||||
{{ form_row(form.costCenter) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<h2 class="flex justify-between pb-2">
|
||||
<span class="font-bold text-lg">Überfällige Feedbacks</span>
|
||||
{% if overdueFeedbacksCount > 0 %}
|
||||
<span>{{ overdueFeedbacksCount }} überfälllig</span>
|
||||
<span>{{ overdueFeedbacksCount }} überfällig</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<div class="max-h-64 overflow-y-scroll overflow-x-hidden">
|
||||
|
||||
Reference in New Issue
Block a user