src/app/project-issue-list/project-issue-list.component.ts
This component is displayed when clicking on issues on the sidebar. It contains the IssueHeaderComponent and the IssueListComponent.
selector | app-project-issue-list |
styleUrls | ./project-issue-list.component.scss |
templateUrl | ./project-issue-list.component.html |
Properties |
|
constructor(route: ActivatedRoute, dataService: DataService)
|
||||||||||||
Parameters :
|
Public issueListId |
Type : ListId
|
ID of the list which is shown in the IssueListComponent |
Public project$ |
Type : DataNode<Project>
|
Public projectId |
Type : string
|
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute} from '@angular/router';
import {ListId, ListType, NodeType} from '@app/data-dgql/id';
import {DataNode} from '@app/data-dgql/query';
import {Project} from '../../generated/graphql-dgql';
import DataService from '@app/data-dgql';
/**
* This component is displayed when clicking on issues on the sidebar.
* It contains the IssueHeaderComponent and the IssueListComponent.
*/
@Component({
selector: 'app-project-issue-list',
templateUrl: './project-issue-list.component.html',
styleUrls: ['./project-issue-list.component.scss']
})
export class ProjectIssueListComponent implements OnInit {
public projectId: string;
public project$: DataNode<Project>;
/**
* ID of the list which is shown in the IssueListComponent
*/
public issueListId: ListId;
/**
* @param route for retrieving the id of the project through the url
* @param dataService for connection to API
*/
constructor(private route: ActivatedRoute, private dataService: DataService) {}
ngOnInit(): void {
this.projectId = this.route.snapshot.paramMap.get('id');
const node = {type: NodeType.Project, id: this.projectId};
this.project$ = this.dataService.getNode(node);
this.issueListId = {node, type: ListType.Issues};
}
}
<div class="margin-left-top p-3" style="display: flex; flex-direction: column">
<div *ngIf="project$ | async as project">
<app-project-header [projectId]="projectId" [projectName]="project.name"></app-project-header>
</div>
<app-issue-list [projectId]="projectId" [listId]="issueListId"></app-issue-list>
</div>
./project-issue-list.component.scss
.center-horizontal {
width: 100%;
text-align: center;
margin-top: 15px;
}
.project-title-row {
width: 100%;
margin-bottom: 12px;
align-items: center;
height: 85px;
}
.box {
float: left;
//display: inline-block;
vertical-align: top;
width: 85px;
height: auto;
margin-right: 5px;
}
.content {
//display: inline-block;
float: left;
}
.title,
.sub-title {
margin: 0;
padding: 3px 10px 3px 0;
}
.title {
font-size: 17px;
font-weight: bold;
}
.sub-title {
font-weight: bold;
color: #3f3f3f;
}
img {
width: 100%;
}
.pagefill {
width: 100%;
height: 300px;
}
.margin-left-top {
margin-top: 3px;
margin-left: 3px;
}