Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change status label implementation
dominik-zeglen1de386942db5
diff --git a/saleor/static/dashboard-next/components/StatusLabel/StatusLabel.tsx b/saleor/static/dashboard-next/components/StatusLabel/StatusLabel.tsxindex 9599791925..be6584919e 100644--- a/saleor/static/dashboard-next/components/StatusLabel/StatusLabel.tsx+++ b/saleor/static/dashboard-next/components/StatusLabel/StatusLabel.tsx@@ -14,45 +14,44 @@ interface StatusLabelProps {const decorate = withStyles(theme => {const dot = {borderRadius: "100%",- display: "inline-block",- height: theme.spacing.unit,- marginBottom: 1,- marginRight: theme.spacing.unit,- width: theme.spacing.unit+ content: "''",+ display: "block",+ height: 8,+ left: -theme.spacing.unit * 2,+ position: "absolute" as "absolute",+ top: "calc(50% - 5px)",+ width: 8};return {errorDot: {- ...dot,- backgroundColor: theme.palette.error.main+ "&:before": { backgroundColor: theme.palette.error.main, ...dot }},neutralDot: {- ...dot,- backgroundColor: yellow[500]+ "&:before": { backgroundColor: yellow[500], ...dot }},root: {- display: "inline-block"+ display: "inline",+ position: "relative" as "relative"},span: {display: "inline"},successDot: {- ...dot,- backgroundColor: theme.palette.primary.main+ "&:before": { backgroundColor: theme.palette.primary.main, ...dot }}};});const StatusLabel = decorate<StatusLabelProps>(({ classes, className, label, status, typographyProps }) => (- <div className={classNames(classes.root, className)}>- <span- className={- status === "success"- ? classes.successDot- : status === "neutral"- ? classes.neutralDot- : classes.errorDot- }- />+ <div+ className={classNames({+ [classes.root]: true,+ [className]: true,+ [classes.successDot]: status === "success",+ [classes.neutralDot]: status === "neutral",+ [classes.errorDot]: status === "error"+ })}+ >{typographyProps ? (<Typographycomponent="span"diff --git a/saleor/static/dashboard-next/orders/index.tsx b/saleor/static/dashboard-next/orders/index.tsxindex bdba6cdfff..ffe9eea1d2 100644--- a/saleor/static/dashboard-next/orders/index.tsx+++ b/saleor/static/dashboard-next/orders/index.tsx@@ -59,7 +59,7 @@ export const transformPaymentStatus = (status: string) => {return { localized: i18n.t("Refunded"), status: "success" };case PaymentStatusEnum.WAITING:return {- localized: i18n.t("Waiting for confirmation"),+ localized: i18n.t("Waiting"),status: "neutral"};case PaymentStatusEnum.PREAUTH: