Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add dashboard basic layout
Lukasz Szewczyk93cb1f72b85f
diff --git a/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsx b/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsxnew file mode 100644index 0000000000..362344ed94--- /dev/null+++ b/saleor/static/dashboard-next/home/components/Dashbaord/Dashbaord.tsx@@ -0,0 +1,70 @@+import Card from "@material-ui/core/Card";+import { withStyles } from "@material-ui/core/styles";+import Typography from "@material-ui/core/Typography";+import * as React from "react";+import CardSpacer from "../../../components/CardSpacer";+import Container from "../../../components/Container";+import PageHeader from "../../../components/PageHeader";+import i18n from "../../../i18n";+interface MoneyType {+ amount: number;+ currency: string;+}++export interface DashboardProps {+ ownerName: string;+}++const decorate = withStyles(theme => ({+ displayBlock: {+ display: "block"+ },+ flexbox: {+ display: "flex"+ },++ root: {+ display: "grid" as "grid",+ gridColumnGap: `${theme.spacing.unit * 3}px`,+ gridTemplateColumns: "2fr 1fr",+ [theme.breakpoints.down("sm")]: {+ gridColumnGap: `${theme.spacing.unit}px`+ },+ [theme.breakpoints.down("xs")]: {+ gridTemplateColumns: "1fr"+ }+ }+}));+const Dashboard = decorate<DashboardProps>(({ ownerName, classes }) => {+ return (+ <Container width="md">+ <PageHeader+ className={classes.displayBlock}+ title={i18n.t("Hello there, {{userName}}", { userName: ownerName })}+ >+ <Typography component="span">+ {i18n.t("Here are some information we gathered about your store")}+ </Typography>+ </PageHeader>++ <div className={classes.root}>+ <div>+ <div className={classes.flexbox}>+ <Card>Sales</Card>+ <Card>Orders</Card>+ </div>++ <CardSpacer />+ <Card>Notification</Card>+ <CardSpacer />+ <Card>ProductListCard</Card>+ <CardSpacer />+ </div>+ <div>+ <Card>HomeActivityCard</Card>+ </div>+ </div>+ </Container>+ );+});+export default Dashboard;diff --git a/saleor/static/dashboard-next/home/components/Dashbaord/index.ts b/saleor/static/dashboard-next/home/components/Dashbaord/index.tsnew file mode 100644index 0000000000..27e698def7--- /dev/null+++ b/saleor/static/dashboard-next/home/components/Dashbaord/index.ts@@ -0,0 +1,2 @@+export { default } from "./Dashbaord";+export * from "./Dashbaord";