diff --git a/src/components/JobForm.tsx b/src/components/JobForm.tsx index ae44e11..20f0a8c 100644 --- a/src/components/JobForm.tsx +++ b/src/components/JobForm.tsx @@ -23,7 +23,8 @@ const JobForm: React.FC = ({ job, onSubmit, onCancel }) => { status: job?.status || IndJobStatusOptions.Planned, projectedCost: job?.projectedCost || 0, projectedRevenue: job?.projectedRevenue || 0, - runtime: job?.runtime || 0 + runtime: job?.runtime || 0, + parallel: job?.parallel || 1 }); const [jobDump, setJobDump] = useState(''); @@ -102,7 +103,8 @@ const JobForm: React.FC = ({ job, onSubmit, onCancel }) => { status: formData.status, projectedCost: formData.projectedCost, projectedRevenue: formData.projectedRevenue, - runtime: formData.runtime + runtime: formData.runtime, + parallel: formData.parallel }, parsedBillOfMaterials.length > 0 ? parsedBillOfMaterials : undefined); }; @@ -166,7 +168,7 @@ const JobForm: React.FC = ({ job, onSubmit, onCancel }) => { -
+
= ({ job, onSubmit, onCancel }) => { className="bg-gray-800 border-gray-600 text-white" />
+
+ + setFormData({ + ...formData, + parallel: Math.max(1, parseInt(e.target.value) || 1) + })} + className="bg-gray-800 border-gray-600 text-white" + /> +
{ - const result = await pb.collection('ind_facility').getFullList(); - return result as IndFacilityResponse[]; -} - -export async function getFacility(id: string): Promise { - try { - return await pb.collection('ind_facility').getOne(id) as IndFacilityResponse; - } catch (e) { - if (e.status === 404) return null; - throw e; - } -} - -export async function createFacility(facility: Omit): Promise { - return await pb.collection('ind_facility').create(facility) as IndFacilityResponse; -} - -export async function updateFacility(id: string, updates: Partial): Promise { - return await pb.collection('ind_facility').update(id, updates) as IndFacilityResponse; -} - -export async function deleteFacility(id: string): Promise { - await pb.collection('ind_facility').delete(id); -}