First to Site
Ordering Portal

Documents & Uploads

Document upload, assignment, categorisation, and versioning in the Ordering Portal

Documents & Uploads

Document management is a core feature of the Ordering Portal. Documents can be uploaded at multiple points in the workflow and assigned across multiple orders.

Where Documents Are Uploaded

ContextWhenRoute
Order Wizard Step 3During new order creation/orders/documents/multiple
Order Detail PageAfter order is created/order/{id} (embedded)
On-Hold ResubmissionFixing rejected/on-hold orders/order/{id} (embedded)

Upload Methods

Drag and Drop

  • Drop files anywhere on the upload zone or directly onto service cards
  • Multiple files can be dropped at once
  • Visual feedback (highlight) when dragging over the zone

Browse Button

  • Click the upload area to open the system file picker
  • Select one or multiple files

Accepted File Types

FormatExtension
PDF.pdf
Word.doc, .docx
Images.jpg, .png
Archives.zip

Maximum file size: 100MB per file

Upload Process

  1. File is selected or dropped
  2. Progress bar shows upload progress
  3. File is uploaded to POST /orders/documents/multiple/upload
  4. A ProjectOrderAttachment entity is created
  5. The document appears in the documents table
  6. The document is not yet assigned to any order (assignment is a separate step)

Document Assignment

After upload, documents must be assigned to one or more orders.

Assignment Modal

Clicking "Assign" on a document opens a modal with:

  • Order checkboxes — select which orders this document applies to
  • Document Type dropdown (Select2) — primary category (e.g., "Architectural Drawings")
  • Document Subcategory dropdown (Select2) — secondary classification (e.g., "Floor Plans")
  • Save button

How Assignment Works

  • Calls POST /orders/documents/multiple/assign
  • Creates ProjectOrderAttachmentAssignment records linking the document to selected orders
  • Updates the document's type and subcategory metadata
  • A single document can be assigned to multiple orders simultaneously
  • Changing assignments removes old links and creates new ones

Document Categorisation

Document Types (Primary Category)

The list of available types is fetched from the v3 API (/v3/api/ordering/document-types). Common types include:

  • Architectural Drawings
  • Engineering Drawings
  • Energy Assessment
  • Plan of Subdivision
  • Developer Guidelines
  • Other

Document Subcategories

Fetched from /v3/api/ordering/document-subcategories. Subcategories provide finer classification within a type, such as:

  • Floor Plans (under Architectural Drawings)
  • Elevations (under Architectural Drawings)
  • Structural Computations (under Engineering)

Required Documents

Each service type may specify required document types that must be uploaded before the order can proceed.

In the Wizard (Step 3)

  • Service overview cards show a required documents checklist
  • Required items are listed with checkmarks (uploaded) or missing indicators
  • The "Continue" button validates that all required documents are present
  • Optional documents are listed separately

In the Order Detail Page

  • The embedded document view shows which document types are still missing

Document Versioning

Documents are automatically versioned based on:

  • Same project
  • Same document type
  • Same document subcategory
  • Same filename

Version Display

  • Documents show a version badge (v1, v2, v3, etc.)
  • Click the badge to open a version history modal
  • The modal shows all versions in chronological order with dates

Version Endpoint

GET /orders/documents/multiple/versions/{id} returns the full version history for a document.

Bulk Operations

Select All

A checkbox in the table header selects all documents at once.

Bulk Reassign

  • Select multiple documents
  • Click "Reassign" in the bulk actions toolbar
  • Opens a modal to update type, subcategory, and order assignments for all selected documents

Bulk Delete

  • Select multiple documents
  • Click "Delete" in the bulk actions toolbar
  • Confirmation dialog before deletion

Document Actions

ActionDescription
PreviewOpens document in a full-screen preview modal (dark theme)
DownloadDownloads the file with proper filename and MIME type
ReassignOpens assignment modal to change orders/category
DeleteSoft-deletes the document (with confirmation)

Document Table Columns

ColumnDescription
DocumentFilename with file type icon, version badge
Order / ServiceAssignment pills showing which orders this document belongs to
Uploaded byUser who uploaded the file
File sizeSize in KB or MB
ActionsPreview, Download, Reassign, Delete buttons

Category Filtering

A dropdown above the documents table allows filtering by document type/category. This helps when a project has many documents across different categories.

Access Control

  • Documents can only be uploaded by the order's associated customer
  • Upload is disabled when order status is received, complete, or completed
  • Delete is only available for pending or rejected orders
  • All document access is verified via Auth0 token