diff --git a/app/frontend/src/javascript/components/store/product-form.tsx b/app/frontend/src/javascript/components/store/product-form.tsx index b4caa92a3..e00f38f79 100644 --- a/app/frontend/src/javascript/components/store/product-form.tsx +++ b/app/frontend/src/javascript/components/store/product-form.tsx @@ -126,7 +126,7 @@ export const ProductForm: React.FC = ({ product, title, onSucc
-
+
= ({ product, title, onSucc + label={t('app.admin.store.product_form.sku')} + className='span-3' />
- - + + label={t('app.admin.store.product_form.slug')} + className='span-7' /> + +

-
+

{t('app.admin.store.product_form.price_and_rule_of_selling_product')}

+ onChange={toggleIsActivePrice} + className='span-3' />
{isActivePrice &&
-
+
= ({ products, onEdit, on }; return ( -
+ <> {products.map((product) => ( -
- {product.name} -
- - - - - - +
+
+ +

{product.name}

+
+
+
+
+ + + + + + +
))} -
+ ); }; diff --git a/app/frontend/src/javascript/components/store/products.tsx b/app/frontend/src/javascript/components/store/products.tsx index 5abf35b0f..6d27af5b1 100644 --- a/app/frontend/src/javascript/components/store/products.tsx +++ b/app/frontend/src/javascript/components/store/products.tsx @@ -65,11 +65,46 @@ const Products: React.FC = ({ onSuccess, onError }) => { {t('app.admin.store.products.create_a_product')}
- +
+
+
+

Filtrer

+
+ Clear +
+
+
+
+
+
+

Result count: {products.length}

+
+
+
+

Display options:

+
+
+ +
+
+
+
+
+

feature name

+ +
+
+

long feature name

+ +
+
+ +
+
); }; diff --git a/app/frontend/src/stylesheets/modules/base/fab-button.scss b/app/frontend/src/stylesheets/modules/base/fab-button.scss index cb661590a..5bf2ece3f 100644 --- a/app/frontend/src/stylesheets/modules/base/fab-button.scss +++ b/app/frontend/src/stylesheets/modules/base/fab-button.scss @@ -62,4 +62,15 @@ opacity: 0.75; } } + &.is-black { + border-color: var(--gray-hard-darkest); + background-color: var(--gray-hard-darkest); + color: var(--gray-soft-lightest); + &:hover { + border-color: var(--gray-hard-darkest); + background-color: var(--gray-hard-darkest); + color: var(--gray-soft-lightest); + opacity: 0.75; + } + } } diff --git a/app/frontend/src/stylesheets/modules/form/form-checklist.scss b/app/frontend/src/stylesheets/modules/form/form-checklist.scss index 4703c2313..20721b0c5 100644 --- a/app/frontend/src/stylesheets/modules/form/form-checklist.scss +++ b/app/frontend/src/stylesheets/modules/form/form-checklist.scss @@ -7,7 +7,7 @@ .checklist { display: grid; - grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.6rem 3.2rem; .checklist-item input { diff --git a/app/frontend/src/stylesheets/modules/store/products.scss b/app/frontend/src/stylesheets/modules/store/products.scss index 1a52e6eb8..05f4d59e6 100644 --- a/app/frontend/src/stylesheets/modules/store/products.scss +++ b/app/frontend/src/stylesheets/modules/store/products.scss @@ -34,6 +34,19 @@ @include title-lg; color: var(--gray-hard-darkest) !important; } + h3 { + margin: 0; + @include text-lg(600); + color: var(--gray-hard-darkest) !important; + } + } + + .layout { + display: flex; + align-items: flex-end; + gap: 0 3.2rem; + .span-7 { flex: 1 1 70%; } + .span-3 { flex: 1 1 30%; } } .main-action-btn { @@ -55,18 +68,146 @@ .products { max-width: 1600px; + + .layout { + align-items: flex-start; + } + + &-filters { + padding-top: 1.6rem; + border-top: 1px solid var(--gray-soft-dark); + } + + &-list { + .status { + padding: 1.6rem 2.4rem; + display: flex; + justify-content: space-between; + background-color: var(--gray-soft); + border-radius: var(--border-radius); + p { margin: 0; } + .count { + p { + display: flex; + align-items: center; + @include text-sm; + span { + margin-left: 1.6rem; + @include text-lg(600); + } + } + } + } + .features { + margin: 2.4rem 0 1.6rem; + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 1.6rem 2.4rem; + &-item { + padding-left: 1.6rem; + display: flex; + align-items: center; + background-color: var(--information-light); + border-radius: 100px; + color: var(--information-dark); + p { margin: 0; } + button { + width: 3.2rem; + height: 3.2rem; + background: none; + border: none; + } + } + } + + &-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.6rem 0.8rem; + border: 1px solid var(--gray-soft-dark); + border-radius: var(--border-radius); + background-color: var(--gray-soft-lightest); + &:not(:first-child) { + margin-top: 1.6rem; + } + + .itemInfo { + display: flex; + justify-content: flex-end; + align-items: center; + + &-thumbnail { + width: 4.8rem; + height: 4.8rem; + margin-right: 1.6rem; + object-fit: cover; + border-radius: var(--border-radius); + background-color: var(--gray-soft); + } + &-name { + margin: 0; + @include text-base; + font-weight: 600; + color: var(--gray-hard-darkest); + } + } + + .actions { + display: flex; + justify-content: flex-end; + align-items: center; + .manage { + overflow: hidden; + display: flex; + border-radius: var(--border-radius-sm); + button { + @include btn; + border-radius: 0; + color: var(--gray-soft-lightest); + &:hover { opacity: 0.75; } + } + .edit-btn {background: var(--gray-hard-darkest) } + .delete-btn {background: var(--error) } + } + } + } + } } .new-product, .edit-product { max-width: 1300px; + padding-right: 1.6rem; + padding-left: 1.6rem; .product-form { - .grp { + .flex { display: flex; - gap: 2.4rem 3.2rem; - .span-7 { - min-width: 70%; + flex-wrap: wrap; + align-items: flex-end; + gap: 0 3.2rem; + & > * { + flex: 1 1 320px; + } + } + + .layout { + @media (max-width: 1023px) { + .span-3, + .span-7 { + flex-basis: 50%; + } + } + @media (max-width: 767px) { + flex-wrap: wrap; + } + } + + .price-data { + .layout { + align-items: center; } } } diff --git a/app/frontend/templates/admin/store/index.html b/app/frontend/templates/admin/store/index.html index 0b7557e96..745b51c57 100644 --- a/app/frontend/templates/admin/store/index.html +++ b/app/frontend/templates/admin/store/index.html @@ -17,7 +17,7 @@
-
+
diff --git a/app/frontend/templates/admin/store/product_edit.html b/app/frontend/templates/admin/store/product_edit.html index f098a8b92..6c2f86d18 100644 --- a/app/frontend/templates/admin/store/product_edit.html +++ b/app/frontend/templates/admin/store/product_edit.html @@ -27,7 +27,7 @@
-
+
diff --git a/app/frontend/templates/admin/store/product_new.html b/app/frontend/templates/admin/store/product_new.html index db9dae230..8c4fb9a05 100644 --- a/app/frontend/templates/admin/store/product_new.html +++ b/app/frontend/templates/admin/store/product_new.html @@ -27,7 +27,7 @@
-
+