Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
M
mydressin-front
Gestion
Activité
Membres
Labels
Programmation
Tickets
0
Tableaux des tickets
Jalons
Wiki
Jira
Code
Requêtes de fusion
2
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Service d'assistance
Analyse
Données d'analyse des chaînes de valeur
Contributor analytics
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
mydressin
mydressin-front
Validations
5d8a19ac
Valider
5d8a19ac
rédigé
il y a un an
par
chaimaa hassoune
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
save for the 101 th time
parent
793d9273
Branches
Branches contenant la validation
1 requête de fusion
!117
MYD-347/Add changes to dashboeard
Pipeline
#2170
en échec avec l'étape
in 3 minutes et 52 secondes
Modifications
1
Pipelines
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/shared/sections/giftcard/giftcardmessage/giftcardmessage.tsx
+16
-19
16 ajouts, 19 suppressions
...red/sections/giftcard/giftcardmessage/giftcardmessage.tsx
avec
16 ajouts
et
19 suppressions
src/shared/sections/giftcard/giftcardmessage/giftcardmessage.tsx
+
16
−
19
Voir le fichier @
5d8a19ac
...
...
@@ -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
'
}
}
>
...
...
This diff is collapsed.
Click to expand it.
Aperçu
0%
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter