diff --git a/src/app/pages/group/components/index.page.component.ts b/src/app/pages/group/components/index.page.component.ts
index 9ac4bd3..fe6c5e3 100644
--- a/src/app/pages/group/components/index.page.component.ts
+++ b/src/app/pages/group/components/index.page.component.ts
@@ -1,12 +1,37 @@
-import { Component, Inject } from '@angular/core';
+import { Subscription } from 'rxjs';
+
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { Router, ActivatedRoute, Params } from '@angular/router';
import { LogService } from '@ucap/ng-logger';
+import { QueryParams } from '../types/params.type';
+
@Component({
selector: 'app-pages-group-index',
templateUrl: './index.page.component.html',
styleUrls: ['./index.page.component.scss']
})
-export class IndexPageComponent {
- constructor(private logService: LogService) {}
+export class IndexPageComponent implements OnInit, OnDestroy {
+ private paramsSubscription: Subscription;
+
+ constructor(
+ private activatedRoute: ActivatedRoute,
+ private router: Router,
+ private logService: LogService
+ ) {}
+
+ ngOnInit(): void {
+ this.paramsSubscription = this.activatedRoute.queryParams.subscribe(
+ (params: Params) => {
+ console.log('IndexPageComponent', params[QueryParams.ID]);
+ }
+ );
+ }
+
+ ngOnDestroy(): void {
+ if (!!this.paramsSubscription) {
+ this.paramsSubscription.unsubscribe();
+ }
+ }
}
diff --git a/src/app/pages/group/components/sidenav.page.component.html b/src/app/pages/group/components/sidenav.page.component.html
index e04db7f..25f90c1 100644
--- a/src/app/pages/group/components/sidenav.page.component.html
+++ b/src/app/pages/group/components/sidenav.page.component.html
@@ -1,3 +1,4 @@
-
- sidenav page of group is works!
+
diff --git a/src/app/pages/group/components/sidenav.page.component.scss b/src/app/pages/group/components/sidenav.page.component.scss
index e69de29..76d36e6 100644
--- a/src/app/pages/group/components/sidenav.page.component.scss
+++ b/src/app/pages/group/components/sidenav.page.component.scss
@@ -0,0 +1,3 @@
+.sidenav-container {
+ overflow: hidden;
+}
diff --git a/src/app/pages/group/components/sidenav.page.component.ts b/src/app/pages/group/components/sidenav.page.component.ts
index 027ea39..469f8f3 100644
--- a/src/app/pages/group/components/sidenav.page.component.ts
+++ b/src/app/pages/group/components/sidenav.page.component.ts
@@ -1,12 +1,37 @@
-import { Component, Inject } from '@angular/core';
+import { Subscription } from 'rxjs';
+
+import { Component, OnInit, OnDestroy } from '@angular/core';
+import { ActivatedRoute, Router, Params } from '@angular/router';
import { LogService } from '@ucap/ng-logger';
+import { QueryParams } from '../types/params.type';
+
@Component({
selector: 'app-pages-group-sidenav',
templateUrl: './sidenav.page.component.html',
styleUrls: ['./sidenav.page.component.scss']
})
-export class SidenavPageComponent {
- constructor(private logService: LogService) {}
+export class SidenavPageComponent implements OnInit, OnDestroy {
+ private queryParamsSubscription: Subscription;
+
+ constructor(
+ private activatedRoute: ActivatedRoute,
+ private router: Router,
+ private logService: LogService
+ ) {}
+
+ ngOnInit(): void {
+ this.queryParamsSubscription = this.activatedRoute.queryParams.subscribe(
+ (params: Params) => {
+ console.log('SidenavPageComponent', params[QueryParams.ID]);
+ }
+ );
+ }
+
+ ngOnDestroy(): void {
+ if (!!this.queryParamsSubscription) {
+ this.queryParamsSubscription.unsubscribe();
+ }
+ }
}
diff --git a/src/app/pages/group/group.page.module.ts b/src/app/pages/group/group.page.module.ts
index fa66058..9335a60 100644
--- a/src/app/pages/group/group.page.module.ts
+++ b/src/app/pages/group/group.page.module.ts
@@ -3,6 +3,8 @@ import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout';
+import { AppGroupSectionModule } from '@app/sections/group/group.section.module';
+
import { AppGroupRoutingPageModule } from './group-routing.page.module';
import { IndexPageComponent } from './components/index.page.component';
@@ -13,7 +15,12 @@ export const COMPONENTS = [IndexPageComponent, SidenavPageComponent];
export { IndexPageComponent, SidenavPageComponent };
@NgModule({
- imports: [CommonModule, FlexLayoutModule, AppGroupRoutingPageModule],
+ imports: [
+ CommonModule,
+ FlexLayoutModule,
+ AppGroupSectionModule,
+ AppGroupRoutingPageModule
+ ],
declarations: [...COMPONENTS],
entryComponents: []
})
diff --git a/src/app/pages/group/types/params.type.ts b/src/app/pages/group/types/params.type.ts
new file mode 100644
index 0000000..99b5bb6
--- /dev/null
+++ b/src/app/pages/group/types/params.type.ts
@@ -0,0 +1,3 @@
+export enum QueryParams {
+ ID = 'id'
+}
diff --git a/src/app/sections/group/components/index.ts b/src/app/sections/group/components/index.ts
new file mode 100644
index 0000000..4cbf983
--- /dev/null
+++ b/src/app/sections/group/components/index.ts
@@ -0,0 +1,4 @@
+import { ListSectionComponent } from './list.section.component';
+import { SearchSectionComponent } from './search.section.component';
+
+export const COMPONENTS = [ListSectionComponent, SearchSectionComponent];
diff --git a/src/app/sections/group/components/list.section.component.html b/src/app/sections/group/components/list.section.component.html
new file mode 100644
index 0000000..b63c805
--- /dev/null
+++ b/src/app/sections/group/components/list.section.component.html
@@ -0,0 +1,3 @@
+
+
+
diff --git a/src/app/sections/group/components/list.section.component.scss b/src/app/sections/group/components/list.section.component.scss
new file mode 100644
index 0000000..356b3ad
--- /dev/null
+++ b/src/app/sections/group/components/list.section.component.scss
@@ -0,0 +1,2 @@
+.list-container {
+}
diff --git a/src/app/sections/group/components/list.section.component.spec.ts b/src/app/sections/group/components/list.section.component.spec.ts
new file mode 100644
index 0000000..c60a7bb
--- /dev/null
+++ b/src/app/sections/group/components/list.section.component.spec.ts
@@ -0,0 +1,32 @@
+import { TestBed, async } from '@angular/core/testing';
+import { RouterTestingModule } from '@angular/router/testing';
+import { ListSectionComponent } from './list.section.component';
+
+describe('app::sections::group::ListSectionComponent', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [RouterTestingModule],
+ declarations: [ListSectionComponent]
+ }).compileComponents();
+ }));
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(ListSectionComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'ucap-lg-web'`, () => {
+ const fixture = TestBed.createComponent(ListSectionComponent);
+ const app = fixture.componentInstance;
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(ListSectionComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement;
+ expect(compiled.querySelector('.content span').textContent).toContain(
+ 'ucap-lg-web app is running!'
+ );
+ });
+});
diff --git a/src/app/sections/group/components/list.section.component.ts b/src/app/sections/group/components/list.section.component.ts
new file mode 100644
index 0000000..931bd05
--- /dev/null
+++ b/src/app/sections/group/components/list.section.component.ts
@@ -0,0 +1,27 @@
+import { Component, OnInit, OnDestroy } from '@angular/core';
+
+import { LogService } from '@ucap/ng-logger';
+import {
+ VirtualScrollStrategy,
+ FixedSizeVirtualScrollStrategy,
+ VIRTUAL_SCROLL_STRATEGY
+} from '@angular/cdk/scrolling';
+
+@Component({
+ selector: 'app-sections-group-list',
+ templateUrl: './list.section.component.html',
+ styleUrls: ['./list.section.component.scss'],
+ providers: [
+ {
+ provide: VIRTUAL_SCROLL_STRATEGY,
+ useValue: new FixedSizeVirtualScrollStrategy(60, 3, 3)
+ }
+ ]
+})
+export class ListSectionComponent implements OnInit, OnDestroy {
+ constructor(private logService: LogService) {}
+
+ ngOnInit(): void {}
+
+ ngOnDestroy(): void {}
+}
diff --git a/src/app/sections/group/components/search.section.component.html b/src/app/sections/group/components/search.section.component.html
new file mode 100644
index 0000000..0cafbea
--- /dev/null
+++ b/src/app/sections/group/components/search.section.component.html
@@ -0,0 +1,3 @@
+
+ search section of group
+
diff --git a/src/app/sections/group/components/search.section.component.scss b/src/app/sections/group/components/search.section.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/sections/group/components/search.section.component.spec.ts b/src/app/sections/group/components/search.section.component.spec.ts
new file mode 100644
index 0000000..e45a1ca
--- /dev/null
+++ b/src/app/sections/group/components/search.section.component.spec.ts
@@ -0,0 +1,32 @@
+import { TestBed, async } from '@angular/core/testing';
+import { RouterTestingModule } from '@angular/router/testing';
+import { SearchSectionComponent } from './search.section.component';
+
+describe('app::sections::group::SearchSectionComponent', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [RouterTestingModule],
+ declarations: [SearchSectionComponent]
+ }).compileComponents();
+ }));
+
+ it('should create the app', () => {
+ const fixture = TestBed.createComponent(SearchSectionComponent);
+ const app = fixture.componentInstance;
+ expect(app).toBeTruthy();
+ });
+
+ it(`should have as title 'ucap-lg-web'`, () => {
+ const fixture = TestBed.createComponent(SearchSectionComponent);
+ const app = fixture.componentInstance;
+ });
+
+ it('should render title', () => {
+ const fixture = TestBed.createComponent(SearchSectionComponent);
+ fixture.detectChanges();
+ const compiled = fixture.nativeElement;
+ expect(compiled.querySelector('.content span').textContent).toContain(
+ 'ucap-lg-web app is running!'
+ );
+ });
+});
diff --git a/src/app/sections/group/components/search.section.component.ts b/src/app/sections/group/components/search.section.component.ts
new file mode 100644
index 0000000..6485ad8
--- /dev/null
+++ b/src/app/sections/group/components/search.section.component.ts
@@ -0,0 +1,16 @@
+import { Component, OnInit, OnDestroy } from '@angular/core';
+
+import { LogService } from '@ucap/ng-logger';
+
+@Component({
+ selector: 'app-sections-group-search',
+ templateUrl: './search.section.component.html',
+ styleUrls: ['./search.section.component.scss']
+})
+export class SearchSectionComponent implements OnInit, OnDestroy {
+ constructor(private logService: LogService) {}
+
+ ngOnInit(): void {}
+
+ ngOnDestroy(): void {}
+}
diff --git a/src/app/sections/group/group.section.module.ts b/src/app/sections/group/group.section.module.ts
new file mode 100644
index 0000000..cee46f5
--- /dev/null
+++ b/src/app/sections/group/group.section.module.ts
@@ -0,0 +1,32 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+
+import { FlexLayoutModule } from '@angular/flex-layout';
+
+import { MatCheckboxModule } from '@angular/material/checkbox';
+
+import { I18nModule, UCAP_I18N_NAMESPACE } from '@ucap/ng-i18n';
+
+import { GroupUiModule } from '@ucap/ng-ui-group';
+
+import { COMPONENTS } from './components';
+
+@NgModule({
+ imports: [
+ CommonModule,
+ FlexLayoutModule,
+ MatCheckboxModule,
+ I18nModule,
+ GroupUiModule
+ ],
+ exports: [...COMPONENTS],
+ declarations: [...COMPONENTS],
+ entryComponents: [],
+ providers: [
+ {
+ provide: UCAP_I18N_NAMESPACE,
+ useValue: ['group']
+ }
+ ]
+})
+export class AppGroupSectionModule {}