Feature #4162
openFeature #4154: Inventory Actuals Capture
Feature #4160: User Story: Preview Planned vs Actual
Backend api for getting inventory data for review
0%
Description
API / Backend
Preview Endpoint
GET /jobs/{id}/actuals/preview returns full job snapshot.
Must include planned, actual, variance, remarks, attachments.
Return error 404 if no actuals exist.
Variance Calculation
Validate calculation logic:
Planned=10, Actual=8 → Variance=-2.
Planned=5, Actual=7 → Variance=+2.
Ensure percentage variance is included if required.
Threshold Highlighting
Backend marks variance items exceeding threshold with flag highlight=true.
Ensure configurable threshold value (e.g., 10%) loaded from system settings.
Attachments
Ensure API returns attachment metadata: fileId, filename, fileType, presignedURL.
Validate expiry time on presigned URL.
Read-Only Enforcement
Ensure preview API is GET only, no mutating operations.
Audit Logging
Verify viewPreview entry added to audit table when Admin calls preview endpoint.
Subtasks
Related issues
No data to display