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
e7b9f9ed
Valider
e7b9f9ed
rédigé
il y a 4 mois
par
salaheddine zidani
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
add attributes of relay point in order entity
parent
65679320
Branches
Branches contenant la validation
1 requête de fusion
!484
MS-88/Fix relay point display in order info of back office
Modifications
2
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
2 fichiers modifiés
src/contexts/types/main-order.ts
+40
-33
40 ajouts, 33 suppressions
src/contexts/types/main-order.ts
src/shared/sections/order/order-details/order-details-info.tsx
+81
-24
81 ajouts, 24 suppressions
...hared/sections/order/order-details/order-details-info.tsx
avec
121 ajouts
et
57 suppressions
src/contexts/types/main-order.ts
+
40
−
33
Voir le fichier @
e7b9f9ed
...
...
@@ -8,23 +8,23 @@ import { RefundOrderItem } from "./refundOrder";
export
enum
NoteType
{
PRIVATE
=
'
PRIVATE
'
,
TO_CLIENT
=
'
TO_CLIENT
'
,
FROM_CLIENT
=
"
FROM_CLIENT
"
FROM_CLIENT
=
"
FROM_CLIENT
"
}
export
const
noteTypeLabels
:
Record
<
NoteType
,
string
>
=
{
[
NoteType
.
PRIVATE
]:
'
Privé
'
,
[
NoteType
.
TO_CLIENT
]:
'
Pour le client
'
,
[
NoteType
.
FROM_CLIENT
]:
'
du client
'
,
[
NoteType
.
PRIVATE
]:
'
Privé
'
,
[
NoteType
.
TO_CLIENT
]:
'
Pour le client
'
,
[
NoteType
.
FROM_CLIENT
]:
'
du client
'
,
};
export
const
order_options
=
{
FAILED
:
"
Échoué
"
,
ON_HOLD
:
"
En attente
"
,
IN_PROGRESS
:
"
En cours
"
,
FINISHED
:
"
Terminé
"
,
CANCELED
:
"
Annulé
"
,
PARTIALLY_REFUNDED
:
"
Remboursé partiellement
"
,
REFUNDED
:
"
Remboursé
"
,
DELETED
:
"
Supprimé
"
,
FAILED
:
"
Échoué
"
,
ON_HOLD
:
"
En attente
"
,
IN_PROGRESS
:
"
En cours
"
,
FINISHED
:
"
Terminé
"
,
CANCELED
:
"
Annulé
"
,
PARTIALLY_REFUNDED
:
"
Remboursé partiellement
"
,
REFUNDED
:
"
Remboursé
"
,
DELETED
:
"
Supprimé
"
,
};
export
enum
ItemSource
{
...
...
@@ -137,8 +137,8 @@ export type OrderAddress = {
export
interface
OrderWithClientDetails
extends
Order
{
clientFullName
:
string
;
clientEmail
:
string
;
clientFullName
:
string
;
clientEmail
:
string
;
}
export
interface
Order
{
id
:
string
;
...
...
@@ -160,6 +160,13 @@ export interface Order {
shippingMethodType
:
ShippingMethodType
;
shippingPrice
:
number
;
shippingAddress
:
OrderAddress
;
relayRef
:
string
;
relayPointName
:
string
;
relayPointAddress1
:
string
;
relayPointAddress2
:
string
;
relayPointZipCode
:
string
;
relayPointCity
:
string
;
relayPointCountry
:
string
;
billingAddress
:
OrderAddress
;
paymentMethodType
:
string
;
transactionId
?:
string
;
...
...
@@ -179,27 +186,27 @@ export interface Order {
voucherBalanceUsed
:
number
;
}
export
interface
IOrderPage
{
content
:
OrderWithClientDetails
[];
pageable
:
{
content
:
OrderWithClientDetails
[];
pageable
:
{
sort
:
{
empty
:
boolean
;
sorted
:
boolean
;
unsorted
:
boolean
;
};
offset
:
number
;
pageNumber
:
number
;
pageSize
:
number
;
unpaged
:
boolean
;
paged
:
boolean
;
};
totalPages
:
number
;
totalElements
:
number
;
last
:
boolean
;
sort
:
{
empty
:
boolean
;
sorted
:
boolean
;
unsorted
:
boolean
;
empty
:
boolean
;
sorted
:
boolean
;
unsorted
:
boolean
;
};
offset
:
number
;
pageNumber
:
number
;
pageSize
:
number
;
unpaged
:
boolean
;
paged
:
boolean
;
};
totalPages
:
number
;
totalElements
:
number
;
last
:
boolean
;
sort
:
{
empty
:
boolean
;
sorted
:
boolean
;
unsorted
:
boolean
;
};
}
...
...
This diff is collapsed.
Click to expand it.
src/shared/sections/order/order-details/order-details-info.tsx
+
81
−
24
Voir le fichier @
e7b9f9ed
...
...
@@ -4,8 +4,11 @@ import Stack from "@mui/material/Stack";
import
Divider
from
"
@mui/material/Divider
"
;
import
CardHeader
from
"
@mui/material/CardHeader
"
;
import
Typography
from
"
@mui/material/Typography
"
;
import
{
CardContent
,
Chip
,
Grid
,
Pagination
,
Table
,
TableBody
,
TableCell
,
TableContainer
,
TableRow
}
from
"
@mui/material
"
;
import
{
CardContent
,
Chip
,
Grid
,
Pagination
,
Table
,
TableBody
,
TableCell
,
TableContainer
,
TableRow
}
from
"
@mui/material
"
;
import
CircularProgress
from
"
@mui/material/CircularProgress
"
;
import
{
OrderStatusHistoryDTO
,
getStatusInFrench
,
OrderStatus
}
from
"
../../../types/order
"
;
import
{
useGetUserById
}
from
"
@/shared/api/user
"
;
import
{
useEffect
,
useState
}
from
"
react
"
;
import
{
OrderStatusHistoryDTO
,
getStatusInFrench
,
OrderStatus
}
from
"
../../../types/order
"
;
import
{
findUserById
,
useGetUserById
}
from
"
@/shared/api/user
"
;
import
{
useCallback
,
useEffect
,
useState
}
from
"
react
"
;
...
...
@@ -227,9 +230,9 @@ export default function OrderDetailsInfo({ order }: Props) {
const
sortedNotes
=
order
?.
notes
?
order
.
notes
.
sort
(
(
a
,
b
)
=>
new
Date
(
b
.
createdAt
).
getTime
()
-
new
Date
(
a
.
createdAt
).
getTime
()
)
(
a
,
b
)
=>
new
Date
(
b
.
createdAt
).
getTime
()
-
new
Date
(
a
.
createdAt
).
getTime
()
)
:
[];
const
paginatedNotes
=
sortedNotes
.
slice
(
...
...
@@ -293,10 +296,10 @@ export default function OrderDetailsInfo({ order }: Props) {
type
===
"
page
"
?
`PageNote
${
page
}
`
:
type
===
"
next
"
?
"
PageNote suivante
"
:
type
===
"
previous
"
?
"
PageNote précédente
"
:
""
?
"
PageNote suivante
"
:
type
===
"
previous
"
?
"
PageNote précédente
"
:
""
}
sx
=
{
{
mt
:
2
,
...
...
@@ -366,9 +369,8 @@ export default function OrderDetailsInfo({ order }: Props) {
>
Adresse
</
Box
>
{
`
${
order
.
billingAddress
.
street
||
""
}
${
order
.
billingAddress
.
home
||
""
}
`
}
{
`
${
order
.
billingAddress
.
street
||
""
}
${
order
.
billingAddress
.
home
||
""
}
`
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
...
...
@@ -418,9 +420,8 @@ export default function OrderDetailsInfo({ order }: Props) {
>
Adresse
</
Box
>
{
`
${
order
.
shippingAddress
.
street
||
""
}
${
order
.
shippingAddress
.
home
||
""
}
`
}
{
`
${
order
.
shippingAddress
.
street
||
""
}
${
order
.
shippingAddress
.
home
||
""
}
`
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
...
...
@@ -449,22 +450,78 @@ export default function OrderDetailsInfo({ order }: Props) {
</
Box
>
{
order
.
shippingAddress
.
country
||
""
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Mode d’expédition
</
Box
>
{
getShippingMethodNameInFrench
(
order
.
shippingMethodType
)
||
""
}
</
Stack
>
</
Stack
>
)
:
(
<
Box
sx
=
{
{
p
:
3
,
typography
:
"
body2
"
,
color
:
"
text.secondary
"
}
}
>
Commande n'a pas d'adresse de livraison
</
Box
>
)
}
<
Stack
spacing
=
{
1.5
}
sx
=
{
{
p
:
3
,
typography
:
"
body2
"
}
}
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Nom
</
Box
>
{
order
?.
relayPointName
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Addresse 1
</
Box
>
{
order
?.
relayPointAddress1
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Addresse 2
</
Box
>
{
order
?.
relayPointAddress2
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Code postal
</
Box
>
{
order
?.
relayPointZipCode
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Ville
</
Box
>
{
order
?.
relayPointCity
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Pays
</
Box
>
{
order
?.
relayPointCountry
}
</
Stack
>
<
Stack
direction
=
"row"
>
<
Box
component
=
"span"
sx
=
{
{
color
:
"
text.secondary
"
,
width
:
118
,
flexShrink
:
0
}
}
>
Mode d’expédition
</
Box
>
{
getShippingMethodNameInFrench
(
order
.
shippingMethodType
)
||
""
}
</
Stack
>
</
Stack
>
</>
);
...
...
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