Hima před 5 roky
rodič
revize
95d9790b1a

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 641 - 425
package-lock.json


+ 6 - 2
package.json

@@ -28,10 +28,12 @@
     "angular-font-awesome": "^3.1.2",
     "angular2-collapsible": "^0.6.1",
     "angular2-jwt": "^0.2.3",
+    "angularx-flatpickr": "^6.1.0",
     "bootstrap": "^4.1.3",
     "core-js": "^2.5.4",
     "cuppa-ng2-slidemenu": "^2.0.0",
     "date-fns": "^1.30.1",
+    "flatpickr": "^4.5.2",
     "font-awesome": "^4.7.0",
     "jwt-decode": "^2.2.0",
     "materialize-css": "^1.0.0",
@@ -45,7 +47,6 @@
     "ngx-hijri-lib": "^1.0.6",
     "ngx-moment": "^3.3.0",
     "ngx-pagination": "^3.2.1",
-    "ngx-quill": "^3.0.0",
     "ngx-spinner": "^6.1.2",
     "ngx-toastr": "^9.1.1",
     "rxjs": "~6.3.3",
@@ -53,13 +54,16 @@
     "zone.js": "~0.8.26"
   },
   "devDependencies": {
-    "@angular-devkit/build-angular": "~0.10.0",
+    "@angular-devkit/build-angular": "^0.12.1",
     "@angular/cli": "~7.0.6",
     "@angular/compiler-cli": "~7.0.0",
     "@angular/language-service": "~7.0.0",
     "@types/jasmine": "~2.8.8",
     "@types/jasminewd2": "~2.0.3",
+<<<<<<< HEAD
     "@types/jquery": "^3.3.29",
+=======
+>>>>>>> 7ae3b8460841f199ceb5f0e46ef2b6450f62c216
     "@types/node": "~8.9.4",
     "codelyzer": "~4.5.0",
     "jasmine-core": "~2.99.1",

+ 0 - 0
src/app/Internal-Page/events/events.component.css


+ 108 - 0
src/app/Internal-Page/events/events.component.html

@@ -0,0 +1,108 @@
+<br><br><br>
+
+<ng-template #modalContent let-close="close">
+  <div class="modal-header">
+    <h5 class="modal-title">Event action occurred</h5>
+    <button type="button" class="close" (click)="close()">
+      <span aria-hidden="true">&times;</span>
+    </button>
+  </div>
+  <div class="modal-body">
+    <div>
+      Action:
+      <pre>{{ modalData?.action }}</pre>
+    </div>
+    <div>
+      Event:
+      <pre>{{ modalData?.event | json }}</pre>
+    </div>
+  </div>
+  <div class="modal-footer">
+    <button type="button" class="btn btn-outline-secondary" (click)="close()">OK</button>
+  </div>
+</ng-template>
+
+<div class="row text-center">
+  <div class="col-md-4">
+    <div class="btn-group">
+      <div
+        class="btn btn-primary"
+        mwlCalendarPreviousView
+        [view]="view"
+        [(viewDate)]="viewDate"
+        (viewDateChange)="activeDayIsOpen = false">
+        Previous
+      </div>
+      <div
+        class="btn btn-outline-secondary"
+        mwlCalendarToday
+        [(viewDate)]="viewDate">
+        Today
+      </div>
+      <div
+        class="btn btn-primary"
+        mwlCalendarNextView
+        [view]="view"
+        [(viewDate)]="viewDate"
+        (viewDateChange)="activeDayIsOpen = false">
+        Next
+      </div>
+    </div>
+  </div>
+  <div class="col-md-4">
+    <h3>{{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }}</h3>
+  </div>
+  <div class="col-md-4">
+    <div class="btn-group">
+      <div
+        class="btn btn-primary"
+        (click)="view = CalendarView.Month"
+        [class.active]="view === CalendarView.Month">
+        Month
+      </div>
+      <div
+        class="btn btn-primary"
+        (click)="view = CalendarView.Week"
+        [class.active]="view === CalendarView.Week">
+        Week
+      </div>
+      <div
+        class="btn btn-primary"
+        (click)="view = CalendarView.Day"
+        [class.active]="view === CalendarView.Day">
+        Day
+      </div>
+    </div>
+  </div>
+</div>
+<br>
+<div [ngSwitch]="view">
+  <mwl-calendar-month-view
+    *ngSwitchCase="CalendarView.Month"
+    [viewDate]="viewDate"
+    [events]="events"
+    [refresh]="refresh"
+    [activeDayIsOpen]="activeDayIsOpen"
+    (dayClicked)="dayClicked($event.day)"
+    (eventClicked)="handleEvent('Clicked', $event.event)"
+    (eventTimesChanged)="eventTimesChanged($event)">
+  </mwl-calendar-month-view>
+  <mwl-calendar-week-view
+    *ngSwitchCase="CalendarView.Week"
+    [viewDate]="viewDate"
+    [events]="events"
+    [refresh]="refresh"
+    (eventClicked)="handleEvent('Clicked', $event.event)"
+    (eventTimesChanged)="eventTimesChanged($event)">
+  </mwl-calendar-week-view>
+  <mwl-calendar-day-view
+    *ngSwitchCase="CalendarView.Day"
+    [viewDate]="viewDate"
+    [events]="events"
+    [refresh]="refresh"
+    (eventClicked)="handleEvent('Clicked', $event.event)"
+    (eventTimesChanged)="eventTimesChanged($event)">
+  </mwl-calendar-day-view>
+</div>
+
+<br><br><br>

+ 124 - 0
src/app/Internal-Page/events/events.component.ts

@@ -0,0 +1,124 @@
+import { InternalPageService } from './../../shared/internal-page.service';
+
+import { Component, OnInit,
+          ChangeDetectionStrategy,
+          ViewChild,
+          TemplateRef } from '@angular/core';
+
+import {
+  startOfDay,
+  endOfDay,
+  subDays,
+  addDays,
+  endOfMonth,
+  isSameDay,
+  isSameMonth,
+  addHours
+} from 'date-fns';
+
+import { Subject } from 'rxjs';
+import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
+import {
+  CalendarEvent,
+  CalendarEventAction,
+  CalendarEventTimesChangedEvent,
+  CalendarView
+} from 'angular-calendar';
+const colors: any = {
+  red: {
+    primary: '#ad2121',
+    secondary: '#FAE3E3'
+  },
+  blue: {
+    primary: '#1e90ff',
+    secondary: '#D1E8FF'
+  },
+  yellow: {
+    primary: '#e3bc08',
+    secondary: '#FDF1BA'
+  }
+};
+
+@Component({
+  selector: 'app-events',
+  templateUrl: './events.component.html',
+  styleUrls: ['./events.component.css']
+})
+export class EventsComponent implements OnInit {
+  events: CalendarEvent[] = [] ;
+  refresh: Subject<any> = new Subject();
+
+  constructor(private modal: NgbModal, private internalService: InternalPageService) {
+
+}
+  ngOnInit() {
+    this.loadEvents();
+    this.refresh.next();
+    console.log("dddddddd"+new Date())
+
+
+  }
+  loadEvents(): void {
+    this.internalService.getEventNow().subscribe(
+      (responce) => {
+        for(var i =0;i < responce['lectures'].length;i++){
+              let event: any={};
+              event['start'] = new Date(responce['lectures'][i].start);
+              event['end'] = new Date(responce['lectures'][i].end);
+              event['title'] = responce['lectures'][i].title;
+              this.events.push(event)
+          }
+          this.dayClicked({ date: new Date(), events: this.events });
+
+      },
+      (error) => {
+        console.log(error);
+      }
+    );
+  }
+
+
+  @ViewChild('modalContent')
+    modalContent: TemplateRef<any>;
+
+    view: CalendarView = CalendarView.Month;
+
+    CalendarView = CalendarView;
+
+    viewDate: Date = new Date();
+
+    modalData: {
+      action: string;
+      event: CalendarEvent;
+    };
+
+
+
+
+
+    activeDayIsOpen: boolean = true;
+
+
+
+    dayClicked({ date, events }: { date: Date; events: CalendarEvent[] }): void {
+      console.log(date)
+
+      if (isSameMonth(date, this.viewDate)) {
+        this.viewDate = date;
+        if (
+          (isSameDay(this.viewDate, date) && this.activeDayIsOpen === true) ||
+          events.length === 0
+        ) {
+          this.activeDayIsOpen = false;
+        } else {
+          this.activeDayIsOpen = true;
+        }
+      }
+    }
+
+  
+
+
+
+
+}

+ 8 - 13
src/app/Internal-Page/internal-page-content/internal-page-content.component.css

@@ -30,7 +30,7 @@ input,button {
 }
 
 .internalPage-w .internalHeader-w .notificationList-w li {
-    display: inline-block; 
+    display: inline-block;
     margin: 0 10px;
 }
 
@@ -89,7 +89,7 @@ input,button {
 .dateW {
     color: #fff;
     text-shadow: 0px 0px 2px #000;
-    font-weight: bold;  
+    font-weight: bold;
 }
 
 .internalPage-w .internalHeader-w .notificationList-w .profileData-w .dropdown-toggle::after {
@@ -329,7 +329,7 @@ input,button {
 
 .eventPart-w .event {
     width: 100%;
-    height: 50px;
+    height: 55px;
     background-color: #f3f0f0;
     border-radius: 10px;
 }
@@ -350,7 +350,7 @@ input,button {
 }
 
 .eventPart-w .event .next{
-    color: green;
+    color: #007A71;
     padding: 10px 0;
 }
 
@@ -387,7 +387,7 @@ input,button {
 .contentsData-w .joinUsEn-w .joinHeading-w {
     width: 100%;
     height: 50px;
-    color: #00a99d;
+    color: #007A71;
     text-shadow: 0px 0px 1px;
     background-color: #f7f7f7;
     box-shadow: 1px 1px 6px #2525;
@@ -476,7 +476,7 @@ input,button {
     text-align: center;
     background-color: #f7f7f7;
     font-size: 18px;
-    color: #03b0b3;
+    color: #007A71;
     text-shadow: 0 0 1px;
 }
 .sharingEvent-w .content,
@@ -502,7 +502,7 @@ input,button {
 }
 
 .sharingEvent-w .content .event {
-    color: #00a99d;
+    color: #007A71;
 }
 
 .secondServices-w {
@@ -590,7 +590,7 @@ input,button {
 .tabs .lastTab-w .menuTab-w ul li {
     display: inline-block;
     margin: 0 10px;
-    padding: 0 10px;
+    padding: 0 50px;
     border-left: 1px solid #bda380;
     cursor: pointer;
     color: #03b0b3;
@@ -700,8 +700,3 @@ input,button {
     background-color: #03b0b3 !important;
     color: #fff !important;
 }
-
-
-
-
-

+ 125 - 85
src/app/Internal-Page/internal-page-content/internal-page-content.component.html

@@ -190,6 +190,8 @@
         </div>
     </ng-template>
 
+    </div>
+  </div>
 
     <ng-template #englishTemplate>
         <div class="servicesContent-w">
@@ -221,9 +223,11 @@
                             </ngb-carousel>
                         </div>
                     </div>
-    
+                  </a>
                 </div>
+              </div>
             </div>
+          </div>
         </div>
     
         <div class="eventPart-w hide">
@@ -239,95 +243,127 @@
                             <p class="next"> <img src="../../../assets/image/back.png"> Soon :<span>{{next_lecture ? next_lecture.name : 'now event now'}}</span></p>
                         </div>
                     </div>
-                </div>
+                  </div>
+                </li>
+              </ol>
             </div>
+          </div>
         </div>
-    
-        <div class="contentsData-w">
-            <div class="container">
-                <div class="row">
-                    <div class="col-12 col-sm-12 col-md-4">
-                        <div class="joinUs-w"  [className]=" arabicTemplate ? '' : 'joinUsEn-w' ">
-                            <div class="joinHeader-w">
-                                 Join Us
-                            </div>
-                            <div class="joinHeading-w">
-                                <h2>Welcome to join the medical center</h2>
-                            </div>
-                            <div class="dataContent">
-                                <div class="row">
-                                    <div class="col-12 col-md-4">
-                                        <div class="joinUs-photo">
-                                            <img src="{{authSer.pathImg + joinUs.photo}}" /> 
-                                        </div>
-                                    </div>
-                                    <div class="col-12 col-md-8">
-                                        <div class="profileData-w">
-                                            <p> Employee : <span>{{joinUs.name_en}}</span></p>
-                                            <p> Administration : <span>{{joinUs.adminstration_name_en ? joinUs.adminstration_name_en : 'not found'}}</span></p>
-                                            <p> Date : <span>{{joinUs.date ? joinUs.date : 'not found'}}</span></p>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                     </div>
-                     <div class="col-12 col-md-8">
-                        <div class="sharingEvent-w">
-                            <div class="sharingHeader-w">
-                                <h2>Share moments</h2>
-                            </div>
-                            <div class="row">
-                                <div class="col-12 col-md-6">
-                                    <div class="congeratolation">
-                                        <h2>Congratulations</h2>
-                                    </div>
-                                    <div class="content">
-                                        <p>Employee : <span>{{congratulations.created_by_name}}</span></p>
-                                        <p class="event">{{congratulations.name_en}}</p>
-                                        <p>Date : <span>{{congratulations.event_time ? congratulations.event_time : 'not found'}}</span></p>
-                                    </div>
-                                </div>
-                                <div class="col-12 col-md-6">
-                                    <div class="sadDead-w">
-                                        <h2>Condolences</h2>
-                                    </div>
-                                    <div class="content">
-                                        <p>Empolyee : <span>{{condolences.created_by_name}}</span></p>
-                                        <p class="event">{{condolences.name_en}}</p>
-                                        <p>Date : <span>{{condolences.event_time ? condolences.event_time : 'not found'}}</span></p>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                     </div>
+      </div>
+    </div>
+  </div>
+</ng-template>
+
+
+<ng-template #englishTemplate>
+  <div class="servicesContent-w">
+    <div class="container">
+      <div class="row">
+
+        <div class="col-12 col-md-4">
+          <div class="row">
+            <div class="col-12 col-md-6" *ngFor="let service of externalServices">
+              <div class="serviceItem-w">
+                <a href="{{service.link}}" target="_blank">
+                  <img src="{{authSer.pathImg + service.photo}}" />
+                  <p>{{service.name_en}}</p>
+                </a>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="col-12 col-md-8">
+          <div class="slider">
+            <ngb-carousel>
+              <ng-template *ngFor="let report of reportsData" ngbSlide>
+                <img src="{{authSer.pathImg + report.photo}}" alt="Random first slide">
+                <div class="carousel-caption">
+                  <p>{{report.description_en}}</p>
                 </div>
-               
+              </ng-template>
+            </ngb-carousel>
+          </div>
+        </div>
+
+      </div>
+    </div>
+  </div>
+
+  <div class="eventPart-w hide">
+    <div class="container">
+      <div class="event">
+        <div class="row">
+          <div class="col-12 col-sm-12 ol-md-4">
+          </div>
+          <div class="col-12 col-sm-12 col-md-4">
+            <p class="now"> <img src="../../../assets/image/live.png" />   Live Now :<span>{{live_event.name ? live_event.name : ' now event now '}}</span></p>
+          </div>
+          <div class="col-12 col-sm-12 col-md-4">
+            <p class="next"> <img src="../../../assets/image/back.png"> Soon :<span>{{next_lecture.name ? next_lecture.name : 'now event now'}}</span></p>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+
+  <div class="contentsData-w">
+    <div class="container">
+      <div class="row">
+        <div class="col-12 col-sm-12 col-md-4">
+          <div class="joinUs-w"  [className]=" arabicTemplate ? '' : 'joinUsEn-w' ">
+            <div class="joinHeader-w">
+              Join Us
+            </div>
+            <div class="joinHeading-w">
+              <h2>Welcome to join the medical center</h2>
+            </div>
+            <div class="dataContent">
+              <div class="row">
+                <div class="col-12 col-md-4">
+                  <div class="joinUs-photo">
+                    <img src="{{authSer.pathImg + joinUs.photo}}" />
+                  </div>
+                </div>
+                <div class="col-12 col-md-8">
+                  <div class="profileData-w">
+                    <p> Employee : <span>{{joinUs.name_en}}</span></p>
+                    <p> Administration : <span>{{joinUs.adminstration_name_en ? joinUs.adminstration_name_en : 'not found'}}</span></p>
+                    <p> Date : <span>{{joinUs.date ? joinUs.date : 'not found'}}</span></p>
+                  </div>
+                </div>
+              </div>
             </div>
+          </div>
         </div>
-    
-        <div class="secondServices-w">
-            <div class="container">
-                <div class="row">
-                    <div class="col-12 col-sm-6 col-md-4" *ngFor="let ser of internalServices">
-                        <div class="contentSecondSer-w">
-                            <div class="headerSer-w">
-                                {{ser.name_en}}
-                            </div>
-                            <div class="contentSer">
-                                <div class="row">
-                                    <div class="col-6 col-md-3"  *ngFor="let field of ser['fields']">
-                                        <div class="fieldData-w text-center">
-                                            <img src="{{authSer.pathImg ? authSer.pathImg + field.photo : authSer.iconImg}}" />
-                                            <p>{{field.name_en ? field.name_en : 'Add Service'}}</p>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
+        <div class="col-12 col-md-8">
+          <div class="sharingEvent-w">
+            <div class="sharingHeader-w">
+              <h2>Share moments</h2>
+            </div>
+            <div class="row">
+              <div class="col-12 col-md-6">
+                <div class="congeratolation">
+                  <h2>Congratulations</h2>
                 </div>
+                <div class="content">
+                  <p>Employee : <span>{{congratulations.created_by_name}}</span></p>
+                  <p class="event">{{congratulations.name_en}}</p>
+                  <p>Date : <span>{{congratulations.event_time ? congratulations.event_time : 'not found'}}</span></p>
+                </div>
+              </div>
+              <div class="col-12 col-md-6">
+                <div class="sadDead-w">
+                  <h2>Condolences</h2>
+                </div>
+                <div class="content">
+                  <p>Empolyee : <span>{{condolences.created_by_name}}</span></p>
+                  <p class="event">{{condolences.name_en}}</p>
+                  <p>Date : <span>{{condolences.event_time ? condolences.event_time : 'not found'}}</span></p>
+                </div>
+              </div>
             </div>
+          </div>
         </div>
     
         <div class="tabs">
@@ -377,8 +413,12 @@
                         </div>
                     </div>
                 </div>
+              </div>
             </div>
+          </div>
         </div>
-    </ng-template>
+      </div>
+    </div>
+  </div>
 
-    
+    

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

@@ -12,9 +12,9 @@ import { NgxSpinnerService } from 'ngx-spinner';
 })
 export class InternalPageContentComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
-    private router:Router, 
-    private userservice: UserService, 
+  constructor(private authSer: AuthServiceService,
+    private router:Router,
+    private userservice: UserService,
     private internalService: InternalPageService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,) { }
@@ -34,14 +34,14 @@ export class InternalPageContentComponent implements OnInit {
     next_lecture = [];
     myInnerHeight = window.innerHeight;
 
-    
+
     flag: boolean = false;
-  
+
     catchEvent(event) {
       this.flag = true
       console.log(event)
     }
-  
+
     hide(event) {
       this.flag = false;
     }
@@ -74,13 +74,13 @@ export class InternalPageContentComponent implements OnInit {
       (responce) => {
         console.log('responxce', responce);
         this.reportsData = responce['reports'];
-      }, 
+      },
       (error) => {
         console.log(error);
       }
     );
 
-    //get externals list 
+    //get externals list
     this.internalService.getExternalServicesList().subscribe(
       (responce) => {
         console.log('external_list' , responce);
@@ -91,7 +91,7 @@ export class InternalPageContentComponent implements OnInit {
       }
     );
 
-    //get join us data 
+    //get join us data
     this.internalService.getJoinUsData().subscribe(
       (responce) => {
         console.log('joooin us', responce);
@@ -182,7 +182,7 @@ export class InternalPageContentComponent implements OnInit {
   // }
 
   // //log out function
-  // onLogout() { 
+  // onLogout() {
   //   localStorage.clear();
   //   this.router.navigate(['login']);
   // }

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

@@ -6,7 +6,7 @@
             <div class="container">
                 <div class="row">
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4"  style="margin:0;padding:0">
-                        <ul class="list-unstyled notificationList-w" *ngIf="!authSer.isAuthenticated()">
+                        <ul class="list-unstyled notificationList-w" *ngIf="authSer.isAuthenticated()">
                             <li class="profileData-w">
                                 <div class="btn-group" ngbDropdown role="group" aria-label="Button group with nested dropdown">
                                     <button class="buttonW" ngbDropdownToggle><img src="{{authSer.dataLoginUser['photo'] ? authSer.pathImg + authSer.dataLoginUser['photo'] : authSer.imgSrc}}" title="imageProfile" /> {{authSer.dataLoginUser['name']}} </button>
@@ -20,7 +20,7 @@
                             <li><span><i class="fas fa-comments"></i></span></li>
                             <li><span><i class="fas fa-bell"></i></span></li>
                         </ul>
-                        <p *ngIf="authSer.isAuthenticated()" class="login" (click)="onLogin()"><a>LOG IN</a></p>
+                        <p *ngIf="!authSer.isAuthenticated()" class="login" (click)="onLogin()"><a>LOG IN</a></p>
                     </div>
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4 backgroundXS">
                         <div class="form-group" style="margin:10px 0;">
@@ -28,14 +28,14 @@
                         </div>
                     </div>
                     <div class="col-6 col-sm-6 col-md-4 col-lg-4 hidden-xs hidden-sm">
-                       <p style="margin:15px 0; display:inline-block" class="dateW"> {{authSer.currentDate}} </p> 
+                       <p style="margin:15px 0; display:inline-block" class="dateW"> {{authSer.currentDate}} </p>
                        <span class="ar" (click)="authSer.onLanguageContent('ar')" [ngClass]="{'activeLanguage':authSer. arabicLanguage}">AR</span>
-                       <span class="en" (click)="authSer.onLanguageContent('en')" [ngClass]="{'activeLanguage': authSer.englishLanguage}">EN</span>               
+                       <span class="en" (click)="authSer.onLanguageContent('en')" [ngClass]="{'activeLanguage': authSer.englishLanguage}">EN</span>
                     </div>
                 </div>
             </div>
         </div>
-    
+
         <div class="logoHeader-w">
             <div class="container">
                 <div class="row">
@@ -70,7 +70,7 @@
                                 <i class="fa fa-caret-down" *ngIf="parent['childs'].length > 0"></i>
                                 </button>
                                 <button class="dropbtn" *ngIf="parent['childs'].length == 0">
-                                    <a [routerLink]="parent.link" style="text-decoration:none">{{parent.name}}</a> 
+                                    <a [routerLink]="parent.link" style="text-decoration:none">{{parent.name}}</a>
                                     <i class="fa fa-caret-down"  *ngIf="parent['childs'].length > 0"></i>
                                 </button>
                                 <div class="dropdown-content" *ngIf="parent['childs'].length > 0">
@@ -121,14 +121,14 @@
                         </div>
                     </div>
                     <div class="col-6 col-sm-6 col-md-4 col-lg-4 hidden-xs hidden-sm">
-                       <p style="margin:15px 0; display:inline-block" class="dateW"> {{authSer.currentDate}} </p> 
+                       <p style="margin:15px 0; display:inline-block" class="dateW"> {{authSer.currentDate}} </p>
                        <span class="ar" (click)="authSer.onLanguageContent('ar')" [ngClass]="{'activeLanguage':authSer. arabicLanguage}">AR</span>
-                       <span class="en" (click)="authSer.onLanguageContent('en')" [ngClass]="{'activeLanguage': authSer.englishLanguage}">EN</span>               
+                       <span class="en" (click)="authSer.onLanguageContent('en')" [ngClass]="{'activeLanguage': authSer.englishLanguage}">EN</span>
                     </div>
                 </div>
             </div>
         </div>
-    
+
         <div class="logoHeader-w">
             <div class="container">
                 <div class="row">
@@ -163,7 +163,7 @@
                                 <i class="fa fa-caret-down" *ngIf="parent['childs'].length > 0"></i>
                                 </button>
                                 <button class="dropbtn" *ngIf="parent['childs'].length == 0">
-                                    <a href="{{parent.link}}" style="text-decoration:none">{{parent.name_en}}</a> 
+                                    <a href="{{parent.link}}" style="text-decoration:none">{{parent.name_en}}</a>
                                     <i class="fa fa-caret-down"  *ngIf="parent['childs'].length > 0"></i>
                                 </button>
                                 <div class="dropdown-content" *ngIf="parent['childs'].length > 0">
@@ -179,6 +179,3 @@
             </div>
         </div>
     </ng-template>
-
-
-    

+ 13 - 2
src/app/Internal-Page/internal-page.module.ts

@@ -11,7 +11,11 @@ import { HospitalContentComponent } from './hospital-content/hospital-content.co
 import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module
 import { CircularsPageComponent } from './circulars-page/circulars-page.component';
 import {NgxPaginationModule} from 'ngx-pagination';
-
+import { EventsComponent } from '../Internal-Page/events/events.component'; // <-- import the module
+import { FlatpickrModule } from 'angularx-flatpickr';
+import { CalendarModule, DateAdapter } from 'angular-calendar';
+import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
+import { FormsModule } from '@angular/forms';
 
 @NgModule({
     declarations: [
@@ -21,6 +25,7 @@ import {NgxPaginationModule} from 'ngx-pagination';
         HospitalContentComponent,
         NewsPageComponent,
         CircularsPageComponent,
+        EventsComponent,
     ],
     imports: [
         CommonModule,
@@ -28,6 +33,12 @@ import {NgxPaginationModule} from 'ngx-pagination';
         CollapsibleModule,
         NgxPaginationModule,
         NgbModule.forRoot(),
+        FlatpickrModule.forRoot(),
+        CalendarModule.forRoot({
+          provide: DateAdapter,
+          useFactory: adapterFactory
+        }),
+        FormsModule,
     ],
     providers: [
         InternalPageService,
@@ -36,4 +47,4 @@ import {NgxPaginationModule} from 'ngx-pagination';
 
 export class InternalPageModule {
 
-}
+}

+ 5 - 10
src/app/Internal-Page/internal-page/internal-page.component.css

@@ -30,7 +30,7 @@ input,button {
 }
 
 .internalPage-w .internalHeader-w .notificationList-w li {
-    display: inline-block; 
+    display: inline-block;
     margin: 0 10px;
 }
 
@@ -89,7 +89,7 @@ input,button {
 .dateW {
     color: #fff;
     text-shadow: 0px 0px 2px #000;
-    font-weight: bold;  
+    font-weight: bold;
 }
 
 .internalPage-w .internalHeader-w .notificationList-w .profileData-w .dropdown-toggle::after {
@@ -512,7 +512,7 @@ input,button {
 
 .secondServices-w .contentSecondSer-w .headerSer-w {
     width: 100%;
-    padding: 13px 0;
+    padding-top: 20px;
     background-color: #bda380;
     text-align: center;
     color: #fff;
@@ -520,7 +520,7 @@ input,button {
 
 .secondServices-w .contentSecondSer-w .titleSer-w {
     width: 100%;
-    padding: 13px 0;
+    /* padding: 13px 0; */
     background-color: #f7f7f7;
     box-shadow: 0 0 6px #ccc;
     text-align: center;
@@ -636,7 +636,7 @@ input,button {
     width: 100%;
     display: inline-block;
     box-shadow: 0 0 6px #ccc;
-} 
+}
 
 .tabs .recods .recordsContent-w ol {
     width: 100%;
@@ -692,8 +692,3 @@ input,button {
     background-color: #03b0b3 !important;
     color: #fff !important;
 }
-
-
-
-
-

+ 2 - 1
src/app/Internal-Page/internal-routing-module.ts

@@ -7,6 +7,7 @@ import { RouterModule, Routes } from '@angular/router';
 import { InternalPageComponent } from './internal-page/internal-page.component';
 
 import { HospitalContentComponent } from './hospital-content/hospital-content.component';
+import { EventsComponent } from './events/events.component';
 import { LoginComponent } from './../login/login.component';
 
 const internalPageRoutes: Routes = [
@@ -16,6 +17,7 @@ const internalPageRoutes: Routes = [
         {path: 'hospital', component: HospitalContentComponent},
         {path: 'news/:reportId', component: NewsPageComponent},
         {path:'circulars', component: CircularsPageComponent},
+        {path: 'events', component: EventsComponent},
     ]},
 ];
 
@@ -32,4 +34,3 @@ const internalPageRoutes: Routes = [
 export class InternalPageRoutingModule {
 
 }
-

+ 2 - 3
src/app/app.module.ts

@@ -90,13 +90,11 @@ import { DashboardContent } from './dashboard/dashboard-content';
 import { AddJoinUsComponent } from './dashboard/add-join-us/add-join-us.component';
 import { InternalPageModule } from './Internal-Page/internal-page.module';
 import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module
-
+import { FlatpickrModule } from 'angularx-flatpickr';
 import { CalendarModule, DateAdapter } from 'angular-calendar';
 import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
 
 
-
-
 @NgModule({
   declarations: [
     AppComponent,
@@ -165,6 +163,7 @@ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
     CollapsibleModule,
     ToastrModule.forRoot(), // ToastrModule added
     NgbModule.forRoot(),
+    FlatpickrModule.forRoot(),
     CalendarModule.forRoot({
       provide: DateAdapter,
       useFactory: adapterFactory

+ 15 - 11
src/app/shared/auth-service.service.ts

@@ -17,7 +17,7 @@ import { Location } from '@angular/common';
 export class AuthServiceService {
 
   constructor(private http:  HttpClient, private location: Location, private route: ActivatedRoute) { }
-  
+
   jwtHelper: JwtHelper = new JwtHelper();
 
   //user permision name
@@ -52,13 +52,13 @@ export class AuthServiceService {
 
   cachedRequests: Array<HttpRequest<any>> = [];
   notificationLogin: boolean = true;
-  
+
   dataLoginUser = {};
   //login function
   login(dataForm) {
     console.log(dataForm);
     return this.http.post(this.pathApi + '/login', dataForm);
-  } 
+  }
 
   //signup Function
   signUp(dataSignUp){
@@ -66,14 +66,14 @@ export class AuthServiceService {
     return this.http.post(this.pathApi + '/register', dataSignUp);
   }
 
-  //return data user function 
+  //return data user function
   setDataUser(user) {
     this.dataLoginUser = user.user;
     console.log('data loooogin' , this.dataLoginUser);
   }
 
-  
-  //Authentication 
+
+  //Authentication
   public getToken(): string {
     return localStorage.getItem('token');
   }
@@ -82,16 +82,20 @@ export class AuthServiceService {
     // get the token
     const token = this.getToken();
     // console.log('toooooken',this.jwtHelper.isTokenExpired(token));
-    // return a boolean reflecting 
+    // return a boolean reflecting
     // whether or not the token is expired
-    return this.jwtHelper.isTokenExpired(token);
+    if(token){
+      return this.jwtHelper.isTokenExpired(token);
+
+    }
+    return false;
   }
 
- 
+
   public collectFailedRequest(request): void {
     this.cachedRequests.push(request);
   }
-  
+
 
   //previous back locarion
   perviousLocation() {
@@ -99,7 +103,7 @@ export class AuthServiceService {
   }
 
 
-  //language content 
+  //language content
   onLanguageContent(typeLang:string) {
     if(typeLang == 'ar') {
       this.arabicTemplate = true;

binární
src/assets/image/live.png


+ 7 - 6
src/styles.css

@@ -11,11 +11,12 @@
 body {
     direction: rtl;
     font-family: 'Cairo', sans-serif;
+    color: #CAB59A;
 }
 
 input:-webkit-autofill,
-input:-webkit-autofill:hover, 
-input:-webkit-autofill:focus, 
+input:-webkit-autofill:hover,
+input:-webkit-autofill:focus,
 input:-webkit-autofill:active  {
     -webkit-box-shadow: 0 0 0 30px #fff inset;
 }
@@ -44,7 +45,7 @@ input:-webkit-autofill:active  {
 .marginTop-w {
     margin: 10px 0;
 }
-/* 
+/*
 input.ng-invalid {
   border: 1px solid red;
 }
@@ -116,7 +117,7 @@ select.ng-invalid.ng-touched {
     bottom: 12px;
     left: 12px;
   }
-  
+
   /* toast styles */
   .toast-title {
     font-weight: bold;
@@ -317,7 +318,7 @@ select.ng-invalid.ng-touched {
   .activeLink {
     color: #252525 !important;
   }
- 
+
   .spanReqired-w {
     color: red;
   }
@@ -370,4 +371,4 @@ select.ng-invalid.ng-touched {
   } */
   .ngx-pagination .current {
     background-color: #00a99d !important;
-  }
+  }