3 Achegas f4b28ae3fa ... cf4356132d

Autor SHA1 Mensaxe Data
  gohary cf4356132d 24 gohari edits %!s(int64=5) %!d(string=hai) anos
  Hima 25939ec83d fixes map %!s(int64=5) %!d(string=hai) anos
  Hima f31650023d maping %!s(int64=5) %!d(string=hai) anos
Modificáronse 29 ficheiros con 287 adicións e 52 borrados
  1. 5 0
      package-lock.json
  2. 1 0
      package.json
  3. 1 1
      src/app/External-Page/external-page-content/external-page-content.component.css
  4. 38 7
      src/app/External-Page/external-page-content/external-page-content.component.html
  5. 3 2
      src/app/External-Page/external-page-content/external-page-content.component.ts
  6. 1 1
      src/app/External-Page/external-page-header/external-page-header.component.css
  7. 1 1
      src/app/Internal-Page/internal-page-content/internal-page-content.component.ts
  8. 1 1
      src/app/Internal-Page/internal-page-header/internal-page-header.component.html
  9. 9 1
      src/app/Internal-Page/internal-page-header/internal-page-header.component.ts
  10. 4 4
      src/app/Internal-Page/internal-page/internal-page.component.ts
  11. 1 1
      src/app/app-routing.module.ts
  12. 3 3
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.html
  13. 2 2
      src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.html
  14. 2 1
      src/app/dashboard/dashboard-routing.ts
  15. 6 0
      src/app/dashboard/dashboard.module.ts
  16. 1 1
      src/app/dashboard/external-achievements/external-achievements-list/external-achievements-list.component.html
  17. 16 15
      src/app/dashboard/hospitals/add-hospital/add-hospital.component.html
  18. 4 0
      src/app/dashboard/hospitals/add-hospital/add-hospital.component.ts
  19. 1 1
      src/app/dashboard/hospitals/hospital-list/hospital-list.component.html
  20. 4 0
      src/app/dashboard/map/map.component.css
  21. 46 0
      src/app/dashboard/map/map.component.html
  22. 121 0
      src/app/dashboard/map/map.component.ts
  23. 1 1
      src/app/dashboard/news/news-list/news-list.component.html
  24. 4 0
      src/app/dashboard/service-item/service-item.component.ts
  25. 4 4
      src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.html
  26. 3 3
      src/app/dashboard/visiting-times/visiting-times-list/visiting-times-list.component.html
  27. 0 1
      src/app/dashboard/visiting-times/visiting-times-list/visiting-times-list.component.ts
  28. 3 0
      src/app/servicesItems/services.component.ts
  29. 1 1
      src/app/shared/auth-service.service.ts

+ 5 - 0
package-lock.json

@@ -1349,6 +1349,11 @@
         "humanize-ms": "^1.2.1"
       }
     },
+    "agm-direction": {
+      "version": "0.7.6",
+      "resolved": "https://registry.npmjs.org/agm-direction/-/agm-direction-0.7.6.tgz",
+      "integrity": "sha512-DefGnQSFpDnEM71t9bzNT5t5R2Xb2l41Y64pEmIe+hwEuZKMpCPIQ+4/tpEY3pdZoSOOEtNAEKyLUpvshWOnXg=="
+    },
     "ajv": {
       "version": "6.5.3",
       "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz",

+ 1 - 0
package.json

@@ -28,6 +28,7 @@
     "@types/es6-promise": "^3.3.0",
     "@types/hammerjs": "^2.0.36",
     "@types/jwt-decode": "^2.2.1",
+    "agm-direction": "^0.7.6",
     "alife-file-to-base64": "0.0.2",
     "angular-calendar": "^0.26.4",
     "angular-font-awesome": "^3.1.2",

+ 1 - 1
src/app/External-Page/external-page-content/external-page-content.component.css

@@ -386,7 +386,7 @@ input,button {
 
 .externalPageContentt-w .recordsContent-w .medical .body #demo2 {
     width: 100%;
-    height: 100;
+    height: 100%;
 }
 
 .externalPageContentt-w .recordsContent-w .medical .body #demo2 .active {

+ 38 - 7
src/app/External-Page/external-page-content/external-page-content.component.html

@@ -165,7 +165,7 @@
                                 <div class="carousel-inner">
                                     <div class="carousel-item" *ngFor="let achievement of achievements; let i = index" [ngClass]="i == 0 ? 'active' : ''">
                                         <div class="carousel-caption">
-                                            <p>{{achievement.description}}</p>
+                                            <p [innerHtml]="achievement.description"></p>
                                         </div>   
                                     </div>
                                 </div>
@@ -179,14 +179,14 @@
               </div>
             </div>
 
-            <!-- <div class="col-12">
+            <div class="col-12">
               <div class="maps">
                 <h1>إتصل بنا</h1>
                 <agm-map [latitude]="lat" [longitude]="lng">
                     <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
                   </agm-map>
               </div>
-            </div> -->
+            </div>
       
           </div>
         </div>
@@ -255,8 +255,39 @@
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                     <div class="advertisimentServices-w text-center">
                       <h1>Advertising services</h1>
-                      <div class="body">
-                         
+                       <div class="body">
+                        <div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
+                          <div class="carousel-inner row w-100 mx-auto" role="listbox">
+                              <div class="carousel-item col-md-4" *ngFor="let image of firstAdvertisiment;let i = index" [ngClass]="i == 0 ? 'active' : '' ">
+                                  <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + image.photo}}" alt="slide 1">
+                              </div>
+                          </div>
+                          <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
+                              <i class="fa fa-chevron-left fa-lg text-muted"></i>
+                              <span class="sr-only">Previous</span>
+                          </a>
+                          <a class="carousel-control-next text-faded" href="#carouselExample" role="button" data-slide="next">
+                              <i class="fa fa-chevron-right fa-lg text-muted"></i>
+                              <span class="sr-only">Next</span>
+                          </a>
+                        </div>
+
+                        <div id="carouselExample2" class="carousel slide" data-ride="carousel" data-interval="9000">
+                          <div class="carousel-inner row w-100 mx-auto" role="listbox">
+                            <div class="carousel-item col-md-4" *ngFor="let slide2 of secondAdvertisiment;let i = index" [ngClass]=" i == 0 ? 'active' : '' ">
+                                <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + slide2.photo}}" alt="slide 1">
+                            </div>
+                          </div>
+                          <a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">
+                              <i class="fa fa-chevron-left fa-lg text-muted"></i>
+                              <span class="sr-only">Previous</span>
+                          </a>
+                          <a class="carousel-control-next text-faded" href="#carouselExample2" role="button" data-slide="next">
+                              <i class="fa fa-chevron-right fa-lg text-muted"></i>
+                              <span class="sr-only">Next</span>
+                          </a>
+                        </div>
+
                       </div>
                     </div>
                   </div>
@@ -301,7 +332,7 @@
                         <div class="datePicker-w">
                           <h1>Events Calendar</h1>
                           <div class="body">
-      
+                             <app-external-events></app-external-events>
                           </div>
                         </div>
                       </div>
@@ -329,7 +360,7 @@
                                   <div class="carousel-inner">
                                       <div class="carousel-item" *ngFor="let achievement of achievements; let i = index" [ngClass]="i == 0 ? 'active' : ''">
                                           <div class="carousel-caption">
-                                              <p>{{achievement.description_en}}</p>
+                                              <p [innerHtml]="achievement.description_en"></p>
                                           </div>   
                                       </div>
                                   </div>

+ 3 - 2
src/app/External-Page/external-page-content/external-page-content.component.ts

@@ -32,8 +32,9 @@ export class ExternalPageContentComponent implements OnInit, OnDestroy, AfterCon
   achievements = [];
 
   title: string = 'My first AGM project';
