Skip to content

Commit

Permalink
feat: add auto renew period in lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed Dec 29, 2024
1 parent a1bad26 commit cbefdb0
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
24 changes: 18 additions & 6 deletions assets/components/search/DomainLifecycleSteps.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import {StepProps, Steps, Tooltip} from "antd";
import React from "react";
import {t} from "ttag";
import {CheckOutlined, DeleteOutlined, ExclamationCircleOutlined, SignatureOutlined} from "@ant-design/icons";
import {
CheckOutlined,
DeleteOutlined,
ExclamationCircleOutlined,
FieldTimeOutlined,
SignatureOutlined
} from "@ant-design/icons";
import {rdapEventDetailTranslation, rdapStatusCodeDetailTranslation} from "../../utils/functions/rdapTranslation";

export function DomainLifecycleSteps({status}: { status: string[] }) {
Expand All @@ -19,23 +25,29 @@ export function DomainLifecycleSteps({status}: { status: string[] }) {
title: <Tooltip title={rdapStatusCodeDetailTranslated.active}>{t`Active`}</Tooltip>,
icon: <CheckOutlined/>
},
{
title: <Tooltip title={rdapStatusCodeDetailTranslated["auto renew period"]}>{t`Auto-Renew Grace Period`}</Tooltip>,
icon: <FieldTimeOutlined style={{color: 'palevioletred'}}/>
},
{
title: <Tooltip
title={rdapStatusCodeDetailTranslated["redemption period"]}>{t`Redemption Period`}</Tooltip>,
icon: <ExclamationCircleOutlined style={{color: 'orangered'}}/>
title={rdapStatusCodeDetailTranslated["redemption period"]}>{t`Redemption Grace Period`}</Tooltip>,
icon: <ExclamationCircleOutlined style={{color: 'magenta'}}/>
},
{
title: <Tooltip title={rdapStatusCodeDetailTranslated["pending delete"]}>{t`Pending Delete`}</Tooltip>,
icon: <DeleteOutlined style={{color: 'palevioletred'}}/>
icon: <DeleteOutlined style={{color: 'orangered'}}/>
}
]

let currentStep = 1

if (status.includes('redemption period')) {
if (status.includes('auto renew period')) {
currentStep = 2
} else if (status.includes('pending delete')) {
} else if (status.includes('redemption period')) {
currentStep = 3
} else if (status.includes('pending delete')) {
currentStep = 4
}

return <Steps
Expand Down
18 changes: 11 additions & 7 deletions translations/translations.pot
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,24 @@ msgstr ""
msgid "Register"
msgstr ""

#: assets/components/search/DomainLifecycleSteps.tsx:15
#: assets/components/search/DomainLifecycleSteps.tsx:21
#: assets/utils/functions/rdapTranslation.ts:43
msgid "Registration"
msgstr ""

#: assets/components/search/DomainLifecycleSteps.tsx:19
#: assets/components/search/DomainLifecycleSteps.tsx:25
msgid "Active"
msgstr ""

#: assets/components/search/DomainLifecycleSteps.tsx:24
msgid "Redemption Period"
#: assets/components/search/DomainLifecycleSteps.tsx:29
msgid "Auto-Renew Grace Period"
msgstr ""

#: assets/components/search/DomainLifecycleSteps.tsx:28
#: assets/components/search/DomainLifecycleSteps.tsx:34
msgid "Redemption Grace Period"
msgstr ""

#: assets/components/search/DomainLifecycleSteps.tsx:38
msgid "Pending Delete"
msgstr ""

Expand Down Expand Up @@ -122,11 +126,11 @@ msgstr ""
msgid "EPP Status Codes"
msgstr ""

#: assets/components/search/DomainResult.tsx:89
#: assets/components/search/DomainResult.tsx:83
msgid "Timeline"
msgstr ""

#: assets/components/search/DomainResult.tsx:96
#: assets/components/search/DomainResult.tsx:90
msgid "Entities"
msgstr ""

Expand Down

0 comments on commit cbefdb0

Please sign in to comment.