From 755b2df2836b86b49f669957d680b0f86589b394 Mon Sep 17 00:00:00 2001 From: Deepika Mahindroo Date: Wed, 24 Jul 2024 17:50:28 +0530 Subject: [PATCH] fix(arc-lib): change in design change in design GH-58 --- .../gantt-bars/gantt-bars.component.html | 14 ++++++++++++- .../gantt-bars/gantt-bars.component.scss | 12 ++++++++++- .../gantt-bars/gantt-bars.component.ts | 1 + .../gantt-header/gantt-header.component.html | 13 ++++++------ .../gantt-header/gantt-header.component.scss | 20 +++++++++++++------ projects/arc/src/app/app.module.ts | 2 -- .../gantt-demo/gantt-demo.component.html | 9 +++++---- .../gantt-demo/gantt-demo.component.scss | 3 +++ .../gantt-demo/gantt-demo.component.spec.ts | 9 ++++----- 9 files changed, 58 insertions(+), 25 deletions(-) diff --git a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.html b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.html index 96d9c8f..dbfdda0 100644 --- a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.html +++ b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.html @@ -16,6 +16,8 @@ class="bar actual-bar" [class.with-suballocations]="hasSubAllocation(item)" [class.closed-won]="item.payload?.['dealStage'] === 'closedwon'" + [attr.gantt-tooltip-data]="'abc'" + gantt-hover="tooltip" [ngClass]="item.classes ?? []" data-gantt-click="bar" > @@ -32,7 +34,9 @@ {{ formatter(item.payload?.['billingRate']) }}
- +
+
+ +
{{ formatAllocation( diff --git a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.scss b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.scss index 4314262..2212e16 100644 --- a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.scss +++ b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.scss @@ -12,12 +12,22 @@ margin-right: 0.75rem; } +.bar { + position: relative; + .showTooltip-wrapper { + position: absolute; + top: 2rem; + } +} + .bar-container { display: flex; flex-grow: 1; background: white; } - +.showTooltip-wrapper { + position: absolute; +} .bar { font-family: var(--font-family-primary); font-weight: map.get($font-weight, bold); diff --git a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.ts b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.ts index 6f6295e..c38620a 100644 --- a/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.ts +++ b/projects/arc-lib/src/lib/components/gantt/components/gantt-bars/gantt-bars.component.ts @@ -10,6 +10,7 @@ export class GanttBarsComponent { @Input() item: Item; @Input() allocationTypes: any; @Input() allocationBase: number; + showTooltip = -1; formatAllocation(value: number): string { return `${value} hours`; diff --git a/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.html b/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.html index b770925..3e3a1c4 100644 --- a/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.html +++ b/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.html @@ -1,11 +1,16 @@
-

{{ name }}

+
+

{{ name }}

+
+

Description is enabled.

+
+
+
{{ name }}
- -
-

Description is enabled.

-
diff --git a/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.scss b/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.scss index bec0b67..65ea571 100644 --- a/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.scss +++ b/projects/arc-lib/src/lib/components/gantt/components/gantt-header/gantt-header.component.scss @@ -51,15 +51,23 @@ nb-form-field nb-icon { color: map.get($color, icon); } - - } + .header-wrapper { display: flex; - align-items: center; - gap: 20px; + justify-content: space-between; + width: calc(100vw - 1rem); } -.project-title{ +.project-title { font-size: x-large; -} \ No newline at end of file + margin-bottom: -2px; +} + +.desc-wrapper { + margin-top: -8px; +} + +.search-wrapper { + margin-top: 32px; +} diff --git a/projects/arc/src/app/app.module.ts b/projects/arc/src/app/app.module.ts index 4cbacc2..3e380bb 100644 --- a/projects/arc/src/app/app.module.ts +++ b/projects/arc/src/app/app.module.ts @@ -38,7 +38,6 @@ import {GanttDemoComponent} from './components/gantt-demo/gantt-demo.component'; ThemeModule.forRoot('default'), OverlayModule, SelectModule, - GanttModule, BrowserAnimationsModule, HeaderComponent, @@ -52,7 +51,6 @@ import {GanttDemoComponent} from './components/gantt-demo/gantt-demo.component'; SystemStoreFacadeService, EnvAdapterService, ApiService, - GanttService, { provide: APP_CONFIG, useValue: environment, diff --git a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.html b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.html index 2516abf..8f5e367 100644 --- a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.html +++ b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.html @@ -22,17 +22,18 @@
- - + - - + + + diff --git a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.scss b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.scss index e69de29..70226f6 100644 --- a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.scss +++ b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.scss @@ -0,0 +1,3 @@ +.bar-wrapper { + height: calc(100% - 1rem); +} diff --git a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.spec.ts b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.spec.ts index 598857a..b4a78f7 100644 --- a/projects/arc/src/app/components/gantt-demo/gantt-demo.component.spec.ts +++ b/projects/arc/src/app/components/gantt-demo/gantt-demo.component.spec.ts @@ -1,6 +1,6 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; +import {ComponentFixture, TestBed} from '@angular/core/testing'; -import { GanttDemoComponent } from './gantt-demo.component'; +import {GanttDemoComponent} from './gantt-demo.component'; describe('GanttDemoComponent', () => { let component: GanttDemoComponent; @@ -8,9 +8,8 @@ describe('GanttDemoComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ GanttDemoComponent ] - }) - .compileComponents(); + declarations: [GanttDemoComponent], + }).compileComponents(); fixture = TestBed.createComponent(GanttDemoComponent); component = fixture.componentInstance;