added chart.js
This commit is contained in:
parent
f292c197ce
commit
8a7e480bf7
36
package-lock.json
generated
36
package-lock.json
generated
@ -2671,6 +2671,16 @@
|
|||||||
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
|
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"bindings": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"file-uri-to-path": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"blob": {
|
"blob": {
|
||||||
"version": "0.0.5",
|
"version": "0.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
|
||||||
@ -5140,6 +5150,13 @@
|
|||||||
"schema-utils": "^2.6.5"
|
"schema-utils": "^2.6.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"file-uri-to-path": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"fileset": {
|
"fileset": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz",
|
||||||
@ -7868,6 +7885,13 @@
|
|||||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
|
||||||
|
"integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
|
||||||
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||||
@ -12688,7 +12712,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"bindings": "^1.5.0",
|
||||||
|
"nan": "^2.12.1"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"is-binary-path": {
|
"is-binary-path": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
@ -13091,7 +13119,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true
|
"optional": true,
|
||||||
|
"requires": {
|
||||||
|
"bindings": "^1.5.0",
|
||||||
|
"nan": "^2.12.1"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"is-absolute-url": {
|
"is-absolute-url": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
|
@ -3,13 +3,10 @@ import {HttpClient, HttpResponse} from '@angular/common/http';
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class BackendService {
|
export class BackendService {
|
||||||
|
|
||||||
constructor(private httpClient: HttpClient) {}
|
constructor(private httpClient: HttpClient) {}
|
||||||
|
|
||||||
|
|
||||||
// Tasks
|
// Tasks
|
||||||
public getTasks(): Observable<HttpResponse<ScrumTask[]>> {
|
public getTasks(): Observable<HttpResponse<ScrumTask[]>> {
|
||||||
const url = `${environment.apiUrl}/tasks`;
|
const url = `${environment.apiUrl}/tasks`;
|
||||||
@ -36,7 +33,6 @@ export class BackendService {
|
|||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Userstories
|
// Userstories
|
||||||
public getUserstories(): Observable<HttpResponse<ScrumUserstory[]>> {
|
public getUserstories(): Observable<HttpResponse<ScrumUserstory[]>> {
|
||||||
const url = `${environment.apiUrl}/userstories`;
|
const url = `${environment.apiUrl}/userstories`;
|
||||||
@ -48,22 +44,29 @@ export class BackendService {
|
|||||||
return this.httpClient.get<ScrumUserstory>(url, { observe: 'response' });
|
return this.httpClient.get<ScrumUserstory>(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public postUserstory(userstory: ScrumUserstory): Observable<HttpResponse<ScrumUserstory>> {
|
public postUserstory(
|
||||||
|
userstory: ScrumUserstory
|
||||||
|
): Observable<HttpResponse<ScrumUserstory>> {
|
||||||
const url = `${environment.apiUrl}/userstories`;
|
const url = `${environment.apiUrl}/userstories`;
|
||||||
return this.httpClient.post<ScrumUserstory>(url, userstory, { observe: 'response' });
|
return this.httpClient.post<ScrumUserstory>(url, userstory, {
|
||||||
|
observe: 'response',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public putUserstory(userstory: ScrumUserstory): Observable<HttpResponse<any>> {
|
public putUserstory(
|
||||||
|
userstory: ScrumUserstory
|
||||||
|
): Observable<HttpResponse<any>> {
|
||||||
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
||||||
return this.httpClient.put(url, userstory, { observe: 'response' });
|
return this.httpClient.put(url, userstory, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteUserstory(userstory: ScrumUserstory): Observable<HttpResponse<any>> {
|
public deleteUserstory(
|
||||||
|
userstory: ScrumUserstory
|
||||||
|
): Observable<HttpResponse<any>> {
|
||||||
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
const url = `${environment.apiUrl}/userstories/${userstory.id}`;
|
||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sprints
|
// Sprints
|
||||||
public getSprints(): Observable<HttpResponse<ScrumSprint[]>> {
|
public getSprints(): Observable<HttpResponse<ScrumSprint[]>> {
|
||||||
const url = `${environment.apiUrl}/sprints`;
|
const url = `${environment.apiUrl}/sprints`;
|
||||||
@ -75,9 +78,13 @@ export class BackendService {
|
|||||||
return this.httpClient.get<ScrumSprint>(url, { observe: 'response' });
|
return this.httpClient.get<ScrumSprint>(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public postSprint(sprint: ScrumSprint): Observable<HttpResponse<ScrumSprint>> {
|
public postSprint(
|
||||||
|
sprint: ScrumSprint
|
||||||
|
): Observable<HttpResponse<ScrumSprint>> {
|
||||||
const url = `${environment.apiUrl}/sprints`;
|
const url = `${environment.apiUrl}/sprints`;
|
||||||
return this.httpClient.post<ScrumSprint>(url, sprint, { observe: 'response' });
|
return this.httpClient.post<ScrumSprint>(url, sprint, {
|
||||||
|
observe: 'response',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public putSprint(sprint: ScrumSprint): Observable<HttpResponse<any>> {
|
public putSprint(sprint: ScrumSprint): Observable<HttpResponse<any>> {
|
||||||
@ -90,7 +97,6 @@ export class BackendService {
|
|||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Categories
|
// Categories
|
||||||
public getCategories(): Observable<HttpResponse<ScrumCategory[]>> {
|
public getCategories(): Observable<HttpResponse<ScrumCategory[]>> {
|
||||||
const url = `${environment.apiUrl}/categories`;
|
const url = `${environment.apiUrl}/categories`;
|
||||||
@ -102,9 +108,13 @@ export class BackendService {
|
|||||||
return this.httpClient.get<ScrumCategory>(url, { observe: 'response' });
|
return this.httpClient.get<ScrumCategory>(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public postCategory(category: ScrumCategory): Observable<HttpResponse<ScrumCategory>> {
|
public postCategory(
|
||||||
|
category: ScrumCategory
|
||||||
|
): Observable<HttpResponse<ScrumCategory>> {
|
||||||
const url = `${environment.apiUrl}/categories`;
|
const url = `${environment.apiUrl}/categories`;
|
||||||
return this.httpClient.post<ScrumCategory>(url, category, { observe: 'response' });
|
return this.httpClient.post<ScrumCategory>(url, category, {
|
||||||
|
observe: 'response',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public putCategory(category: ScrumCategory): Observable<HttpResponse<any>> {
|
public putCategory(category: ScrumCategory): Observable<HttpResponse<any>> {
|
||||||
@ -112,12 +122,13 @@ export class BackendService {
|
|||||||
return this.httpClient.put(url, category, { observe: 'response' });
|
return this.httpClient.put(url, category, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteCategory(category: ScrumCategory): Observable<HttpResponse<any>> {
|
public deleteCategory(
|
||||||
|
category: ScrumCategory
|
||||||
|
): Observable<HttpResponse<any>> {
|
||||||
const url = `${environment.apiUrl}/categories/${category.id}`;
|
const url = `${environment.apiUrl}/categories/${category.id}`;
|
||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
public getAllStatus(): Observable<HttpResponse<ScrumStatus[]>> {
|
public getAllStatus(): Observable<HttpResponse<ScrumStatus[]>> {
|
||||||
const url = `${environment.apiUrl}/status`;
|
const url = `${environment.apiUrl}/status`;
|
||||||
@ -129,9 +140,13 @@ export class BackendService {
|
|||||||
return this.httpClient.get<ScrumStatus>(url, { observe: 'response' });
|
return this.httpClient.get<ScrumStatus>(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public postStatus(status: ScrumStatus): Observable<HttpResponse<ScrumStatus>> {
|
public postStatus(
|
||||||
|
status: ScrumStatus
|
||||||
|
): Observable<HttpResponse<ScrumStatus>> {
|
||||||
const url = `${environment.apiUrl}/status`;
|
const url = `${environment.apiUrl}/status`;
|
||||||
return this.httpClient.post<ScrumStatus>(url, status, { observe: 'response' });
|
return this.httpClient.post<ScrumStatus>(url, status, {
|
||||||
|
observe: 'response',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public putStatus(status: ScrumStatus): Observable<HttpResponse<any>> {
|
public putStatus(status: ScrumStatus): Observable<HttpResponse<any>> {
|
||||||
@ -144,7 +159,6 @@ export class BackendService {
|
|||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Users
|
// Users
|
||||||
public getUsers(): Observable<HttpResponse<ScrumUser[]>> {
|
public getUsers(): Observable<HttpResponse<ScrumUser[]>> {
|
||||||
const url = `${environment.apiUrl}/users`;
|
const url = `${environment.apiUrl}/users`;
|
||||||
@ -171,7 +185,6 @@ export class BackendService {
|
|||||||
return this.httpClient.delete(url, { observe: 'response' });
|
return this.httpClient.delete(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Projects
|
// Projects
|
||||||
public getProjects(): Observable<HttpResponse<ScrumProject[]>> {
|
public getProjects(): Observable<HttpResponse<ScrumProject[]>> {
|
||||||
const url = `${environment.apiUrl}/projects`;
|
const url = `${environment.apiUrl}/projects`;
|
||||||
@ -183,9 +196,13 @@ export class BackendService {
|
|||||||
return this.httpClient.get<ScrumProject>(url, { observe: 'response' });
|
return this.httpClient.get<ScrumProject>(url, { observe: 'response' });
|
||||||
}
|
}
|
||||||
|
|
||||||
public postProject(project: ScrumProject): Observable<HttpResponse<ScrumProject>> {
|
public postProject(
|
||||||
|
project: ScrumProject
|
||||||
|
): Observable<HttpResponse<ScrumProject>> {
|
||||||
const url = `${environment.apiUrl}/projects`;
|
const url = `${environment.apiUrl}/projects`;
|
||||||
return this.httpClient.post<ScrumProject>(url, project, { observe: 'response' });
|
return this.httpClient.post<ScrumProject>(url, project, {
|
||||||
|
observe: 'response',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public putProject(project: ScrumProject): Observable<HttpResponse<any>> {
|
public putProject(project: ScrumProject): Observable<HttpResponse<any>> {
|
||||||
@ -200,9 +217,9 @@ export class BackendService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum Priority {
|
export enum Priority {
|
||||||
High="high",
|
High = 'high',
|
||||||
Medium="medium",
|
Medium = 'medium',
|
||||||
Low="low"
|
Low = 'low',
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ScrumTask {
|
export interface ScrumTask {
|
||||||
@ -252,7 +269,6 @@ export interface ScrumStatus {
|
|||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface ScrumUser {
|
export interface ScrumUser {
|
||||||
id?: number;
|
id?: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
ScrumCategory,
|
ScrumCategory,
|
||||||
ScrumUser,
|
ScrumUser,
|
||||||
ScrumProject,
|
ScrumProject,
|
||||||
ScrumUserstory
|
ScrumUserstory,
|
||||||
} from '../services/backend.service';
|
} from '../services/backend.service';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { HttpResponse } from '@angular/common/http';
|
import { HttpResponse } from '@angular/common/http';
|
||||||
@ -16,7 +16,7 @@ import { HttpResponse } from '@angular/common/http';
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'app-task-form',
|
selector: 'app-task-form',
|
||||||
templateUrl: './task-form.component.html',
|
templateUrl: './task-form.component.html',
|
||||||
styleUrls: [ './task-form.component.css' ]
|
styleUrls: ['./task-form.component.css'],
|
||||||
})
|
})
|
||||||
export class TaskFormComponent implements OnInit {
|
export class TaskFormComponent implements OnInit {
|
||||||
@Input() public task: ScrumTask;
|
@Input() public task: ScrumTask;
|
||||||
@ -25,7 +25,10 @@ export class TaskFormComponent implements OnInit {
|
|||||||
public userstories: any[] = [];
|
public userstories: any[] = [];
|
||||||
public allStatus: any[] = [];
|
public allStatus: any[] = [];
|
||||||
|
|
||||||
constructor(private backendService: BackendService, private activeModalService: NgbActiveModal) {
|
constructor(
|
||||||
|
private backendService: BackendService,
|
||||||
|
private activeModalService: NgbActiveModal
|
||||||
|
) {
|
||||||
this.getUserStories();
|
this.getUserStories();
|
||||||
this.getTaskStatus();
|
this.getTaskStatus();
|
||||||
}
|
}
|
||||||
@ -92,8 +95,7 @@ export class TaskFormComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
addNewStatus(){
|
// addNewStatus() {
|
||||||
allStatus
|
// this.allStatus;
|
||||||
|
// }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user