diff --git a/daikoku/javascript/src/components/backoffice/apis/TeamApiSubscriptions.tsx b/daikoku/javascript/src/components/backoffice/apis/TeamApiSubscriptions.tsx index 3f866b1b6..626429de5 100644 --- a/daikoku/javascript/src/components/backoffice/apis/TeamApiSubscriptions.tsx +++ b/daikoku/javascript/src/components/backoffice/apis/TeamApiSubscriptions.tsx @@ -59,7 +59,7 @@ interface IApiSubscriptionGql extends ISubscriptionCustomization { type: string; }; createdAt: string; - validUntil: string; + validUntil: number; api: { _id: string; }; @@ -77,7 +77,7 @@ interface IApiSubscriptionGql extends ISubscriptionCustomization { _id: string; adminCustomName: string; enabled: boolean; - validUntil: string; + validUntil: number; api: { _id: string; name: string; @@ -224,10 +224,6 @@ export const TeamApiSubscriptions = ({ sortingFn: "basic", cell: (info) => { const sub = info.row.original; - let titleDate = `
- ${translate("validationDate.apikey.badge.title")} : - ${sub.validUntil ? formatDate(sub.validUntil, language) : "N/A"} -
`; if (sub.parent) { const title = `
${translate("aggregated.apikey.badge.title")} @@ -237,33 +233,18 @@ export const TeamApiSubscriptions = ({
  • ${translate("aggregated.apikey.badge.apikey.name")}: ${sub.parent.adminCustomName}
  • `; - titleDate = `
    - ${translate("validationDate.apikey.badge.title")} : - ${sub.parent.validUntil ? formatDate(sub.parent.validUntil, language) : "N/A"} -
    `; return (
    {info.getValue()} -
    - -
    V
    -
    -
    A
    -
    ); } return ( -
    {info.getValue()} - -
    V
    -
    -
    ); }, } diff --git a/daikoku/javascript/src/contexts/modals/SubscriptionMetadataModal.tsx b/daikoku/javascript/src/contexts/modals/SubscriptionMetadataModal.tsx index 08ca52573..df50cd4fe 100644 --- a/daikoku/javascript/src/contexts/modals/SubscriptionMetadataModal.tsx +++ b/daikoku/javascript/src/contexts/modals/SubscriptionMetadataModal.tsx @@ -27,7 +27,7 @@ export type CustomSubscriptionData = { customMaxPerMonth: number; customReadOnly: boolean; adminCustomName: string; - validUntil: Date; + validUntil: number; }; export const SubscriptionMetadataModal = ( @@ -66,7 +66,7 @@ export const SubscriptionMetadataModal = ( customMaxPerMonth: formData.customQuotas.customMaxPerMonth, customReadOnly: formData.customReadOnly, adminCustomName: formData.adminCustomName, - validUntil: formData.validUntil, + validUntil: Date.parse(formData.validUntil), }; const res = props.save(subProps); diff --git a/daikoku/javascript/src/locales/en/translation.json b/daikoku/javascript/src/locales/en/translation.json index 38dd7294f..3f0a790e3 100644 --- a/daikoku/javascript/src/locales/en/translation.json +++ b/daikoku/javascript/src/locales/en/translation.json @@ -1390,7 +1390,6 @@ "aggregated.apikey.badge.apikey.name": "API key custom name", "apisubscription.lastUsage.label": "Last usage", "N/A": "N/A", - "validationDate.apikey.badge.title": "Valid Until", "semver.error.message": "Can't create a version with special characters : %s", "version.creation.success.message": "New version of API created successfully", "error.message.creation.security.enabled": "You're not authorized to create an API, please contact your administrator.", diff --git a/daikoku/javascript/src/locales/fr/translation.json b/daikoku/javascript/src/locales/fr/translation.json index 15155aefd..78b600e78 100644 --- a/daikoku/javascript/src/locales/fr/translation.json +++ b/daikoku/javascript/src/locales/fr/translation.json @@ -1390,7 +1390,6 @@ "aggregated.apikey.badge.apikey.name": "Nom personnalisée de la clé", "apisubscription.lastUsage.label": "Dernier usage", "N/A": "N/A", - "validationDate.apikey.badge.title": "Date de validation", "semver.error.message": "Une version ne peut pas être créée avec des caractères spéciaux : %s", "version.creation.success.message": "La nouvelle version de l'API a été créée avec succès", "error.message.creation.security.enabled": "Vous n'êtes pas autorisé à créer d'API, merci de contacter votre administrateur.",