Hima 5 rokov pred
rodič
commit
64c4eed9a7

+ 1 - 0
src/app/Internal-Page/hospital-content/hospital-content.component.ts

@@ -41,6 +41,7 @@ export class HospitalContentComponent implements OnInit {
 
 
   ngOnInit() {
+    this.authSer.homeActivate = false;
     this.expandedIndex = 0;
     this.route.params.subscribe(
       (params: Params) => {

+ 15 - 0
src/app/Internal-Page/internal-page-content/internal-page-content.component.ts

@@ -102,7 +102,22 @@ export class InternalPageContentComponent implements OnInit {
    //console.log(this.checkTokenExpire);
        //get profile data
     this.userservice.getUserDataProfile();
+    this.authSer.homeActivate = true;
     this.spinner.show();
+    
+    this.internalService.getParentData().subscribe(
+      (responce) => {
+        this.authSer.parentsPage = responce['parents'];
+        for(let i = 0; i < this.authSer.parentsPage.length; i++) {
+          this.authSer.parentsPage[i].active = 0;
+        }
+        this.spinner.hide();
+      },
+      (error) => {
+        console.log(error);
+      }
+    );
+
     this.internalService.getInternalPageData().subscribe(
       (responce) => {
         console.log(responce);

+ 2 - 2
src/app/Internal-Page/internal-page-header/internal-page-header.component.html

@@ -123,7 +123,7 @@
 
                     <!-- start large screen navbar -->
 
-                    <button class="dropbtn d-none d-sm-none d-md-none d-lg-block homeBtn" (click)="goToHome()" style="background:transparent; border:none;color:#00A99D;height: 100%" [ngClass]="{'activeInternalHeader-w': authSer.headereClassActive}">
+                    <button class="dropbtn d-none d-sm-none d-md-none d-lg-block homeBtn" (click)="goToHome()" style="background:transparent; border:none;color:#00A99D;height: 100%" [ngClass]="{'homeActive': authSer.homeActivate}">
                         <a style="cursor: pointer; font-size:18px; font-weight:bold">   <i class="fa fa-home" style="font-size: 30px;margin:0 5px;"></i> <span class="parentName-w"> الرئيسيه</span></a>
                     </button>
                     <div *ngFor="let parent of authSer.parentsPage; let i = index" class="dropdown d-none d-sm-none d-md-none d-lg-block">
@@ -256,7 +256,7 @@
                     <div ngbDropdown class="d-inline-block d-lg-none mobileMenu-w">
                         <button class="btn btn-outline-primary menuMobile-w" id="dropdownBasic1" style="color:#61a59b" ngbDropdownToggle><i class="fas fa-bars"></i></button>
                         <div ngbDropdownMenu aria-labelledby="dropdownBasic1" class="dropDownMobile-w">
-                            <button class="dropdown-item" (click)="goToHome()" [className]=" arabicTemplate ? '' : 'activeHomeMenu' ">  Home</button>
+                            <button class="dropdown-item" (click)="goToHome()" [className]=" arabicTemplate ? '' : 'activeHomeMenu' " [ngClass]="{'homeActive': authSer.homeActivate}">  Home</button>
                             <div *ngFor="let parent of authSer.parentsPage; let i = index" class="dropdown" [className]=" arabicTemplate ? '' : 'activeHeaderMenu' ">
                                 <button class="dropbtn" *ngIf="parent['childs'].length > 0">
                                     <span class="parentName-w"> {{parent.name_en}}  <i class="fa fa-caret-down" *ngIf="parent['childs'].length > 0"></i></span>

+ 2 - 1
src/app/shared/auth-service.service.ts

@@ -58,10 +58,11 @@ export class AuthServiceService {
 
   showSearchHeader: boolean = true;
   headereClassActive:boolean = false;
+  homeActivate:boolean = true;
   cachedRequests: Array<HttpRequest<any>> = [];
   notificationLogin: boolean = true;
   parentsPage = [];
-
+  
 
   dataLoginUser = {};
   //login function

+ 23 - 4
src/styles.css

@@ -476,6 +476,7 @@ width: 100%;
     cursor: pointer;
   }
 
+
  
   /* .IN-5c1caa55-0e85-4bb1-925b-96b537f99da5-1G9ISYhSF8XoOmdcl0yKDu,
   .IN-5c1caa55-0e85-4bb1-925b-96b537f99da5-1G9ISYhSF8XoOmdcl0yKDu.IN-5c1caa55-0e85-4bb1-925b-96b537f99da5-3uCBSbQNVNf2QjqHe1rfb6 {
@@ -692,7 +693,7 @@ border: 1px solid #BDA380 !important;
     margin-top: 0px !important;
 background-color: #926f3f2e !important;
 height: 70px !important;
-	display: none;
+	display: block;
 }
 .pagesHeader-w .navbar{
 height: 70px !important;
@@ -894,14 +895,25 @@ height: 7px !important;
 .container{max-width: 1272px !important;}
 	.dateW{
 		font-size: 13px !important;
-	}
+  }
+  
+  .homeActive {
+    background-color: #a2835d !important;
+    color: #fff !important;
+  }
+
 }
 /* ------pink-----*/
 @media screen and (min-width: 992px) and (max-width: 1200px) {
 	body{border-top: 1px solid pink;}
 	.carousel-caption h4, .paragraphTemplate-w {
 		width: 60% !important;
-	}
+  }
+  
+  .homeActive {
+    background-color: #a2835d !important;
+    color: #fff !important;
+  }
 	
 }
 /* ------yellow-----*/
@@ -959,7 +971,14 @@ height: 7px !important;
     width: 100% !important;
     text-align: right !important;
     height: 47px;
-	}
+  }
+
+  .homeActive {
+    background-color: #a2835d !important;
+    color: #fff !important;
+  }
+  
+  
 }
 /* ------red-----*/
 @media screen and (max-width: 767px) {