Skip to content
Extraits de code Groupes Projets
Valider 5d8a19ac rédigé par chaimaa hassoune's avatar chaimaa hassoune
Parcourir les fichiers

save for the 101 th time

parent 793d9273
Branches
1 requête de fusion!117MYD-347/Add changes to dashboeard
Pipeline #2170 en échec avec l'étape
in 3 minutes et 52 secondes
......@@ -6,6 +6,7 @@ import FormControl from '@mui/material/FormControl';
import TextField from '@mui/material/TextField';
import Label from '@/shared/components/label';
import { MenuItem } from '@mui/material';
import AddMediaButton from '../../media/view/Add-media-button';
......@@ -15,6 +16,7 @@ const GiftCardForm: React.FC = () => {
const [image, setImage] = useState<File | null>(null);
const [titleColor, setTitleColor] = useState('#000000');
const [title, setTitle] = useState('Carte Cadeau');
const handleColorChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setCardColor(event.target.value);
......@@ -28,6 +30,9 @@ const GiftCardForm: React.FC = () => {
const handleMessageChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setMessage(event.target.value);
};
const handleTitleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
setTitle(event.target.value);
};
const handleImageChange = (event: React.ChangeEvent<HTMLInputElement>) => {
const files = event.target.files;
......@@ -96,7 +101,7 @@ const GiftCardForm: React.FC = () => {
<body>
<div class="print-content">
<div class="card-container">
<h2 class="titre" ; style="margin-top: 0; text-align: center;">Carte Cadeau</h2>
<h2 class="titre" ; style="margin-top: 0; text-align: center;">${title}</h2>
<Typography variant="subtitle2" gutterBottom>
${image ? `<img src="${URL.createObjectURL(image)}" alt="Image" style="max-width: 100%; margin-bottom: 20px;" />` : ''}
<p>Destinataire:Nom du destinataire</p>
......@@ -173,7 +178,7 @@ const GiftCardForm: React.FC = () => {
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '40px' }}>
<div style={{ width: '45%', padding: '20px', border: '1px solid #ccc', borderRadius: '8px' }}>
<div style={{ width: '45%', justifyContent: 'center' ,padding: '20px', border: '1px solid #ccc', borderRadius: '8px' }}>
<h2>Modifier la carte cadeau</h2>
<form >
<FormControl defaultValue="" >
......@@ -193,6 +198,8 @@ const GiftCardForm: React.FC = () => {
multiline
InputLabelProps={{ shrink: true }}
variant="outlined"
value={title}
onChange={handleTitleChange}
defaultValue={'joyeux anniversaire'}
style={{ marginRight: '10px', marginBottom: '40px' }}
/>
......@@ -229,22 +236,10 @@ const GiftCardForm: React.FC = () => {
onChange={handleColorChange}
style={{ marginBottom: '40px' }}
/>
<input
accept="image/*"
id="contained-button-file"
type="file"
onChange={handleImageChange}
style={{ display: 'none' }}
/>
<Label style={{ marginBottom: '20px' }}>Importer une image</Label>
<input
type="file"
accept="image/*"
color="primary"
onChange={handleImageChange}
style={{ marginBottom: '100px', minWidth: '150px', borderWidth: '0.5px', whiteSpace: 'nowrap', textTransform: 'none' }}
/>
<AddMediaButton variant="outlined" color="success" size="small" sx={{ mt: 1 , marginBottom: '40px' }} />
......@@ -258,7 +253,8 @@ const GiftCardForm: React.FC = () => {
</div>
<div style={{ width: '45%', padding: '20px', border: '1px solid #ccc', borderRadius: '8px', backgroundColor: '#f9f9f9' }}>
<h2 style={{ marginTop: '0', textAlign: 'center', color: titleColor }}>Carte Cadeau</h2>
<h2 style={{ marginTop: '0', textAlign: 'center', color: titleColor }}>{title}</h2>
{image && (
<div style={{ marginBottom: '20px' }}>
<img src={URL.createObjectURL(image)} alt="Carte cadeau" style={{ maxWidth: '100%' }} />
......@@ -267,8 +263,9 @@ const GiftCardForm: React.FC = () => {
<Typography variant="subtitle2" gutterBottom>
<p style={{ margin: '0', marginBottom: '20px' }}>Destinataire: {'Nom du destinataire'}</p>
<p style={{ margin: '0', marginBottom: '20px' }}>de : {'Message'}</p>
<p style={{ margin: '0', marginBottom: '20px' }}>Montant: $50</p>
<p style={{ margin: '0', marginBottom: '20px' }}>Montant: 50</p>
<p style={{ margin: '0', marginBottom: '20px' }}> {message} </p>
</Typography>
<div style={{ backgroundColor: cardColor, color: 'white', padding: '10px', borderRadius: '4px', marginBottom: '20px' }}>
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter