diff --git a/public/images/qr.svg b/public/images/qr.svg index 7470ba9..38bf26f 100644 --- a/public/images/qr.svg +++ b/public/images/qr.svg @@ -1,351 +1,566 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx b/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx index c5c1c79..89c6c85 100644 --- a/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx +++ b/src/components/pages/BusinessCardPage/BusinessCardPage.test.tsx @@ -6,6 +6,7 @@ import BusinessCardPage from './index.js' vi.mock('./envVars.js', () => ({ NAME: 'Test Name', + ASSOCIATION: 'Test Association', POSITION: 'Test Position', VAT: 'Test VAT', PHONE: '+123456789', @@ -28,6 +29,7 @@ describe('BusinessCardPage', () => { // Name appears in uppercase in the first card expect(screen.getByText('Test Name')).toBeInTheDocument() + expect(screen.getByText('Test Association')).toBeInTheDocument() expect(screen.getByText('Test Position')).toBeInTheDocument() // Check if values are rendered correctly in the second card @@ -62,7 +64,7 @@ describe('BusinessCardPage', () => { const user = userEvent.setup() render() - await user.click(screen.getByText('Print Business Card')) + await user.click(screen.getByText('Stampa')) expect(mockPrint).toHaveBeenCalledTimes(1) }) diff --git a/src/components/pages/BusinessCardPage/envVars.ts b/src/components/pages/BusinessCardPage/envVars.ts index 4ae8393..aa7a3f3 100644 --- a/src/components/pages/BusinessCardPage/envVars.ts +++ b/src/components/pages/BusinessCardPage/envVars.ts @@ -1,6 +1,7 @@ /* istanbul ignore file */ export const NAME = import.meta.env.VITE_BC_NAME || '[FULL NAME]' -export const POSITION = import.meta.env.VITE_BC_POSITION || 'Ass. di rievocazione storica affiliata C.E.R.S. (XIV-XV secolo)' +export const ASSOCIATION = import.meta.env.VITE_BC_ASSOCIATION || 'Ass. di rievocazione storica affiliata C.E.R.S.' +export const POSITION = import.meta.env.VITE_BC_POSITION || '(fine XIV - inizio XV secolo)' export const PHONE = import.meta.env.VITE_BC_PHONE || null export const EMAIL = import.meta.env.VITE_BC_EMAIL || '[Redacted for privacy]' export const FACEBOOK = import.meta.env.VITE_BC_FACEBOOK || 'compagniadarmedelsantoluca' diff --git a/src/components/pages/BusinessCardPage/index.tsx b/src/components/pages/BusinessCardPage/index.tsx index e753125..1080005 100644 --- a/src/components/pages/BusinessCardPage/index.tsx +++ b/src/components/pages/BusinessCardPage/index.tsx @@ -150,10 +150,15 @@ const BusinessCardPage = () => { color="text.secondary" fontSize="0.55rem" fontFamily="Oswald, sans-serif" - textTransform="uppercase" + // textTransform="uppercase" fontWeight={700}> {env.NAME} + {env.ASSOCIATION != null && ( + + {env.ASSOCIATION} + + )} {env.POSITION} @@ -180,7 +185,7 @@ const BusinessCardPage = () => { { }, }}>