-  lat: number;
-  lng: number;
+  
+  lat: number =  24.380000;
+  lng: number = 46.430000;
 
   contentSubscription:Subscription;
 

+ 1 - 1
src/app/External-Page/external-page-header/external-page-header.component.css

@@ -500,7 +500,7 @@ input,button {
   .menuHeaderEn-w li a {
       float: left;
       margin: 0 15px;
-      color: #049288 !important;
+      color: #049288;
       transition: all 0.5s;
   }
 

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

@@ -101,7 +101,7 @@ export class InternalPageContentComponent implements OnInit {
   ngOnInit() {
    //console.log(this.checkTokenExpire);
        //get profile data
-       this.spinner.show();
+    //this.spinner.show();
     this.userservice.getUserDataProfile();
     this.authSer.homeActivate = true;
     

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

@@ -105,7 +105,7 @@
                                     <a href="{{parent.link}}" style="text-decoration:none"> <span class="parentName-w"> {{parent.name}}</span> </a>
                                     <i class="fa fa-caret-down"  *ngIf="parent['childs'].length > 0"></i>
                                 </button>
-                                <div class="dropdown-content"  *ngIf="parent['childs'].length > 0">
+                                <div class="dropdown-content" *ngIf="parent['childs'].length > 0">
                                     <div class="row">
                                         <div *ngFor="let child of parent['childs']" style="width:100%;">
                                             <ul class="list-unstyled" style="width: 100%; padding: 0 10px;">

+ 9 - 1
src/app/Internal-Page/internal-page-header/internal-page-header.component.ts

@@ -5,6 +5,7 @@ import { AuthServiceService } from './../../shared/auth-service.service';
 import { Component, OnInit } from '@angular/core';
 import 'hijri-date';
 import HijriDate,{toHijri} from 'hijri-date/lib/safe';
+import { NgxSpinnerService } from 'ngx-spinner';
 
 @Component({
   selector: 'app-internal-page-header',
@@ -17,7 +18,10 @@ export class InternalPageHeaderComponent implements OnInit {
     private userservice: UserService, 
     private internalService: InternalPageService, 
     private route: ActivatedRoute,
-    private router: Router) { }
+    private spinner: NgxSpinnerService,
+    private router: Router) {
+      this.spinner.show();
+     }
   
     
   currentDate: any = Date.now();
@@ -86,6 +90,10 @@ export class InternalPageHeaderComponent implements OnInit {
     this.router.navigate(['InternalPage/home']);
   }
 
+  getData(parentData) {
+    console.log(parentData);
+  }
+
 
   
 

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

@@ -23,7 +23,9 @@ export class InternalPageComponent implements OnInit {
     private userservice: UserService, 
     private route: ActivatedRoute,
     private internalService: InternalPageService,
-    private spinner: NgxSpinnerService,) { }
+    private spinner: NgxSpinnerService,) {
+      this.spinner.show();
+     }
 
     // joinUs = [];
     // reportsData = [];
@@ -57,14 +59,12 @@ export class InternalPageComponent implements OnInit {
 
   ngOnInit() {
 
-    this.spinner.show();
 
-    //this.spinner.show();
+    this.spinner.show();
     this.authSer.showDashboardHeader = false;
     
    //get profile data
     this.userservice.getUserDataProfile();
-    this.spinner.hide();
     //get parent and child data
    
     //this.router.navigate(['InternalPage/home']);

+ 1 - 1
src/app/app-routing.module.ts

@@ -1,6 +1,6 @@
 import { CanDeactivateGuard } from './shared/can-deactivate-guards.service';
 import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
+import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
 import { LoginComponent } from './login/login.component';
 import { RegesterComponent } from './regester/regester.component';
 import { PageNotFoundComponent } from './page-not-found/page-not-found.component';

+ 3 - 3
src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.html

@@ -40,7 +40,7 @@
               </div>
 
               <div class="col-12 col-sm-12 col-md-4">
-                <label for="position" style="float: right; margin-right: 5px">صف العرض <span class="spanReqired-w">*</span></label>
+                <label for="position" style="float: right; margin-right: 5px">مكان الإعلان <span class="spanReqired-w">*</span></label>
                 <select class="form-control" name="position" ngModel [ngModel]="advertising.position" id="position" required>
                   <option value="first_row">الصف الأول</option>
                   <option value="second_row">الصف الثاني </option>
@@ -48,7 +48,7 @@
               </div>
 
               <div class="col-12 col-sm-12 col-md-4">
-                <label for="type" style="float: right; margin-right: 5px">نوع الخدمة <span class="spanReqired-w">*</span></label>
+                <label for="type" style="float: right; margin-right: 5px">نوع محتوي الإعلان <span class="spanReqired-w">*</span></label>
                 <select class="form-control" name="type" ngModel [ngModel]="advertising.type" id="type" required>
                   <option value="link">رابط</option>
                   <option value="content">محتوي </option>
@@ -58,7 +58,7 @@
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
-                  <label for="link" style="float: right; margin-right: 5px"> الرابط <span class="spanReqired-w">*</span></label>
+                  <label for="link" style="float: right; margin-right: 5px"> رابط الخدمة <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="link" name="link" ngModel [ngModel]="advertising.link" #name="ngModel" />
                 </div>
               </div>

+ 2 - 2
src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.html

@@ -52,8 +52,8 @@
               <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor: pointer;"></label>
             </div>
           </th>
-          <th>إسم الإعلان</th>
-          <th>صف العرض</th>
+          <th>عنوان الإعلان</th>
+          <th>مكان الإعلان</th>
           <th>الحالة</th>
           <th *ngIf="authSer.showEditBtn">تعديل</th>
         </tr>

+ 2 - 1
src/app/dashboard/dashboard-routing.ts

@@ -1,3 +1,4 @@
+import { MapComponent } from './map/map.component';
 import { NgModule } from '@angular/core';
 import { RouterModule, Routes } from '@angular/router';
 
@@ -131,7 +132,7 @@ const dashboardRouting: Routes = [
     {path: 'advertisingList/:advertisingListIds', component: AdvertisingServicesListComponent , canActivate: [AuthGuard]},
     {path: 'addAdvertising', component: AddAdvertisingServiceComponent, canActivate: [AuthGuard] },
     {path: 'advertising/:typeAdvertising/:advertisingId', component: AddAdvertisingServiceComponent , canActivate: [AuthGuard]},
-
+    {path: 'map/:mapId', component: MapComponent, canActivate: [AuthGuard]},
   ]},
 ];
 

+ 6 - 0
src/app/dashboard/dashboard.module.ts

@@ -93,9 +93,11 @@ import { UserService } from '../shared/user.service';
 import { VisitingTimesListComponent } from './visiting-times/visiting-times-list/visiting-times-list.component';
 import { ExternalAchievementsListComponent } from './external-achievements/external-achievements-list/external-achievements-list.component';
 import { StatisticsListComponent } from './statistics/statistics-list/statistics-list.component';
+import { MapComponent } from './map/map.component';
 // import { NumberDirective } from './number.directive';
 // import { EnglishDirective } from './english.directive';
 
+import { AgmCoreModule } from '@agm/core';
 
 
 @NgModule({
@@ -159,6 +161,7 @@ import { StatisticsListComponent } from './statistics/statistics-list/statistics
         AddStatisticComponent,
         AdvertisingServicesListComponent,
         AddAdvertisingServiceComponent,
+        MapComponent,
     ],
     imports: [
         CommonModule,
@@ -171,6 +174,9 @@ import { StatisticsListComponent } from './statistics/statistics-list/statistics
         ModalModule.forRoot(),
         FormsModule,
         ReactiveFormsModule,
+        AgmCoreModule.forRoot({
+            apiKey: 'AIzaSyAxlgymaua-8BszEryfQIOr9PLKrtEqU2I'
+          }),
         QuillModule
     ],
     providers: [

+ 1 - 1
src/app/dashboard/external-achievements/external-achievements-list/external-achievements-list.component.html

@@ -52,7 +52,7 @@
               <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor: pointer;"></label>
             </div>
           </th>
-          <th>عنوان الإنجاز</th>
+          <th>اسم الإنجاز</th>
           <th>تاريخ الإنجاز</th>
           <th>الترتيب</th>
           <th>الحالة</th>

+ 16 - 15
src/app/dashboard/hospitals/add-hospital/add-hospital.component.html

@@ -1,6 +1,6 @@
 <div class="addHospital-w">
   <div class="container">
-    
+
     <div class="row">
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
@@ -10,12 +10,12 @@
         </ul>
       </div>
     </div>
-    
+
     <div class="containerContent-w">
         <div class="row">
             <div class="col-12">
               <form (ngSubmit)="onSubmitted()" [formGroup]="addHospitalForm">
-                
+
                 <div class="row">
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
@@ -40,14 +40,15 @@
                       <select class="form-control" formControlName="display_location" id="displayLocation">
                         <option value="internal">داخليه</option>
                         <option value="external">خارجيه</option>
+                        <option value="both">كلاهما</option>
                       </select>
                     </div>
                   </div>
                 </div>
-              
+
                 <div formArrayName="fields" *ngFor="let titleControl of addHospitalForm.get('fields').controls; let i = index" style="padding: 20px 0;">
                   <div class="form-group  arrayGroupForm-w" [formGroupName]="i">
-                   
+
                     <div class="row">
                         <div class="col-12 col-md-6">
                             <div class="form-group">
@@ -55,17 +56,17 @@
                                 <input type="text" id="title" class="form-control" formControlName="title" style="margin: 10px 0;" />
                             </div>
                         </div>
-                        
-          
+
+
                         <div class="col-12 col-md-6">
                             <div class="form-group">
                                 <label for="title_en" style="float: right;">العنوان باللغه الإنجليزيه</label>
                                 <input type="text" id="title_en" class="form-control" formControlName="title_en" style="margin: 10px 0;" />
                             </div>
                         </div>
-                      
-                
-                
+
+
+
                       <div class="col-12">
                           <div class="form-group">
                             <label id="description" style="float: right; margin: 10px 5px"> الوصف باللغه العربيه</label>
@@ -73,8 +74,8 @@
                             </quill-editor>
                           </div>
                       </div>
-                        
-          
+
+
                       <div class="col-12">
                         <div class="form-group">
                           <label id="description_en" style="float: right; margin: 10px 5px">الوصف باللغه الإنجليزيه</label>
@@ -86,17 +87,17 @@
                       <div class="col-12">
                         <button type="button" class="btn btn-danger rightW" (click)="removeTitle(i)" *ngIf="i == 0 ? false : true">حذف</button>
                       </div>
-      
+
                     </div>
                   </div>
                 </div>
 
                 <button type="submit" class="btn btn-success rightW" [disabled]="!addHospitalForm.valid || checkSaveClick">حفظ</button>
                 <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()" style="margin: 33px 10px;">إلغاء</button>
-                
+
               </form>
             </div>
         </div>
     </div>
   </div>
-</div>
+</div>

+ 4 - 0
src/app/dashboard/hospitals/add-hospital/add-hospital.component.ts

@@ -295,6 +295,7 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
                 this.checkSaveClick = false;
                 console.log(responce);
                 this.toastr.success('تم التعديل بنجاح ');
+                this.location.back();
               }, (error) => {
                 this.checkSaveClick = false;
                 console.log(error);
@@ -307,6 +308,7 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
                 this.checkSaveClick = false;
                 console.log(responce);
                 this.toastr.success('تم التعديل بنجاح ');
+                this.location.back();
               }, (error) => {
                 this.checkSaveClick = false;
                 console.log(error);
@@ -326,6 +328,7 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
                 this.checkSaveClick = false;
                 console.log(responce);
                 this.toastr.success('تم التعديل بنجاح ');
+                this.location.back();
               }, (error) => {
                 this.checkSaveClick = false;
                 console.log(error);
@@ -338,6 +341,7 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
                 this.checkSaveClick = false;
                 console.log(responce);
                 this.toastr.success('تم التعديل بنجاح ');
+                this.location.back();
               }, (error) => {
                 this.checkSaveClick = false;
                 console.log(error);

+ 1 - 1
src/app/dashboard/hospitals/hospital-list/hospital-list.component.html

@@ -3,7 +3,7 @@
   <div class="row">
     <div class="col-12">
         <ul class="list-unstyled titileLi-w">
-          <li class="headingText-w"> {{typeServices}} > </li>
+          <li class="headingText-w"> {{typeServices}}  </li>
           <li class="headingText-w activeLi-w" style="margin-right:5px">{{typeLink}}</li>
         </ul>
     </div>

+ 4 - 0
src/app/dashboard/map/map.component.css

@@ -0,0 +1,4 @@
+
+agm-map {
+    height: 400px;
+  }

+ 46 - 0
src/app/dashboard/map/map.component.html

@@ -0,0 +1,46 @@
+<!-- <agm-map [latitude]="lat" [longitude]="lng">
+  <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
+</agm-map> -->
+<!-- <agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" [disableDefaultUI]="false" (mapClick)="mapClicked($event)">
+  <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
+</agm-map> -->
+
+<div class="container">
+  <div class="row">
+    <div class="col-12">
+        <agm-map 
+        [latitude]="lat"
+        [longitude]="lng"
+        [zoom]="zoom"
+        [disableDefaultUI]="false"
+        [zoomControl]="false"
+        (mapClick)="mapClicked($event)">
+      
+        <agm-marker 
+            *ngFor="let m of markers; let i = index"
+            (markerClick)="clickedMarker(m.label, i)"
+            [latitude]="m.lat"
+            [longitude]="m.lng"
+            [label]="m.label"
+            [markerDraggable]="m.draggable"
+            (dragEnd)="markerDragEnd(m, $event)">
+            
+          <agm-info-window>
+            <strong>InfoWindow content</strong>
+          </agm-info-window>
+          
+        </agm-marker>
+        
+        <agm-circle [latitude]="lat + 0.3" [longitude]="lng" 
+            [radius]="5000"
+            [fillColor]="'red'"
+            [circleDraggable]="true"
+            [editable]="true">
+        </agm-circle>
+      </agm-map>
+    </div>
+    <div class="col-12">
+      <button class="btn btn-success" (click)="saveLocation()" style="float: right; margin: 20px 0;">حفظ الإحدثيات</button>
+    </div>
+  </div>
+</div>

+ 121 - 0
src/app/dashboard/map/map.component.ts

@@ -0,0 +1,121 @@
+import { AuthServiceService } from './../../shared/auth-service.service';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { MouseEvent } from '@agm/core';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ToastrService } from 'ngx-toastr';
+
+
+@Component({
+  selector: 'app-map',
+  templateUrl: './map.component.html',
+  styleUrls: ['./map.component.css']
+})
+export class MapComponent implements OnInit {
+
+  constructor(private http: HttpClient, 
+    private spinner: NgxSpinnerService, 
+    private toastr: ToastrService,
+    private authSer: AuthServiceService) { 
+    this.spinner.show();
+  }
+
+  lat: number =  24.380000;//51.673858;
+  lng: number = 46.430000;  //= 7.815982;
+
+  zoom: number = 8;
+
+
+
+  
+  markers: marker[] = [
+	  {
+		  lat: 46.430000,
+		  lng: 46.430000,
+		  label: 'A',
+		  draggable: true
+	  }
+  ];
+
+
+  ngOnInit() {
+    
+    this.http.get(this.authSer.pathApi + '/get_reach_map/1').subscribe(
+      (responce) => {
+        console.log(responce);
+        this.lat = responce['reach_map'].latitude;
+        this.lng = responce['reach_map'].longitude;
+        this.markers[0].lat = responce['reach_map'].latitude
+        this.markers[0].lng = responce['reach_map'].longitude
+        this.spinner.hide();
+      },
+      (error) => {
+        console.log(error);
+      }
+    );
+
+  }
+
+  clickedMarker(label: string, index: number) {
+    console.log(`clicked the marker: ${label || index}`)
+  }
+
+  mapClicked($event: MouseEvent) {
+    
+    this.markers[0].lat = $event.coords.lat;
+    this.markers[0].lng = $event.coords.lng;
+    // this.markers.push({
+    //   lat: $event.coords.lat,
+    //   lng: $event.coords.lng,
+    //   draggable: true
+    // });
+
+   
+  }
+
+  markerDragEnd(m: marker, $event: MouseEvent) {
+    console.log('dragEnd', m, $event);
+    this.markers[0].lat = $event.coords.lat;
+    this.markers[0].lng = $event.coords.lng;
+    console.log('wwwwwwwwwwwwwwwwwwwwww' , this.markers);
+  }
+
+
+saveLocation() {
+  console.log(this.markers);
+  
+  const dataMap={
+    latitude: this.markers[0].lat,
+    longitude: this.markers[0].lng,
+    id: 1
+  }
+
+  console.log('responce map', dataMap);
+
+  this.http.post(this.authSer.pathApi + '/edit_reach_map', dataMap).subscribe(
+    (responce) => {
+      console.log(responce);
+      this.toastr.success('تم حفظ الموقع');
+    },
+    (error) => {
+      console.log(error);
+      this.toastr.error('خطأ في الموقع إنتظر قليلاً');
+    }
+  );
+
+}
+
+  
+
+}
+
+
+
+
+  // just an interface for type safety.
+  interface marker {
+    lat: number;
+    lng: number;
+    label?: string;
+    draggable: boolean;
+  }

+ 1 - 1
src/app/dashboard/news/news-list/news-list.component.html

@@ -69,7 +69,7 @@
           </td>
           <td>{{news.title}}</td>
           <td>
-            {{news.ranking}}
+            {{news.ranking == 10000 ? 'المزيد' : news.ranking}}
             <!-- <select class="form-control" [ngModel]="news.ranking" (change)="changeRanking($event, news.id)">
               <option value="1">1</option>
               <option value="2">2</option>

+ 4 - 0
src/app/dashboard/service-item/service-item.component.ts

@@ -207,6 +207,8 @@ export class ServiceItemComponent implements OnInit {
           } else if(this.pages[0].id == 22) {
             console.log('/service/' + this.userId + '/' + service.id + '/advertisingList/' + this.pages[0].id);
             this.router.navigate(['/service/' + this.userId + '/' + service.id + '/advertisingList/' + this.pages[0].id]);
+          } else if(this.pages[0].id == 28) {
+            this.router.navigate(['/service/' + this.userId + '/' + service.id + '/map/' + this.pages[0].id]);
           }
           this.spinner.hide();
         },
@@ -279,6 +281,8 @@ export class ServiceItemComponent implements OnInit {
       this.router.navigate(['statisticsList/' + dataPage.id], {relativeTo: this.route});
     } else if(dataPage.id == 22) {
       this.router.navigate(['advertisingList/' + dataPage.id], {relativeTo: this.route});
+    } else if(dataPage.id == 28) {
+      this.router.navigate(['map/' + dataPage.id], {relativeTo: this.route});
     }
   }
 

+ 4 - 4
src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.html

@@ -20,13 +20,13 @@
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
-                  <label for="name" style="float: right; margin-right: 5px"> العنوان باللغه العربيه <span class="spanReqired-w">*</span></label>
+                  <label for="name" style="float: right; margin-right: 5px"> الاسم باللغه العربية <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="name" name="name" ngModel [ngModel]="visitingTime.name" #name="ngModel" required/>
                 </div>
               </div>
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
-                  <label for="name_en" style="float: right; margin-right: 5px">العنوان باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
+                  <label for="name_en" style="float: right; margin-right: 5px">الاسم باللعه الانجليزية <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="name_en" name="name_en" ngModel [ngModel]="visitingTime.name_en" #name="ngModel" required/>
                 </div>
               </div>
@@ -40,12 +40,12 @@
               </div>
 
               <div class="col-12 col-sm-12 col-md-4" >
-                <label for="event_time" style="float: right;margin-right: 5px"> موعد البدء <span class="spanReqired-w">*</span></label>
+                <label for="event_time" style="float: right;margin-right: 5px">وقت بداية الزيارة <span class="spanReqired-w">*</span></label>
                 <input  class="form-control" type="time" name="open_time" ngModel [ngModel]="visitingTime.open_time">
               </div>
 
               <div class="col-12 col-sm-12 col-md-4" >
-                <label for="event_time" style="float: right;margin-right: 5px"> موعد الانتهاء <span class="spanReqired-w">*</span></label>
+                <label for="event_time" style="float: right;margin-right: 5px"> وقت نهاية الزيارة <span class="spanReqired-w">*</span></label>
                 <input  class="form-control" type="time" name="close_time" ngModel [ngModel]="visitingTime.close_time">
               </div>
 

+ 3 - 3
src/app/dashboard/visiting-times/visiting-times-list/visiting-times-list.component.html

@@ -4,7 +4,7 @@
     <div class="col-12">
       <ul class="list-unstyled titileLi-w">
         <li class="headingText-w">خدمة إدارة الصفحة الخارجية </li>
-        <li class="headingText-w activeLi-w" style="margin-right:5px">إدارة مواعيد الزيارات </li>
+        <li class="headingText-w activeLi-w" style="margin-right:5px">إدارة مواعيد الزيارة </li>
       </ul>
     </div>
   </div>
@@ -53,8 +53,8 @@
             </div>
           </th>
           <th>الإسم</th>
-          <th>موعد بدء العمل</th>
-          <th>موعد انتهاء العمل</th>
+          <th>وقت بداية الزيارة</th>
+          <th>وقت نهاية الزيارة</th>
           <th>الحالة</th>
           <th *ngIf="authSer.showEditBtn">تعديل</th>
         </tr>

+ 0 - 1
src/app/dashboard/visiting-times/visiting-times-list/visiting-times-list.component.ts

@@ -247,7 +247,6 @@ export class VisitingTimesListComponent implements OnInit {
 
     //edit function
     onEdit(editTabID) {
-    alert(editTabID)
     localStorage.setItem('editvisitingTimeIdStorage', editTabID);
     this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/visitingTime/edit/'+ editTabID]);
     console.log('service/' + this.userLoginId + '/' + this.serviceId + '/visitingTime/edit/'+ editTabID);

+ 3 - 0
src/app/servicesItems/services.component.ts

@@ -147,6 +147,9 @@ getDataService(dataService){
           } else if(this.pages[0].id == 26) {
             console.log('/service/' + this.idUser + '/' + dataService.id + '/statisticsList/' + this.pages[0].id);
             this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/statisticsList/' + this.pages[0].id]);
+          } else if(this.pages[0].id == 28) {
+            console.log('/service/' + this.idUser + '/' + dataService.id + '/map/' + this.pages[0].id);
+            this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/map/' + this.pages[0].id]);
           }
           this.spinner.hide();
         },

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

@@ -163,7 +163,7 @@ export class AuthServiceService {
   onLanguageContent(typeLang:string) {
     localStorage.setItem('lang', typeLang);
     this.setLocalLang();
-    window.location.reload();
+    //window.location.reload();
   }