-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from H2-invent/feature/simple-deletion-concep…
…t-inheritance Feature/simple deletion concept inheritance
- Loading branch information
Showing
9 changed files
with
143 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
namespace App\DataTypes; | ||
|
||
use App\Entity\Loeschkonzept; | ||
use App\Entity\VVTDatenkategorie; | ||
|
||
class InheritedEntity | ||
{ | ||
private ?VVTDatenkategorie $category; | ||
|
||
private ?Loeschkonzept $deletionConcept; | ||
|
||
public function __construct() | ||
{ | ||
$this->category = null; | ||
$this->deletionConcept = null; | ||
} | ||
|
||
public function getCategory(): ?VVTDatenkategorie | ||
{ | ||
return $this->category; | ||
} | ||
|
||
public function setCategory(?VVTDatenkategorie $category): InheritedEntity | ||
{ | ||
$this->category = $category; | ||
return $this; | ||
} | ||
|
||
public function getDeletionConcept(): ?Loeschkonzept | ||
{ | ||
return $this->deletionConcept; | ||
} | ||
|
||
public function setDeletionConcept(?Loeschkonzept $deletionConcept): InheritedEntity | ||
{ | ||
$this->deletionConcept = $deletionConcept; | ||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
{% set teams = adminArea is defined and adminArea ? app.user.adminRoles : app.user.teams %} | ||
|
||
{% if teams|length > 1 and currentTeam is defined and currentTeam %} | ||
{% if currentTeam is defined and currentTeam %} | ||
<div class="flex flex-row justify-end items-center relative"> | ||
<button data-type="dropdown" data-target="#teamtoggle-menu" class="relative !inline-flex !items-center justify-center h-10 gap-x-2 p-3 rounded-[6.25rem] text-sm tracking-[.00714em] text-center font-medium hover:bg-surface-300 focus:bg-surface-400"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</button> | ||
<ul id="teamtoggle-menu" role="dropdownmenu" class="dropdown hidden top-10"> | ||
{% for team in teams %} | ||
{% if team != currentTeam %} | ||
<li class="relative"> | ||
<a href="{{ path('team_switch',{'team':team.id}) }}">{{ team.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% if teams|length > 1 %} | ||
<button data-type="dropdown" data-target="#teamtoggle-menu" class="relative !inline-flex !items-center justify-center h-10 gap-x-2 p-3 rounded-[6.25rem] text-sm tracking-[.00714em] text-center font-medium hover:bg-surface-300 focus:bg-surface-400"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</button> | ||
<ul id="teamtoggle-menu" role="dropdownmenu" class="dropdown hidden top-10"> | ||
{% for team in teams %} | ||
{% if team != currentTeam %} | ||
<li class="relative"> | ||
<a href="{{ path('team_switch',{'team':team.id}) }}">{{ team.name }}</a> | ||
</li> | ||
{% endif %} | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<div class="!inline-flex !items-center justify-center gap-x-2 p-3 text-sm font-medium"> | ||
<span class="material-symbols-outlined">group</span> | ||
{{ currentTeam.name }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{% if not isEditable %} | ||
<div class="card mt-4"> | ||
<h4 class="h4-responsive card-header">{% trans from 'vvt' %}inheritedEntities{% endtrans %}</h4> | ||
<div class="card-body"> | ||
<div class="table-responsive"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>{% trans from 'vvt_datenkategorie' %}dataCategory.word{% endtrans %}</th> | ||
<th>{% trans from 'vvt_datenkategorie' %}deletion.deadline{% endtrans %}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for inherited in inheritedEntities %} | ||
<tr> | ||
<td> | ||
<a class="badge badge-light" href="{{ path('app_vvtdatenkategorie_show', {id: inherited.category.id}) }}"> | ||
{{ inherited.category.name }} | ||
</a> | ||
</td> | ||
<td> | ||
{% if inherited.deletionConcept %} | ||
<a class="badge badge-light" href="{{ path('app_loeschkonzept_show', {id: inherited.deletionConcept.id}) }}"> | ||
{{ inherited.deletionConcept.standartlf }} | ||
</a> | ||
{% else %} | ||
{% trans from 'loeschkonzept' %}deletionConcept.notSet{% endtrans %} | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% else %} | ||
<tr><td>{% trans from 'vvt' %}noInheritedEntities{% endtrans %}</td></tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters