Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Full Changelog: [https://github.com/netgrif/components/commits/v6.3.0](https://g
- [NAE-1830] Changing columns in overflow Service deletes all set columns
- [NAE-1832] Security upgrade moment from 2.24.0 to 2.29.4
- [NAE-1839] Public view - fields after auto assign are still only visible
- [NAE-1869] Incorrectly expanded task
- [NAE-1802] TaskRef-ed fields behavior update unaware of parent task behavior

### Changed

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

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

Expand Down
12 changes: 6 additions & 6 deletions projects/nae-example-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import {
SnackBarModule,
SnackBarVerticalPosition,
ViewService,
ProfileModule
ProfileModule,
Dashboard
} from '@netgrif/components-core';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {FlexLayoutModule, FlexModule} from '@angular/flex-layout';
Expand Down Expand Up @@ -85,7 +86,9 @@ import {
ToolbarComponentModule,
TreeCaseViewComponentModule,
WorkflowViewComponentModule,
FilterFieldTabViewComponent, FilterFieldTabbedCaseViewComponent, DefaultTabbedTaskViewComponent
FilterFieldTabViewComponent,
FilterFieldTabbedCaseViewComponent,
FilterFieldTabbedTaskViewComponent
} from '@netgrif/components';
import {UserInviteComponent} from './doc/user-invite/user-invite.component';
import {ExamplePortalCardComponent} from './doc/dashboard-example/piechart-card/example-portal-card.component';
Expand Down Expand Up @@ -124,9 +127,6 @@ import {
} from './doc/single-tabbed-view/single-tabbed-task-view/single-tabbed-task-view.component';
import {ImpersonationDemoComponent} from './doc/impersonation-demo/impersonation-demo.component';
import { ChangePasswordComponent } from './doc/forms/change-password/change-password.component';
import {
Dashboard
} from '../../../netgrif-components-core/src/lib/data-fields/text-field/dashboard-portal-text-field/dashboard-view-constants';

export function HttpLoaderFactory(http: HttpClient) {
return new TranslateHttpLoader(http);
Expand Down Expand Up @@ -264,6 +264,6 @@ export class AppModule {
registry.register('tab-view', (injector: Injector) => new ComponentPortal(TabbedViewsExampleComponent, null, injector));
registry.register(Dashboard.FILTER_TAB_VIEW_ID, (injector: Injector) => new ComponentPortal(FilterFieldTabViewComponent, null, injector));
registry.registerType(Dashboard.FILTER_CASE_VIEW_ID, FilterFieldTabbedCaseViewComponent);
registry.registerType(Dashboard.FILTER_TASK_VIEW_ID, DefaultTabbedTaskViewComponent);
registry.registerType(Dashboard.FILTER_TASK_VIEW_ID, FilterFieldTabbedTaskViewComponent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ import { MaterialModule } from '@netgrif/components-core';
import { SearchComponentModule } from '../search/search.module';
import { CaseViewComponentModule } from '../view/case-view/case-view.module';
import { HeaderComponentModule } from '../header/header.module';
import { FilterFieldTabbedTaskViewComponent } from './filter-field-tabbed-task-view/filter-field-tabbed-task-view.component';
import {PanelComponentModule} from "../panel/panel.module";

@NgModule({
declarations: [
FilterFieldTabViewComponent,
FilterFieldTabbedCaseViewComponent
FilterFieldTabbedCaseViewComponent,
FilterFieldTabbedTaskViewComponent
],
exports: [
FilterFieldTabViewComponent,
FilterFieldTabbedCaseViewComponent
FilterFieldTabbedCaseViewComponent,
FilterFieldTabbedTaskViewComponent
],
imports: [
CommonModule,
Expand All @@ -25,7 +29,8 @@ import { HeaderComponentModule } from '../header/header.module';
FlexModule,
SearchComponentModule,
CaseViewComponentModule,
HeaderComponentModule
HeaderComponentModule,
PanelComponentModule
]
})
export class FilterFieldContentModule { }
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Component, Inject, Type } from '@angular/core';
import { Component, Inject } from '@angular/core';
import {
DashboardPortalComponentRegistryService,
AbstractFilterFieldTabViewComponent,
NAE_FILTER_FIELD,
FilterField
} from '@netgrif/components-core';
import {
DefaultTabbedTaskViewComponent
} from '../../navigation/group-navigation-component-resolver/default-components/default-tabbed-task-view/default-tabbed-task-view.component';
import {
FilterFieldTabbedCaseViewComponent
} from '../filter-field-tabbed-case-view/filter-field-tabbed-case-view.component';
import {
FilterFieldTabbedTaskViewComponent
} from "../filter-field-tabbed-task-view/filter-field-tabbed-task-view.component";

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

constructor(registry: DashboardPortalComponentRegistryService,
@Inject(NAE_FILTER_FIELD) filterField: FilterField) {
super(registry, filterField, FilterFieldTabbedCaseViewComponent, DefaultTabbedTaskViewComponent);
super(registry, filterField, FilterFieldTabbedCaseViewComponent, FilterFieldTabbedTaskViewComponent);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="task-tab-background full-height min-height-task-custom">
<div fxLayout="column" fxLayoutAlign="start stretch" class="content-margin full-height" >
<nc-header #header type="task" class="task-panel-padding-mini"></nc-header>
<nc-task-list [tasks$]="tasks$" [loading$]="loading$" [allowMultiOpen]="false" [selectedHeaders$]="selectedHeaders$" [textEllipsis]="true" fxFlex></nc-task-list>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.task-tab-background{
height: 100%;
width: 100%;
overflow: auto;
background-color: transparent;
}
.search-panel{
margin-top: 20px;
}
.content-margin{
margin: 0 20px;
}
.task-panel-padding-mini{
padding-bottom: 20px;
padding-top: 20px;
}
.full-height {
height: 100%;
}

.search-width {
width: 100%;
}
.min-height-task-custom {
min-height: 400px;
height: 400px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {NAE_TAB_DATA, OverflowService, SimpleFilter, TestMockDependenciesModule} from '@netgrif/components-core';
import {of} from 'rxjs';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {RouterTestingModule} from '@angular/router/testing';
import {FilterFieldTabbedTaskViewComponent} from "./filter-field-tabbed-task-view.component";
import {NavigationComponentModule} from "../../navigation/navigation.module";
import {HeaderComponent} from "../../header/header.component";

describe('FilterFieldTabbedTaskViewComponent', () => {
let component: FilterFieldTabbedTaskViewComponent;
let fixture: ComponentFixture<FilterFieldTabbedTaskViewComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FilterFieldTabbedTaskViewComponent, HeaderComponent],
imports: [
NavigationComponentModule,
TestMockDependenciesModule,
NoopAnimationsModule,
RouterTestingModule.withRoutes([]),
],
providers: [
OverflowService,
{
provide: NAE_TAB_DATA,
useValue: {
baseFilter: SimpleFilter.emptyTaskFilter(),
allowedNets: [],
tabUniqueId: '1',
tabSelected$: of(true),
tabClosed$: of()
}
}
]
})
.compileComponents();
});

beforeEach(() => {
fixture = TestBed.createComponent(FilterFieldTabbedTaskViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

afterEach(() => {
TestBed.resetTestingModule();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import {AfterViewInit, Component, Inject, ViewChild} from '@angular/core';
import {
NAE_TAB_DATA,
TaskViewService,
AbstractTabbedTaskViewComponent,
InjectedTabbedTaskViewData,
CategoryFactory,
SearchService,
NAE_BASE_FILTER,
AllowedNetsService,
AllowedNetsServiceFactory,
ViewIdService,
NAE_TASK_VIEW_CONFIGURATION,
ChangedFieldsService,
tabbedTaskViewConfigurationFactory,
tabbedAllowedNetsServiceFactory
} from '@netgrif/components-core';
import {HeaderComponent} from "../../header/header.component";

function baseFilterFactory(injectedTabData: InjectedTabbedTaskViewData) {
return {
filter: injectedTabData.baseFilter
};
}

@Component({
selector: 'nc-filter-field-tabbed-task-view',
templateUrl: './filter-field-tabbed-task-view.component.html',
styleUrls: ['./filter-field-tabbed-task-view.component.scss'],
providers: [
CategoryFactory,
TaskViewService,
SearchService,
ChangedFieldsService,
{ provide: ViewIdService, useValue: null},
{
provide: NAE_BASE_FILTER,
useFactory: baseFilterFactory,
deps: [NAE_TAB_DATA]
},
{
provide: AllowedNetsService,
useFactory: tabbedAllowedNetsServiceFactory,
deps: [AllowedNetsServiceFactory, NAE_TAB_DATA]
},
{
provide: NAE_TASK_VIEW_CONFIGURATION,
useFactory: tabbedTaskViewConfigurationFactory,
deps: [NAE_TAB_DATA]
}
]
})
export class FilterFieldTabbedTaskViewComponent extends AbstractTabbedTaskViewComponent implements AfterViewInit {

@ViewChild('header') public taskHeaderComponent: HeaderComponent;

constructor(taskViewService: TaskViewService, @Inject(NAE_TAB_DATA) injectedTabData: InjectedTabbedTaskViewData) {
super(taskViewService, injectedTabData);
}

ngAfterViewInit(): void {
this.initializeHeader(this.taskHeaderComponent);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export * from './filter-field-content.module'

export * from './filter-field-tab-view/filter-field-tab-view.component'
export * from './filter-field-tabbed-case-view/filter-field-tabbed-case-view.component'
export * from './filter-field-tabbed-task-view/filter-field-tabbed-task-view.component'