feat: update my watchlist page

This commit is contained in:
Maël Gangloff
2024-07-27 20:44:10 +02:00
parent 7d88003dfb
commit e2913a9c9f
7 changed files with 85 additions and 46 deletions

View File

@@ -47,7 +47,7 @@ class Domain
{
#[ORM\Id]
#[ORM\Column(length: 255)]
#[Groups(['domain:item', 'domain:list', 'watchlist:item'])]
#[Groups(['domain:item', 'domain:list', 'watchlist:item', 'watchlist:list'])]
private ?string $ldhName = null;
#[ORM\Column(length: 255, nullable: true)]

View File

@@ -58,14 +58,14 @@ class WatchList
#[ORM\JoinTable(name: 'watch_lists_domains',
joinColumns: [new ORM\JoinColumn(name: 'watch_list_token', referencedColumnName: 'token')],
inverseJoinColumns: [new ORM\JoinColumn(name: 'domain_ldh_name', referencedColumnName: 'ldh_name')])]
#[Groups(['watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create', 'watchlist:update'])]
private Collection $domains;
/**
* @var Collection<int, WatchListTrigger>
*/
#[ORM\OneToMany(targetEntity: WatchListTrigger::class, mappedBy: 'watchList', cascade: ['persist'], orphanRemoval: true)]
#[Groups(['watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[SerializedName("triggers")]
private Collection $watchListTriggers;

View File

@@ -13,7 +13,7 @@ class WatchListTrigger
{
#[ORM\Id]
#[ORM\Column(length: 255)]
#[Groups(['watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create', 'watchlist:update'])]
private ?string $event = null;
#[ORM\Id]
@@ -23,7 +23,7 @@ class WatchListTrigger
#[ORM\Id]
#[ORM\Column(enumType: TriggerAction::class)]
#[Groups(['watchlist:item', 'watchlist:create', 'watchlist:update'])]
#[Groups(['watchlist:list', 'watchlist:item', 'watchlist:create', 'watchlist:update'])]
private ?TriggerAction $action = null;
public function getEvent(): ?string