Warehouse zone occupancy heatmap

Visualize live per-zone occupancy on the warehouse detail page.
This commit is contained in:
Hagernesh
2026-07-13 11:38:23 +00:00
parent 1034756bab
commit 4e8d35a7fb
18 changed files with 550 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
import { MigrationInterface, QueryRunner } from "typeorm";
/**
* Proof of delivery for EDR last-mile: recipient name, a captured signature
* (stored as a file), delivery photos (file ids), notes, and the capture time.
* Recorded when the driver completes the delivery.
*/
export class AddLastMileProofOfDelivery2120000000000
implements MigrationInterface
{
name = "AddLastMileProofOfDelivery2120000000000";
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE freight.last_mile
ADD COLUMN IF NOT EXISTS pod_recipient_name varchar(160),
ADD COLUMN IF NOT EXISTS pod_signature_file_id uuid,
ADD COLUMN IF NOT EXISTS pod_photo_file_ids text[] NOT NULL DEFAULT '{}',
ADD COLUMN IF NOT EXISTS pod_notes text,
ADD COLUMN IF NOT EXISTS pod_captured_at timestamptz
`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE freight.last_mile
DROP COLUMN IF EXISTS pod_recipient_name,
DROP COLUMN IF EXISTS pod_signature_file_id,
DROP COLUMN IF EXISTS pod_photo_file_ids,
DROP COLUMN IF EXISTS pod_notes,
DROP COLUMN IF EXISTS pod_captured_at
`);
}
}