From b62db962fd572dbf7314684b89d9d1f39becd596 Mon Sep 17 00:00:00 2001 From: Jake Kasper Date: Wed, 3 Sep 2025 11:54:05 -0400 Subject: [PATCH] front end --- frontend/src/pages/Products/Products.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/frontend/src/pages/Products/Products.js b/frontend/src/pages/Products/Products.js index 409afe9..3651a90 100644 --- a/frontend/src/pages/Products/Products.js +++ b/frontend/src/pages/Products/Products.js @@ -183,6 +183,8 @@ const Products = () => { ? 'bg-blue-100 text-blue-800' : product.productType === 'granular' ? 'bg-green-100 text-green-800' + : product.productType === 'seed' + ? 'bg-yellow-100 text-yellow-800' : 'bg-gray-100 text-gray-800' }`}> {product.productType ? @@ -267,7 +269,8 @@ const Products = () => { ); - if (loading) { + // Avoid blowing away the modal while background loading occurs + if (loading && !showCreateForm && !showEditForm) { return (
@@ -342,6 +345,8 @@ const Products = () => { + +
@@ -613,14 +618,16 @@ const CreateProductModal = ({ onSubmit, onCancel, sharedProducts, categories })
- +