Skip to content

Commit

Permalink
task modül yazıldı.
Browse files Browse the repository at this point in the history
  • Loading branch information
NisanurBulut committed Aug 9, 2020
1 parent a900071 commit 2667511
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 30 deletions.
20 changes: 6 additions & 14 deletions PratikForumClient/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MatDialogModule, MatSidenavModule } from '@angular/material';
import { SimpleNotificationsModule } from 'angular2-notifications';


import { AppComponent } from './app.component';
import { BankAccountComponent } from './bank-account/bank-account.component';
Expand All @@ -14,14 +14,11 @@ import { BankComponent } from './bank/bank.component';
import { UserComponent } from './user/user.component';
import { UserOperationsComponent } from './user/user-operations/user-operations.component';



import { TaskViewComponent } from './task-pages/task-view/task-view.component';
import { NewListComponent } from './task-pages/new-list/new-list.component';
import { NewTaskComponent } from './task-pages/new-task/new-task.component';
import { DefaultModule } from './modules/default.module';
import {BankModule} from './modules/bank/bank.module';
import {BudgetModule} from './modules/budget/budget.module';
import {TaskModule} from './modules/task/task.module';

import { ComponentModule } from './components/component/component.module';


Expand All @@ -32,12 +29,7 @@ import { ComponentModule } from './components/component/component.module';
HomeComponent,
BankComponent,
UserComponent,
UserOperationsComponent,


TaskViewComponent,
NewListComponent,
NewTaskComponent
UserOperationsComponent
],
imports: [
BrowserModule,
Expand All @@ -48,11 +40,11 @@ import { ComponentModule } from './components/component/component.module';
BrowserAnimationsModule,
MatDialogModule,
DefaultModule,
TaskModule,
BankModule,
BudgetModule,
ComponentModule,
MatSidenavModule,
SimpleNotificationsModule.forRoot()
MatSidenavModule
],
providers: [],
bootstrap: [AppComponent]
Expand Down
25 changes: 25 additions & 0 deletions PratikForumClient/src/app/modules/task/task.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SimpleNotificationsModule } from 'angular2-notifications';

import {TaskViewComponent} from '../../task-pages/task-view/task-view.component';
import {NewListComponent} from '../../task-pages/new-list/new-list.component';
import {NewTaskComponent} from '../../task-pages/new-task/new-task.component';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

@NgModule({
declarations: [
TaskViewComponent,
NewListComponent,
NewTaskComponent
],
imports: [
CommonModule,
RouterModule,
FormsModule,
ReactiveFormsModule,
SimpleNotificationsModule.forRoot()
]
})
export class TaskModule { }
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ <h1 class="title">
</button>
</div>
</div>
</div>
<simple-notifications></simple-notifications>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import * as core from '@angular/core';
import { TaskService } from 'src/app/shared/task.service';
import { TaskList } from 'src/app/models/taskList.model';
import { Route } from '@angular/compiler/src/core';
import { TaskService } from '../../shared/task.service';
import { TaskList } from '../../models/taskList.model';
import { Router, ActivatedRoute } from '@angular/router';
import { ToastService } from 'src/app/shared/toast.service';
import { ToastService } from '../../shared/toast.service';

@core.Component({
selector: 'app-new-list',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ <h1 class="title">
</button>
</div>
</div>
</div>
<simple-notifications></simple-notifications>
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { TaskService } from 'src/app/shared/task.service';
import { TaskService } from '../../shared/task.service';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { Task } from 'src/app/models/task.model';
import { ToastService } from 'src/app/shared/toast.service';
import { Task } from '../../models/task.model';

@Component({
selector: 'app-new-task',
Expand All @@ -11,7 +10,7 @@ import { ToastService } from 'src/app/shared/toast.service';
})
export class NewTaskComponent implements OnInit {

constructor(private ts: TaskService, private tos: ToastService, private route: ActivatedRoute, private router: Router) { }
constructor(private ts: TaskService, private route: ActivatedRoute, private router: Router) { }
taskListId: number;
ngOnInit() {
this.route.params.subscribe((params: Params) => {
Expand All @@ -25,7 +24,6 @@ export class NewTaskComponent implements OnInit {
taskItem.description = descTask;
taskItem.taskId = 0;
this.ts.postTask(taskItem).subscribe((response: any) => {
this.tos.success('Başarılı', 'Yeni görev oluşturuldu.');
this.router.navigate(['../'], { relativeTo: this.route });
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { TaskService } from 'src/app/shared/task.service';
import { TaskService } from '../../shared/task.service';
import { ActivatedRoute, Params } from '@angular/router';
import { Task } from 'src/app/models/task.model';
import { ToastService } from 'src/app/shared/toast.service';
import { Task } from '../../models/task.model';
import { ToastService } from '../../shared/toast.service';

@Component({
selector: 'app-task-view',
Expand Down

0 comments on commit 2667511

Please sign in to comment.