Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add placeholder for new variant
dominik-zeglenf92d838bbdb7
diff --git a/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx b/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsxindex 815c0b1659..f80fa7aa19 100644--- a/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx+++ b/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx@@ -39,11 +39,11 @@ const TableCellAvatar = withStyles(styles, { name: "TableCellAvatar" })(<TableCell className={classNames(classes.root, className)}>{thumbnail === undefined ? (<Avatar className={classNames(classes.avatar, avatarProps)}>- <Cached />+ <Cached color="primary" /></Avatar>) : thumbnail === null ? (<Avatar className={classNames(classes.avatar, avatarProps)}>- <NoPhoto />+ <NoPhoto color="primary" /></Avatar>) : (<Avatardiff --git a/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsxindex cdd6d487c9..6188b35d0c 100644--- a/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx+++ b/saleor/static/dashboard-next/products/components/ProductVariantNavigation/ProductVariantNavigation.tsx@@ -97,7 +97,7 @@ const ProductVariantNavigation = withStyles(styles, {</TableRow>))}- {onAdd && (+ {onAdd ? (<TableRow><TableCell colSpan={2}><Button color="primary" onClick={onAdd}>@@ -105,6 +105,13 @@ const ProductVariantNavigation = withStyles(styles, {</Button></TableCell></TableRow>+ ) : (+ <TableRow>+ <TableCellAvatar className={classes.tabActive} thumbnail={null} />+ <TableCell className={classes.textLeft}>+ {i18n.t("New Variant")}+ </TableCell>+ </TableRow>)}</TableBody></Table>diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snapindex e922eebc97..028a0170b0 100644--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap@@ -153,7 +153,7 @@ exports[`Storyshots Categories / CategoryProducts when loading data 1`] = `><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -13887,7 +13887,7 @@ Ctrl + K"><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -32933,7 +32933,7 @@ exports[`Storyshots Views / HomePage loading 1`] = `><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -37511,7 +37511,7 @@ exports[`Storyshots Views / Orders / Order details loading 1`] = `><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -48582,7 +48582,7 @@ exports[`Storyshots Views / Orders / Order draft loading 1`] = `><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -58643,6 +58643,38 @@ exports[`Storyshots Views / Products / Create product variant default 1`] = `silver</td></tr>+ <tr+ class="MuiTableRow-root-id"+ >+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id ProductVariantNavigation-tabActive-id"+ >+ <div+ class="MuiAvatar-root-id MuiAvatar-colorDefault-id TableCellAvatar-avatar-id"+ >+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"+ focusable="false"+ role="presentation"+ viewBox="0 0 24 24"+ >+ <g+ style="fill-rule:evenodd"+ >+ <path+ d="M 22.418358,23.933955 23.941248,22.416861 1.505286,0.06622212 -0.01756434,1.5833815 2.3945365,3.98626 c -0.00402,0.054209 -0.00609,0.1089561 -0.00609,0.1641949 l 0,15.5654231 c 0,1.223034 1.0044565,2.223746 2.232151,2.223746 l 15.6251379,0 c 0.05533,0 0.110242,-0.0021 0.164611,-0.0061 l 2.008007,2.000405 z m -4.234188,-4.218065 -2.232782,-2.224284 -10.2147024,0 3.3482328,-4.291641 2.3883966,2.879541 1.336535,-1.717557 -8.1892465,-8.1579753 0,13.5119163 13.5635665,0 z m 4.293682,-15.5654234 0,13.8585934 -2.232111,-2.223614 0,-11.6349794 -11.6793779,0 -2.232218,-2.2237479 13.9115959,0 c 1.227708,0 2.232111,1.0007001 2.232111,2.2237479 z"+ />+ </g>+ </svg>+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id ProductVariantNavigation-textLeft-id"+ >+ New Variant+ </td>+ </tr></tbody></table></div>@@ -58974,7 +59006,7 @@ exports[`Storyshots Views / Products / Create product variant when loading data><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -58999,6 +59031,38 @@ exports[`Storyshots Views / Products / Create product variant when loading data</span></td></tr>+ <tr+ class="MuiTableRow-root-id"+ >+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id ProductVariantNavigation-tabActive-id"+ >+ <div+ class="MuiAvatar-root-id MuiAvatar-colorDefault-id TableCellAvatar-avatar-id"+ >+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"+ focusable="false"+ role="presentation"+ viewBox="0 0 24 24"+ >+ <g+ style="fill-rule:evenodd"+ >+ <path+ d="M 22.418358,23.933955 23.941248,22.416861 1.505286,0.06622212 -0.01756434,1.5833815 2.3945365,3.98626 c -0.00402,0.054209 -0.00609,0.1089561 -0.00609,0.1641949 l 0,15.5654231 c 0,1.223034 1.0044565,2.223746 2.232151,2.223746 l 15.6251379,0 c 0.05533,0 0.110242,-0.0021 0.164611,-0.0061 l 2.008007,2.000405 z m -4.234188,-4.218065 -2.232782,-2.224284 -10.2147024,0 3.3482328,-4.291641 2.3883966,2.879541 1.336535,-1.717557 -8.1892465,-8.1579753 0,13.5119163 13.5635665,0 z m 4.293682,-15.5654234 0,13.8585934 -2.232111,-2.223614 0,-11.6349794 -11.6793779,0 -2.232218,-2.2237479 13.9115959,0 c 1.227708,0 2.232111,1.0007001 2.232111,2.2237479 z"+ />+ </g>+ </svg>+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id ProductVariantNavigation-textLeft-id"+ >+ New Variant+ </td>+ </tr></tbody></table></div>@@ -59327,6 +59391,38 @@ exports[`Storyshots Views / Products / Create product variant with errors 1`] =silver</td></tr>+ <tr+ class="MuiTableRow-root-id"+ >+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id TableCellAvatar-root-id ProductVariantNavigation-tabActive-id"+ >+ <div+ class="MuiAvatar-root-id MuiAvatar-colorDefault-id TableCellAvatar-avatar-id"+ >+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"+ focusable="false"+ role="presentation"+ viewBox="0 0 24 24"+ >+ <g+ style="fill-rule:evenodd"+ >+ <path+ d="M 22.418358,23.933955 23.941248,22.416861 1.505286,0.06622212 -0.01756434,1.5833815 2.3945365,3.98626 c -0.00402,0.054209 -0.00609,0.1089561 -0.00609,0.1641949 l 0,15.5654231 c 0,1.223034 1.0044565,2.223746 2.232151,2.223746 l 15.6251379,0 c 0.05533,0 0.110242,-0.0021 0.164611,-0.0061 l 2.008007,2.000405 z m -4.234188,-4.218065 -2.232782,-2.224284 -10.2147024,0 3.3482328,-4.291641 2.3883966,2.879541 1.336535,-1.717557 -8.1892465,-8.1579753 0,13.5119163 13.5635665,0 z m 4.293682,-15.5654234 0,13.8585934 -2.232111,-2.223614 0,-11.6349794 -11.6793779,0 -2.232218,-2.2237479 13.9115959,0 c 1.227708,0 2.232111,1.0007001 2.232111,2.2237479 z"+ />+ </g>+ </svg>+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id ProductVariantNavigation-textLeft-id"+ >+ New Variant+ </td>+ </tr></tbody></table></div>@@ -65974,7 +66070,7 @@ exports[`Storyshots Views / Products / Product list loading 1`] = `><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"@@ -67677,7 +67773,7 @@ exports[`Storyshots Views / Products / Product variant details when loading data><svgaria-hidden="true"- class="MuiSvgIcon-root-id"+ class="MuiSvgIcon-root-id MuiSvgIcon-colorPrimary-id"focusable="false"role="presentation"viewBox="0 0 24 24"