feat(Orders): update order status translations and colors
- Refactored order status translations to use English keys for 'new', 'shipped', and 'delivered'. - Updated corresponding status colors to maintain consistency in the UI. - Adjusted the display logic to reflect the new status keys in the OrdersTab component.
This commit is contained in:
@@ -40,33 +40,23 @@ const getStatusTranslation = (status, t) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const statusEmojis = {
|
const statusEmojis = {
|
||||||
"in Bearbeitung": "⚙️",
|
new: "⚙️",
|
||||||
pending: "⏳",
|
pending: "⏳",
|
||||||
processing: "🔄",
|
processing: "🔄",
|
||||||
paid: "🏦",
|
paid: "🏦",
|
||||||
cancelled: "❌",
|
cancelled: "❌",
|
||||||
Verschickt: "🚚",
|
shipped: "🚚",
|
||||||
Geliefert: "✅",
|
delivered: "✅",
|
||||||
Bezahlt: "💰",
|
|
||||||
Storniert: "❌",
|
|
||||||
Retoure: "↩️",
|
|
||||||
"Teil Retoure": "↪️",
|
|
||||||
"Teil geliefert": "⚡",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const statusColors = {
|
const statusColors = {
|
||||||
"in Bearbeitung": "#ed6c02", // orange
|
new: "#ed6c02", // orange
|
||||||
pending: "#ff9800", // orange for pending
|
pending: "#ff9800", // orange for pending
|
||||||
processing: "#2196f3", // blue for processing
|
processing: "#2196f3", // blue for processing
|
||||||
paid: "#2e7d32", // green
|
paid: "#2e7d32", // green
|
||||||
cancelled: "#d32f2f", // red for cancelled
|
cancelled: "#d32f2f", // red for cancelled
|
||||||
Verschickt: "#2e7d32", // green
|
shipped: "#2e7d32", // green
|
||||||
Geliefert: "#2e7d32", // green
|
delivered: "#2e7d32", // green
|
||||||
Bezahlt: "#2e7d32", // green
|
|
||||||
Storniert: "#d32f2f", // red
|
|
||||||
Retoure: "#9c27b0", // purple
|
|
||||||
"Teil Retoure": "#9c27b0", // purple
|
|
||||||
"Teil geliefert": "#009688", // teal
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const currencyFormatter = new Intl.NumberFormat("de-DE", {
|
const currencyFormatter = new Intl.NumberFormat("de-DE", {
|
||||||
@@ -234,11 +224,11 @@ const OrdersTab = ({ orderIdFromHash, t }) => {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: "8px",
|
gap: "8px",
|
||||||
color: getStatusColor(displayStatus),
|
color: getStatusColor(order.status),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span style={{ fontSize: "1.2rem" }}>
|
<span style={{ fontSize: "1.2rem" }}>
|
||||||
{getStatusEmoji(displayStatus)}
|
{getStatusEmoji(order.status)}
|
||||||
</span>
|
</span>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
|
|||||||
Reference in New Issue
Block a user