-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connect ag-grid sort with the API (#1492)
* Connect ag-grid sort with the API * Fix code style issues with Prettier * Updated changelog * Fix code style issues with Prettier * Add empty values as last * Fix code style issues with Prettier * Add missing OrderBy enum definitions * Add migrating empty strings to nulls in applicant.last_name and applicant.first_name * Fix code style issues with Prettier * Fix 1625746856273-migrate-empty-strings-to-nulls-in-app SQL queries * Map firstName and lastName empty strings to nulls * Update sorting compare method * Add applicant firstName and lastName MinLength(1) validators * Fix e2e tests (missing lastName in test fixtures) * Update var name * Update order type * Update types Co-authored-by: Dominik Barcikowski <dominik@airnauts.com> Co-authored-by: Lint Action <lint-action@samuelmeuli.com> Co-authored-by: Michal Plebanski <michalp@airnauts.com>
- Loading branch information
1 parent
f90479b
commit 34cd0ce
Showing
11 changed files
with
160 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
backend/core/src/migration/1625746856273-migrate-empty-strings-to-nulls-in-app.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {MigrationInterface, QueryRunner} from "typeorm"; | ||
|
||
export class migrateEmptyStringsToNullsInApp1625746856273 implements MigrationInterface { | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`UPDATE applicant SET last_name = NULL where last_name = ''`) | ||
await queryRunner.query(`UPDATE applicant SET first_name = NULL where first_name = ''`) | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query(`UPDATE applicant SET first_name = '' where first_name = NULL`) | ||
await queryRunner.query(`UPDATE applicant SET last_name = '' where last_name = NULL`) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.