Skip to content

Commit

Permalink
Possibility to edit a sale (current day only for supervisor)
Browse files Browse the repository at this point in the history
  • Loading branch information
froozeify committed Aug 12, 2024
1 parent c026e47 commit 2170c64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Entity/Sale.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'groups' => ['sale', 'sale-read', 'timestamp']
],
denormalizationContext: [
'groups' => ['sale', 'sale-write']
'groups' => ['sale', 'sale-write', 'timestamp-write-create']
],
order: ['createdAt' => 'DESC']
)]
Expand Down
4 changes: 2 additions & 2 deletions src/Entity/Trait/TimestampTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

trait TimestampTrait {
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
#[Groups(['timestamp'])]
#[Groups(['timestamp', 'timestamp-write-create'])]
private ?\DateTimeImmutable $createdAt = null;

#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
#[Groups(['timestamp'])]
#[Groups(['timestamp', 'timestamp-write-update'])]
private ?\DateTimeImmutable $updatedAt = null;

public function getCreatedAt(): ?\DateTimeImmutable {
Expand Down

0 comments on commit 2170c64

Please sign in to comment.