Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Replace order id with order number

dominik-zeglen66b3c826da10
diff --git a/saleor/static/dashboard-next/home/components/HomeActivityCard/activityMessages.ts b/saleor/static/dashboard-next/home/components/HomeActivityCard/activityMessages.ts
index 5144d3c5d8..29c21bdd25 100644
--- a/saleor/static/dashboard-next/home/components/HomeActivityCard/activityMessages.ts
+++ b/saleor/static/dashboard-next/home/components/HomeActivityCard/activityMessages.ts
@@ -5,18 +5,18 @@ import { Home_activities_edges_node } from "../../types/home";
export const getActivityMessage = (activity: Home_activities_edges_node) => {
switch (activity.type) {
case OrderEvents.ORDER_FULLY_PAID:
- return i18n.t("Order {{ orderId }} had been fully paid", {
- orderId: activity.id
+ return i18n.t("Order #{{ orderId }} had been fully paid", {
+ orderId: activity.orderNumber
});
case OrderEvents.PLACED:
- return i18n.t("Order {{ orderId }} had been placed", {
- orderId: activity.id
+ return i18n.t("Order #{{ orderId }} had been placed", {
+ orderId: activity.orderNumber
});
case OrderEvents.PLACED_FROM_DRAFT:
return i18n.t(
- "Order {{ orderId }} had been placed from draft by {{ user }}",
+ "Order #{{ orderId }} had been placed from draft by {{ user }}",
{
- orderId: activity.id,
+ orderId: activity.orderNumber,
user: activity.user.email
}
);
diff --git a/saleor/static/dashboard-next/home/fixtures.ts b/saleor/static/dashboard-next/home/fixtures.ts
index da334de062..7d1853ad27 100644
--- a/saleor/static/dashboard-next/home/fixtures.ts
+++ b/saleor/static/dashboard-next/home/fixtures.ts
@@ -18,6 +18,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDoxOA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -39,6 +40,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDozNQ==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED,
@@ -56,6 +58,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDozNw==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.ORDER_FULLY_PAID,
@@ -73,6 +76,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo1OA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -94,6 +98,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo2Nw==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -115,6 +120,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo2OA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -136,6 +142,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo3MQ==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -157,6 +164,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo3Mw==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED,
@@ -174,6 +182,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo3Nw==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED_FROM_DRAFT,
@@ -195,6 +204,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo3OA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED,
@@ -212,6 +222,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo4MA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.PLACED,
@@ -229,6 +240,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo4Mg==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.ORDER_FULLY_PAID,
@@ -246,6 +258,7 @@ export const shop: (placeholderImage: string) => Home = (
emailType: null,
id: "T3JkZXJFdmVudDo4NA==",
message: null,
+ orderNumber: "15",
oversoldItems: null,
quantity: null,
type: OrderEvents.ORDER_FULLY_PAID,
diff --git a/saleor/static/dashboard-next/home/queries.ts b/saleor/static/dashboard-next/home/queries.ts
index d8ab29ec6a..a6b099a065 100644
--- a/saleor/static/dashboard-next/home/queries.ts
+++ b/saleor/static/dashboard-next/home/queries.ts
@@ -63,6 +63,7 @@ const home = gql`
emailType
id
message
+ orderNumber
oversoldItems
quantity
type
diff --git a/saleor/static/dashboard-next/home/types/Home.ts b/saleor/static/dashboard-next/home/types/Home.ts
index be5d3c6b18..88fafc7da1 100644
--- a/saleor/static/dashboard-next/home/types/Home.ts
+++ b/saleor/static/dashboard-next/home/types/Home.ts
@@ -109,6 +109,7 @@ export interface Home_activities_edges_node {
emailType: OrderEventsEmails | null;
id: string;
message: string | null;
+ orderNumber: string | null;
oversoldItems: (string | null)[] | null;
quantity: number | null;
type: OrderEvents | null;