mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 12:30:58 +00:00
feat(rates): multi-tier distance band entry in last-mile rate form
- tierList field type in rule-engine form dialog (add/remove rows, overlap + open-ended validation, From km auto-continues) - create submits one rate row per tier sequentially - editing a band row keeps the single From/To/value form
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Last-mile contract fields on freight.last_mile_requests: the customer-chosen
|
||||
* delivery date, the chief-approved advance amount (held until the invoice is
|
||||
* generated at signing time), the rate snapshot rendered into the contract,
|
||||
* and the customer signature bookkeeping. The signed PDF and signature image
|
||||
* live in freight.files (resource 'last_mile_requests').
|
||||
*/
|
||||
export class LastMileRequestContract3290000000000 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.last_mile_requests
|
||||
ADD COLUMN IF NOT EXISTS requested_delivery_date date,
|
||||
ADD COLUMN IF NOT EXISTS approved_advance_amount numeric(14,2),
|
||||
ADD COLUMN IF NOT EXISTS contract_summary jsonb,
|
||||
ADD COLUMN IF NOT EXISTS contract_generated_at timestamptz,
|
||||
ADD COLUMN IF NOT EXISTS customer_signed_at timestamptz,
|
||||
ADD COLUMN IF NOT EXISTS signer_display_name varchar(160),
|
||||
ADD COLUMN IF NOT EXISTS consent_text text
|
||||
`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`
|
||||
ALTER TABLE freight.last_mile_requests
|
||||
DROP COLUMN IF EXISTS requested_delivery_date,
|
||||
DROP COLUMN IF EXISTS approved_advance_amount,
|
||||
DROP COLUMN IF EXISTS contract_summary,
|
||||
DROP COLUMN IF EXISTS contract_generated_at,
|
||||
DROP COLUMN IF EXISTS customer_signed_at,
|
||||
DROP COLUMN IF EXISTS signer_display_name,
|
||||
DROP COLUMN IF EXISTS consent_text
|
||||
`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user