-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: null behavior of category_ids Platform Projects Migration (#3003)
- Loading branch information
1 parent
8745d14
commit 74cfbcc
Showing
23 changed files
with
1,001 additions
and
393 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
15 changes: 15 additions & 0 deletions
15
src/app/core/mock-data/platform/v1/platform-project-args.data.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 { PlatformProjectArgs } from 'src/app/core/models/platform/v1/platform-project-args.model'; | ||
import deepFreeze from 'deep-freeze-strict'; | ||
import { apiEouRes } from '../../extended-org-user.data'; | ||
import { recentlyUsedRes } from '../../recently-used.data'; | ||
|
||
export const platformProjectsArgs1: PlatformProjectArgs = deepFreeze({ | ||
orgId: apiEouRes.ou.org_id, | ||
isEnabled: true, | ||
sortDirection: 'asc', | ||
sortOrder: 'name', | ||
orgCategoryIds: ['16558', '16559', '16560', '16561', '16562'], | ||
projectIds: recentlyUsedRes.recent_project_ids, | ||
offset: 0, | ||
limit: 10, | ||
}); |
122 changes: 122 additions & 0 deletions
122
src/app/core/mock-data/platform/v1/platform-project.data.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,122 @@ | ||
import { PlatformApiResponse } from '../../../models/platform/platform-api-response.model'; | ||
import { PlatformProject } from '../../../models/platform/platform-project.model'; | ||
import deepFreeze from 'deep-freeze-strict'; | ||
|
||
export const platformProjectSingleRes: PlatformApiResponse<PlatformProject[]> = deepFreeze({ | ||
count: 1, | ||
data: [ | ||
{ | ||
is_enabled: true, | ||
code: '1184', | ||
created_at: new Date('2021-05-12T10:28:40.834844'), | ||
description: 'Sage Intacct Project - Customer Mapped Project, Id - 1184', | ||
id: 257528, | ||
name: 'Customer Mapped Project', | ||
category_ids: [122269, 122270, 122271, null], | ||
org_id: 'orFdTTTNcyye', | ||
updated_at: new Date('2021-07-08T10:28:27.686886'), | ||
display_name: 'Customer Mapped Project', | ||
sub_project: null, | ||
}, | ||
], | ||
offset: 0, | ||
}); | ||
|
||
export const platformAPIResponseMultiple: PlatformApiResponse<PlatformProject[]> = deepFreeze({ | ||
count: 2, | ||
data: [ | ||
{ | ||
is_enabled: true, | ||
code: '1184', | ||
created_at: new Date('2021-05-12T10:28:40.834844'), | ||
description: 'Sage Intacct Project - Customer Mapped Project, Id - 1184', | ||
id: 257528, | ||
display_name: 'Customer Mapped Project', | ||
category_ids: [122269, 122270, 122271, null], | ||
org_id: 'orFdTTTNcyye', | ||
updated_at: new Date('2021-07-08T10:28:27.686886'), | ||
name: 'Customer Mapped Project', | ||
sub_project: null, | ||
}, | ||
{ | ||
is_enabled: true, | ||
code: '1182', | ||
created_at: new Date('2021-05-12T10:28:40.834844'), | ||
description: 'Sage Intacct Project - Fyle Engineering, Id - 1182', | ||
id: 257529, | ||
display_name: 'Fyle Engineering', | ||
category_ids: [122269, 122270, 122271], | ||
org_id: 'orFdTTTNcyye', | ||
updated_at: new Date('2021-07-08T10:28:27.686886'), | ||
name: 'Fyle Engineering', | ||
sub_project: null, | ||
}, | ||
], | ||
offset: 0, | ||
}); | ||
|
||
export const platformAPIResponseActiveOnly: PlatformApiResponse<PlatformProject[]> = deepFreeze({ | ||
count: 4, | ||
data: [ | ||
{ | ||
id: 257528, | ||
created_at: new Date('2021-05-12T10:28:40.834Z'), | ||
updated_at: new Date('2021-07-08T10:28:27.686Z'), | ||
name: 'Customer Mapped Project', | ||
sub_project: null, | ||
code: '1184', | ||
org_id: 'orFdTTTNcyye', | ||
description: 'Sage Intacct Project - Customer Mapped Project, Id - 1184', | ||
is_enabled: true, | ||
category_ids: [null, 145429, 122269, 122271], | ||
display_name: 'Customer Mapped Project', | ||
}, | ||
{ | ||
id: 257541, | ||
created_at: new Date('2021-05-12T10:28:40.834Z'), | ||
updated_at: new Date('2021-07-08T10:28:27.686Z'), | ||
name: 'Sage Project 8', | ||
sub_project: null, | ||
code: '1178', | ||
org_id: 'orFdTTTNcyye', | ||
description: 'Sage Intacct Project - Sage Project 8, Id - 1178', | ||
is_enabled: true, | ||
category_ids: [null, 145429, 122269, 122271], | ||
display_name: 'Customer Mapped Project', | ||
}, | ||
{ | ||
id: 257531, | ||
created_at: new Date('2021-05-12T10:28:40.834Z'), | ||
updated_at: new Date('2021-07-08T10:28:27.686Z'), | ||
name: 'Fyle Team Integrations', | ||
sub_project: null, | ||
code: '1183', | ||
org_id: 'orFdTTTNcyye', | ||
description: 'Sage Intacct Project - Fyle Team Integrations, Id - 1183', | ||
is_enabled: true, | ||
category_ids: null, | ||
display_name: 'Customer Mapped Project', | ||
}, | ||
], | ||
offset: 0, | ||
}); | ||
|
||
export const platformAPIResponseNullCategories: PlatformApiResponse<PlatformProject[]> = deepFreeze({ | ||
count: 4, | ||
data: [ | ||
{ | ||
id: 257528, | ||
created_at: new Date('2021-05-12T10:28:40.834Z'), | ||
updated_at: new Date('2021-07-08T10:28:27.686Z'), | ||
name: 'Customer Mapped Project', | ||
sub_project: null, | ||
code: '1184', | ||
org_id: 'orFdTTTNcyye', | ||
description: 'Sage Intacct Project - Customer Mapped Project, Id - 1184', | ||
is_enabled: true, | ||
category_ids: null, | ||
display_name: 'Customer Mapped Project', | ||
}, | ||
], | ||
offset: 0, | ||
}); |
13 changes: 13 additions & 0 deletions
13
src/app/core/mock-data/platform/v1/platform-projects-params.data.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,13 @@ | ||
import { PlatformProjectParams } from 'src/app/core/models/platform/v1/platform-project-params.model'; | ||
import deepFreeze from 'deep-freeze-strict'; | ||
|
||
export const ProjectPlatformParams: PlatformProjectParams = deepFreeze({ | ||
org_id: 'eq.orNVthTo2Zyo', | ||
order: 'name.asc', | ||
limit: 10, | ||
offset: 0, | ||
is_enabled: 'eq.true', | ||
or: '(category_ids.is.null, category_ids.ov.{122269,122270,122271,122272,122273})', | ||
id: 'in.(3943,305792,148971,247936)', | ||
name: 'ilike.%search%', | ||
}); |
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,13 @@ | ||
export interface PlatformProject { | ||
id: number; | ||
org_id: string; | ||
created_at: Date; | ||
updated_at: Date; | ||
name: string; | ||
sub_project: string; | ||
code: string; | ||
display_name: string; | ||
description: string; | ||
is_enabled: boolean; | ||
category_ids: number[]; | ||
} |
11 changes: 11 additions & 0 deletions
11
src/app/core/models/platform/v1/platform-project-args.model.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,11 @@ | ||
export interface PlatformProjectArgs { | ||
orgId?: string; | ||
isEnabled?: boolean; | ||
orgCategoryIds?: string[]; | ||
searchNameText?: string; | ||
limit?: number; | ||
offset?: number; | ||
sortOrder?: string; | ||
sortDirection?: string; | ||
projectIds?: number[]; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/app/core/models/platform/v1/platform-project-params.model.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,14 @@ | ||
export interface PlatformProjectParams { | ||
limit: number; | ||
offset: number; | ||
order?: string; | ||
sortDirection?: string; | ||
sortOrder?: string; | ||
searchNameText?: string; | ||
is_enabled?: string; | ||
id?: string; | ||
category_ids?: string; | ||
org_id?: string; | ||
name?: string; | ||
or?: string; | ||
} |
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.