I can see the Resource Planner already has the ability to view positions per contract, but the main planner page only shows counts. I'll enhance the main Resource Planner page to allow adding positions directly, with a modal to add new positions and display them in an expandable table.
I've enhanced the Resource Planner page with a comprehensive position management system. The page now features summary cards showing total positions, resources required/allocated, and unallocated positions. Contracts are displayed with expandable sections that reveal all positions within each contract, including details like department, required count, allocated count, status, type (hourly/monthly), cost per resource, and duration. Users can add new positions via a modal with fields for title, department, number required, resource type, estimated cost, skills, and dates. Positions can also be deleted, and clicking "Allocate" navigates to the detailed planner page for resource allocation.
The code returns the following error:
Cannot read properties of undefined (reading 'toLocaleString')
at (/app/procurement/payment-certificates/create/page)
at CreatePaymentCertificatePage (/app/procurement/payment-certificates/create/page)
Revise the code to address the error.
I was previewing: /procurement/payment-certificates/create
I can see the issue - in the "Previous Payments" table, when iterating over previousPayments, the code calls .toLocaleString() on properties like payment.amount, payment.netPayable, payment.retentionAmount, and payment.advanceKnockoff which might be undefined for older certificates. Let me fix this:
I've added null/undefined checks with fallback values (|| 0) for all numeric fields in the Previous Payments table that call .toLocaleString(). This prevents the error when older payment certificates might not have all the expected properties defined.
In Contracts add varation option varaiation can be on contract or variance can be in pla if plan in plan let add teh revsed dates against the issued plan if varatiin in amount allow the varation order to be added with liens and wbs cost id linked and show varation in contract and paymet certifcates