diff --git a/package-lock.json b/package-lock.json index a5477890e..f6c967a31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "interop-dashboard-frontend", - "version": "1.0.73", + "version": "1.0.79", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "interop-dashboard-frontend", - "version": "1.0.73", + "version": "1.0.79", "dependencies": { "@date-io/date-fns": "^2.17.0", "@emotion/react": "^11.11.1", diff --git a/package.json b/package.json index adf45d796..68480e9c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "interop-dashboard-frontend", - "version": "1.0.78", + "version": "1.0.79", "type": "module", "scripts": { "dev": "vite", diff --git a/src/config/constants.ts b/src/config/constants.ts index efc88199b..322a55d0f 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -1,3 +1,4 @@ +import { PagoPAEnvVars } from '@/types/common.types' import { getCurrentSelfCareProductId } from '@/utils/common.utils' export const DEFAULT_LANG = 'it' @@ -37,3 +38,17 @@ export const eserviceNamingBestPracticeLink = 'https://italia.github.io/pdnd-guida-nomenclatura-eservice/' export const keychainGuideLink = `${documentationLink}/manuale-operativo/utilizzare-i-voucher#garanzia-dellintegrita-della-risposta` export const keychainSetupGuideLink = `${documentationLink}/manuale-operativo/utilizzare-i-voucher#precondizioni` + +export const SH_ESERVICES_TO_HIDE_TEMP: Partial>> = { + ATT: ['9b6993ee-60e3-4901-9a32-e6987d690ec4'], + UAT: [ + '7ab0a0fc-7d22-4007-b2f3-fddd68fe2f17', + 'e8c087eb-627b-4488-a9b7-65b70fd1301b', + '407edf51-23b5-462b-af6e-128bbaa4d9ff', + '3b0fbe47-2e2c-4d8b-9cff-b2381c92d003', + '260e45e1-9a61-49d6-8b6d-da0643da68ac', + 'a2b84a6e-34cf-44ca-85a4-de21fd232668', + '6b14c622-dad2-44ea-82bc-2dd4010364d5', + '03c34a8a-a79a-4928-9afc-8647eefabdb1', + ], +} diff --git a/src/pages/ConsumerEServiceCatalogPage/components/CatalogCard.tsx b/src/pages/ConsumerEServiceCatalogPage/components/CatalogCard.tsx index 5313c67e8..171538e54 100644 --- a/src/pages/ConsumerEServiceCatalogPage/components/CatalogCard.tsx +++ b/src/pages/ConsumerEServiceCatalogPage/components/CatalogCard.tsx @@ -8,9 +8,9 @@ import { CardHeader, Skeleton, Stack, + Tooltip, Typography, } from '@mui/material' -import React from 'react' import { useTranslation } from 'react-i18next' import AccountBalanceIcon from '@mui/icons-material/AccountBalance' import type { CatalogEService } from '@/api/api.generatedTypes' @@ -18,10 +18,12 @@ import { useQueryClient } from '@tanstack/react-query' interface CatalogCardProps { eservice: CatalogEService + disabled?: boolean } -export const CatalogCard: React.FC = ({ eservice }) => { +export const CatalogCard: React.FC = ({ eservice, disabled }) => { const { t: tCommon } = useTranslation('common') + const { t } = useTranslation('eservice') const queryClient = useQueryClient() const handlePrefetch = () => { @@ -39,6 +41,7 @@ export const CatalogCard: React.FC = ({ eservice }) => { display: 'flex', flexDirection: 'column', minHeight: 410, + opacity: disabled ? 0.5 : 1, }} > = ({ eservice }) => { - - {tCommon('actions.inspect')} - + + + + {tCommon('actions.inspect')} + + + diff --git a/src/pages/ConsumerEServiceCatalogPage/components/EServiceCatalogGrid.tsx b/src/pages/ConsumerEServiceCatalogPage/components/EServiceCatalogGrid.tsx index 214b18161..4a567cb66 100644 --- a/src/pages/ConsumerEServiceCatalogPage/components/EServiceCatalogGrid.tsx +++ b/src/pages/ConsumerEServiceCatalogPage/components/EServiceCatalogGrid.tsx @@ -3,6 +3,8 @@ import React from 'react' import { CatalogCard, CatalogCardSkeleton } from './CatalogCard' import { useTranslation } from 'react-i18next' import type { CatalogEService } from '@/api/api.generatedTypes' +import { STAGE } from '@/config/env' +import { SH_ESERVICES_TO_HIDE_TEMP } from '@/config/constants' type EServiceCatalogGridProps = { eservices: Array | undefined @@ -19,7 +21,11 @@ export const EServiceCatalogGrid: React.FC = ({ eservi {eservices?.map((eservice) => ( - + ))} diff --git a/src/static/locales/en/eservice.json b/src/static/locales/en/eservice.json index df05622b7..8d2ee58e0 100644 --- a/src/static/locales/en/eservice.json +++ b/src/static/locales/en/eservice.json @@ -252,7 +252,8 @@ "ariaLabel": "Switch for acknowledgment and confirmation" } } - } + }, + "disabledTooltip": "Test e-service archived from the catalog and not usable." }, "read": { "tabs": { diff --git a/src/static/locales/it/eservice.json b/src/static/locales/it/eservice.json index cacc2c5c6..0082857ab 100644 --- a/src/static/locales/it/eservice.json +++ b/src/static/locales/it/eservice.json @@ -252,7 +252,8 @@ "ariaLabel": "Switch di presa visione e conferma" } } - } + }, + "disabledTooltip": "E-service di test archiviato dal catalogo e non utilizzabile" }, "read": { "tabs": {