front end

This commit is contained in:
Jake Kasper
2025-09-03 11:54:05 -04:00
parent af302719be
commit b62db962fd

View File

@@ -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 = () => {
</div>
);
if (loading) {
// Avoid blowing away the modal while background loading occurs
if (loading && !showCreateForm && !showEditForm) {
return (
<div className="p-6">
<div className="flex justify-center items-center h-64">
@@ -342,6 +345,8 @@ const Products = () => {
<option value="">All Types</option>
<option value="liquid">Liquid</option>
<option value="granular">Granular</option>
<option value="seed">Seed</option>
<option value="powder">Powder</option>
</select>
</div>
</div>
@@ -620,6 +625,8 @@ const CreateProductModal = ({ onSubmit, onCancel, sharedProducts, categories })
>
<option value="granular">Granular</option>
<option value="liquid">Liquid</option>
<option value="seed">Seed</option>
<option value="powder">Powder</option>
</select>
</div>
</div>