diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 60260308c..d935f391a 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -16,7 +16,7 @@ const routes: Routes = [ path: 'login', component: LoginWrapperComponent, children: [ - { path: '', component: LoginMaskComponent }, + { path: '', component: LoginMaskComponent, pathMatch: 'full' }, { path: 'reset-password', component: ResetPasswordComponent }, { path: 'reset-password-confirm', component: ResetPasswordConfirmComponent }, { path: 'legalnotice', component: LoginLegalNoticeComponent }, diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index ce9352af9..b20eebb70 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -61,14 +61,12 @@ export class AppComponent { // change default JS functions this.overloadArrayToString(); - appRef.isStable.subscribe(s => console.log('is stable', s)); appRef.isStable .pipe( filter(s => s), take(1) ) .subscribe(() => { - console.log('start scheduler'); servertimeService.startScheduler(); }); } diff --git a/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts b/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts index c98334b5d..c3380a051 100644 --- a/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts +++ b/client/src/app/fullscreen-projector/fullscreen-projector-routing.module.ts @@ -6,7 +6,8 @@ import { FullscreenProjectorComponent } from './fullscreen-projector/fullscreen- const routes: Routes = [ { path: '', - component: FullscreenProjectorComponent + component: FullscreenProjectorComponent, + pathMatch: 'full' }, { path: ':id', diff --git a/client/src/app/shared/components/head-bar/head-bar.component.ts b/client/src/app/shared/components/head-bar/head-bar.component.ts index f232ba5c5..6b09d336b 100644 --- a/client/src/app/shared/components/head-bar/head-bar.component.ts +++ b/client/src/app/shared/components/head-bar/head-bar.component.ts @@ -16,6 +16,7 @@ import { MainMenuService } from 'app/core/core-services/main-menu.service'; * * ```html * { - let component: MotionDetailComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [E2EImportsModule, MotionsModule], - declarations: [] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(MotionDetailComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/client/src/app/site/motions/modules/call-list/call-list-routing.module.ts b/client/src/app/site/motions/modules/call-list/call-list-routing.module.ts new file mode 100644 index 000000000..78c587fec --- /dev/null +++ b/client/src/app/site/motions/modules/call-list/call-list-routing.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { CallListComponent } from './call-list.component'; + +const routes: Routes = [{ path: '', component: CallListComponent, pathMatch: 'full' }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class CallListRoutingModule {} diff --git a/client/src/app/site/motions/components/call-list/call-list.component.html b/client/src/app/site/motions/modules/call-list/call-list.component.html similarity index 96% rename from client/src/app/site/motions/components/call-list/call-list.component.html rename to client/src/app/site/motions/modules/call-list/call-list.component.html index af238d371..1c0059979 100644 --- a/client/src/app/site/motions/components/call-list/call-list.component.html +++ b/client/src/app/site/motions/modules/call-list/call-list.component.html @@ -1,4 +1,4 @@ - +

Call list

diff --git a/client/src/app/site/motions/components/call-list/call-list.component.spec.ts b/client/src/app/site/motions/modules/call-list/call-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/call-list/call-list.component.spec.ts rename to client/src/app/site/motions/modules/call-list/call-list.component.spec.ts diff --git a/client/src/app/site/motions/components/call-list/call-list.component.ts b/client/src/app/site/motions/modules/call-list/call-list.component.ts similarity index 90% rename from client/src/app/site/motions/components/call-list/call-list.component.ts rename to client/src/app/site/motions/modules/call-list/call-list.component.ts index 2e5feaa55..e8a03b9db 100644 --- a/client/src/app/site/motions/components/call-list/call-list.component.ts +++ b/client/src/app/site/motions/modules/call-list/call-list.component.ts @@ -5,12 +5,13 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; -import { BaseViewComponent } from '../../../base/base-view'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; -import { MotionCsvExportService } from '../../services/motion-csv-export.service'; -import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; -import { ViewMotion } from '../../models/view-motion'; + +import { BaseViewComponent } from 'app/site/base/base-view'; +import { MotionCsvExportService } from 'app/site/motions/services/motion-csv-export.service'; +import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; import { OSTreeSortEvent } from 'app/shared/components/sorting-tree/sorting-tree.component'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Sort view for the call list. diff --git a/client/src/app/site/motions/modules/call-list/call-list.module.ts b/client/src/app/site/motions/modules/call-list/call-list.module.ts new file mode 100644 index 000000000..52d3c83a8 --- /dev/null +++ b/client/src/app/site/motions/modules/call-list/call-list.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { CallListRoutingModule } from './call-list-routing.module'; +import { CallListComponent } from './call-list.component'; +import { SharedModule } from 'app/shared/shared.module'; + +@NgModule({ + declarations: [CallListComponent], + imports: [CommonModule, CallListRoutingModule, SharedModule] +}) +export class CallListModule {} diff --git a/client/src/app/site/motions/modules/category/category-routing.module.ts b/client/src/app/site/motions/modules/category/category-routing.module.ts new file mode 100644 index 000000000..ad4198dee --- /dev/null +++ b/client/src/app/site/motions/modules/category/category-routing.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { CategoryListComponent } from './components/category-list/category-list.component'; +import { CategorySortComponent } from './components/category-sort/category-sort.component'; + +const routes: Routes = [ + { path: '', component: CategoryListComponent, pathMatch: 'full' }, + { path: ':id', component: CategorySortComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class CategoryRoutingModule {} diff --git a/client/src/app/site/motions/modules/category/category.module.ts b/client/src/app/site/motions/modules/category/category.module.ts new file mode 100644 index 000000000..c97e6d1e4 --- /dev/null +++ b/client/src/app/site/motions/modules/category/category.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { CategoryRoutingModule } from './category-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; +import { CategoryListComponent } from './components/category-list/category-list.component'; +import { CategorySortComponent } from './components/category-sort/category-sort.component'; + +@NgModule({ + declarations: [CategoryListComponent, CategorySortComponent], + imports: [CommonModule, CategoryRoutingModule, SharedModule] +}) +export class CategoryModule {} diff --git a/client/src/app/site/motions/components/category-list/category-list.component.html b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.html similarity index 98% rename from client/src/app/site/motions/components/category-list/category-list.component.html rename to client/src/app/site/motions/modules/category/components/category-list/category-list.component.html index d43b8e4d9..29e9e5256 100644 --- a/client/src/app/site/motions/components/category-list/category-list.component.html +++ b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.html @@ -1,4 +1,4 @@ - +

Categories

diff --git a/client/src/app/site/motions/components/category-list/category-list.component.scss b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/category-list/category-list.component.scss rename to client/src/app/site/motions/modules/category/components/category-list/category-list.component.scss diff --git a/client/src/app/site/motions/components/category-list/category-list.component.spec.ts b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.spec.ts similarity index 91% rename from client/src/app/site/motions/components/category-list/category-list.component.spec.ts rename to client/src/app/site/motions/modules/category/components/category-list/category-list.component.spec.ts index 3c301e2a4..084792b09 100644 --- a/client/src/app/site/motions/components/category-list/category-list.component.spec.ts +++ b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { CategoryListComponent } from './category-list.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('CategoryListComponent', () => { let component: CategoryListComponent; diff --git a/client/src/app/site/motions/components/category-list/category-list.component.ts b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts similarity index 97% rename from client/src/app/site/motions/components/category-list/category-list.component.ts rename to client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts index 206aaa50e..b82309be6 100644 --- a/client/src/app/site/motions/components/category-list/category-list.component.ts +++ b/client/src/app/site/motions/modules/category/components/category-list/category-list.component.ts @@ -5,13 +5,13 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { Category } from 'app/shared/models/motions/category'; import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { ViewCategory } from '../../models/view-category'; -import { ViewMotion } from '../../models/view-motion'; +import { ViewCategory } from 'app/site/motions/models/view-category'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * List view for the categories. diff --git a/client/src/app/site/motions/components/category-sort/category-sort.component.html b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.html similarity index 100% rename from client/src/app/site/motions/components/category-sort/category-sort.component.html rename to client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.html diff --git a/client/src/app/site/motions/components/category-sort/category-sort.component.scss b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.scss similarity index 100% rename from client/src/app/site/motions/components/category-sort/category-sort.component.scss rename to client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.scss diff --git a/client/src/app/site/motions/components/category-sort/category-sort.component.spec.ts b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/category-sort/category-sort.component.spec.ts rename to client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.spec.ts diff --git a/client/src/app/site/motions/components/category-sort/category-sort.component.ts b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts similarity index 96% rename from client/src/app/site/motions/components/category-sort/category-sort.component.ts rename to client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts index a41b7a652..8713d7305 100644 --- a/client/src/app/site/motions/components/category-sort/category-sort.component.ts +++ b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts @@ -10,8 +10,8 @@ import { MatSnackBar } from '@angular/material'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { SortingListComponent } from 'app/shared/components/sorting-list/sorting-list.component'; -import { ViewCategory } from '../../models/view-category'; -import { ViewMotion } from '../../models/view-motion'; +import { ViewCategory } from 'app/site/motions/models/view-category'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * View for rearranging and renumbering the motions of a category. The {@link onNumberMotions} diff --git a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.html b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.html rename to client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.html diff --git a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.scss b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.scss similarity index 90% rename from client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.scss rename to client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.scss index 9a8150135..70423f07d 100644 --- a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.scss +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.scss @@ -24,6 +24,7 @@ .chip-container { display: block; + min-height: 0; // default is inherit, will appear on the top edge of the cell } .os-headed-listview-table { diff --git a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.spec.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.spec.ts rename to client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.ts similarity index 97% rename from client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts rename to client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.ts index 54e34029e..e6deb564c 100644 --- a/client/src/app/site/motions/components/motion-block-detail/motion-block-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-detail/motion-block-detail.component.ts @@ -10,10 +10,10 @@ import { ListViewBaseComponent } from 'app/site/base/list-view-base'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; -import { ViewMotionBlock } from '../../models/view-motion-block'; +import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { ViewMotion } from '../../models/view-motion'; -import { OperatorService } from '../../../../core/core-services/operator.service'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; +import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; /** * Detail component to display one motion block diff --git a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.html b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.html similarity index 97% rename from client/src/app/site/motions/components/motion-block-list/motion-block-list.component.html rename to client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.html index e168f6e4a..d8d99ade5 100644 --- a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.html +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.html @@ -1,4 +1,4 @@ - +

Motion blocks

diff --git a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.scss b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-block-list/motion-block-list.component.scss rename to client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.scss diff --git a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.spec.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-block-list/motion-block-list.component.spec.ts rename to client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts similarity index 98% rename from client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts rename to client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts index 5da2cf866..9b56490f7 100644 --- a/client/src/app/site/motions/components/motion-block-list/motion-block-list.component.ts +++ b/client/src/app/site/motions/modules/motion-block/components/motion-block-list/motion-block-list.component.ts @@ -15,7 +15,7 @@ import { MotionBlockRepositoryService } from 'app/core/repositories/motions/moti import { OperatorService } from 'app/core/core-services/operator.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { ViewItem } from 'app/site/agenda/models/view-item'; -import { ViewMotionBlock } from '../../models/view-motion-block'; +import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; /** * Table for the motion blocks diff --git a/client/src/app/site/motions/modules/motion-block/motion-block-routing.module.ts b/client/src/app/site/motions/modules/motion-block/motion-block-routing.module.ts new file mode 100644 index 000000000..a56580ff6 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-block/motion-block-routing.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { MotionBlockDetailComponent } from './components/motion-block-detail/motion-block-detail.component'; +import { MotionBlockListComponent } from './components/motion-block-list/motion-block-list.component'; + +const routes: Routes = [ + { path: '', component: MotionBlockListComponent, pathMatch: 'full' }, + { path: ':id', component: MotionBlockDetailComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionBlockRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-block/motion-block.module.ts b/client/src/app/site/motions/modules/motion-block/motion-block.module.ts new file mode 100644 index 000000000..109ca252e --- /dev/null +++ b/client/src/app/site/motions/modules/motion-block/motion-block.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionBlockRoutingModule } from './motion-block-routing.module'; +import { MotionBlockListComponent } from './components/motion-block-list/motion-block-list.component'; +import { MotionBlockDetailComponent } from './components/motion-block-detail/motion-block-detail.component'; +import { SharedModule } from 'app/shared/shared.module'; + +@NgModule({ + declarations: [MotionBlockListComponent, MotionBlockDetailComponent], + imports: [CommonModule, MotionBlockRoutingModule, SharedModule] +}) +export class MotionBlockModule {} diff --git a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.html b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.html similarity index 57% rename from client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.html rename to client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.html index 1642b2d73..32ba6bf31 100644 --- a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.html +++ b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.html @@ -1,4 +1,4 @@ - +

Comment fields

@@ -12,19 +12,31 @@

- + Required

- +

- +

@@ -38,8 +50,13 @@ - +
@@ -67,19 +84,31 @@ Edit comment field:

- + Required

- +

- +

@@ -97,19 +126,34 @@
No groups selected
- - - - diff --git a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.scss b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.scss rename to client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.scss diff --git a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.spec.ts b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.spec.ts rename to client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.ts similarity index 97% rename from client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts rename to client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.ts index 12555ae56..cafc8bcb9 100644 --- a/client/src/app/site/motions/components/motion-comment-section-list/motion-comment-section-list.component.ts +++ b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-list.component.ts @@ -7,12 +7,13 @@ import { BehaviorSubject } from 'rxjs'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { MotionCommentSection } from 'app/shared/models/motions/motion-comment-section'; -import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { BaseViewComponent } from '../../../base/base-view'; + import { ViewGroup } from 'app/site/users/models/view-group'; import { GroupRepositoryService } from 'app/core/repositories/users/group-repository.service'; +import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; /** * List view for the comment sections. diff --git a/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-routing.module.ts b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-routing.module.ts new file mode 100644 index 000000000..914a92a0c --- /dev/null +++ b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section-routing.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { MotionCommentSectionListComponent } from './motion-comment-section-list.component'; + +const routes: Routes = [{ path: '', component: MotionCommentSectionListComponent, pathMatch: 'full' }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionCommentSectionRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section.module.ts b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section.module.ts new file mode 100644 index 000000000..ad7b85c27 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-comment-section/motion-comment-section.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionCommentSectionRoutingModule } from './motion-comment-section-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; +import { MotionCommentSectionListComponent } from './motion-comment-section-list.component'; + +@NgModule({ + declarations: [MotionCommentSectionListComponent], + imports: [CommonModule, MotionCommentSectionRoutingModule, SharedModule] +}) +export class MotionCommentSectionModule {} diff --git a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.html b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html similarity index 100% rename from client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.html rename to client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html diff --git a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.scss b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.scss similarity index 100% rename from client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.scss diff --git a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts similarity index 92% rename from client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts index ada8008cd..cb79ec285 100644 --- a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { AmendmentCreateWizardComponent } from './amendment-create-wizard.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('AmendmentCreateWizardComponent', () => { let component: AmendmentCreateWizardComponent; diff --git a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts similarity index 96% rename from client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts index 32180c2e3..a6e03a1bb 100644 --- a/client/src/app/site/motions/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -5,13 +5,13 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; -import { ConfigService } from 'app/core/ui-services/config.service'; -import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; -import { ViewMotion } from '../../models/view-motion'; +import { BaseViewComponent } from 'app/site/base/base-view'; +import { ConfigService } from 'app/core/ui-services/config.service'; +import { CreateMotion } from 'app/site/motions/models/create-motion'; import { LinenumberingService } from 'app/core/ui-services/linenumbering.service'; -import { BaseViewComponent } from '../../../base/base-view'; -import { CreateMotion } from '../../models/create-motion'; +import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Describes the single paragraphs from the base motion. diff --git a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.html b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.html similarity index 100% rename from client/src/app/site/motions/components/manage-submitters/manage-submitters.component.html rename to client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.html diff --git a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.scss b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.scss similarity index 100% rename from client/src/app/site/motions/components/manage-submitters/manage-submitters.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.scss diff --git a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.spec.ts similarity index 95% rename from client/src/app/site/motions/components/manage-submitters/manage-submitters.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.spec.ts index 902f3083b..372030871 100644 --- a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.spec.ts @@ -3,7 +3,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { ManageSubmittersComponent } from './manage-submitters.component'; import { E2EImportsModule } from 'e2e-imports.module'; import { ViewChild, Component } from '@angular/core'; -import { ViewMotion } from '../../models/view-motion'; + +import { ViewMotion } from 'app/site/motions/models/view-motion'; import { Motion } from 'app/shared/models/motions/motion'; describe('ManageSubmittersComponent', () => { diff --git a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.ts similarity index 96% rename from client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.ts index 81a6c89ae..84b0e0b48 100644 --- a/client/src/app/site/motions/components/manage-submitters/manage-submitters.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/manage-submitters/manage-submitters.component.ts @@ -2,18 +2,18 @@ import { Component, Input } from '@angular/core'; import { FormGroup, FormControl } from '@angular/forms'; import { MatSnackBar } from '@angular/material'; import { Title } from '@angular/platform-browser'; - -import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; +import { TranslateService } from '@ngx-translate/core'; + import { BaseViewComponent } from 'app/site/base/base-view'; -import { LocalPermissionsService } from '../../services/local-permissions.service'; +import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { User } from 'app/shared/models/users/user'; -import { ViewMotion } from '../../models/view-motion'; import { ViewUser } from 'app/site/users/models/view-user'; import { ViewModelStoreService } from 'app/core/core-services/view-model-store.service'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Component for the motion comments view diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.html diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.scss diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts similarity index 91% rename from client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts index 12468e1cd..27b684b5a 100644 --- a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.spec.ts @@ -4,10 +4,11 @@ import { MotionChangeRecommendationComponent, MotionChangeRecommendationComponentData } from './motion-change-recommendation.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; + +import { E2EImportsModule } from 'e2e-imports.module'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; import { ModificationType } from 'app/core/ui-services/diff.service'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; describe('MotionChangeRecommendationComponent', () => { let component: MotionChangeRecommendationComponent; diff --git a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.ts similarity index 96% rename from client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.ts index 78d93dd05..f5501770e 100644 --- a/client/src/app/site/motions/components/motion-change-recommendation/motion-change-recommendation.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-change-recommendation/motion-change-recommendation.component.ts @@ -5,10 +5,10 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { LineRange, ModificationType } from 'app/core/ui-services/diff.service'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; -import { BaseViewComponent } from '../../../base/base-view'; +import { LineRange, ModificationType } from 'app/core/ui-services/diff.service'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; /** * Data that needs to be provided to the MotionChangeRecommendationComponent dialog diff --git a/client/src/app/site/motions/components/motion-comments/motion-comments.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-comments/motion-comments.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.html diff --git a/client/src/app/site/motions/components/motion-comments/motion-comments.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-comments/motion-comments.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.scss diff --git a/client/src/app/site/motions/components/motion-comments/motion-comments.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.spec.ts similarity index 91% rename from client/src/app/site/motions/components/motion-comments/motion-comments.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.spec.ts index f635f0e14..3489bfeec 100644 --- a/client/src/app/site/motions/components/motion-comments/motion-comments.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MotionCommentsComponent } from './motion-comments.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('MotionCommentsComponent', () => { let component: MotionCommentsComponent; diff --git a/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.ts similarity index 96% rename from client/src/app/site/motions/components/motion-comments/motion-comments.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.ts index 9c0570404..b6093931a 100644 --- a/client/src/app/site/motions/components/motion-comments/motion-comments.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-comments/motion-comments.component.ts @@ -5,13 +5,13 @@ import { FormGroup, FormBuilder } from '@angular/forms'; import { TranslateService } from '@ngx-translate/core'; -import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; -import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; -import { OperatorService } from 'app/core/core-services/operator.service'; -import { ViewMotion } from '../../models/view-motion'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; import { MotionComment } from 'app/shared/models/motions/motion'; +import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; +import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; +import { OperatorService } from 'app/core/core-services/operator.service'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; +import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; /** * Component for the motion comments view diff --git a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.html diff --git a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.scss diff --git a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.spec.ts similarity index 85% rename from client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.spec.ts index 2c3a269ed..0f6382dc1 100644 --- a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.spec.ts @@ -1,13 +1,13 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { E2EImportsModule } from '../../../../../e2e-imports.module'; import { Component } from '@angular/core'; -import { LineNumberingMode, ViewMotion } from '../../models/view-motion'; + import { MotionDetailDiffComponent } from './motion-detail-diff.component'; import { MotionDetailOriginalChangeRecommendationsComponent } from '../motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component'; -import { ViewUnifiedChange } from '../../../../shared/models/motions/view-unified-change'; import { Motion } from 'app/shared/models/motions/motion'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; +import { ViewMotion, LineNumberingMode } from 'app/site/motions/models/view-motion'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; +import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change'; +import { E2EImportsModule } from 'e2e-imports.module'; @Component({ template: ` diff --git a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts similarity index 97% rename from client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts index eb930c22c..ae6bc5042 100644 --- a/client/src/app/site/motions/components/motion-detail-diff/motion-detail-diff.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-diff/motion-detail-diff.component.ts @@ -4,19 +4,19 @@ import { DomSanitizer, SafeHtml, Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { ConfigService } from 'app/core/ui-services/config.service'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; import { DiffService, LineRange, ModificationType } from 'app/core/ui-services/diff.service'; -import { LineNumberingMode, ViewMotion } from '../../models/view-motion'; import { MotionChangeRecommendationComponent, MotionChangeRecommendationComponentData } from '../motion-change-recommendation/motion-change-recommendation.component'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { ViewUnifiedChange, ViewUnifiedChangeType } from '../../../../shared/models/motions/view-unified-change'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; +import { ViewMotion, LineNumberingMode } from 'app/site/motions/models/view-motion'; +import { ViewUnifiedChange, ViewUnifiedChangeType } from 'app/shared/models/motions/view-unified-change'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; /** * This component displays the original motion text with the change blocks inside. diff --git a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.html diff --git a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.scss diff --git a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts similarity index 95% rename from client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts index 34939a96b..fb2c256ff 100644 --- a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MotionDetailOriginalChangeRecommendationsComponent } from './motion-detail-original-change-recommendations.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { E2EImportsModule } from 'e2e-imports.module'; import { Component } from '@angular/core'; @Component({ diff --git a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts similarity index 98% rename from client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts index 288483c42..7567a559f 100644 --- a/client/src/app/site/motions/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component.ts @@ -11,8 +11,8 @@ import { } from '@angular/core'; import { LineRange, ModificationType } from 'app/core/ui-services/diff.service'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; import { OperatorService } from 'app/core/core-services/operator.service'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; /** * This component displays the original motion text with annotated change commendations diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html similarity index 99% rename from client/src/app/site/motions/components/motion-detail/motion-detail.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html index 70048efe4..a1351161b 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.html +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.html @@ -1,6 +1,7 @@ { + let component: MotionDetailComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [E2EImportsModule], + declarations: [ + MotionDetailComponent, + MotionCommentsComponent, + PersonalNoteComponent, + ManageSubmittersComponent, + MotionPollComponent, + MotionDetailOriginalChangeRecommendationsComponent, + MotionDetailDiffComponent + ] + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MotionDetailComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts similarity index 93% rename from client/src/app/site/motions/components/motion-detail/motion-detail.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts index 901a9d1f1..99d720802 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-detail/motion-detail.component.ts @@ -7,28 +7,26 @@ import { MatDialog, MatSnackBar, MatCheckboxChange, ErrorStateMatcher } from '@a import { BehaviorSubject, Subscription } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; -import { BaseViewComponent } from '../../../base/base-view'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { ChangeRecommendationRepositoryService } from 'app/core/repositories/motions/change-recommendation-repository.service'; -import { ChangeRecoMode, LineNumberingMode, ViewMotion } from '../../models/view-motion'; -import { CreateMotion } from '../../models/create-motion'; +import { CreateMotion } from 'app/site/motions/models/create-motion'; import { ConfigService } from 'app/core/ui-services/config.service'; import { DataStoreService } from 'app/core/core-services/data-store.service'; import { DiffLinesInParagraph, LineRange } from 'app/core/ui-services/diff.service'; import { ItemRepositoryService } from 'app/core/repositories/agenda/item-repository.service'; import { itemVisibilityChoices, Item } from 'app/shared/models/agenda/item'; import { LinenumberingService } from 'app/core/ui-services/linenumbering.service'; -import { LocalPermissionsService } from '../../services/local-permissions.service'; +import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; import { Mediafile } from 'app/shared/models/mediafiles/mediafile'; import { Motion } from 'app/shared/models/motions/motion'; import { MotionBlock } from 'app/shared/models/motions/motion-block'; import { - MotionChangeRecommendationComponent, - MotionChangeRecommendationComponentData + MotionChangeRecommendationComponentData, + MotionChangeRecommendationComponent } from '../motion-change-recommendation/motion-change-recommendation.component'; -import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; +import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; - import { NotifyService } from 'app/core/core-services/notify.service'; import { OperatorService } from 'app/core/core-services/operator.service'; import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; @@ -37,18 +35,22 @@ import { PromptService } from 'app/core/ui-services/prompt.service'; import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; import { Tag } from 'app/shared/models/core/tag'; import { UserRepositoryService } from 'app/core/repositories/users/user-repository.service'; -import { ViewMotionBlock } from '../../models/view-motion-block'; -import { ViewWorkflow } from '../../models/view-workflow'; +import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; +import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; import { ViewUser } from 'app/site/users/models/view-user'; -import { ViewCategory } from '../../models/view-category'; -import { ViewCreateMotion } from '../../models/view-create-motion'; +import { ViewCategory } from 'app/site/motions/models/view-category'; +import { ViewCreateMotion } from 'app/site/motions/models/view-create-motion'; import { ViewItem } from 'app/site/agenda/models/view-item'; import { ViewportService } from 'app/core/ui-services/viewport.service'; import { ViewMediafile } from 'app/site/mediafiles/models/view-mediafile'; import { ViewModelStoreService } from 'app/core/core-services/view-model-store.service'; -import { ViewMotionChangeRecommendation } from '../../models/view-change-recommendation'; -import { ViewMotionNotificationEditMotion, TypeOfNotificationViewMotion } from '../../models/view-motion-notify'; -import { ViewStatuteParagraph } from '../../models/view-statute-paragraph'; +import { ViewMotionChangeRecommendation } from 'app/site/motions/models/view-change-recommendation'; +import { + ViewMotionNotificationEditMotion, + TypeOfNotificationViewMotion +} from 'app/site/motions/models/view-motion-notify'; +import { ViewMotion, ChangeRecoMode, LineNumberingMode } from 'app/site/motions/models/view-motion'; +import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph'; import { ViewTag } from 'app/site/tags/models/view-tag'; import { ViewUnifiedChange } from 'app/shared/models/motions/view-unified-change'; import { Workflow } from 'app/shared/models/motions/workflow'; @@ -342,7 +344,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, private editNotificationSubscription: Subscription; /** - * Constuct the detail view. + * Constructs the detail view. * * @param title * @param translate @@ -552,44 +554,10 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, * determine the motion to display using the URL */ public getMotionByUrl(): void { - if (this.route.snapshot.url[0] && this.route.snapshot.url[0].path === 'new') { - // creates a new motion - this.newMotion = true; - this.editMotion = true; - // prevent 'undefined' to appear in the ui - const defaultMotion: Partial = { - title: '', - origin: '', - identifier: '' - }; - if (this.route.snapshot.queryParams.parent) { - this.amendmentEdit = true; - const parentMotion = this.repo.getViewModel(this.route.snapshot.queryParams.parent); - const defaultTitle = `${this.translate.instant('Amendment to')} ${parentMotion.identifierOrTitle}`; - const mode = this.configService.instant('motions_amendments_text_mode'); - if (mode === 'freestyle' || mode === 'fulltext') { - defaultMotion.title = defaultTitle; - defaultMotion.parent_id = parentMotion.id; - defaultMotion.category_id = parentMotion.category_id; - defaultMotion.motion_block_id = parentMotion.motion_block_id; - this.contentForm.patchValue({ - title: defaultTitle, - category_id: parentMotion.category_id, - motion_block_id: parentMotion.motion_block_id, - parent_id: parentMotion.id - }); - } - if (mode === 'fulltext') { - defaultMotion.text = parentMotion.text; - this.contentForm.patchValue({ text: parentMotion.text }); - } - } - this.motion = new ViewCreateMotion(new CreateMotion(defaultMotion)); - this.motionCopy = new ViewCreateMotion(new CreateMotion(defaultMotion)); - } else { - // load existing motion - this.route.params.subscribe(params => { - const motionId: number = parseInt(params.id, 10); + this.route.params.subscribe(params => { + if (Object.keys(params).length > 0) { + // load existing motion + const motionId: number = +params.id; this.repo.getViewModelObservable(motionId).subscribe(newViewMotion => { if (newViewMotion) { this.motion = newViewMotion; @@ -612,8 +580,42 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, this.changeRecommendations = recos; this.recalcUnifiedChanges(); }); - }); - } + } else { + // creates a new motion + this.newMotion = true; + this.editMotion = true; + // prevent 'undefined' to appear in the ui + const defaultMotion: Partial = { + title: '', + origin: '', + identifier: '' + }; + if (this.route.snapshot.queryParams.parent) { + this.amendmentEdit = true; + const parentMotion = this.repo.getViewModel(this.route.snapshot.queryParams.parent); + const defaultTitle = `${this.translate.instant('Amendment to')} ${parentMotion.identifierOrTitle}`; + const mode = this.configService.instant('motions_amendments_text_mode'); + if (mode === 'freestyle' || mode === 'fulltext') { + defaultMotion.title = defaultTitle; + defaultMotion.parent_id = parentMotion.id; + defaultMotion.category_id = parentMotion.category_id; + defaultMotion.motion_block_id = parentMotion.motion_block_id; + this.contentForm.patchValue({ + title: defaultTitle, + category_id: parentMotion.category_id, + motion_block_id: parentMotion.motion_block_id, + parent_id: parentMotion.id + }); + } + if (mode === 'fulltext') { + defaultMotion.text = parentMotion.text; + this.contentForm.patchValue({ text: parentMotion.text }); + } + } + this.motion = new ViewCreateMotion(new CreateMotion(defaultMotion)); + this.motionCopy = new ViewCreateMotion(new CreateMotion(defaultMotion)); + } + }); } /** @@ -1080,7 +1082,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit, */ public navigateToMotion(motion: ViewMotion): void { if (motion) { - this.router.navigate(['../' + motion.id], { relativeTo: this.route }); + this.router.navigate(['../contacts'], { relativeTo: this.route.parent }); // update the current motion this.motion = motion; this.setSurroundingMotions(); diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.html diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.scss diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.ts similarity index 95% rename from client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.ts index 43063b321..438ddbe95 100644 --- a/client/src/app/site/motions/components/motion-poll/motion-poll-dialog.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll-dialog.component.ts @@ -3,7 +3,7 @@ import { MatDialogRef, MAT_DIALOG_DATA, MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; -import { MotionPollService, CalculablePollKey } from '../../services/motion-poll.service'; +import { MotionPollService, CalculablePollKey } from 'app/site/motions/services/motion-poll.service'; /** * A dialog for updating the values of a poll. diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll.component.html b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-poll/motion-poll.component.html rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.html diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll.component.scss b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-poll/motion-poll.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.scss diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-poll/motion-poll.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.ts similarity index 96% rename from client/src/app/site/motions/components/motion-poll/motion-poll.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.ts index 60a966231..28100d3f4 100644 --- a/client/src/app/site/motions/components/motion-poll/motion-poll.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/motion-poll/motion-poll.component.ts @@ -5,13 +5,13 @@ import { TranslateService } from '@ngx-translate/core'; import { CalculablePollKey } from 'app/core/ui-services/poll.service'; import { ConstantsService } from 'app/core/ui-services/constants.service'; -import { LocalPermissionsService } from '../../services/local-permissions.service'; +import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; import { MotionPoll } from 'app/shared/models/motions/motion-poll'; -import { MotionPollService } from '../../services/motion-poll.service'; import { MotionPollDialogComponent } from './motion-poll-dialog.component'; +import { MotionPollPdfService } from 'app/site/motions/services/motion-poll-pdf.service'; +import { MotionPollService } from 'app/site/motions/services/motion-poll.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; import { PromptService } from 'app/core/ui-services/prompt.service'; -import { MotionPollPdfService } from '../../services/motion-poll-pdf.service'; /** * A component used to display and edit polls of a motion. diff --git a/client/src/app/site/motions/components/personal-note/personal-note.component.html b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.html similarity index 100% rename from client/src/app/site/motions/components/personal-note/personal-note.component.html rename to client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.html diff --git a/client/src/app/site/motions/components/personal-note/personal-note.component.scss b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.scss similarity index 100% rename from client/src/app/site/motions/components/personal-note/personal-note.component.scss rename to client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.scss diff --git a/client/src/app/site/motions/components/personal-note/personal-note.component.spec.ts b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/personal-note/personal-note.component.spec.ts rename to client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.spec.ts diff --git a/client/src/app/site/motions/components/personal-note/personal-note.component.ts b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts similarity index 94% rename from client/src/app/site/motions/components/personal-note/personal-note.component.ts rename to client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts index 4f0e9906c..67fac7c8d 100644 --- a/client/src/app/site/motions/components/personal-note/personal-note.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/personal-note/personal-note.component.ts @@ -3,11 +3,11 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { Subscription } from 'rxjs'; -import { BaseComponent } from '../../../../base.component'; -import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; +import { BaseComponent } from 'app/base.component'; +import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; import { PersonalNoteContent } from 'app/shared/models/users/personal-note'; import { PersonalNoteService } from 'app/core/ui-services/personal-note.service'; -import { ViewMotion } from '../../models/view-motion'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Component for the motion comments view diff --git a/client/src/app/site/motions/modules/motion-detail/motion-detail-routing.module.ts b/client/src/app/site/motions/modules/motion-detail/motion-detail-routing.module.ts new file mode 100644 index 000000000..962eade2f --- /dev/null +++ b/client/src/app/site/motions/modules/motion-detail/motion-detail-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { MotionDetailComponent } from './components/motion-detail/motion-detail.component'; +import { AmendmentCreateWizardComponent } from './components/amendment-create-wizard/amendment-create-wizard.component'; + +const routes: Routes = [ + { path: '', component: MotionDetailComponent, pathMatch: 'full' }, + { path: 'create-amendment', component: AmendmentCreateWizardComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionDetailRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts b/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts new file mode 100644 index 000000000..c5daee26d --- /dev/null +++ b/client/src/app/site/motions/modules/motion-detail/motion-detail.module.ts @@ -0,0 +1,39 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionDetailRoutingModule } from './motion-detail-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; +import { MotionDetailComponent } from './components/motion-detail/motion-detail.component'; +import { AmendmentCreateWizardComponent } from './components/amendment-create-wizard/amendment-create-wizard.component'; +import { MotionCommentsComponent } from './components/motion-comments/motion-comments.component'; +import { PersonalNoteComponent } from './components/personal-note/personal-note.component'; +import { ManageSubmittersComponent } from './components/manage-submitters/manage-submitters.component'; +import { MotionPollDialogComponent } from './components/motion-poll/motion-poll-dialog.component'; +import { MotionPollComponent } from './components/motion-poll/motion-poll.component'; +import { MotionDetailOriginalChangeRecommendationsComponent } from './components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component'; +import { MotionDetailDiffComponent } from './components/motion-detail-diff/motion-detail-diff.component'; +import { MotionChangeRecommendationComponent } from './components/motion-change-recommendation/motion-change-recommendation.component'; + +@NgModule({ + imports: [CommonModule, MotionDetailRoutingModule, SharedModule], + declarations: [ + MotionDetailComponent, + AmendmentCreateWizardComponent, + MotionCommentsComponent, + PersonalNoteComponent, + ManageSubmittersComponent, + MotionPollComponent, + MotionPollDialogComponent, + MotionDetailDiffComponent, + MotionDetailOriginalChangeRecommendationsComponent, + MotionChangeRecommendationComponent + ], + entryComponents: [ + MotionCommentsComponent, + PersonalNoteComponent, + ManageSubmittersComponent, + MotionPollDialogComponent, + MotionChangeRecommendationComponent + ] +}) +export class MotionDetailModule {} diff --git a/client/src/app/site/motions/components/motion-import-list/motion-import-list.component.html b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.html similarity index 99% rename from client/src/app/site/motions/components/motion-import-list/motion-import-list.component.html rename to client/src/app/site/motions/modules/motion-import/motion-import-list.component.html index 60f234a39..20b0955ea 100644 --- a/client/src/app/site/motions/components/motion-import-list/motion-import-list.component.html +++ b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.html @@ -1,4 +1,4 @@ - +

Import motions

@@ -48,7 +48,7 @@ Text separator - + {{ option.label | translate }} @@ -107,7 +107,6 @@
- diff --git a/client/src/app/site/motions/components/motion-import-list/motion-import-list.component.spec.ts b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-import-list/motion-import-list.component.spec.ts rename to client/src/app/site/motions/modules/motion-import/motion-import-list.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-import-list/motion-import-list.component.ts b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts similarity index 84% rename from client/src/app/site/motions/components/motion-import-list/motion-import-list.component.ts rename to client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts index d1656d078..fff002c60 100644 --- a/client/src/app/site/motions/components/motion-import-list/motion-import-list.component.ts +++ b/client/src/app/site/motions/modules/motion-import/motion-import-list.component.ts @@ -5,9 +5,9 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { BaseImportListComponent } from 'app/site/base/base-import-list'; -import { MotionCsvExportService } from '../../services/motion-csv-export.service'; -import { MotionImportService } from '../../services/motion-import.service'; -import { ViewMotion } from '../../models/view-motion'; +import { MotionCsvExportService } from 'app/site/motions/services/motion-csv-export.service'; +import { MotionImportService } from 'app/site/motions/services/motion-import.service'; +import { ViewMotion } from 'app/site/motions/models/view-motion'; /** * Component for the motion import list view. diff --git a/client/src/app/site/motions/modules/motion-import/motion-import-routing.module.ts b/client/src/app/site/motions/modules/motion-import/motion-import-routing.module.ts new file mode 100644 index 000000000..f63bba3aa --- /dev/null +++ b/client/src/app/site/motions/modules/motion-import/motion-import-routing.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { MotionImportListComponent } from './motion-import-list.component'; + +const routes: Routes = [{ path: '', component: MotionImportListComponent, pathMatch: 'full' }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionImportRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-import/motion-import.module.ts b/client/src/app/site/motions/modules/motion-import/motion-import.module.ts new file mode 100644 index 000000000..528a610a1 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-import/motion-import.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionImportListComponent } from './motion-import-list.component'; +import { MotionImportRoutingModule } from './motion-import-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; + +@NgModule({ + declarations: [MotionImportListComponent], + imports: [CommonModule, MotionImportRoutingModule, SharedModule] +}) +export class MotionImportModule {} diff --git a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.html b/client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.html rename to client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.html diff --git a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.scss b/client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.scss rename to client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.scss diff --git a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.spec.ts b/client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.spec.ts rename to client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.spec.ts diff --git a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts b/client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.ts similarity index 96% rename from client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts rename to client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.ts index 81692a401..7d0fcefe0 100644 --- a/client/src/app/site/motions/components/motion-export-dialog/motion-export-dialog.component.ts +++ b/client/src/app/site/motions/modules/motion-list/components/motion-export-dialog/motion-export-dialog.component.ts @@ -3,10 +3,10 @@ import { FormGroup, FormBuilder } from '@angular/forms'; import { MatDialogRef, MatButtonToggle } from '@angular/material'; import { ConfigService } from 'app/core/ui-services/config.service'; -import { LineNumberingMode, ChangeRecoMode } from '../../models/view-motion'; -import { InfoToExport } from '../../services/motion-pdf.service'; import { MotionCommentSectionRepositoryService } from 'app/core/repositories/motions/motion-comment-section-repository.service'; -import { ViewMotionCommentSection } from '../../models/view-motion-comment-section'; +import { LineNumberingMode, ChangeRecoMode } from 'app/site/motions/models/view-motion'; +import { InfoToExport } from 'app/site/motions/services/motion-pdf.service'; +import { ViewMotionCommentSection } from 'app/site/motions/models/view-motion-comment-section'; /** * Dialog component to determine exporting. diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.html b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.html similarity index 100% rename from client/src/app/site/motions/components/motion-list/motion-list.component.html rename to client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.html diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.scss b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/motion-list/motion-list.component.scss rename to client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.scss diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.spec.ts b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.spec.ts similarity index 91% rename from client/src/app/site/motions/components/motion-list/motion-list.component.spec.ts rename to client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.spec.ts index 6b598239e..3b3caa7b7 100644 --- a/client/src/app/site/motions/components/motion-list/motion-list.component.spec.ts +++ b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MotionListComponent } from './motion-list.component'; -import { E2EImportsModule } from '../../../../../e2e-imports.module'; +import { E2EImportsModule } from 'e2e-imports.module'; describe('MotionListComponent', () => { let component: MotionListComponent; diff --git a/client/src/app/site/motions/components/motion-list/motion-list.component.ts b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts similarity index 92% rename from client/src/app/site/motions/components/motion-list/motion-list.component.ts rename to client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts index fef6f0775..bd7e682ef 100644 --- a/client/src/app/site/motions/components/motion-list/motion-list.component.ts +++ b/client/src/app/site/motions/modules/motion-list/components/motion-list/motion-list.component.ts @@ -7,27 +7,27 @@ import { TranslateService } from '@ngx-translate/core'; import { CategoryRepositoryService } from 'app/core/repositories/motions/category-repository.service'; import { ConfigService } from 'app/core/ui-services/config.service'; -import { ListViewBaseComponent } from '../../../base/list-view-base'; -import { LocalPermissionsService } from '../../services/local-permissions.service'; +import { ListViewBaseComponent } from 'app/site/base/list-view-base'; import { MotionBlockRepositoryService } from 'app/core/repositories/motions/motion-block-repository.service'; -import { MotionCsvExportService } from '../../services/motion-csv-export.service'; -import { MotionFilterListService } from '../../services/motion-filter-list.service'; -import { MotionMultiselectService } from '../../services/motion-multiselect.service'; import { MotionRepositoryService } from 'app/core/repositories/motions/motion-repository.service'; -import { MotionSortListService } from '../../services/motion-sort-list.service'; import { TagRepositoryService } from 'app/core/repositories/tags/tag-repository.service'; -import { ViewCategory } from '../../models/view-category'; -import { ViewMotion, LineNumberingMode, ChangeRecoMode } from '../../models/view-motion'; -import { ViewMotionBlock } from '../../models/view-motion-block'; import { ViewTag } from 'app/site/tags/models/view-tag'; -import { ViewWorkflow } from '../../models/view-workflow'; import { WorkflowState } from 'app/shared/models/motions/workflow-state'; import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; -import { MotionPdfExportService } from '../../services/motion-pdf-export.service'; import { MotionExportDialogComponent } from '../motion-export-dialog/motion-export-dialog.component'; import { OperatorService } from 'app/core/core-services/operator.service'; import { ViewportService } from 'app/core/ui-services/viewport.service'; import { Motion } from 'app/shared/models/motions/motion'; +import { ViewMotion, LineNumberingMode, ChangeRecoMode } from 'app/site/motions/models/view-motion'; +import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; +import { ViewCategory } from 'app/site/motions/models/view-category'; +import { ViewMotionBlock } from 'app/site/motions/models/view-motion-block'; +import { MotionSortListService } from 'app/site/motions/services/motion-sort-list.service'; +import { MotionFilterListService } from 'app/site/motions/services/motion-filter-list.service'; +import { MotionCsvExportService } from 'app/site/motions/services/motion-csv-export.service'; +import { MotionPdfExportService } from 'app/site/motions/services/motion-pdf-export.service'; +import { MotionMultiselectService } from 'app/site/motions/services/motion-multiselect.service'; +import { LocalPermissionsService } from 'app/site/motions/services/local-permissions.service'; /** * Component that displays all the motions in a Table using DataSource. diff --git a/client/src/app/site/motions/modules/motion-list/motion-list-routing.module.ts b/client/src/app/site/motions/modules/motion-list/motion-list-routing.module.ts new file mode 100644 index 000000000..1a45e9508 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-list/motion-list-routing.module.ts @@ -0,0 +1,11 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { MotionListComponent } from './components/motion-list/motion-list.component'; + +const routes: Routes = [{ path: '', component: MotionListComponent, pathMatch: 'full' }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionListRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-list/motion-list.module.ts b/client/src/app/site/motions/modules/motion-list/motion-list.module.ts new file mode 100644 index 000000000..657481121 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-list/motion-list.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionListRoutingModule } from './motion-list-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; +import { MotionExportDialogComponent } from './components/motion-export-dialog/motion-export-dialog.component'; +import { MotionListComponent } from './components/motion-list/motion-list.component'; + +@NgModule({ + imports: [CommonModule, MotionListRoutingModule, SharedModule], + declarations: [MotionListComponent, MotionExportDialogComponent], + entryComponents: [MotionExportDialogComponent] +}) +export class MotionListModule {} diff --git a/client/src/app/site/motions/components/workflow-detail/workflow-detail.component.html b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.html similarity index 100% rename from client/src/app/site/motions/components/workflow-detail/workflow-detail.component.html rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.html diff --git a/client/src/app/site/motions/components/workflow-detail/workflow-detail.component.scss b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.scss similarity index 100% rename from client/src/app/site/motions/components/workflow-detail/workflow-detail.component.scss rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.scss diff --git a/client/src/app/site/motions/components/workflow-detail/workflow-detail.component.spec.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/workflow-detail/workflow-detail.component.spec.ts rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.spec.ts diff --git a/client/src/app/site/motions/components/workflow-detail/workflow-detail.component.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts similarity index 99% rename from client/src/app/site/motions/components/workflow-detail/workflow-detail.component.ts rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts index bfbe40820..b5b4a14d1 100644 --- a/client/src/app/site/motions/components/workflow-detail/workflow-detail.component.ts +++ b/client/src/app/site/motions/modules/motion-workflow/components/workflow-detail/workflow-detail.component.ts @@ -7,7 +7,7 @@ import { Title } from '@angular/platform-browser'; import { TranslateService } from '@ngx-translate/core'; import { BaseViewComponent } from 'app/site/base/base-view'; -import { ViewWorkflow, StateCssClassMapping } from '../../models/view-workflow'; +import { ViewWorkflow, StateCssClassMapping } from 'app/site/motions/models/view-workflow'; import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; import { WorkflowState, MergeAmendment } from 'app/shared/models/motions/workflow-state'; import { PromptService } from 'app/core/ui-services/prompt.service'; diff --git a/client/src/app/site/motions/components/workflow-list/workflow-list.component.html b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.html similarity index 94% rename from client/src/app/site/motions/components/workflow-list/workflow-list.component.html rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.html index decbe1bb0..21a79c80f 100644 --- a/client/src/app/site/motions/components/workflow-list/workflow-list.component.html +++ b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.html @@ -1,5 +1,5 @@ - +

Workflows

diff --git a/client/src/app/site/motions/components/workflow-list/workflow-list.component.scss b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/workflow-list/workflow-list.component.scss rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.scss diff --git a/client/src/app/site/motions/components/workflow-list/workflow-list.component.spec.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/workflow-list/workflow-list.component.spec.ts rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.spec.ts diff --git a/client/src/app/site/motions/components/workflow-list/workflow-list.component.ts b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts similarity index 98% rename from client/src/app/site/motions/components/workflow-list/workflow-list.component.ts rename to client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts index cd0d10e63..5777d483d 100644 --- a/client/src/app/site/motions/components/workflow-list/workflow-list.component.ts +++ b/client/src/app/site/motions/modules/motion-workflow/components/workflow-list/workflow-list.component.ts @@ -7,7 +7,7 @@ import { ListViewBaseComponent } from 'app/site/base/list-view-base'; import { MatSnackBar, MatDialog } from '@angular/material'; import { PromptService } from 'app/core/ui-services/prompt.service'; import { Router, ActivatedRoute } from '@angular/router'; -import { ViewWorkflow } from '../../models/view-workflow'; +import { ViewWorkflow } from 'app/site/motions/models/view-workflow'; import { WorkflowRepositoryService } from 'app/core/repositories/motions/workflow-repository.service'; import { Workflow } from 'app/shared/models/motions/workflow'; diff --git a/client/src/app/site/motions/modules/motion-workflow/motion-workflow-routing.module.ts b/client/src/app/site/motions/modules/motion-workflow/motion-workflow-routing.module.ts new file mode 100644 index 000000000..0ac2fbb86 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-workflow/motion-workflow-routing.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { WorkflowListComponent } from './components/workflow-list/workflow-list.component'; +import { WorkflowDetailComponent } from './components/workflow-detail/workflow-detail.component'; + +const routes: Routes = [ + { path: '', component: WorkflowListComponent, pathMatch: 'full' }, + { path: ':id', component: WorkflowDetailComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class MotionWorkflowRoutingModule {} diff --git a/client/src/app/site/motions/modules/motion-workflow/motion-workflow.module.ts b/client/src/app/site/motions/modules/motion-workflow/motion-workflow.module.ts new file mode 100644 index 000000000..531142930 --- /dev/null +++ b/client/src/app/site/motions/modules/motion-workflow/motion-workflow.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { MotionWorkflowRoutingModule } from './motion-workflow-routing.module'; +import { SharedModule } from 'app/shared/shared.module'; +import { WorkflowListComponent } from './components/workflow-list/workflow-list.component'; +import { WorkflowDetailComponent } from './components/workflow-detail/workflow-detail.component'; + +@NgModule({ + declarations: [WorkflowListComponent, WorkflowDetailComponent], + imports: [CommonModule, MotionWorkflowRoutingModule, SharedModule] +}) +export class MotionWorkflowModule {} diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.html b/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.html similarity index 100% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.html rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.html diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.spec.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.spec.ts rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.spec.ts diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts similarity index 100% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-import-list/statute-import-list.component.ts rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-import-list/statute-import-list.component.ts diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.html b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.html similarity index 66% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.html rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.html index 162db0445..61a268d81 100644 --- a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.html +++ b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.html @@ -1,4 +1,4 @@ - +

Statute

@@ -16,11 +16,10 @@ New statute paragraph -
+

- + Required @@ -29,10 +28,7 @@

Statute paragraph

- +
@@ -47,20 +43,23 @@
- + {{ statuteParagraph.title }} -
+ Edit statute paragraph:

- + Required @@ -69,10 +68,7 @@

Statute paragraph

- + @@ -84,19 +80,34 @@ - - - - diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.scss b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.scss similarity index 100% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.scss rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.scss diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.spec.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.spec.ts similarity index 100% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.spec.ts rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.spec.ts diff --git a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts similarity index 96% rename from client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts rename to client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts index 627b4d175..344c1f953 100644 --- a/client/src/app/site/motions/components/statute-paragraph-list/statute-paragraph-list.component.ts +++ b/client/src/app/site/motions/modules/statute-paragraph/components/statute-paragraph-list/statute-paragraph-list.component.ts @@ -5,12 +5,12 @@ import { MatSnackBar } from '@angular/material'; import { TranslateService } from '@ngx-translate/core'; +import { BaseViewComponent } from 'app/site/base/base-view'; import { PromptService } from 'app/core/ui-services/prompt.service'; +import { StatuteCsvExportService } from 'app/site/motions/services/statute-csv-export.service'; import { StatuteParagraph } from 'app/shared/models/motions/statute-paragraph'; -import { ViewStatuteParagraph } from '../../models/view-statute-paragraph'; import { StatuteParagraphRepositoryService } from 'app/core/repositories/motions/statute-paragraph-repository.service'; -import { BaseViewComponent } from '../../../base/base-view'; -import { StatuteCsvExportService } from '../../services/statute-csv-export.service'; +import { ViewStatuteParagraph } from 'app/site/motions/models/view-statute-paragraph'; /** * List view for the statute paragraphs. diff --git a/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph-routing.module.ts b/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph-routing.module.ts new file mode 100644 index 000000000..9328dad5e --- /dev/null +++ b/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph-routing.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { StatuteParagraphListComponent } from './components/statute-paragraph-list/statute-paragraph-list.component'; +import { StatuteImportListComponent } from './components/statute-import-list/statute-import-list.component'; + +const routes: Routes = [ + { path: '', component: StatuteParagraphListComponent, pathMatch: 'full' }, + { path: 'import', component: StatuteImportListComponent } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class StatuteParagraphRoutingModule {} diff --git a/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph.module.ts b/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph.module.ts new file mode 100644 index 000000000..f54a2fa22 --- /dev/null +++ b/client/src/app/site/motions/modules/statute-paragraph/statute-paragraph.module.ts @@ -0,0 +1,13 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { SharedModule } from 'app/shared/shared.module'; +import { StatuteImportListComponent } from './components/statute-import-list/statute-import-list.component'; +import { StatuteParagraphListComponent } from './components/statute-paragraph-list/statute-paragraph-list.component'; +import { StatuteParagraphRoutingModule } from './statute-paragraph-routing.module'; + +@NgModule({ + declarations: [StatuteParagraphListComponent, StatuteImportListComponent], + imports: [CommonModule, StatuteParagraphRoutingModule, SharedModule] +}) +export class StatuteParagraphModule {} diff --git a/client/src/app/site/motions/motions-routing.module.ts b/client/src/app/site/motions/motions-routing.module.ts index ade8abc77..6a618ffb2 100644 --- a/client/src/app/site/motions/motions-routing.module.ts +++ b/client/src/app/site/motions/motions-routing.module.ts @@ -1,37 +1,48 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; -import { AmendmentCreateWizardComponent } from './components/amendment-create-wizard/amendment-create-wizard.component'; -import { CallListComponent } from './components/call-list/call-list.component'; -import { CategoryListComponent } from './components/category-list/category-list.component'; -import { CategorySortComponent } from './components/category-sort/category-sort.component'; -import { MotionBlockListComponent } from './components/motion-block-list/motion-block-list.component'; -import { MotionBlockDetailComponent } from './components/motion-block-detail/motion-block-detail.component'; -import { MotionCommentSectionListComponent } from './components/motion-comment-section-list/motion-comment-section-list.component'; -import { MotionDetailComponent } from './components/motion-detail/motion-detail.component'; -import { MotionImportListComponent } from './components/motion-import-list/motion-import-list.component'; -import { MotionListComponent } from './components/motion-list/motion-list.component'; -import { StatuteImportListComponent } from './components/statute-paragraph-list/statute-import-list/statute-import-list.component'; -import { StatuteParagraphListComponent } from './components/statute-paragraph-list/statute-paragraph-list.component'; -import { WorkflowListComponent } from './components/workflow-list/workflow-list.component'; -import { WorkflowDetailComponent } from './components/workflow-detail/workflow-detail.component'; - const routes: Routes = [ - { path: '', component: MotionListComponent }, - { path: 'category', component: CategoryListComponent }, - { path: 'category/:id', component: CategorySortComponent }, - { path: 'comment-section', component: MotionCommentSectionListComponent }, - { path: 'statute-paragraphs', component: StatuteParagraphListComponent }, - { path: 'statute-paragraphs/import', component: StatuteImportListComponent }, - { path: 'call-list', component: CallListComponent }, - { path: 'blocks', component: MotionBlockListComponent }, - { path: 'blocks/:id', component: MotionBlockDetailComponent }, - { path: 'new', component: MotionDetailComponent }, - { path: 'import', component: MotionImportListComponent }, - { path: 'workflow', component: WorkflowListComponent }, - { path: 'workflow/:id', component: WorkflowDetailComponent }, - { path: ':id', component: MotionDetailComponent }, - { path: ':id/create-amendment', component: AmendmentCreateWizardComponent } + { + path: '', + loadChildren: './modules/motion-list/motion-list.module#MotionListModule', + pathMatch: 'full' + }, + { + path: 'import', + loadChildren: './modules/motion-import/motion-import.module#MotionImportModule' + }, + { + path: 'statute-paragraphs', + loadChildren: './modules/statute-paragraph/statute-paragraph.module#StatuteParagraphModule' + }, + { + path: 'comment-section', + loadChildren: './modules/motion-comment-section/motion-comment-section.module#MotionCommentSectionModule' + }, + { + path: 'call-list', + loadChildren: './modules/call-list/call-list.module#CallListModule' + }, + { + path: 'category', + loadChildren: './modules/category/category.module#CategoryModule' + }, + { + path: 'blocks', + loadChildren: './modules/motion-block/motion-block.module#MotionBlockModule' + }, + { + path: 'workflow', + loadChildren: './modules/motion-workflow/motion-workflow.module#MotionWorkflowModule' + }, + { + path: 'new', + loadChildren: './modules/motion-detail/motion-detail.module#MotionDetailModule' + }, + { + path: ':id', + loadChildren: './modules/motion-detail/motion-detail.module#MotionDetailModule' + } ]; @NgModule({ diff --git a/client/src/app/site/motions/motions.module.ts b/client/src/app/site/motions/motions.module.ts index a1656d09b..0b6bcf28c 100644 --- a/client/src/app/site/motions/motions.module.ts +++ b/client/src/app/site/motions/motions.module.ts @@ -3,66 +3,8 @@ import { CommonModule } from '@angular/common'; import { MotionsRoutingModule } from './motions-routing.module'; import { SharedModule } from '../../shared/shared.module'; -import { MotionListComponent } from './components/motion-list/motion-list.component'; -import { MotionDetailComponent } from './components/motion-detail/motion-detail.component'; -import { CategoryListComponent } from './components/category-list/category-list.component'; -import { MotionCommentSectionListComponent } from './components/motion-comment-section-list/motion-comment-section-list.component'; -import { StatuteParagraphListComponent } from './components/statute-paragraph-list/statute-paragraph-list.component'; -import { MotionChangeRecommendationComponent } from './components/motion-change-recommendation/motion-change-recommendation.component'; -import { MotionDetailOriginalChangeRecommendationsComponent } from './components/motion-detail-original-change-recommendations/motion-detail-original-change-recommendations.component'; -import { MotionDetailDiffComponent } from './components/motion-detail-diff/motion-detail-diff.component'; -import { MotionCommentsComponent } from './components/motion-comments/motion-comments.component'; -import { PersonalNoteComponent } from './components/personal-note/personal-note.component'; -import { CallListComponent } from './components/call-list/call-list.component'; -import { AmendmentCreateWizardComponent } from './components/amendment-create-wizard/amendment-create-wizard.component'; -import { MotionBlockListComponent } from './components/motion-block-list/motion-block-list.component'; -import { MotionBlockDetailComponent } from './components/motion-block-detail/motion-block-detail.component'; -import { MotionImportListComponent } from './components/motion-import-list/motion-import-list.component'; -import { ManageSubmittersComponent } from './components/manage-submitters/manage-submitters.component'; -import { MotionPollComponent } from './components/motion-poll/motion-poll.component'; -import { MotionPollDialogComponent } from './components/motion-poll/motion-poll-dialog.component'; -import { MotionExportDialogComponent } from './components/motion-export-dialog/motion-export-dialog.component'; -import { StatuteImportListComponent } from './components/statute-paragraph-list/statute-import-list/statute-import-list.component'; -import { WorkflowListComponent } from './components/workflow-list/workflow-list.component'; -import { WorkflowDetailComponent } from './components/workflow-detail/workflow-detail.component'; -import { CategorySortComponent } from './components/category-sort/category-sort.component'; @NgModule({ - imports: [CommonModule, MotionsRoutingModule, SharedModule], - declarations: [ - MotionListComponent, - MotionDetailComponent, - CategoryListComponent, - MotionCommentSectionListComponent, - StatuteParagraphListComponent, - MotionChangeRecommendationComponent, - MotionDetailOriginalChangeRecommendationsComponent, - MotionDetailDiffComponent, - MotionCommentsComponent, - PersonalNoteComponent, - CallListComponent, - AmendmentCreateWizardComponent, - MotionBlockListComponent, - MotionBlockDetailComponent, - MotionImportListComponent, - ManageSubmittersComponent, - MotionPollComponent, - MotionPollDialogComponent, - MotionExportDialogComponent, - StatuteImportListComponent, - WorkflowListComponent, - WorkflowDetailComponent, - CategorySortComponent - ], - entryComponents: [ - MotionChangeRecommendationComponent, - StatuteParagraphListComponent, - MotionCommentsComponent, - MotionCommentSectionListComponent, - PersonalNoteComponent, - ManageSubmittersComponent, - MotionPollDialogComponent, - MotionExportDialogComponent - ] + imports: [CommonModule, MotionsRoutingModule, SharedModule] }) export class MotionsModule {} diff --git a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss index 0e4026a35..90ac81a4d 100644 --- a/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss +++ b/client/src/app/site/projector/components/projector-detail/projector-detail.component.scss @@ -1,4 +1,4 @@ -@import '../../../../../assets/styles/drag.scss'; +@import '~assets/styles/drag.scss'; #projector { width: 100%; /*1000px;*/ diff --git a/client/src/app/site/projector/projector-routing.module.ts b/client/src/app/site/projector/projector-routing.module.ts index e44692588..8de5de99e 100644 --- a/client/src/app/site/projector/projector-routing.module.ts +++ b/client/src/app/site/projector/projector-routing.module.ts @@ -8,7 +8,8 @@ import { ProjectorMessageListComponent } from './components/projector-message-li const routes: Routes = [ { path: '', - component: ProjectorListComponent + component: ProjectorListComponent, + pathMatch: 'full' }, { path: 'detail/:id', diff --git a/client/src/app/site/site-routing.module.ts b/client/src/app/site/site-routing.module.ts index cb57a4ca0..d8109d62e 100644 --- a/client/src/app/site/site-routing.module.ts +++ b/client/src/app/site/site-routing.module.ts @@ -16,7 +16,8 @@ const routes: Routes = [ children: [ { path: '', - loadChildren: './common/os-common.module#OsCommonModule' + loadChildren: './common/os-common.module#OsCommonModule', + pathMatch: 'full' }, { path: 'agenda', diff --git a/client/src/app/site/tags/tag-routing.module.ts b/client/src/app/site/tags/tag-routing.module.ts index c2043794d..d1ac3b371 100644 --- a/client/src/app/site/tags/tag-routing.module.ts +++ b/client/src/app/site/tags/tag-routing.module.ts @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { TagListComponent } from './components/tag-list/tag-list.component'; -const routes: Routes = [{ path: '', component: TagListComponent }]; +const routes: Routes = [{ path: '', component: TagListComponent, pathMatch: 'full' }]; @NgModule({ imports: [RouterModule.forChild(routes)], diff --git a/client/src/app/site/users/users-routing.module.ts b/client/src/app/site/users/users-routing.module.ts index 926dd396d..2aaacaaa7 100644 --- a/client/src/app/site/users/users-routing.module.ts +++ b/client/src/app/site/users/users-routing.module.ts @@ -11,7 +11,8 @@ import { UserListComponent } from './components/user-list/user-list.component'; const routes: Routes = [ { path: '', - component: UserListComponent + component: UserListComponent, + pathMatch: 'full' }, { path: 'password', diff --git a/client/src/app/slides/motions/motion/motion-slide.component.scss b/client/src/app/slides/motions/motion/motion-slide.component.scss index d75186a98..0b15a3b0b 100644 --- a/client/src/app/slides/motions/motion/motion-slide.component.scss +++ b/client/src/app/slides/motions/motion/motion-slide.component.scss @@ -1,4 +1,4 @@ -@import '../../../../assets/styles/motion-styles-common'; +@import '~assets/styles/motion-styles-common'; ::ng-deep .paragraph-context { opacity: 0.5;