Skip to content

Commit eb2176c

Browse files
Merge pull request #194 from netgrif/NAE-1881
[NAE-1881] Release 6.3.0-rc.9
2 parents bf587af + 035a617 commit eb2176c

File tree

9 files changed

+177
-14
lines changed

9 files changed

+177
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Full Changelog: [https://github.com/netgrif/components/commits/v6.3.0](https://g
2121
- [NAE-1830] Changing columns in overflow Service deletes all set columns
2222
- [NAE-1832] Security upgrade moment from 2.24.0 to 2.29.4
2323
- [NAE-1839] Public view - fields after auto assign are still only visible
24+
- [NAE-1869] Incorrectly expanded task
25+
- [NAE-1802] TaskRef-ed fields behavior update unaware of parent task behavior
2426

2527
### Changed
2628

@@ -36,6 +38,10 @@ Full Changelog: [https://github.com/netgrif/components/commits/v6.3.0](https://g
3638
- [NAE-1809] UserList field show selected users
3739
- [NAE-1835] Change password component
3840
- [NAE-1841] Idle timer component
41+
- [NAE-1874] Filtering users based on roles when selecting users for UserListField
42+
- [NAE-1607] Allowed nets configuration for newly created filter
43+
- [NAE-1722] Set default view headers with the CreateMenuItem action method
44+
- [NAE-1711] Dashboard
3945

4046
## [6.2.9](https://github.com/netgrif/components/releases/tag/v6.2.9) (2023-05-04)
4147

projects/nae-example-app/src/app/app.module.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ import {
1717
SnackBarModule,
1818
SnackBarVerticalPosition,
1919
ViewService,
20-
ProfileModule
20+
ProfileModule,
21+
Dashboard
2122
} from '@netgrif/components-core';
2223
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
2324
import {FlexLayoutModule, FlexModule} from '@angular/flex-layout';
@@ -85,7 +86,9 @@ import {
8586
ToolbarComponentModule,
8687
TreeCaseViewComponentModule,
8788
WorkflowViewComponentModule,
88-
FilterFieldTabViewComponent, FilterFieldTabbedCaseViewComponent, DefaultTabbedTaskViewComponent
89+
FilterFieldTabViewComponent,
90+
FilterFieldTabbedCaseViewComponent,
91+
FilterFieldTabbedTaskViewComponent
8992
} from '@netgrif/components';
9093
import {UserInviteComponent} from './doc/user-invite/user-invite.component';
9194
import {ExamplePortalCardComponent} from './doc/dashboard-example/piechart-card/example-portal-card.component';
@@ -124,9 +127,6 @@ import {
124127
} from './doc/single-tabbed-view/single-tabbed-task-view/single-tabbed-task-view.component';
125128
import {ImpersonationDemoComponent} from './doc/impersonation-demo/impersonation-demo.component';
126129
import { ChangePasswordComponent } from './doc/forms/change-password/change-password.component';
127-
import {
128-
Dashboard
129-
} from '../../../netgrif-components-core/src/lib/data-fields/text-field/dashboard-portal-text-field/dashboard-view-constants';
130130

131131
export function HttpLoaderFactory(http: HttpClient) {
132132
return new TranslateHttpLoader(http);
@@ -264,6 +264,6 @@ export class AppModule {
264264
registry.register('tab-view', (injector: Injector) => new ComponentPortal(TabbedViewsExampleComponent, null, injector));
265265
registry.register(Dashboard.FILTER_TAB_VIEW_ID, (injector: Injector) => new ComponentPortal(FilterFieldTabViewComponent, null, injector));
266266
registry.registerType(Dashboard.FILTER_CASE_VIEW_ID, FilterFieldTabbedCaseViewComponent);
267-
registry.registerType(Dashboard.FILTER_TASK_VIEW_ID, DefaultTabbedTaskViewComponent);
267+
registry.registerType(Dashboard.FILTER_TASK_VIEW_ID, FilterFieldTabbedTaskViewComponent);
268268
}
269269
}

projects/netgrif-components/src/lib/filter-field-content/filter-field-content.module.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ import { MaterialModule } from '@netgrif/components-core';
88
import { SearchComponentModule } from '../search/search.module';
99
import { CaseViewComponentModule } from '../view/case-view/case-view.module';
1010
import { HeaderComponentModule } from '../header/header.module';
11+
import { FilterFieldTabbedTaskViewComponent } from './filter-field-tabbed-task-view/filter-field-tabbed-task-view.component';
12+
import {PanelComponentModule} from "../panel/panel.module";
1113

1214
@NgModule({
1315
declarations: [
1416
FilterFieldTabViewComponent,
15-
FilterFieldTabbedCaseViewComponent
17+
FilterFieldTabbedCaseViewComponent,
18+
FilterFieldTabbedTaskViewComponent
1619
],
1720
exports: [
1821
FilterFieldTabViewComponent,
19-
FilterFieldTabbedCaseViewComponent
22+
FilterFieldTabbedCaseViewComponent,
23+
FilterFieldTabbedTaskViewComponent
2024
],
2125
imports: [
2226
CommonModule,
@@ -25,7 +29,8 @@ import { HeaderComponentModule } from '../header/header.module';
2529
FlexModule,
2630
SearchComponentModule,
2731
CaseViewComponentModule,
28-
HeaderComponentModule
32+
HeaderComponentModule,
33+
PanelComponentModule
2934
]
3035
})
3136
export class FilterFieldContentModule { }
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { Component, Inject, Type } from '@angular/core';
1+
import { Component, Inject } from '@angular/core';
22
import {
33
DashboardPortalComponentRegistryService,
44
AbstractFilterFieldTabViewComponent,
55
NAE_FILTER_FIELD,
66
FilterField
77
} from '@netgrif/components-core';
8-
import {
9-
DefaultTabbedTaskViewComponent
10-
} from '../../navigation/group-navigation-component-resolver/default-components/default-tabbed-task-view/default-tabbed-task-view.component';
118
import {
129
FilterFieldTabbedCaseViewComponent
1310
} from '../filter-field-tabbed-case-view/filter-field-tabbed-case-view.component';
11+
import {
12+
FilterFieldTabbedTaskViewComponent
13+
} from "../filter-field-tabbed-task-view/filter-field-tabbed-task-view.component";
1414

1515
@Component({
1616
selector: 'nc-filter-field-tab-view',
@@ -21,6 +21,6 @@ export class FilterFieldTabViewComponent extends AbstractFilterFieldTabViewCompo
2121

2222
constructor(registry: DashboardPortalComponentRegistryService,
2323
@Inject(NAE_FILTER_FIELD) filterField: FilterField) {
24-
super(registry, filterField, FilterFieldTabbedCaseViewComponent, DefaultTabbedTaskViewComponent);
24+
super(registry, filterField, FilterFieldTabbedCaseViewComponent, FilterFieldTabbedTaskViewComponent);
2525
}
2626
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div class="task-tab-background full-height min-height-task-custom">
2+
<div fxLayout="column" fxLayoutAlign="start stretch" class="content-margin full-height" >
3+
<nc-header #header type="task" class="task-panel-padding-mini"></nc-header>
4+
<nc-task-list [tasks$]="tasks$" [loading$]="loading$" [allowMultiOpen]="false" [selectedHeaders$]="selectedHeaders$" [textEllipsis]="true" fxFlex></nc-task-list>
5+
</div>
6+
</div>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.task-tab-background{
2+
height: 100%;
3+
width: 100%;
4+
overflow: auto;
5+
background-color: transparent;
6+
}
7+
.search-panel{
8+
margin-top: 20px;
9+
}
10+
.content-margin{
11+
margin: 0 20px;
12+
}
13+
.task-panel-padding-mini{
14+
padding-bottom: 20px;
15+
padding-top: 20px;
16+
}
17+
.full-height {
18+
height: 100%;
19+
}
20+
21+
.search-width {
22+
width: 100%;
23+
}
24+
.min-height-task-custom {
25+
min-height: 400px;
26+
height: 400px;
27+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import {ComponentFixture, TestBed} from '@angular/core/testing';
2+
import {NAE_TAB_DATA, OverflowService, SimpleFilter, TestMockDependenciesModule} from '@netgrif/components-core';
3+
import {of} from 'rxjs';
4+
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
5+
import {RouterTestingModule} from '@angular/router/testing';
6+
import {FilterFieldTabbedTaskViewComponent} from "./filter-field-tabbed-task-view.component";
7+
import {NavigationComponentModule} from "../../navigation/navigation.module";
8+
import {HeaderComponent} from "../../header/header.component";
9+
10+
describe('FilterFieldTabbedTaskViewComponent', () => {
11+
let component: FilterFieldTabbedTaskViewComponent;
12+
let fixture: ComponentFixture<FilterFieldTabbedTaskViewComponent>;
13+
14+
beforeEach(async () => {
15+
await TestBed.configureTestingModule({
16+
declarations: [ FilterFieldTabbedTaskViewComponent, HeaderComponent],
17+
imports: [
18+
NavigationComponentModule,
19+
TestMockDependenciesModule,
20+
NoopAnimationsModule,
21+
RouterTestingModule.withRoutes([]),
22+
],
23+
providers: [
24+
OverflowService,
25+
{
26+
provide: NAE_TAB_DATA,
27+
useValue: {
28+
baseFilter: SimpleFilter.emptyTaskFilter(),
29+
allowedNets: [],
30+
tabUniqueId: '1',
31+
tabSelected$: of(true),
32+
tabClosed$: of()
33+
}
34+
}
35+
]
36+
})
37+
.compileComponents();
38+
});
39+
40+
beforeEach(() => {
41+
fixture = TestBed.createComponent(FilterFieldTabbedTaskViewComponent);
42+
component = fixture.componentInstance;
43+
fixture.detectChanges();
44+
});
45+
46+
afterEach(() => {
47+
TestBed.resetTestingModule();
48+
});
49+
50+
it('should create', () => {
51+
expect(component).toBeTruthy();
52+
});
53+
});
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import {AfterViewInit, Component, Inject, ViewChild} from '@angular/core';
2+
import {
3+
NAE_TAB_DATA,
4+
TaskViewService,
5+
AbstractTabbedTaskViewComponent,
6+
InjectedTabbedTaskViewData,
7+
CategoryFactory,
8+
SearchService,
9+
NAE_BASE_FILTER,
10+
AllowedNetsService,
11+
AllowedNetsServiceFactory,
12+
ViewIdService,
13+
NAE_TASK_VIEW_CONFIGURATION,
14+
ChangedFieldsService,
15+
tabbedTaskViewConfigurationFactory,
16+
tabbedAllowedNetsServiceFactory
17+
} from '@netgrif/components-core';
18+
import {HeaderComponent} from "../../header/header.component";
19+
20+
function baseFilterFactory(injectedTabData: InjectedTabbedTaskViewData) {
21+
return {
22+
filter: injectedTabData.baseFilter
23+
};
24+
}
25+
26+
@Component({
27+
selector: 'nc-filter-field-tabbed-task-view',
28+
templateUrl: './filter-field-tabbed-task-view.component.html',
29+
styleUrls: ['./filter-field-tabbed-task-view.component.scss'],
30+
providers: [
31+
CategoryFactory,
32+
TaskViewService,
33+
SearchService,
34+
ChangedFieldsService,
35+
{ provide: ViewIdService, useValue: null},
36+
{
37+
provide: NAE_BASE_FILTER,
38+
useFactory: baseFilterFactory,
39+
deps: [NAE_TAB_DATA]
40+
},
41+
{
42+
provide: AllowedNetsService,
43+
useFactory: tabbedAllowedNetsServiceFactory,
44+
deps: [AllowedNetsServiceFactory, NAE_TAB_DATA]
45+
},
46+
{
47+
provide: NAE_TASK_VIEW_CONFIGURATION,
48+
useFactory: tabbedTaskViewConfigurationFactory,
49+
deps: [NAE_TAB_DATA]
50+
}
51+
]
52+
})
53+
export class FilterFieldTabbedTaskViewComponent extends AbstractTabbedTaskViewComponent implements AfterViewInit {
54+
55+
@ViewChild('header') public taskHeaderComponent: HeaderComponent;
56+
57+
constructor(taskViewService: TaskViewService, @Inject(NAE_TAB_DATA) injectedTabData: InjectedTabbedTaskViewData) {
58+
super(taskViewService, injectedTabData);
59+
}
60+
61+
ngAfterViewInit(): void {
62+
this.initializeHeader(this.taskHeaderComponent);
63+
}
64+
65+
}

projects/netgrif-components/src/lib/filter-field-content/public-api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ export * from './filter-field-content.module'
22

33
export * from './filter-field-tab-view/filter-field-tab-view.component'
44
export * from './filter-field-tabbed-case-view/filter-field-tabbed-case-view.component'
5+
export * from './filter-field-tabbed-task-view/filter-field-tabbed-task-view.component'
56

67

0 commit comments

Comments
 (0)