Skip to content

Commit

Permalink
fix:ORV2-3352 Update: Change Term Permits Vehicles (#1781)
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot authored Jan 29, 2025
1 parent c591662 commit 6928710
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions database/mssql/scripts/versions/revert/v_58_ddl_revert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ DELETE FROM dbo.ORBC_TRAILER_TYPE WHERE TRAILER_TYPE='FEWHLPR';
DELETE FROM dbo.ORBC_TRAILER_TYPE WHERE TRAILER_TYPE='LOGLGCY';
*/

UPDATE dbo.ORBC_TRAILER_TYPE set [TYPE]='Fixed Equipment Semi-Trailer (16 and 24 Wheeler) Peace River',[DESCRIPTION]='Fixed Equipment Semi-Trailer (16 and 24 Wheeler) Peace River' where TRAILER_TYPE='FEWHLPR';

UPDATE [dbo].[ORBC_POWER_UNIT_TYPE] set IS_ACTIVE='1' WHERE [POWER_UNIT_TYPE] IN ('CRAFTAT','CRAFTMB','FARMVEH');

UPDATE [dbo].[ORBC_TRAILER_TYPE] set IS_ACTIVE='1' WHERE [TRAILER_TYPE] IN ('FECVYPT');

-- Remove the newly added policy configuration
DELETE FROM [dbo].[ORBC_POLICY_CONFIGURATION]
WHERE POLICY_CONFIGURATION_ID = (SELECT MAX(POLICY_CONFIGURATION_ID) FROM [dbo].[ORBC_POLICY_CONFIGURATION])
Expand Down
8 changes: 7 additions & 1 deletion database/mssql/scripts/versions/v_58_ddl.sql

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class PowerUnitTypesService {
@LogAsyncMethodExecution()
async findAll(): Promise<ReadPowerUnitTypeDto[]> {
return this.classMapper.mapArrayAsync(
await this.powerUnitTypeRepository.find(),
await this.powerUnitTypeRepository.find({ where: { isActive: '1' } }),
PowerUnitType,
ReadPowerUnitTypeDto,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TrailerTypesService {
@LogAsyncMethodExecution()
async findAll(): Promise<ReadTrailerTypeDto[]> {
return this.classMapper.mapArrayAsync(
await this.trailerTypeRepository.find(),
await this.trailerTypeRepository.find({ where: { isActive: '1' } }),
TrailerType,
ReadTrailerTypeDto,
);
Expand Down

0 comments on commit 6928710

Please sign in to comment.