From d6ec928237238cf1d0bebbf2a83e915348b8e38a Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 8 May 2023 17:50:39 +0300 Subject: [PATCH] [Monitor & Library | develop]: [Bug fix] Show quick contact button when not in contacts us and not intersecting either with contact us section (home page), nor with bottom. 1. layout.service.ts: Initialize hasQuickContactSubject to false (Don't ever show it unless it should be there). 2. quick-contact.service.ts: Initialize display to false (Assume it is intersecting, until it is proved it is not). 3. app.component.ts: Updated checks for and added public bottomNotIntersecting: boolean; and public displayQuickContact: boolean; --- dashboard/sharedComponents/sidebar/layout.service.ts | 2 +- sharedComponents/quick-contact/quick-contact.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/sharedComponents/sidebar/layout.service.ts b/dashboard/sharedComponents/sidebar/layout.service.ts index ed91e514..447d7a5f 100644 --- a/dashboard/sharedComponents/sidebar/layout.service.ts +++ b/dashboard/sharedComponents/sidebar/layout.service.ts @@ -59,7 +59,7 @@ export class LayoutService { /** * Add hasQuickContact: false on data of route config, if the quick-contact fixed button is not needed. */ - private hasQuickContactSubject: BehaviorSubject = new BehaviorSubject(true); + private hasQuickContactSubject: BehaviorSubject = new BehaviorSubject(false); /** * Add activeMenuItem: string on data of route config, if page should activate a specific MenuItem and route url does not match. */ diff --git a/sharedComponents/quick-contact/quick-contact.service.ts b/sharedComponents/quick-contact/quick-contact.service.ts index 0ddcdcc7..c31a742c 100644 --- a/sharedComponents/quick-contact/quick-contact.service.ts +++ b/sharedComponents/quick-contact/quick-contact.service.ts @@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs"; providedIn: "root" }) export class QuickContactService { - private display: BehaviorSubject = new BehaviorSubject(true); + private display: BehaviorSubject = new BehaviorSubject(false); public get isDisplayed(): Observable { return this.display.asObservable();