overlay adjusted
This commit is contained in:
parent
aaf64666b9
commit
67eecc0341
6 changed files with 26 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<section (click)="showTaskDetails(task.id)">
|
<section (click)="openTaskDetailsOverlay(task.id)">
|
||||||
<div
|
<div
|
||||||
class="content"
|
class="content"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ export class TaskComponent {
|
||||||
public overlayService: OverlayService
|
public overlayService: OverlayService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
showTaskDetails(taskId: string | undefined) {
|
openTaskDetailsOverlay(taskId: string | undefined) {
|
||||||
this.overlayService.setOverlayData(taskId);
|
this.overlayService.setOverlayData('taskOverlay', taskId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subtasks
|
// Subtasks
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export class OverlayService {
|
||||||
|
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
setOverlayData(data: any) {
|
setOverlayData(overlay: string, data: any) {
|
||||||
this.overlayDataSubject.next(data);
|
this.overlayDataSubject.next({ overlay, data });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
<div *ngIf="overlayData" class="overlay">
|
<div *ngIf="overlayData" class="overlay">
|
||||||
<div class="overlay-content">{{ overlayData }}</div>
|
<div class="overlay-content">
|
||||||
|
@if (overlayType === "taskOverlay") {
|
||||||
|
<div class="task-overlay">{{ overlayData }}</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,23 @@
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
backdrop-filter: blur(5px);
|
backdrop-filter: blur(5px);
|
||||||
|
background-color: rgba($color: #000000, $alpha: 0.2);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.overlayContent {
|
.overlay-content {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: aqua;
|
}
|
||||||
height: auto;
|
|
||||||
width: auto;
|
.task-overlay {
|
||||||
|
width: 525px;
|
||||||
|
height: 700px;
|
||||||
|
padding: 48px 40px 48px 40px;
|
||||||
|
border-radius: 30px;
|
||||||
|
background-color: var(--white);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,17 @@ import { CommonModule } from '@angular/common';
|
||||||
styleUrl: './overlay.component.scss',
|
styleUrl: './overlay.component.scss',
|
||||||
})
|
})
|
||||||
export class OverlayComponent implements OnInit {
|
export class OverlayComponent implements OnInit {
|
||||||
|
overlayType: any;
|
||||||
overlayData: any;
|
overlayData: any;
|
||||||
|
|
||||||
constructor(private overlayService: OverlayService) {}
|
constructor(private overlayService: OverlayService) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.overlayService.overlayData$.subscribe((data) => {
|
this.overlayService.overlayData$.subscribe((data) => {
|
||||||
this.overlayData = data;
|
if (data) {
|
||||||
|
this.overlayType = data.overlay;
|
||||||
|
this.overlayData = data.data;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -34,7 +38,7 @@ export class OverlayComponent implements OnInit {
|
||||||
@HostListener('document:click', ['$event'])
|
@HostListener('document:click', ['$event'])
|
||||||
checkOpenContactEdit(event: MouseEvent) {
|
checkOpenContactEdit(event: MouseEvent) {
|
||||||
const targetElement = event.target as HTMLElement;
|
const targetElement = event.target as HTMLElement;
|
||||||
if (targetElement.closest('.overlay-content')) {
|
if (targetElement.closest('.overlay')) {
|
||||||
this.onCloseOverlay();
|
this.onCloseOverlay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue