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
0
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
394db9bc
Valider
394db9bc
rédigé
il y a 5 mois
par
salaheddine zidani
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
search in variations list at add supplier order
parent
90e37f60
Branches
Branches contenant la validation
1 requête de fusion
!442
MYD-807/Fix supplier order items order in change receipt status, make promo code usageLimit optional and search in variations list at add supplier order.
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
.env
+1
-1
1 ajout, 1 suppression
.env
src/shared/sections/supplier/supplier-orders/add-edit-SupplierOrder/SupplierOrderVariationsModal.tsx
+40
-3
40 ajouts, 3 suppressions
...s/add-edit-SupplierOrder/SupplierOrderVariationsModal.tsx
avec
41 ajouts
et
4 suppressions
.env
+
1
−
1
Voir le fichier @
394db9bc
...
...
@@ -40,7 +40,7 @@ NEXT_PUBLIC_DEFAULT_IMAGE_URL=https://mydressin-rec.s3.eu-west-3.amazonaws.com/I
#GATEWAY API URL
NEXT_PUBLIC_MYDRESSIN_GATEWAY_API_URL=https://api
-gateway
.mydressin-server.com/
NEXT_PUBLIC_MYDRESSIN_GATEWAY_API_URL=https://api.mydressin-server.com/
NEXT_PUBLIC_MYDRESSIN_CLIENT_URL=https://app.mydressin-server.com/*
...
...
This diff is collapsed.
Click to expand it.
src/shared/sections/supplier/supplier-orders/add-edit-SupplierOrder/SupplierOrderVariationsModal.tsx
+
40
−
3
Voir le fichier @
394db9bc
import
React
from
'
react
'
;
import
{
List
,
ListItem
,
ListItemText
,
Avatar
,
Typography
,
Button
,
Card
,
Modal
,
Checkbox
}
from
'
@mui/material
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
List
,
ListItem
,
ListItemText
,
Avatar
,
Typography
,
Button
,
Card
,
Modal
,
Checkbox
,
TextField
,
InputAdornment
}
from
'
@mui/material
'
;
import
{
DEFAULT_IMAGE_URL
}
from
'
@/config-global
'
;
import
{
SaveSupplierOrderProductItem
,
SupplierOrderProductVariation
}
from
'
@/contexts/types/supplierOrder
'
;
import
Iconify
from
'
@/components/iconify
'
;
interface
SelectVariationsModalProps
{
showVariationsModal
:
boolean
;
...
...
@@ -38,6 +39,25 @@ const SupplierOrderVariationsModal: React.FC<SelectVariationsModalProps> = ({
}
};
const
[
filtredVariations
,
setFiltredVariations
]
=
useState
<
SupplierOrderProductVariation
[]
>
([]);
const
[
keyword
,
setKeyword
]
=
useState
<
string
>
(
""
);
useEffect
(()
=>
{
if
(
keyword
!==
""
)
{
const
data
=
variationsChoices
.
filter
((
variation
)
=>
variation
.
name
.
toLowerCase
().
includes
(
keyword
.
toLowerCase
())
||
variation
.
id
.
toString
().
includes
(
keyword
)
);
setFiltredVariations
(
data
);
}
else
{
setFiltredVariations
(
variationsChoices
);
}
},
[
keyword
,
variationsChoices
]);
const
onChangeKeyword
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
|
HTMLTextAreaElement
>
)
=>
{
setKeyword
(
event
.
target
.
value
);
};
return
(
<
Modal
open
=
{
showVariationsModal
&&
variationsChoices
&&
variationsChoices
.
length
>
0
}
...
...
@@ -65,8 +85,25 @@ const SupplierOrderVariationsModal: React.FC<SelectVariationsModalProps> = ({
Liste des variations
</
Typography
>
<
TextField
fullWidth
value
=
{
keyword
}
onChange
=
{
onChangeKeyword
}
placeholder
=
"Chercher par code promo, montant minimum, usage, limite d'usage"
InputProps
=
{
{
startAdornment
:
(
<
InputAdornment
position
=
"start"
>
<
Iconify
icon
=
"eva:search-fill"
sx
=
{
{
color
:
"
text.disabled
"
}
}
/>
</
InputAdornment
>
),
}
}
/>
<
List
sx
=
{
{
overflowY
:
'
auto
'
,
maxHeight
:
'
calc(100% - 64px)
'
,
p
:
2
}
}
>
{
v
ariations
Choices
?.
map
((
variation
:
SupplierOrderProductVariation
)
=>
{
{
filtredV
ariations
?.
map
((
variation
:
SupplierOrderProductVariation
)
=>
{
const
isChecked
=
selectedItems
.
some
((
item
:
SaveSupplierOrderProductItem
)
=>
item
.
productId
===
variation
.
id
);
return
(
<
ListItem
key
=
{
variation
.
id
}
onClick
=
{
()
=>
toggleVariationSelection
(
variation
)
}
>
...
...
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