front end
This commit is contained in:
@@ -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>
|
||||
@@ -613,14 +618,16 @@ const CreateProductModal = ({ onSubmit, onCancel, sharedProducts, categories })
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Product Type *</label>
|
||||
<select
|
||||
className="input"
|
||||
value={formData.productType}
|
||||
onChange={(e) => setFormData({ ...formData, productType: e.target.value })}
|
||||
>
|
||||
<option value="granular">Granular</option>
|
||||
<option value="liquid">Liquid</option>
|
||||
</select>
|
||||
<select
|
||||
className="input"
|
||||
value={formData.productType}
|
||||
onChange={(e) => setFormData({ ...formData, productType: e.target.value })}
|
||||
>
|
||||
<option value="granular">Granular</option>
|
||||
<option value="liquid">Liquid</option>
|
||||
<option value="seed">Seed</option>
|
||||
<option value="powder">Powder</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user