♻️ refactor: update business card
add correct qr and association entry
This commit is contained in:
+565
-350
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', () => ({
|
vi.mock('./envVars.js', () => ({
|
||||||
NAME: 'Test Name',
|
NAME: 'Test Name',
|
||||||
|
ASSOCIATION: 'Test Association',
|
||||||
POSITION: 'Test Position',
|
POSITION: 'Test Position',
|
||||||
VAT: 'Test VAT',
|
VAT: 'Test VAT',
|
||||||
PHONE: '+123456789',
|
PHONE: '+123456789',
|
||||||
@@ -28,6 +29,7 @@ describe('BusinessCardPage', () => {
|
|||||||
|
|
||||||
// Name appears in uppercase in the first card
|
// Name appears in uppercase in the first card
|
||||||
expect(screen.getByText('Test Name')).toBeInTheDocument()
|
expect(screen.getByText('Test Name')).toBeInTheDocument()
|
||||||
|
expect(screen.getByText('Test Association')).toBeInTheDocument()
|
||||||
expect(screen.getByText('Test Position')).toBeInTheDocument()
|
expect(screen.getByText('Test Position')).toBeInTheDocument()
|
||||||
|
|
||||||
// Check if values are rendered correctly in the second card
|
// Check if values are rendered correctly in the second card
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* istanbul ignore file */
|
/* istanbul ignore file */
|
||||||
export const NAME = import.meta.env.VITE_BC_NAME || '[FULL NAME]'
|
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 PHONE = import.meta.env.VITE_BC_PHONE || null
|
||||||
export const EMAIL = import.meta.env.VITE_BC_EMAIL || '[Redacted for privacy]'
|
export const EMAIL = import.meta.env.VITE_BC_EMAIL || '[Redacted for privacy]'
|
||||||
export const FACEBOOK = import.meta.env.VITE_BC_FACEBOOK || 'compagniadarmedelsantoluca'
|
export const FACEBOOK = import.meta.env.VITE_BC_FACEBOOK || 'compagniadarmedelsantoluca'
|
||||||
|
|||||||
@@ -150,10 +150,15 @@ const BusinessCardPage = () => {
|
|||||||
color="text.secondary"
|
color="text.secondary"
|
||||||
fontSize="0.55rem"
|
fontSize="0.55rem"
|
||||||
fontFamily="Oswald, sans-serif"
|
fontFamily="Oswald, sans-serif"
|
||||||
textTransform="uppercase"
|
// textTransform="uppercase"
|
||||||
fontWeight={700}>
|
fontWeight={700}>
|
||||||
{env.NAME}
|
{env.NAME}
|
||||||
</Typography>
|
</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}>
|
<Typography variant="caption" color="text.secondary" fontSize="0.55rem" mb={0.5}>
|
||||||
{env.POSITION}
|
{env.POSITION}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -180,7 +185,7 @@ const BusinessCardPage = () => {
|
|||||||
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
ariaLabel: 'Print Business Card',
|
ariaLabel: 'Stampa',
|
||||||
my: 7,
|
my: 7,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
@@ -189,7 +194,7 @@ const BusinessCardPage = () => {
|
|||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<Button variant="contained" startIcon={<Print />} onClick={() => window.print()}>
|
<Button variant="contained" startIcon={<Print />} onClick={() => window.print()}>
|
||||||
Print Business Card
|
Stampa
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
Reference in New Issue
Block a user