♻️ refactor: update business card

add correct qr and association entry
This commit is contained in:
2026-03-16 14:46:17 +01:00
parent a1bfa9e2fc
commit c61534d33a
4 changed files with 577 additions and 354 deletions
+565 -350
View File
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 174 KiB

@@ -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
@@ -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'
@@ -150,10 +150,15 @@ const BusinessCardPage = () => {
color="text.secondary"
fontSize="0.55rem"
fontFamily="Oswald, sans-serif"
textTransform="uppercase"
// textTransform="uppercase"
fontWeight={700}>
{env.NAME}
</Typography>
{env.ASSOCIATION != null && (
<Typography variant="caption" color="text.secondary" fontSize="0.55rem">
{env.ASSOCIATION}
</Typography>
)}
<Typography variant="caption" color="text.secondary" fontSize="0.55rem" mb={0.5}>
{env.POSITION}
</Typography>
@@ -180,7 +185,7 @@ const BusinessCardPage = () => {
<Box
sx={{
ariaLabel: 'Print Business Card',
ariaLabel: 'Stampa',
my: 7,
display: 'flex',
justifyContent: 'center',
@@ -189,7 +194,7 @@ const BusinessCardPage = () => {
},
}}>
<Button variant="contained" startIcon={<Print />} onClick={() => window.print()}>
Print Business Card
Stampa
</Button>
</Box>
</Page>