From 3f9745d8cfc0d81ac5c43dbab42ce8ecedef30ec Mon Sep 17 00:00:00 2001 From: Boris Waaub Date: Mon, 6 May 2024 18:03:04 +0200 Subject: [PATCH] Use teleport for banner --- .../ChillTicketBundle/src/Entity/Ticket.php | 20 +++ .../src/Resources/public/types.ts | 1 - .../Resources/public/vuejs/TicketApp/App.vue | 120 +++++++++++++++--- .../components/TicketHistoryListComponent.vue | 3 +- .../components/TicketSelectorComponent.vue | 5 +- .../public/vuejs/TicketApp/i18n/messages.ts | 22 +++- .../Resources/views/Banner/banner.html.twig | 57 --------- .../Normalizer/TicketNormalizer.php | 2 + .../src/translations/messages.fr.yaml | 6 - 9 files changed, 142 insertions(+), 94 deletions(-) delete mode 100644 src/Bundle/ChillTicketBundle/src/translations/messages.fr.yaml diff --git a/src/Bundle/ChillTicketBundle/src/Entity/Ticket.php b/src/Bundle/ChillTicketBundle/src/Entity/Ticket.php index 04cfe828b..9fc4d6a15 100644 --- a/src/Bundle/ChillTicketBundle/src/Entity/Ticket.php +++ b/src/Bundle/ChillTicketBundle/src/Entity/Ticket.php @@ -69,6 +69,13 @@ class Ticket implements TrackCreationInterface, TrackUpdateInterface #[ORM\OneToMany(targetEntity: PersonHistory::class, mappedBy: 'ticket')] private Collection $personHistories; + #[ORM\ManyToOne(targetEntity: User::class)] + #[ORM\JoinColumn(nullable: true)] + private ?User $updatedBy = null; + + #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)] + private ?\DateTimeImmutable $createdAt = null; + public function __construct() { $this->addresseeHistory = new ArrayCollection(); @@ -76,6 +83,7 @@ class Ticket implements TrackCreationInterface, TrackUpdateInterface $this->motiveHistories = new ArrayCollection(); $this->personHistories = new ArrayCollection(); $this->inputHistories = new ArrayCollection(); + } public function getId(): ?int @@ -211,4 +219,16 @@ class Ticket implements TrackCreationInterface, TrackUpdateInterface { return $this->addresseeHistory; } + + public function getCreatedAt(): \DateTimeImmutable + { + return $this->createdAt; + } + + public function getUpdatedBy(): ?User + { + return $this->updatedBy; + } + + } diff --git a/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts b/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts index 6d8657f82..1af87d044 100644 --- a/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts +++ b/src/Bundle/ChillTicketBundle/src/Resources/public/types.ts @@ -2,7 +2,6 @@ import { DateTime, TranslatableString, User, - UserGroup, UserGroupOrUser } from "../../../../ChillMainBundle/Resources/public/types"; import { Person } from "../../../../ChillPersonBundle/Resources/public/types"; diff --git a/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/App.vue b/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/App.vue index cf4eff359..e738bd10a 100644 --- a/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/App.vue +++ b/src/Bundle/ChillTicketBundle/src/Resources/public/vuejs/TicketApp/App.vue @@ -1,5 +1,75 @@