changey
This commit is contained in:
@@ -255,6 +255,17 @@ const Equipment = () => {
|
||||
{item.powerSource && <p><strong>Power:</strong> {item.powerSource}</p>}
|
||||
</>
|
||||
);
|
||||
case 'nozzle':
|
||||
return (
|
||||
<>
|
||||
{item.orificeSize && <p><strong>Orifice:</strong> {item.orificeSize}</p>}
|
||||
{item.sprayAngle && <p><strong>Spray Angle:</strong> {item.sprayAngle}°</p>}
|
||||
{item.flowRateGpm && <p><strong>Flow Rate:</strong> {item.flowRateGpm} GPM</p>}
|
||||
{item.dropletSize && <p><strong>Droplet Size:</strong> {item.dropletSize}</p>}
|
||||
{item.sprayPattern && <p><strong>Pattern:</strong> {item.sprayPattern.replace('_', ' ')}</p>}
|
||||
{item.quantityOwned && <p><strong>Quantity:</strong> {item.quantityOwned}</p>}
|
||||
</>
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<>
|
||||
@@ -270,6 +281,7 @@ const Equipment = () => {
|
||||
'Mower': 'bg-green-100 text-green-800',
|
||||
'Spreader': 'bg-orange-100 text-orange-800',
|
||||
'Sprayer': 'bg-blue-100 text-blue-800',
|
||||
'Nozzle': 'bg-teal-100 text-teal-800',
|
||||
'Pump': 'bg-purple-100 text-purple-800',
|
||||
'Aerator': 'bg-yellow-100 text-yellow-800',
|
||||
'Dethatcher': 'bg-red-100 text-red-800',
|
||||
@@ -505,6 +517,17 @@ const EquipmentFormModal = ({ isEdit, equipment, categories, equipmentTypes, onS
|
||||
maxGpm: equipment?.maxGpm || '',
|
||||
maxPsi: equipment?.maxPsi || '',
|
||||
powerSource: equipment?.powerSource || '',
|
||||
// Nozzle fields
|
||||
orificeSize: equipment?.orificeSize || '',
|
||||
sprayAngle: equipment?.sprayAngle || '',
|
||||
flowRateGpm: equipment?.flowRateGpm || '',
|
||||
dropletSize: equipment?.dropletSize || '',
|
||||
sprayPattern: equipment?.sprayPattern || '',
|
||||
pressureRangePsi: equipment?.pressureRangePsi || '',
|
||||
threadSize: equipment?.threadSize || '',
|
||||
material: equipment?.material || '',
|
||||
colorCode: equipment?.colorCode || '',
|
||||
quantityOwned: equipment?.quantityOwned || 1,
|
||||
// General fields
|
||||
purchaseDate: equipment?.purchaseDate || '',
|
||||
purchasePrice: equipment?.purchasePrice || '',
|
||||
@@ -552,6 +575,17 @@ const EquipmentFormModal = ({ isEdit, equipment, categories, equipmentTypes, onS
|
||||
maxGpm: formData.maxGpm ? parseFloat(formData.maxGpm) : null,
|
||||
maxPsi: formData.maxPsi ? parseFloat(formData.maxPsi) : null,
|
||||
powerSource: formData.powerSource || null,
|
||||
// Nozzle fields
|
||||
orificeSize: formData.orificeSize || null,
|
||||
sprayAngle: formData.sprayAngle ? parseInt(formData.sprayAngle) : null,
|
||||
flowRateGpm: formData.flowRateGpm ? parseFloat(formData.flowRateGpm) : null,
|
||||
dropletSize: formData.dropletSize || null,
|
||||
sprayPattern: formData.sprayPattern || null,
|
||||
pressureRangePsi: formData.pressureRangePsi || null,
|
||||
threadSize: formData.threadSize || null,
|
||||
material: formData.material || null,
|
||||
colorCode: formData.colorCode || null,
|
||||
quantityOwned: formData.quantityOwned ? parseInt(formData.quantityOwned) : null,
|
||||
purchaseDate: formData.purchaseDate || null,
|
||||
purchasePrice: formData.purchasePrice ? parseFloat(formData.purchasePrice) : null,
|
||||
notes: formData.notes || null,
|
||||
@@ -804,6 +838,140 @@ const EquipmentFormModal = ({ isEdit, equipment, categories, equipmentTypes, onS
|
||||
</>
|
||||
);
|
||||
|
||||
case 'nozzle':
|
||||
return (
|
||||
<>
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
<div>
|
||||
<label className="label">Orifice Size *</label>
|
||||
<input
|
||||
type="text"
|
||||
className="input"
|
||||
value={formData.orificeSize}
|
||||
onChange={(e) => setFormData({ ...formData, orificeSize: e.target.value })}
|
||||
placeholder="02, 03, 04..."
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Spray Angle *</label>
|
||||
<input
|
||||
type="number"
|
||||
className="input"
|
||||
value={formData.sprayAngle}
|
||||
onChange={(e) => setFormData({ ...formData, sprayAngle: e.target.value })}
|
||||
placeholder="80, 110..."
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Flow Rate (GPM) *</label>
|
||||
<input
|
||||
type="number"
|
||||
step="0.001"
|
||||
className="input"
|
||||
value={formData.flowRateGpm}
|
||||
onChange={(e) => setFormData({ ...formData, flowRateGpm: e.target.value })}
|
||||
placeholder="0.20, 0.30..."
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="label">Droplet Size *</label>
|
||||
<select
|
||||
className="input"
|
||||
value={formData.dropletSize}
|
||||
onChange={(e) => setFormData({ ...formData, dropletSize: e.target.value })}
|
||||
required
|
||||
>
|
||||
<option value="">Select droplet size</option>
|
||||
<option value="fine">Fine</option>
|
||||
<option value="medium">Medium</option>
|
||||
<option value="coarse">Coarse</option>
|
||||
<option value="very_coarse">Very Coarse</option>
|
||||
<option value="extremely_coarse">Extremely Coarse</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Spray Pattern *</label>
|
||||
<select
|
||||
className="input"
|
||||
value={formData.sprayPattern}
|
||||
onChange={(e) => setFormData({ ...formData, sprayPattern: e.target.value })}
|
||||
required
|
||||
>
|
||||
<option value="">Select spray pattern</option>
|
||||
<option value="flat_fan">Flat Fan</option>
|
||||
<option value="hollow_cone">Hollow Cone</option>
|
||||
<option value="full_cone">Full Cone</option>
|
||||
<option value="flooding">Flooding</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className="label">Pressure Range (PSI)</label>
|
||||
<input
|
||||
type="text"
|
||||
className="input"
|
||||
value={formData.pressureRangePsi}
|
||||
onChange={(e) => setFormData({ ...formData, pressureRangePsi: e.target.value })}
|
||||
placeholder="15-60"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Thread Size</label>
|
||||
<input
|
||||
type="text"
|
||||
className="input"
|
||||
value={formData.threadSize}
|
||||
onChange={(e) => setFormData({ ...formData, threadSize: e.target.value })}
|
||||
placeholder="1/4", 3/8"..."
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-3 gap-4">
|
||||
<div>
|
||||
<label className="label">Material</label>
|
||||
<select
|
||||
className="input"
|
||||
value={formData.material}
|
||||
onChange={(e) => setFormData({ ...formData, material: e.target.value })}
|
||||
>
|
||||
<option value="">Select material</option>
|
||||
<option value="polymer">Polymer</option>
|
||||
<option value="stainless_steel">Stainless Steel</option>
|
||||
<option value="brass">Brass</option>
|
||||
<option value="ceramic">Ceramic</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Color Code</label>
|
||||
<input
|
||||
type="text"
|
||||
className="input"
|
||||
value={formData.colorCode}
|
||||
onChange={(e) => setFormData({ ...formData, colorCode: e.target.value })}
|
||||
placeholder="Yellow, Blue, Red..."
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="label">Quantity Owned</label>
|
||||
<input
|
||||
type="number"
|
||||
min="1"
|
||||
className="input"
|
||||
value={formData.quantityOwned}
|
||||
onChange={(e) => setFormData({ ...formData, quantityOwned: e.target.value })}
|
||||
placeholder="1"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
default:
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user