Skip to content

Commit 6e31c9e

Browse files
committed
feat(arc): gantt module added with demo component which includes demo of all sub component
gantt module added with demo component which includes demo of all sub component GH-58
1 parent b80f391 commit 6e31c9e

31 files changed

+1771
-249
lines changed

projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
justify-content: space-between;
8888
align-items: center;
8989
height: 100%;
90-
overflow: hidden;
90+
9191

9292
background: repeating-linear-gradient(
9393
305deg,

projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Input} from '@angular/core';
1+
import {Component, Input, OnChanges, SimpleChanges} from '@angular/core';
22
import {AllocationBar, Item} from '../../model/item.model';
33

44
@Component({
@@ -7,7 +7,7 @@ import {AllocationBar, Item} from '../../model/item.model';
77
styleUrls: ['./gantt-bars.component.scss'],
88
})
99
export class GanttBarsComponent {
10-
@Input() item: Item;
10+
@Input() item: any;
1111
@Input() allocationTypes: any;
1212
@Input() allocationBase: number;
1313
showTooltip = -1;

projects/arc-lib/src/lib/components/gantt/components/gantt-column/gantt-column.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
<div *ngFor="let item of items" class="employee-list-item">
1+
<div
2+
*ngFor="let item of items"
3+
(click)="onItemClick(item)"
4+
class="employee-list-item"
5+
>
26
<nb-icon
37
*ngIf="item.hasChildren"
48
[icon]="item.$open ? 'chevron-up' : 'chevron-down'"

projects/arc-lib/src/lib/components/gantt/components/gantt-column/gantt-column.component.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Input} from '@angular/core';
1+
import {Component, EventEmitter, Input, Output} from '@angular/core';
22
import {empData} from '../../model/item.model';
33

44
@Component({
@@ -18,4 +18,12 @@ export class GanttColumnComponent {
1818

1919
@Input()
2020
showOverallocatedIcon: boolean;
21+
// for testing
22+
23+
@Output() itemSelected = new EventEmitter<empData>();
24+
25+
onItemClick(item: empData): void {
26+
this.itemSelected.emit(item);
27+
console.log('hi tiny');
28+
}
2129
}

projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@ <h2 class="project-title">{{ name }}</h2>
55
<p>Description is enabled.</p>
66
</div>
77
</div>
8-
9-
<nb-card>
10-
<nb-card-body>
11-
<div class="search-wrapper" *ngIf="showSearch">
12-
<input
13-
nbInput
14-
fieldSize="medium"
15-
type="text"
16-
status="basic"
17-
[placeholder]="searchPlaceholder"
18-
/>
19-
</div>
20-
</nb-card-body>
21-
</nb-card>
8+
<div class="search-wrapper" *ngIf="showSearch">
9+
<input
10+
nbInput
11+
fieldSize="medium"
12+
type="text"
13+
status="basic"
14+
[placeholder]="searchPlaceholder"
15+
/>
16+
</div>
2217
</div>

projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.scss

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,22 @@
5656
.header-wrapper {
5757
display: flex;
5858
justify-content: space-between;
59+
align-items: center;
5960
width: calc(100vw - 1rem);
6061
}
6162

6263
.project-title {
6364
font-size: x-large;
64-
margin-bottom: -2px;
65+
line-height: 1;
6566
}
6667

6768
.desc-wrapper {
68-
margin-top: -8px;
69+
margin-top: 6px;
70+
p{
71+
margin:0;
72+
}
6973
}
7074

71-
.search-wrapper {
72-
margin-top: 32px;
75+
.project-title{
76+
margin:0;
7377
}

projects/arc-lib/src/lib/components/gantt/components/gantt-scroll/gantt-scroll.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="w-100 p-3 mt-1 display-flex flex-direction-row">
1+
<div class="w-100 p-3 mt-1 display-flex flex-direction-row icon-wrapper">
22
<nb-icon
33
icon="chevron-left"
44
class="gantt-scroll-icon cursor-pointer"

projects/arc-lib/src/lib/components/gantt/components/gantt-scroll/gantt-scroll.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22
height: 2rem;
33
width: 2rem;
44
}
5+
6+
.icon-wrapper{
7+
display: flex;
8+
justify-content: flex-start;
9+
align-items: center;
10+
margin-top: -24px;
11+
}

projects/arc-lib/src/lib/components/gantt/components/gantt-tooltip/gantt-tooltip.component.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
font-family: var(--font-family-primary);
1515
font-weight: map.get($font-weight, light);
1616
font-size: map.get($font-size, default);
17-
width: 35rem;
17+
width: 25rem;
1818
max-height: 25rem;
1919
overflow-y: auto;
2020
}
@@ -77,7 +77,7 @@ hr {
7777

7878
.deal-name {
7979
text-decoration: underline;
80-
width: 24rem !important;
80+
width: 20rem !important;
8181
color: map.get($color, light) !important;
8282
font-weight: map.get($font-weight, bold);
8383
text-overflow: ellipsis;
@@ -87,7 +87,7 @@ hr {
8787
}
8888
.deal-key {
8989
display: flex;
90-
gap: 20px;
90+
gap: 15px;
9191
justify-content: end;
9292
}
9393
.status-circle {
@@ -96,6 +96,7 @@ hr {
9696
height: 10px;
9797
border-radius: 50%;
9898
margin-right: 10px;
99+
99100
&.active {
100101
background-color: green;
101102
}
Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
<nb-layout>
2-
<nb-layout-header fixed>
3-
<div class="icon-wrapper">
4-
<nb-icon class="icon" icon="fit_content" (click)="fitToScreen()">
5-
</nb-icon>
6-
<nb-icon class="icon" pack="eva" name="maximize-outline"></nb-icon>
7-
<nb-icon class="icon" icon="star" (click)="zoomIn()"> </nb-icon>
8-
<nb-icon class="icon" icon="heart-outline" (click)="zoomOut()"> </nb-icon>
9-
</div>
10-
</nb-layout-header>
11-
</nb-layout>
1+
<div class="icon-wrapper">
2+
<nb-icon class="icon" icon="fit_content" (click)="fitToScreen()"> </nb-icon>
3+
<nb-icon class="icon" pack="eva" name="maximize-outline"></nb-icon>
4+
<nb-icon nbPrefix icon="move-outline" pack="eva" (click)="zoomIn()"></nb-icon>
5+
<nb-icon
6+
nbPrefix
7+
icon="maximize-outline"
8+
pack="eva"
9+
(click)="zoomIn()"
10+
></nb-icon>
11+
<nb-icon
12+
nbPrefix
13+
icon="minimize-outline"
14+
pack="eva"
15+
(click)="zoomOut()"
16+
></nb-icon>
17+
</div>

0 commit comments

Comments
 (0)