fix(freight): filter container returns by returned-by truck type

Top Returned Containers table ignored the EDR/Customer tab because
the backend never persisted which truck type performed the return.
Added returned_by column + DTO/entity field, wired create payload to
send it, and filtered the table by the active tab.
This commit is contained in:
Hagernesh
2026-08-04 06:54:52 +00:00
parent 5c33ea90bd
commit dfc7dfec5a
13 changed files with 198 additions and 578 deletions

View File

@@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class EmptyContainerReturnedBy3210000000000 implements MigrationInterface {
name = 'EmptyContainerReturnedBy3210000000000';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE freight.empty_container_returns
ADD COLUMN IF NOT EXISTS returned_by varchar(20) NULL
`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
ALTER TABLE freight.empty_container_returns
DROP COLUMN IF EXISTS returned_by
`);
}
}