front end
This commit is contained in:
@@ -183,6 +183,8 @@ const Products = () => {
|
|||||||
? 'bg-blue-100 text-blue-800'
|
? 'bg-blue-100 text-blue-800'
|
||||||
: product.productType === 'granular'
|
: product.productType === 'granular'
|
||||||
? 'bg-green-100 text-green-800'
|
? 'bg-green-100 text-green-800'
|
||||||
|
: product.productType === 'seed'
|
||||||
|
? 'bg-yellow-100 text-yellow-800'
|
||||||
: 'bg-gray-100 text-gray-800'
|
: 'bg-gray-100 text-gray-800'
|
||||||
}`}>
|
}`}>
|
||||||
{product.productType ?
|
{product.productType ?
|
||||||
@@ -267,7 +269,8 @@ const Products = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (loading) {
|
// Avoid blowing away the modal while background loading occurs
|
||||||
|
if (loading && !showCreateForm && !showEditForm) {
|
||||||
return (
|
return (
|
||||||
<div className="p-6">
|
<div className="p-6">
|
||||||
<div className="flex justify-center items-center h-64">
|
<div className="flex justify-center items-center h-64">
|
||||||
@@ -342,6 +345,8 @@ const Products = () => {
|
|||||||
<option value="">All Types</option>
|
<option value="">All Types</option>
|
||||||
<option value="liquid">Liquid</option>
|
<option value="liquid">Liquid</option>
|
||||||
<option value="granular">Granular</option>
|
<option value="granular">Granular</option>
|
||||||
|
<option value="seed">Seed</option>
|
||||||
|
<option value="powder">Powder</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -613,14 +618,16 @@ const CreateProductModal = ({ onSubmit, onCancel, sharedProducts, categories })
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label className="label">Product Type *</label>
|
<label className="label">Product Type *</label>
|
||||||
<select
|
<select
|
||||||
className="input"
|
className="input"
|
||||||
value={formData.productType}
|
value={formData.productType}
|
||||||
onChange={(e) => setFormData({ ...formData, productType: e.target.value })}
|
onChange={(e) => setFormData({ ...formData, productType: e.target.value })}
|
||||||
>
|
>
|
||||||
<option value="granular">Granular</option>
|
<option value="granular">Granular</option>
|
||||||
<option value="liquid">Liquid</option>
|
<option value="liquid">Liquid</option>
|
||||||
</select>
|
<option value="seed">Seed</option>
|
||||||
|
<option value="powder">Powder</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user