From c400719fcc8ae04ba95a15ef9e6f583969e6c0b0 Mon Sep 17 00:00:00 2001 From: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> Date: Wed, 22 Jan 2025 11:32:24 +0100 Subject: [PATCH] fix(dashboard): Persist variant_rank (#11074) **What** - Sends variant_rank to the backend - Sorts variant table by variant_rank if no other order is selected. We have a project planned for implementing variant_rank correctly, and adding UI for managing the rank after product creation. This PR handles none of that, as it should be handled as part of said project. This PR simply makes the field useable until then. Resolves CMRC-859 --- .changeset/neat-rabbits-teach.md | 5 +++++ .../product-create-details-variant-section.tsx | 2 ++ .../dashboard/src/routes/products/product-create/utils.ts | 1 + .../product-variant-section/product-variant-section.tsx | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/neat-rabbits-teach.md diff --git a/.changeset/neat-rabbits-teach.md b/.changeset/neat-rabbits-teach.md new file mode 100644 index 0000000000..27b656f018 --- /dev/null +++ b/.changeset/neat-rabbits-teach.md @@ -0,0 +1,5 @@ +--- +"@medusajs/dashboard": patch +--- + +fix(dashboard): Persist variant_rank diff --git a/packages/admin/dashboard/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx b/packages/admin/dashboard/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx index cd18dbf7b2..6361ac4d1a 100644 --- a/packages/admin/dashboard/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx +++ b/packages/admin/dashboard/src/routes/products/product-create/components/product-create-details-form/components/product-create-details-variant-section/product-create-details-variant-section.tsx @@ -453,6 +453,7 @@ export const ProductCreateVariantsSection = ({ >