mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: update tracked domain table
This commit is contained in:
@@ -62,7 +62,7 @@ export function TrackedDomainTable() {
|
||||
const notices: ReactElement[] = []
|
||||
setDataTable(data['hydra:member'].map((d: Domain) => {
|
||||
const expirationDate = d.events.find(e => e.action === 'expiration' && !e.deleted)?.date
|
||||
const expiresInDays = d.expiresInDays ? -d.expiresInDays : undefined
|
||||
const expiresInDays = d.expiresInDays && d.expiresInDays > 0 ? -d.expiresInDays : undefined
|
||||
|
||||
if (d.status.includes('redemption period')) {
|
||||
if (!notices.includes(REDEMPTION_NOTICE)) notices.push(REDEMPTION_NOTICE)
|
||||
|
||||
@@ -121,9 +121,6 @@ class Domain
|
||||
#[Groups(['domain:item', 'domain:list'])]
|
||||
private ?bool $delegationSigned = null;
|
||||
|
||||
#[Groups(['domain:item', 'domain:list'])]
|
||||
protected ?int $expiresInDays = null;
|
||||
|
||||
private const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value];
|
||||
private const IMPORTANT_STATUS = [
|
||||
'redemption period',
|
||||
@@ -468,6 +465,7 @@ class Domain
|
||||
/**
|
||||
* @throws \Exception
|
||||
*/
|
||||
#[Groups(['domain:item', 'domain:list'])]
|
||||
public function getExpiresInDays(): ?int
|
||||
{
|
||||
$now = new \DateTimeImmutable();
|
||||
|
||||
Reference in New Issue
Block a user