From b502f7cfe67868ef1fd5f6420c3986b29bbe4712 Mon Sep 17 00:00:00 2001 From: Niggl Date: Mon, 20 Jul 2020 11:15:33 +0200 Subject: [PATCH] Refactored Form Component locations All form related components now reside in the components/forms folder --- src/app/app.module.ts | 6 +- .../components/backlog/backlog.component.ts | 2 +- .../sprint}/sprint-form.component.css | 0 .../sprint}/sprint-form.component.html | 0 .../sprint}/sprint-form.component.spec.ts | 2 +- .../sprint}/sprint-form.component.ts | 2 +- .../task}/task-form.component.css | 0 .../task}/task-form.component.html | 0 .../task}/task-form.component.spec.ts | 72 +++++++++---------- .../task}/task-form.component.ts | 2 +- .../userstory}/userstory-form.component.css | 0 .../userstory}/userstory-form.component.html | 0 .../userstory-form.component.spec.ts | 2 +- .../userstory}/userstory-form.component.ts | 3 +- .../tabels/sprint/sprint-table.component.ts | 2 +- .../tabels/task/task-table.component.ts | 2 +- .../userstory-inner-table.component.ts | 2 +- 17 files changed, 48 insertions(+), 49 deletions(-) rename src/app/components/{sprint-form => forms/sprint}/sprint-form.component.css (100%) rename src/app/components/{sprint-form => forms/sprint}/sprint-form.component.html (100%) rename src/app/components/{sprint-form => forms/sprint}/sprint-form.component.spec.ts (93%) rename src/app/components/{sprint-form => forms/sprint}/sprint-form.component.ts (95%) rename src/app/components/{task-form => forms/task}/task-form.component.css (100%) rename src/app/components/{task-form => forms/task}/task-form.component.html (100%) rename src/app/components/{task-form => forms/task}/task-form.component.spec.ts (90%) rename src/app/components/{task-form => forms/task}/task-form.component.ts (99%) rename src/app/components/{userstory-form => forms/userstory}/userstory-form.component.css (100%) rename src/app/components/{userstory-form => forms/userstory}/userstory-form.component.html (100%) rename src/app/components/{userstory-form => forms/userstory}/userstory-form.component.spec.ts (93%) rename src/app/components/{userstory-form => forms/userstory}/userstory-form.component.ts (97%) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5273c2d..66fa777 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,9 +7,9 @@ import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { BackendService } from './services/backend.service'; -import { TaskFormComponent } from './components/task-form/task-form.component'; -import { UserstoryFormComponent } from './components/userstory-form/userstory-form.component'; -import { SprintFormComponent } from './components/sprint-form/sprint-form.component'; +import { TaskFormComponent } from './components/forms/task/task-form.component'; +import { UserstoryFormComponent } from './components/forms/userstory/userstory-form.component'; +import { SprintFormComponent } from './components/forms/sprint/sprint-form.component'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { UserstoryTableComponent } from './components/tabels/userstory/userstory-table.component'; import { TaskTableComponent } from './components/tabels/task/task-table.component'; diff --git a/src/app/components/backlog/backlog.component.ts b/src/app/components/backlog/backlog.component.ts index f966f3d..ca62113 100644 --- a/src/app/components/backlog/backlog.component.ts +++ b/src/app/components/backlog/backlog.component.ts @@ -7,7 +7,7 @@ import { ScrumSprint, } from '../../services/backend.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { SprintFormComponent } from '../sprint-form/sprint-form.component'; +import { SprintFormComponent } from '../forms/sprint/sprint-form.component'; @Component({ selector: 'app-backlog', diff --git a/src/app/components/sprint-form/sprint-form.component.css b/src/app/components/forms/sprint/sprint-form.component.css similarity index 100% rename from src/app/components/sprint-form/sprint-form.component.css rename to src/app/components/forms/sprint/sprint-form.component.css diff --git a/src/app/components/sprint-form/sprint-form.component.html b/src/app/components/forms/sprint/sprint-form.component.html similarity index 100% rename from src/app/components/sprint-form/sprint-form.component.html rename to src/app/components/forms/sprint/sprint-form.component.html diff --git a/src/app/components/sprint-form/sprint-form.component.spec.ts b/src/app/components/forms/sprint/sprint-form.component.spec.ts similarity index 93% rename from src/app/components/sprint-form/sprint-form.component.spec.ts rename to src/app/components/forms/sprint/sprint-form.component.spec.ts index fef25ea..301c117 100644 --- a/src/app/components/sprint-form/sprint-form.component.spec.ts +++ b/src/app/components/forms/sprint/sprint-form.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientModule } from '@angular/common/http'; -import { BackendService } from '../../services/backend.service'; +import { BackendService } from '../../../services/backend.service'; import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { SprintFormComponent } from './sprint-form.component'; diff --git a/src/app/components/sprint-form/sprint-form.component.ts b/src/app/components/forms/sprint/sprint-form.component.ts similarity index 95% rename from src/app/components/sprint-form/sprint-form.component.ts rename to src/app/components/forms/sprint/sprint-form.component.ts index 632c87a..13a034c 100644 --- a/src/app/components/sprint-form/sprint-form.component.ts +++ b/src/app/components/forms/sprint/sprint-form.component.ts @@ -1,7 +1,7 @@ // Importing necessary components and interfaces. import { Component, OnInit, Input } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { BackendService, ScrumSprint } from '../../services/backend.service'; +import { BackendService, ScrumSprint } from '../../../services/backend.service'; @Component({ selector: 'app-task-form', diff --git a/src/app/components/task-form/task-form.component.css b/src/app/components/forms/task/task-form.component.css similarity index 100% rename from src/app/components/task-form/task-form.component.css rename to src/app/components/forms/task/task-form.component.css diff --git a/src/app/components/task-form/task-form.component.html b/src/app/components/forms/task/task-form.component.html similarity index 100% rename from src/app/components/task-form/task-form.component.html rename to src/app/components/forms/task/task-form.component.html diff --git a/src/app/components/task-form/task-form.component.spec.ts b/src/app/components/forms/task/task-form.component.spec.ts similarity index 90% rename from src/app/components/task-form/task-form.component.spec.ts rename to src/app/components/forms/task/task-form.component.spec.ts index 22c7432..fa7c665 100644 --- a/src/app/components/task-form/task-form.component.spec.ts +++ b/src/app/components/forms/task/task-form.component.spec.ts @@ -1,36 +1,36 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { TaskFormComponent } from './task-form.component'; -import { HttpClientModule } from '@angular/common/http'; -import { BackendService } from '../../services/backend.service'; -import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'; - -describe('TaskFormComponent', () => { - let component: TaskFormComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientModule, - NgbModule, - ], - declarations: [TaskFormComponent], - providers: [ - BackendService, - NgbActiveModal, - ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TaskFormComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create the component', () => { - expect(component).toBeTruthy(); - }); -}); +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TaskFormComponent } from './task-form.component'; +import { HttpClientModule } from '@angular/common/http'; +import { BackendService } from '../../../services/backend.service'; +import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'; + +describe('TaskFormComponent', () => { + let component: TaskFormComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [ + HttpClientModule, + NgbModule, + ], + declarations: [TaskFormComponent], + providers: [ + BackendService, + NgbActiveModal, + ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TaskFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create the component', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/components/task-form/task-form.component.ts b/src/app/components/forms/task/task-form.component.ts similarity index 99% rename from src/app/components/task-form/task-form.component.ts rename to src/app/components/forms/task/task-form.component.ts index 6aeb845..07c04df 100644 --- a/src/app/components/task-form/task-form.component.ts +++ b/src/app/components/forms/task/task-form.component.ts @@ -10,7 +10,7 @@ import { ScrumUser, ScrumProject, ScrumUserstory -} from '../../services/backend.service'; +} from '../../../services/backend.service'; import { Observable } from 'rxjs'; import { HttpResponse } from '@angular/common/http'; diff --git a/src/app/components/userstory-form/userstory-form.component.css b/src/app/components/forms/userstory/userstory-form.component.css similarity index 100% rename from src/app/components/userstory-form/userstory-form.component.css rename to src/app/components/forms/userstory/userstory-form.component.css diff --git a/src/app/components/userstory-form/userstory-form.component.html b/src/app/components/forms/userstory/userstory-form.component.html similarity index 100% rename from src/app/components/userstory-form/userstory-form.component.html rename to src/app/components/forms/userstory/userstory-form.component.html diff --git a/src/app/components/userstory-form/userstory-form.component.spec.ts b/src/app/components/forms/userstory/userstory-form.component.spec.ts similarity index 93% rename from src/app/components/userstory-form/userstory-form.component.spec.ts rename to src/app/components/forms/userstory/userstory-form.component.spec.ts index cf68016..260d7ca 100644 --- a/src/app/components/userstory-form/userstory-form.component.spec.ts +++ b/src/app/components/forms/userstory/userstory-form.component.spec.ts @@ -1,7 +1,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientModule } from '@angular/common/http'; -import { BackendService } from '../../services/backend.service'; +import { BackendService } from '../../../services/backend.service'; import { NgbActiveModal, NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { UserstoryFormComponent } from './userstory-form.component'; diff --git a/src/app/components/userstory-form/userstory-form.component.ts b/src/app/components/forms/userstory/userstory-form.component.ts similarity index 97% rename from src/app/components/userstory-form/userstory-form.component.ts rename to src/app/components/forms/userstory/userstory-form.component.ts index a139017..c7cf153 100644 --- a/src/app/components/userstory-form/userstory-form.component.ts +++ b/src/app/components/forms/userstory/userstory-form.component.ts @@ -1,8 +1,7 @@ // Importing necessary components and interfaces. import { Component, OnInit, Input } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { BackendService, ScrumUserstory, Priority } from '../../services/backend.service'; -import { ScrumTask, ScrumStatus, ScrumCategory, ScrumUser, ScrumProject } from '../../services/backend.service'; +import { BackendService, ScrumUserstory, Priority, ScrumStatus, ScrumCategory, ScrumUser } from '../../../services/backend.service'; @Component({ selector: 'app-userstory-form', diff --git a/src/app/components/tabels/sprint/sprint-table.component.ts b/src/app/components/tabels/sprint/sprint-table.component.ts index 0ce42b8..77e3138 100644 --- a/src/app/components/tabels/sprint/sprint-table.component.ts +++ b/src/app/components/tabels/sprint/sprint-table.component.ts @@ -3,7 +3,7 @@ import { BackendService, ScrumSprint } from '../../../services/backend.service'; import { TableComponentBase } from '../table-component.base'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ActivatedRoute, ParamMap, Router } from '@angular/router'; -import { SprintFormComponent } from '../../sprint-form/sprint-form.component'; +import { SprintFormComponent } from '../../forms/sprint/sprint-form.component'; @Component({ selector: 'app-sprint', diff --git a/src/app/components/tabels/task/task-table.component.ts b/src/app/components/tabels/task/task-table.component.ts index ae9305d..cf24aad 100644 --- a/src/app/components/tabels/task/task-table.component.ts +++ b/src/app/components/tabels/task/task-table.component.ts @@ -7,7 +7,7 @@ import { ScrumCategory, } from '../../../services/backend.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { TaskFormComponent } from '../../task-form/task-form.component'; +import { TaskFormComponent } from '../../forms/task/task-form.component'; import { TableComponentBase } from '../table-component.base'; import { ActivatedRoute, ParamMap, Router } from '@angular/router'; import { getNumberForPriority } from '../../../services/sorting.service'; diff --git a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts index fcaba81..3889f7c 100644 --- a/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts +++ b/src/app/components/tabels/userstory-inner-table/userstory-inner-table.component.ts @@ -9,7 +9,7 @@ import { import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TableComponentBase } from '../table-component.base'; import { getNumberForPriority } from '../../../services/sorting.service'; -import { UserstoryFormComponent } from '../../userstory-form/userstory-form.component'; +import { UserstoryFormComponent } from '../../forms/userstory/userstory-form.component'; import { ActivatedRoute, ParamMap, Router } from '@angular/router'; @Component({