-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from AmpersandTarski/feature/inactive-projects…
…-view-dev Feature/inactive projects view dev
- Loading branch information
Showing
9 changed files
with
229 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
40 changes: 40 additions & 0 deletions
40
src/app/project-administration/inactive-projects/inactive-projects.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<h3>Inactive Projects</h3> | ||
<div *ngIf="data$ | async as data; else loading"> | ||
<app-box-table [data]="data" sortable sortBy="Name" order="desc"> | ||
<ng-template boxTableHeader> | ||
<ng-container *ngTemplateOutlet="header"></ng-container> | ||
</ng-template> | ||
<ng-template [boxTableRow]="data" let-row> | ||
<td> | ||
<app-atomic-object [property]="row.Name" label="Name" isUni isTot crud="cRud"> </app-atomic-object> | ||
</td> | ||
<td> | ||
<app-atomic-bigalphanumeric [property]="row.Description" label="Description" isUni crud="cRud"> | ||
</app-atomic-bigalphanumeric> | ||
</td> | ||
<td> | ||
<app-atomic-object [property]="row.Projectleider" label="Projectleider" isUni crud="cRUD"> | ||
</app-atomic-object> | ||
</td> | ||
<td> | ||
<app-atomic-alphanumeric [property]="row.Status" label="Status" isUni isTot crud="cRud"> | ||
</app-atomic-alphanumeric> | ||
</td> | ||
<td> | ||
<app-atomic-boolean [property]="row.Active" isUni crud="cRUd"></app-atomic-boolean> | ||
</td> | ||
</ng-template> | ||
</app-box-table> | ||
</div> | ||
|
||
<ng-template #header> | ||
<th>Name</th> | ||
<th>Description</th> | ||
<th>Projectleider</th> | ||
<th>Status</th> | ||
<th>Active</th> | ||
</ng-template> | ||
|
||
<ng-template #loading> | ||
<app-box-table-loading [nrOfRows]="10"> </app-box-table-loading> | ||
</ng-template> |
19 changes: 19 additions & 0 deletions
19
src/app/project-administration/inactive-projects/inactive-projects.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { BackendService } from '../backend.service'; | ||
import { InactiveProjectsInterface } from './inactive-projects.interface'; | ||
|
||
@Component({ | ||
selector: 'app-inactive-projects', | ||
templateUrl: './inactive-projects.component.html', | ||
styleUrls: ['./inactive-projects.component.css'], | ||
}) | ||
export class InactiveProjectsComponent implements OnInit { | ||
data$!: Observable<InactiveProjectsInterface[]>; | ||
|
||
constructor(private service: BackendService) {} | ||
|
||
ngOnInit(): void { | ||
this.data$ = this.service.getInactiveProjects(); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/app/project-administration/inactive-projects/inactive-projects.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
export interface InactiveProjectsInterface extends ObjectBase { | ||
_view_: ProjectNameView; | ||
Name: ObjectBase & { | ||
_view_: ProjectNameView; | ||
}; | ||
Description: string; | ||
Projectleider: ObjectBase & { | ||
_view_: PersonNameView; | ||
}; | ||
Status: string; | ||
Active: boolean; | ||
} | ||
|
||
interface ObjectBase { | ||
_id_: string; | ||
_label_: string; | ||
_path_: string; | ||
_ifcs_: Array<InterfaceRefObject>; | ||
} | ||
|
||
interface PersonNameView { | ||
firstName: string; | ||
txt1: string; | ||
lastName: string; | ||
} | ||
|
||
interface ProjectNameView { | ||
name: string; | ||
} | ||
|
||
interface InterfaceRefObject { | ||
id: string; | ||
label: string; | ||
} |
112 changes: 112 additions & 0 deletions
112
src/app/project-administration/inactive-projects/testdata.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
export const testdata = [ | ||
{ | ||
_id_: '2014_04', | ||
_label_: 'Odysseus', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_04', | ||
_view_: { | ||
name: 'Odysseus', | ||
}, | ||
Name: { | ||
_id_: '2014_04', | ||
_label_: 'Odysseus', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_04/Name', | ||
_view_: { | ||
name: 'Odysseus', | ||
}, | ||
_ifcs_: [ | ||
{ | ||
id: 'Project', | ||
label: 'Project', | ||
}, | ||
{ | ||
id: 'New_47_edit_32_project', | ||
label: 'New/edit project', | ||
}, | ||
], | ||
}, | ||
Description: 'Research how to destroy Troje.', | ||
Projectleider: { | ||
_id_: 'p10011', | ||
_label_: 'O. Dysseus', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_04/Projectleider/p10011', | ||
_view_: { | ||
firstName: 'O.', | ||
txt1: ' ', | ||
lastName: 'Dysseus', | ||
}, | ||
_ifcs_: [ | ||
{ | ||
id: 'Person', | ||
label: 'Person', | ||
}, | ||
], | ||
}, | ||
Status: 'Completed', | ||
Active: false, | ||
_ifcs_: [ | ||
{ | ||
id: 'Project', | ||
label: 'Project', | ||
}, | ||
{ | ||
id: 'New_47_edit_32_project', | ||
label: 'New/edit project', | ||
}, | ||
], | ||
}, | ||
{ | ||
_id_: '2014_03', | ||
_label_: 'Release board', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_03', | ||
_view_: { | ||
name: 'Release board', | ||
}, | ||
Name: { | ||
_id_: '2014_03', | ||
_label_: 'Release board', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_03/Name', | ||
_view_: { | ||
name: 'Release board', | ||
}, | ||
_ifcs_: [ | ||
{ | ||
id: 'Project', | ||
label: 'Project', | ||
}, | ||
{ | ||
id: 'New_47_edit_32_project', | ||
label: 'New/edit project', | ||
}, | ||
], | ||
}, | ||
Description: 'Make board production-ready', | ||
Projectleider: { | ||
_id_: 'p10012', | ||
_label_: 'P. Leider', | ||
_path_: 'resource/SESSION/1/Inactive_32_projects/2014_03/Projectleider/p10012', | ||
_view_: { | ||
firstName: 'P.', | ||
txt1: ' ', | ||
lastName: 'Leider', | ||
}, | ||
_ifcs_: [ | ||
{ | ||
id: 'Person', | ||
label: 'Person', | ||
}, | ||
], | ||
}, | ||
Status: 'Completed', | ||
Active: false, | ||
_ifcs_: [ | ||
{ | ||
id: 'Project', | ||
label: 'Project', | ||
}, | ||
{ | ||
id: 'New_47_edit_32_project', | ||
label: 'New/edit project', | ||
}, | ||
], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters