Skip to content

Commit 5a95b69

Browse files
committed
Merge remote-tracking branch 'origin/release/7.0.0-rev6' into release/7.0.0-rev6
2 parents 09074ec + 72bb0c5 commit 5a95b69

File tree

6 files changed

+26
-23
lines changed

6 files changed

+26
-23
lines changed

projects/netgrif-components-core/src/lib/data-fields/case-ref-field/model/abstract-case-ref-base-field-component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export abstract class AbstractCaseRefBaseFieldComponent<T extends DataField<unkn
4242
},
4343
{
4444
provide: NAE_BASE_FILTER,
45-
useValue: { filter: SimpleFilter.fromCaseQuery((filterProperty && query ? query : {stringId: filterValue})) } as BaseFilter
45+
useValue: { filter: SimpleFilter.fromCaseQuery((filterProperty && query ? query : {id: filterValue})) } as BaseFilter
4646
},
4747
{
4848
provide: NAE_VIEW_ID_SEGMENT,

projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ export interface CaseSearchRequestBody {
5353
*/
5454
query?: string;
5555
/**
56-
* Returned cases must have the specified string ID.
57-
* If more than one string ID is specified, the returned cases must have one of them.
56+
* Returned cases must have the specified ID.
57+
* If more than one ID is specified, the returned cases must have one of them.
58+
*/
59+
id?: string | Array<string>;
60+
/**
61+
* @deprecated Use `id` instead. This field remains for backward compatibility and may be removed in a future major release.
5862
*/
5963
stringId?: string | Array<string>;
6064
/**

projects/netgrif-components-core/src/lib/groups/services/next-group.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ export class NextGroupService implements OnDestroy {
3737
return of([]);
3838
}
3939

40-
const params = new HttpParams();
41-
params.set(PaginationParams.PAGE_SIZE, `${(user as any).nextGroups.length}`);
40+
const params = new HttpParams().set(PaginationParams.PAGE_SIZE, `${(user as any).nextGroups.length}`);
4241

43-
return this._caseResourceService.searchCases(SimpleFilter.fromCaseQuery({stringId: (user as any).nextGroups}), params)
42+
return this._caseResourceService.searchCases(SimpleFilter.fromCaseQuery({id: (user as any).nextGroups}), params)
4443
.pipe(
4544
map(page => page.content ? page.content : []),
4645
map(groups => groups.filter(group => group.author.fullName !== 'application engine'))

projects/netgrif-components-core/src/lib/navigation/dashboard/abstract-dashboard.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export abstract class AbstractDashboardComponent {
131131

132132
private getMenuItems(dashboardMenuToItems: {}, dashboardItemsParams: HttpParams) {
133133
let menuItemsSearchBody = {
134-
stringId: Object.keys(dashboardMenuToItems)
134+
id: Object.keys(dashboardMenuToItems)
135135
};
136136
this._caseResource.searchCases(SimpleFilter.fromCaseQuery(menuItemsSearchBody), dashboardItemsParams).subscribe(resultItems => {
137137
const itemsContent = resultItems.content;
@@ -156,7 +156,7 @@ export abstract class AbstractDashboardComponent {
156156
}, dashboardItemsParams: HttpParams) {
157157
const itemsOrder = this.getManagementItemsOrder(this.dashboardCase)?.split(",");
158158
let dashboardItemsSearchBody: CaseSearchRequestBody = {
159-
stringId: Object.keys(dashboardItemsOptions)
159+
id: Object.keys(dashboardItemsOptions)
160160
};
161161
this._caseResource.searchCases(SimpleFilter.fromCaseQuery(dashboardItemsSearchBody), dashboardItemsParams).subscribe(resultItems => {
162162
const itemsContent = resultItems.content;

projects/netgrif-components-core/src/lib/navigation/navigation-double-drawer/service/double-drawer-navigation.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export class DoubleDrawerNavigationService implements OnDestroy {
462462

463463
protected getItemCasesByIds(caseIds: string[], pageNumber: number, pageSize: string | number): Observable<Page<Case>> {
464464
const searchBody: CaseSearchRequestBody = {
465-
stringId: caseIds,
465+
id: caseIds,
466466
process: MENU_IDENTIFIERS.map(id => ({identifier: id} as PetriNetSearchRequest)),
467467
};
468468

projects/netgrif-components-core/src/lib/view/tree-case-view/tree-component/case-tree.service.spec.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ describe('CaseTreeService', () => {
9191
}
9292
});
9393

94-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
94+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
9595
});
9696

9797
it('should initialize with root node hidden', (done) => {
@@ -108,7 +108,7 @@ describe('CaseTreeService', () => {
108108
}
109109
});
110110

111-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
111+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
112112
});
113113

114114
it('should initialize lazy-loaded tree with root node shown', (done) => {
@@ -137,7 +137,7 @@ describe('CaseTreeService', () => {
137137
}
138138
});
139139

140-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
140+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
141141
});
142142

143143
it('should initialize lazy-loaded tree with root node hidden', (done) => {
@@ -168,7 +168,7 @@ describe('CaseTreeService', () => {
168168
}
169169
});
170170

171-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
171+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
172172
});
173173

174174
it('should initialize eager-loaded tree with root node shown', (done) => {
@@ -210,7 +210,7 @@ describe('CaseTreeService', () => {
210210
});
211211

212212
treeService.isEagerLoaded = true;
213-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
213+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
214214
});
215215

216216
it('should initialize eager-loaded tree with root node hidden', (done) => {
@@ -250,7 +250,7 @@ describe('CaseTreeService', () => {
250250
});
251251

252252
treeService.isEagerLoaded = true;
253-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
253+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
254254
});
255255

256256
it('should add root child with root node shown', (done) => {
@@ -281,7 +281,7 @@ describe('CaseTreeService', () => {
281281
}
282282
});
283283

284-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
284+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
285285
});
286286

287287
it('should add root child with root node hidden', (done) => {
@@ -307,7 +307,7 @@ describe('CaseTreeService', () => {
307307
}
308308
});
309309

310-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
310+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
311311
});
312312

313313
// NAE-1185
@@ -346,7 +346,7 @@ describe('CaseTreeService', () => {
346346
});
347347

348348
treeService.isEagerLoaded = true;
349-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
349+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
350350
});
351351

352352
// NAE-1185 similar to the reported bug but in combination with changed fields response adding multiple sibling branches
@@ -395,7 +395,7 @@ describe('CaseTreeService', () => {
395395
});
396396

397397
treeService.isEagerLoaded = true;
398-
treeService.rootFilter = SimpleFilter.fromCaseQuery({stringId: 'root'});
398+
treeService.rootFilter = SimpleFilter.fromCaseQuery({id: 'root'});
399399
});
400400
});
401401

@@ -452,11 +452,11 @@ class TreeTestCaseResourceService {
452452
public searchCases(filter: Filter, params?: Params): Observable<Page<Case>> {
453453
if (filter.type === FilterType.CASE
454454
&& !Array.isArray(filter.getRequestBody())
455-
&& (filter.getRequestBody() as CaseSearchRequestBody).stringId
456-
&& !Array.isArray((filter.getRequestBody() as CaseSearchRequestBody).stringId)) {
455+
&& (filter.getRequestBody() as CaseSearchRequestBody).id
456+
&& !Array.isArray((filter.getRequestBody() as CaseSearchRequestBody).id)) {
457457
const content: Array<Case> = [];
458-
if (this.mockCases.has((filter.getRequestBody() as CaseSearchRequestBody).stringId as string)) {
459-
content.push(this.mockCases.get((filter.getRequestBody() as CaseSearchRequestBody).stringId as string));
458+
if (this.mockCases.has((filter.getRequestBody() as CaseSearchRequestBody).id as string)) {
459+
content.push(this.mockCases.get((filter.getRequestBody() as CaseSearchRequestBody).id as string));
460460
}
461461
return of(createMockPage(content));
462462
} else {

0 commit comments

Comments
 (0)