Hima 5 年之前
父節點
當前提交
a6cd23659b
共有 100 個文件被更改,包括 359 次插入294 次删除
  1. 2 2
      angular.json
  2. 37 40
      package-lock.json
  3. 2 2
      package.json
  4. 1 1
      src/app/External-Page/contact-us/contact-us.component.ts
  5. 1 1
      src/app/External-Page/event-details/event-details.component.ts
  6. 1 1
      src/app/External-Page/external-contact-us/external-contact-us.component.ts
  7. 1 1
      src/app/External-Page/external-events-table/external-events-table.component.ts
  8. 1 1
      src/app/External-Page/external-events/external-events.component.ts
  9. 1 1
      src/app/External-Page/external-hospital/external-hospital.component.ts
  10. 1 1
      src/app/External-Page/external-managaments/external-managaments.component.ts
  11. 1 1
      src/app/External-Page/external-page-content/external-page-content.component.ts
  12. 2 2
      src/app/External-Page/external-page-header/external-page-header.component.html
  13. 13 2
      src/app/External-Page/external-page-header/external-page-header.component.ts
  14. 1 1
      src/app/External-Page/external-page/external-page.component.ts
  15. 1 1
      src/app/External-Page/external-policy/external-policy.component.ts
  16. 1 1
      src/app/External-Page/inernal-service-page/inernal-service-page.component.ts
  17. 1 1
      src/app/External-Page/more-news/more-news.component.ts
  18. 5 5
      src/app/External-Page/new-page/new-page.component.html
  19. 3 2
      src/app/External-Page/new-page/new-page.component.ts
  20. 1 1
      src/app/Internal-Page/circulars-page/circulars-page.component.ts
  21. 1 1
      src/app/Internal-Page/external-service-details/external-service-details.component.ts
  22. 1 1
      src/app/Internal-Page/hospital-content/hospital-content.component.ts
  23. 1 1
      src/app/Internal-Page/internal-contact-us/internal-contact-us.component.ts
  24. 1 1
      src/app/Internal-Page/internal-page-content/internal-page-content.component.ts
  25. 2 2
      src/app/Internal-Page/internal-page-header/internal-page-header.component.html
  26. 12 3
      src/app/Internal-Page/internal-page-header/internal-page-header.component.ts
  27. 0 2
      src/app/Internal-Page/internal-page.module.ts
  28. 1 1
      src/app/Internal-Page/internal-page/internal-page.component.ts
  29. 1 1
      src/app/Internal-Page/internal-policy/internal-policy.component.ts
  30. 4 7
      src/app/Internal-Page/news-page/news-page.component.html
  31. 2 3
      src/app/Internal-Page/news-page/news-page.component.ts
  32. 1 1
      src/app/Internal-Page/news-pages/news-pages.component.ts
  33. 0 1
      src/app/app-routing.module.ts
  34. 0 4
      src/app/app.module.ts
  35. 1 1
      src/app/auth-services/auth-services-routing.module.ts
  36. 2 3
      src/app/auth-services/login/login.component.ts
  37. 2 1
      src/app/auth-services/regester/regester.component.ts
  38. 3 3
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.html
  39. 6 1
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.ts
  40. 1 1
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-list/registration-trainee-movement-list.component.ts
  41. 1 1
      src/app/dashboard/absorpation-plan/absorpation-add/absorpation-add.component.ts
  42. 1 1
      src/app/dashboard/absorpation-plan/absorpation-list/absorpation-list.component.ts
  43. 1 1
      src/app/dashboard/achievements/achievement-list/achievement.component.ts
  44. 1 1
      src/app/dashboard/achievements/add-achievement/add-achievement.component.ts
  45. 2 1
      src/app/dashboard/add-join-us/add-join-us.component.ts
  46. 1 1
      src/app/dashboard/adminstration-contact-officers/adminstration-contact-officers-list/adminstration-contact-officers-list.component.ts
  47. 2 1
      src/app/dashboard/advertisiment/add-advertisiment/add-adver/add-adver.component.ts
  48. 1 1
      src/app/dashboard/advertisiment/advertisiment.component.ts
  49. 2 1
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.ts
  50. 1 1
      src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.ts
  51. 1 1
      src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.ts
  52. 2 2
      src/app/dashboard/bar-events/bar-events-list/bar-events-list.component.ts
  53. 1 1
      src/app/dashboard/contact-us/add-contact-us/add-contact-us.component.ts
  54. 1 1
      src/app/dashboard/contact-us/contact-us-list/contact-us-list.component.ts
  55. 2 2
      src/app/dashboard/create-report/add-new-report/add-new-report.component.html
  56. 8 1
      src/app/dashboard/create-report/add-new-report/add-new-report.component.ts
  57. 1 1
      src/app/dashboard/dashboard-content.ts
  58. 0 3
      src/app/dashboard/dashboard-routing.ts
  59. 0 3
      src/app/dashboard/dashboard.module.ts
  60. 1 1
      src/app/dashboard/definition-of-classification/definition-add/definition-add.component.ts
  61. 2 2
      src/app/dashboard/definition-of-classification/definition-list/definition-list.component.ts
  62. 1 1
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.ts
  63. 1 1
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts
  64. 1 1
      src/app/dashboard/definition-of-location/location-add/location-add.component.ts
  65. 2 2
      src/app/dashboard/definition-of-location/location-list/location-list.component.ts
  66. 1 1
      src/app/dashboard/definition-of-time/definition-time-add/definition-time-add.component.html
  67. 1 1
      src/app/dashboard/definition-of-time/definition-time-add/definition-time-add.component.ts
  68. 2 2
      src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.ts
  69. 2 2
      src/app/dashboard/department/add-department/add-department.component.ts
  70. 1 1
      src/app/dashboard/department/department-list/department-list.component.ts
  71. 0 31
      src/app/dashboard/english.directive.ts
  72. 1 1
      src/app/dashboard/event-calendars/add-event-calendar/add-event-calendar.component.ts
  73. 1 1
      src/app/dashboard/event-calendars/event-calendars-list/event-calendars-list.component.ts
  74. 7 7
      src/app/dashboard/events/add-event/add-event.component.ts
  75. 10 10
      src/app/dashboard/events/events.component.ts
  76. 1 1
      src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.ts
  77. 1 1
      src/app/dashboard/external-achievements/external-achievements-list/external-achievements-list.component.ts
  78. 0 1
      src/app/dashboard/external-services/add-external/add-external.component.html
  79. 3 2
      src/app/dashboard/external-services/add-external/add-external.component.ts
  80. 1 1
      src/app/dashboard/external-services/external-list/external-list.component.ts
  81. 2 2
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.html
  82. 24 2
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.ts
  83. 1 1
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-list/final-accerditation-list.component.ts
  84. 2 1
      src/app/dashboard/final-trainee-report/final-trainee-report.component.ts
  85. 2 23
      src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.html
  86. 28 2
      src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.ts
  87. 1 20
      src/app/dashboard/follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component.html
  88. 23 2
      src/app/dashboard/follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component.ts
  89. 3 5
      src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.html
  90. 36 12
      src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.ts
  91. 2 1
      src/app/dashboard/footer/add-footer/add-footer.component.ts
  92. 1 1
      src/app/dashboard/footer/footer-list/footer-list.component.ts
  93. 3 3
      src/app/dashboard/header/header.component.html
  94. 11 11
      src/app/dashboard/header/header.component.ts
  95. 1 1
      src/app/dashboard/hospitals/add-hospital/add-hospital.component.html
  96. 5 1
      src/app/dashboard/hospitals/add-hospital/add-hospital.component.ts
  97. 24 1
      src/app/dashboard/hospitals/hospital-list/hospital-list.component.ts
  98. 1 1
      src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.html
  99. 1 1
      src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.ts
  100. 0 0
      src/app/dashboard/internal-services/internal-services.component.ts

+ 2 - 2
angular.json

@@ -59,8 +59,8 @@
               "budgets": [
                 {
                   "type": "initial",
-                  "maximumWarning": "2mb",
-                  "maximumError": "5mb"
+                  "maximumWarning": "8mb",
+                  "maximumError": "8mb"
                 }
               ]
             }

+ 37 - 40
package-lock.json

@@ -10,12 +10,12 @@
       "integrity": "sha512-LVENJqtBZEWpX+uJkGI0zgg+Xkm2KkktQm4ojZozArbeNvQkVL6pqVc04Mme6vvOzwJpD1cET5w4byC8Xaq1QQ=="
     },
     "@angular-devkit/architect": {
-      "version": "0.13.8",
-      "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.13.8.tgz",
-      "integrity": "sha512-gxUs5rhnP576T8ZclKqxlspiChrqRtqaJo54wqNVFvYKEjRZKyMa+1AK6p0oD9zcIToEkcjknj3BbtQa27lLHg==",
+      "version": "0.13.9",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.13.9.tgz",
+      "integrity": "sha512-EAFtCs9dsGhpMRC45PoYsrkiExpWz9Ax15qXfzwdDRacz5DmdOVt+QpkLW1beUOwiyj/bhFyj23eaONK2RTn/w==",
       "dev": true,
       "requires": {
-        "@angular-devkit/core": "7.3.8",
+        "@angular-devkit/core": "7.3.9",
         "rxjs": "6.3.3"
       }
     },
@@ -180,9 +180,9 @@
       }
     },
     "@angular-devkit/core": {
-      "version": "7.3.8",
-      "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.3.8.tgz",
-      "integrity": "sha512-3X9uzaZXFpm5o2TSzhD6wEOtVU32CgeytKjD1Scxj+uMMVo48SWLlKiFh312T+smI9ko7tOT8VqxglwYkWosgg==",
+      "version": "7.3.9",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-7.3.9.tgz",
+      "integrity": "sha512-SaxD+nKFW3iCBKsxNR7+66J30EexW/y7tm8m5AvUH+GwSAgIj0ZYmRUzFEPggcaLVA4WnE/YWqIXZMJW5dT7gw==",
       "dev": true,
       "requires": {
         "ajv": "6.9.1",
@@ -207,12 +207,12 @@
       }
     },
     "@angular-devkit/schematics": {
-      "version": "7.3.8",
-      "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.3.8.tgz",
-      "integrity": "sha512-mvaKoORZIaW/h0VNZ3IQWP0qThRCZRX6869FNlzV0jlW0mhn07XbiIGHCGGSCDRxS7qJ0VbuIVnKXntF+iDeWw==",
+      "version": "7.3.9",
+      "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.3.9.tgz",
+      "integrity": "sha512-xzROGCYp7aQbeJ3V6YC0MND7wKEAdWqmm/GaCufEk0dDS8ZGe0sQhcM2oBRa2nQqGQNeThFIH51kx+FayrJP0w==",
       "dev": true,
       "requires": {
-        "@angular-devkit/core": "7.3.8",
+        "@angular-devkit/core": "7.3.9",
         "rxjs": "6.3.3"
       }
     },
@@ -225,16 +225,16 @@
       }
     },
     "@angular/cli": {
-      "version": "7.3.8",
-      "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.8.tgz",
-      "integrity": "sha512-5ldU1idvWstmRaavGZen9WRjfjIViERGt8NYuLLI7dgVLYOPF5TyFoTnpT5nxkiCopp4tPIcpbzPV394Bxmdtg==",
+      "version": "7.3.9",
+      "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.9.tgz",
+      "integrity": "sha512-7oJj7CKDlFUbQav1x1CV4xKKcbt0pnxY4unKcm7Q1tVXhu8bU2bc3cDA0aJnbofcYb6TJcd/C2qHgCt78q7edA==",
       "dev": true,
       "requires": {
-        "@angular-devkit/architect": "0.13.8",
-        "@angular-devkit/core": "7.3.8",
-        "@angular-devkit/schematics": "7.3.8",
-        "@schematics/angular": "7.3.8",
-        "@schematics/update": "0.13.8",
+        "@angular-devkit/architect": "0.13.9",
+        "@angular-devkit/core": "7.3.9",
+        "@angular-devkit/schematics": "7.3.9",
+        "@schematics/angular": "7.3.9",
+        "@schematics/update": "0.13.9",
         "@yarnpkg/lockfile": "1.1.0",
         "ini": "1.3.5",
         "inquirer": "6.2.1",
@@ -895,14 +895,19 @@
       "resolved": "https://registry.npmjs.org/@ngui/tab/-/tab-0.5.0.tgz",
       "integrity": "sha1-DLsOeOLiq/s9+/S+EY6GrvOIQKI="
     },
+    "@nguniversal/express-engine": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@nguniversal/express-engine/-/express-engine-7.0.2.tgz",
+      "integrity": "sha512-mmNgDpUrcuFcjBOfUlmAliS3St4tSekLdQZWu6PK/d+kw5zicDDlSO/UoUw5g+wz7YHkGQK+VDy3wHc0Bo36rA=="
+    },
     "@schematics/angular": {
-      "version": "7.3.8",
-      "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.3.8.tgz",
-      "integrity": "sha512-7o90bnIxXNpJhWPDY/zCedcG6KMIihz7a4UQe6UdlhEX21MNZLYFiDiR5Vmsx39wjm2EfPh3JTuBIHGmMCXkQQ==",
+      "version": "7.3.9",
+      "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.3.9.tgz",
+      "integrity": "sha512-B3lytFtFeYNLfWdlrIzvy3ulFRccD2/zkoL0734J+DAGfUz7vbysJ50RwYL46sQUcKdZdvb48ktfu1S8yooP6Q==",
       "dev": true,
       "requires": {
-        "@angular-devkit/core": "7.3.8",
-        "@angular-devkit/schematics": "7.3.8",
+        "@angular-devkit/core": "7.3.9",
+        "@angular-devkit/schematics": "7.3.9",
         "typescript": "3.2.4"
       },
       "dependencies": {
@@ -915,13 +920,13 @@
       }
     },
     "@schematics/update": {
-      "version": "0.13.8",
-      "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.13.8.tgz",
-      "integrity": "sha512-2jP9w7Nnn24jOdrJtWjoS9LsNPmO9/Eu/+gDxBAVERCqR71mtNW+DopgWDtxleE9jri/pZWrHwShGFCSS7w23g==",
+      "version": "0.13.9",
+      "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.13.9.tgz",
+      "integrity": "sha512-4MQcaKFxhMzZyE//+DknDh3h3duy3avg2oxSHxdwXlCZ8Q92+4lpegjJcSRiqlEwO4qeJ5XnrjrvzfIiaIZOmA==",
       "dev": true,
       "requires": {
-        "@angular-devkit/core": "7.3.8",
-        "@angular-devkit/schematics": "7.3.8",
+        "@angular-devkit/core": "7.3.9",
+        "@angular-devkit/schematics": "7.3.9",
         "@yarnpkg/lockfile": "1.1.0",
         "ini": "1.3.5",
         "pacote": "9.4.0",
@@ -2987,14 +2992,6 @@
       "integrity": "sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=",
       "dev": true
     },
-    "cuppa-ng2-slidemenu": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/cuppa-ng2-slidemenu/-/cuppa-ng2-slidemenu-2.0.0.tgz",
-      "integrity": "sha1-S62Hzq1N0L/FNKxCT32rOF+EdFs=",
-      "requires": {
-        "font-awesome": "*"
-      }
-    },
     "currently-unhandled": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
@@ -4231,9 +4228,9 @@
       }
     },
     "fs-minipass": {
-      "version": "1.2.5",
-      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
-      "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.6.tgz",
+      "integrity": "sha512-crhvyXcMejjv3Z5d2Fa9sf5xLYVCF5O1c71QxbVnbLsmYMBEvDAftewesN/HhY03YRoA7zOMxjNGrF5svGaaeQ==",
       "dev": true,
       "requires": {
         "minipass": "^2.2.1"

+ 2 - 2
package.json

@@ -24,6 +24,7 @@
     "@auth0/angular-jwt": "^2.1.0",
     "@ng-bootstrap/ng-bootstrap": "^4.0.0",
     "@ngui/tab": "^0.5.0",
+    "@nguniversal/express-engine": "^7.0.2",
     "@types/chart.js": "^2.7.40",
     "@types/es6-promise": "^3.3.0",
     "@types/hammerjs": "^2.0.36",
@@ -42,7 +43,6 @@
     "bootstrap": "^4.0.0-beta",
     "chart.js": "^2.7.2",
     "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",
@@ -88,7 +88,7 @@
   },
   "devDependencies": {
     "@angular-devkit/build-angular": "^0.12.4",
-    "@angular/cli": "^7.3.8",
+    "@angular/cli": "^7.3.9",
     "@angular/compiler-cli": "~7.0.0",
     "@angular/language-service": "~7.0.0",
     "@types/core-js": "^2.5.0",

+ 1 - 1
src/app/External-Page/contact-us/contact-us.component.ts

@@ -14,7 +14,7 @@ export class ContactUsComponent implements OnInit {
   constructor(private http: HttpClient, 
     private spinner: NgxSpinnerService,
     private externalService: ExternalPageService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
     contactUs = [];
 

+ 1 - 1
src/app/External-Page/event-details/event-details.component.ts

@@ -10,7 +10,7 @@ import { Component, OnInit } from '@angular/core';
 export class EventDetailsComponent implements OnInit {
 
   constructor(private route: ActivatedRoute, 
-    private authSer:AuthServiceService) { }
+    public authSer:AuthServiceService) { }
 
   eventData: any;
 

+ 1 - 1
src/app/External-Page/external-contact-us/external-contact-us.component.ts

@@ -14,7 +14,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 export class ExternalContactUsComponent implements OnInit {
 
   constructor(private route: ActivatedRoute, 
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private spinner: NgxSpinnerService,
     private toastr: ToastrService,
     private http: HttpClient) { }

+ 1 - 1
src/app/External-Page/external-events-table/external-events-table.component.ts

@@ -13,7 +13,7 @@ import { Component, OnInit } from '@angular/core';
 
 export class ExternalEventsTableComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private http: HttpClient, 
     private spinner: NgxSpinnerService,
     private route: ActivatedRoute) { 

+ 1 - 1
src/app/External-Page/external-events/external-events.component.ts

@@ -67,7 +67,7 @@ export class ExternalEventsComponent implements OnInit {
   constructor(private modal: NgbModal, 
     private http: HttpClient,
     private router: Router,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private spinner:NgxSpinnerService) {}
 
 

+ 1 - 1
src/app/External-Page/external-hospital/external-hospital.component.ts

@@ -58,7 +58,7 @@ export class ExternalHospitalComponent implements OnInit {
 
 
   constructor(private route: ActivatedRoute,
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private spinner: NgxSpinnerService,
     private externalService: ExternalPageService) {
       this.spinner.show();

+ 1 - 1
src/app/External-Page/external-managaments/external-managaments.component.ts

@@ -21,7 +21,7 @@ export class ExternalManagamentsComponent implements OnInit {
   }
 
   constructor(private route: ActivatedRoute,
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private spinner: NgxSpinnerService,
     private externalService: ExternalPageService) {
       this.spinner.show();

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

@@ -25,7 +25,7 @@ export class ExternalPageContentComponent implements OnInit, OnDestroy {
     private route: ActivatedRoute,
     config: NgbCarouselConfig,
     private toastr: ToastrService,
-    private authSer: AuthServiceService) {
+    public authSer: AuthServiceService) {
     this.spinner.show();
     
     }

+ 2 - 2
src/app/External-Page/external-page-header/external-page-header.component.html

@@ -8,8 +8,8 @@
                             <li class="profileData-w">
                                 <div class="dropdown">
                                     <button class="btn dropdown-toggle buttonW" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-                                        <img src="{{authSer.dataLoginUser['photo'] ? authSer.pathImg + authSer.dataLoginUser['photo'] : authSer.imgSrc}}" title="imageProfile" alt="" />
-                                        {{ authSer.dataLoginUser['name'] }} 
+                                        <img src="{{dataLoginUser.photo ? authSer.pathImg + dataLoginUser.photo : authSer.imgSrc}}" title="imageProfile" alt="" />
+                                        {{ dataLoginUser.name }} 
                                     </button>
                                     <div class="dropdown-menu" style="text-align:right" aria-labelledby="dropdownMenuButton"> 
                                         <button class="dropdown-item" style="cursor: pointer;" >

+ 13 - 2
src/app/External-Page/external-page-header/external-page-header.component.ts

@@ -10,19 +10,30 @@ import { Router } from '@angular/router';
 })
 export class ExternalPageHeaderComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private externalService: ExternalPageService,
     private router: Router) { }
     
     currentDate: any = Date.now();//ararbic date 
     currentEnglishDate: any = Date.now(); //english date
 
+    dataLoginUser = {
+      name: '',
+      photo: '',
+    }
+
   ngOnInit() {
 
     this.authSer.arabicTemplate = true;
     this.authSer.showDashboardHeader = false;
     this.authSer.setLocalLang(); //set languages icons
     this.currentDate = this.authSer.writeHijri(new Date(this.currentDate), 'ar', 'header');
+    
+    if(!this.authSer.isAuthenticated()) {
+      this.dataLoginUser.name = this.authSer.returnUserData().name;
+      this.dataLoginUser.photo = this.authSer.returnUserData().photo;
+    }
+ 
 
     this.authSer.footerData = [];
 
@@ -65,7 +76,7 @@ export class ExternalPageHeaderComponent implements OnInit {
 
   onGetProfile() {
     console.log('profile/'  + this.authSer.dataLoginUser['id']);
-    this.router.navigate(['profile/'  + this.authSer.dataLoginUser['id']]);
+    this.router.navigate(['auth/profile/'  + this.authSer.dataLoginUser['id']]);
   }
 
   //log out function

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

@@ -12,7 +12,7 @@ import { HostListener } from "@angular/core";
 })
 export class ExternalPageComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private router:Router) {
       this.getScreenSize();
      }

+ 1 - 1
src/app/External-Page/external-policy/external-policy.component.ts

@@ -14,7 +14,7 @@ export class ExternalPolicyComponent implements OnInit {
   constructor(private route: ActivatedRoute, 
     private http: HttpClient,
     private spinner: NgxSpinnerService,
-    private authSer:AuthServiceService) { }
+    public authSer:AuthServiceService) { }
 
   policyId: number;
   data = [];

+ 1 - 1
src/app/External-Page/inernal-service-page/inernal-service-page.component.ts

@@ -11,7 +11,7 @@ import { Component, OnInit } from '@angular/core';
 export class InernalServicePageComponent implements OnInit {
 
   constructor(private route: ActivatedRoute,
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private http: HttpClient) { }
 
   serviceId: number;

+ 1 - 1
src/app/External-Page/more-news/more-news.component.ts

@@ -12,7 +12,7 @@ import { ExternalPageService } from '../../shared/external-page.service';
 })
 export class MoreNewsComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private http: HttpClient,
     private router: Router,
     private externalSer: ExternalPageService,

+ 5 - 5
src/app/External-Page/new-page/new-page.component.html

@@ -15,11 +15,11 @@
                       <div class="col-12 col-sm-12 col-md-6">
                         <div class="socialMedia-w">
                           <ul class="list-unstyled saredLinks-w" style="float:right;">
-                            <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
+                            <!-- <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
                             <li><button class="linkedin" ceiboShare  [linkedIn]="{url:repoUrl}"><i class="fab fa-linkedin-in"></i></button></li>
                             <li><button class="googleplus" ceiboShare  [googlePlus]="{url:repoUrl}"><i class="fab fa-google-plus-g"></i></button></li>
                             <li> <button class="whatsapp"> <a href="{{'http://example.org/?test=' + url}}"><i class="fab fa-whatsapp"></i></a></button></li>
-                            <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li>
+                            <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li> -->
                           </ul>
                         </div>
                       </div>
@@ -78,11 +78,11 @@
                     <div class="col-6">
                       <div class="socialMedia-w">
                         <ul class="list-unstyled saredLinks-w" style="text-align: left; direction: ltr;float: left !important;width:100%">
-                          <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
+                          <!-- <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
                           <li><button class="linkedin" ceiboShare  [linkedIn]="{url:repoUrl}"><i class="fab fa-linkedin-in"></i></button></li>
                           <li><button class="googleplus" ceiboShare  [googlePlus]="{url:repoUrl}"><i class="fab fa-google-plus-g"></i></button></li>
                           <li> <button class="whatsapp"> <a href="{{'http://example.org/?test=' + url}}"><i class="fab fa-whatsapp"></i></a></button></li>
-                          <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li>
+                          <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li> -->
                         </ul>
                       </div>
                     </div>
@@ -128,4 +128,4 @@
         </ng-template>
       </div>
   </div>
-</div>
+</div> 

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

@@ -4,15 +4,16 @@ import { AuthServiceService } from './../../shared/auth-service.service';
 import { Component, OnInit } from '@angular/core';
 import { NgxSpinnerService } from 'ngx-spinner';
 import { ExternalPageService } from '../../shared/external-page.service';
+import { CeiboShare } from 'ng2-social-share';
 
 @Component({
   selector: 'app-new-page',
   templateUrl: './new-page.component.html',
-  styleUrls: ['./new-page.component.css']
+  styleUrls: ['./new-page.component.css'],
 })
 export class NewPageComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private http: HttpClient,
     private spinner: NgxSpinnerService,
     private externalService: ExternalPageService,

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

@@ -11,7 +11,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 })
 export class CircularsPageComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private spinner: NgxSpinnerService,
     private internalService: InternalPageService) { }
    

+ 1 - 1
src/app/Internal-Page/external-service-details/external-service-details.component.ts

@@ -12,7 +12,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 export class ExternalServiceDetailsComponent implements OnInit {
 
   constructor(private route: ActivatedRoute,
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private spinner: NgxSpinnerService,
     private http: HttpClient) { }
 

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

@@ -16,7 +16,7 @@ export class HospitalContentComponent implements OnInit {
   constructor(private internalService: InternalPageService, 
               private route: ActivatedRoute,
               private spinner: NgxSpinnerService,
-              private authSer:AuthServiceService) { 
+              public authSer:AuthServiceService) { 
               }
 
   hospitalCenters = [];

+ 1 - 1
src/app/Internal-Page/internal-contact-us/internal-contact-us.component.ts

@@ -14,7 +14,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 export class InternalContactUsComponent implements OnInit {
 
   constructor(private route: ActivatedRoute, 
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private spinner: NgxSpinnerService,
     private toastr: ToastrService,
     private http: HttpClient) { }

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

@@ -25,7 +25,7 @@ export class InternalPageContentComponent implements OnInit {
   
 
 
-  constructor(private authSer: AuthServiceService,
+  constructor(public authSer: AuthServiceService,
     private router:Router,
     private userservice: UserService,
     private internalService: InternalPageService,

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

@@ -10,8 +10,8 @@
                           <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" alt="" />
-                                        {{ authSer.dataLoginUser['name'] }} 
+                                    <img src="{{dataLoginUser.photo ? authSer.pathImg + authSer.dataLoginUser.photo : authSer.imgSrc}}" title="imageProfile" alt="" />
+                                        {{ dataLoginUser.name }} 
                                 </button>
                   
                             <div class="dropdown-menu" style="text-align:right" ngbDropdownMenu>

+ 12 - 3
src/app/Internal-Page/internal-page-header/internal-page-header.component.ts

@@ -14,7 +14,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 })
 export class InternalPageHeaderComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private userservice: UserService, 
     private internalService: InternalPageService, 
     private route: ActivatedRoute,
@@ -23,6 +23,10 @@ export class InternalPageHeaderComponent implements OnInit {
       spinner.show();
      }
   
+     dataLoginUser = {
+      name: '',
+      photo: '',
+    }
     
   currentDate: any = Date.now();
 
@@ -34,6 +38,11 @@ export class InternalPageHeaderComponent implements OnInit {
   ngOnInit() {
    
      this.authSer.footerData = [];
+     
+     if(!this.authSer.isAuthenticated()) {
+      this.dataLoginUser.name = this.authSer.returnUserData().name;
+      this.dataLoginUser.photo = this.authSer.returnUserData().photo;
+    }
 
     this.authSer.onGetFooterData('internal').subscribe(
       (responce) => {
@@ -62,7 +71,7 @@ export class InternalPageHeaderComponent implements OnInit {
     this.internalService.getParentData();
     //console.log(this.checkTokenExpire);
       //get profile data
-    this.userservice.getUserDataProfile();
+    //this.userservice.getUserDataProfile();
 
     this.currentDate = this.authSer.writeHijri(new Date(this.currentDate), 'ar', 'header');
   }
@@ -73,7 +82,7 @@ export class InternalPageHeaderComponent implements OnInit {
 
   onGetProfile() {
     console.log('profile/'  + this.authSer.dataLoginUser['id']);
-    this.router.navigate(['profile/'  + this.authSer.dataLoginUser['id']]);
+    this.router.navigate(['auth/profile/'  + this.authSer.dataLoginUser['id']]);
   }
 
   //log out function

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

@@ -27,7 +27,6 @@ import { NgxSpinnerModule } from 'ngx-spinner';
 import { SharedModule } from '../shared/shared.module';
 import { ExternalServiceDetailsComponent } from './external-service-details/external-service-details.component';
 
-//import { CeiboShare } from 'ng2-social-share';
 
 @NgModule({
     declarations: [
@@ -42,7 +41,6 @@ import { ExternalServiceDetailsComponent } from './external-service-details/exte
         ExternalServiceDetailsComponent,
         InternalContactUsComponent,
         InternalPolicyComponent,
-        //CeiboShare,
     ],
     imports: [
         CommonModule,

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

@@ -18,7 +18,7 @@ import { UserService } from '../../shared/user.service';
 })
 export class InternalPageComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, private spinner: NgxSpinnerService) {
+  constructor(public authSer: AuthServiceService, private spinner: NgxSpinnerService) {
       this.spinner.show();
      }
 

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

@@ -14,7 +14,7 @@ export class InternalPolicyComponent implements OnInit {
   constructor(private route: ActivatedRoute, 
     private http: HttpClient,
     private spinner: NgxSpinnerService,
-    private authSer:AuthServiceService) { }
+    public authSer:AuthServiceService) { }
 
   policyId: number;
   data = [];

+ 4 - 7
src/app/Internal-Page/news-page/news-page.component.html

@@ -23,11 +23,11 @@
                   <div class="col-12 col-sm-12 col-md-11" style="margin-left: auto;margin-right: auto;">
                   
                    <ul class="list-unstyled saredLinks-w" style="float:right">
-                      <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
+                      <!-- <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
                       <li><button class="linkedin" ceiboShare  [linkedIn]="{url:repoUrl}"><i class="fab fa-linkedin-in"></i></button></li>
                       <li><button class="googleplus" ceiboShare  [googlePlus]="{url:repoUrl}"><i class="fab fa-google-plus-g"></i></button></li>
                       <li> <button class="whatsapp"> <a href="{{'http://example.org/?test=' + url}}"><i class="fab fa-whatsapp"></i></a></button></li>
-                      <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li>
+                      <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li> -->
                     </ul>
                   </div>
                   <div class="col-12 col-sm-6 col-md-6">
@@ -37,7 +37,6 @@
               </div>
               <div class="col-12">
                 <div class="description">
-                <!--   <h3>{{newsData.title}}</h3> -->
                     <p [innerHTML]="newsData.description"></p>
                 </div>
               </div>
@@ -112,18 +111,17 @@
                           </div>
                            <div class="col-12 col-sm-12 col-md-9" style="margin-left: auto;margin-right: auto;">
                            <ul class="list-unstyled saredLinks-w" style="text-align: right; direction: ltr;float: right !important;">
-                              <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
+                              <!-- <li><button class="facebook" ceiboShare  [facebook]="{u: repoUrl}"><i class="fab fa-facebook-f"></i></button></li>
                               <li><button class="linkedin" ceiboShare  [linkedIn]="{url:repoUrl}"><i class="fab fa-linkedin-in"></i></button></li>
                               <li><button class="googleplus" ceiboShare  [googlePlus]="{url:repoUrl}"><i class="fab fa-google-plus-g"></i></button></li>
                               <li> <button class="whatsapp"> <a href="{{'http://example.org/?test=' + url}}"><i class="fab fa-whatsapp"></i></a></button></li>
-                              <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li>
+                              <li><button class="twitter" ceiboShare  [twitter]="{url:repoUrl, text:'Checkout this awesome ng2 social share directive', hashtags:'angular2, social, ceiboIT'}"><i class="fab fa-twitter"></i></button></li> -->
                             </ul>
                           </div>
                         </div>
                       </div>
                     <div class="col-12">
                       <div class="description" [className]="authSer.arabicTemplate ? '' : 'achievementsLang-w' ">
-                        <!--  <h3>{{newsData.title_en}}</h3> -->
                           <p [innerHTML]="newsData.description_en"></p>
                       </div>
                     </div>
@@ -143,4 +141,3 @@
       </div>
 </ng-template>
 
-

+ 2 - 3
src/app/Internal-Page/news-page/news-page.component.ts

@@ -1,9 +1,8 @@
 import { AuthServiceService } from './../../shared/auth-service.service';
 import { ActivatedRoute, Params } from '@angular/router';
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, Directive } from '@angular/core';
 import { InternalPageService } from '../../shared/internal-page.service';
 import { NgxSpinnerService } from 'ngx-spinner';
-//import { CeiboShare } from 'ng2-social-share';
 
 
 @Component({
@@ -18,7 +17,7 @@ export class NewsPageComponent implements OnInit {
   public imageUrl = '';
   
   constructor(private route: ActivatedRoute, 
-    private authSer:AuthServiceService, 
+    public authSer:AuthServiceService, 
     private spinner: NgxSpinnerService,
     private internalService: InternalPageService) { }
   

+ 1 - 1
src/app/Internal-Page/news-pages/news-pages.component.ts

@@ -13,7 +13,7 @@ import { NgxSpinnerService } from 'ngx-spinner';
 export class NewsPagesComponent implements OnInit {
 
   constructor(private http: HttpClient, 
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private spinner: NgxSpinnerService, 
     private internalSer: InternalPageService,
     private router: Router) { }

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

@@ -27,7 +27,6 @@ const routes: Routes = [
 
   {path: 'trainingServices/:visitorId/:trainningServicesId', component: TrainningServicesComponent, canActivate:[AuthGuard]},
 
- {path: 'profile/:idProfile', component: RegesterComponent, canActivate: [AuthGuard]},
 
   {path: 'page-not-found', component: PageNotFoundComponent},
   {path: '**', redirectTo: '/page-not-found', pathMatch: 'full'}

+ 0 - 4
src/app/app.module.ts

@@ -22,14 +22,11 @@ import { QuillModule } from 'ngx-quill';
 import { MomentModule } from 'ngx-moment';
 
 import {FormsModule, ReactiveFormsModule} from '@angular/forms';
-import { SlideMenuModule } from 'cuppa-ng2-slidemenu/cuppa-ng2-slidemenu';
 import { AppRoutingModule } from './app-routing.module';
 import { AppComponent } from './app.component';
 import { HttpModule } from '@angular/http';
 import { HttpClientModule } from '@angular/common/http';
 import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
-import { LoginComponent } from './auth-services/login/login.component';
-import { RegesterComponent } from './auth-services/regester/regester.component';
 import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
 import { AuthServiceService } from './shared/auth-service.service';
 import { HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -85,7 +82,6 @@ import { AuthServicesModule } from './auth-services/auth-services.module';
     ExternalPageModule,
     SharedModule,
     AppRoutingModule,
-    SlideMenuModule,
     NgxSpinnerModule,
     NgxPaginationModule,
     MomentModule,

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

@@ -12,7 +12,7 @@ const routes: Routes = [
       {path: '', redirectTo: 'login', pathMatch: 'full'},
       {path: 'login', component: LoginComponent},
       {path: 'register', component: RegesterComponent},
-     
+      {path: 'profile/:idProfile', component:RegesterComponent},
       {path: '**', redirectTo: 'login', pathMatch: 'full'},
     ]},
   ];

+ 2 - 3
src/app/auth-services/login/login.component.ts

@@ -17,7 +17,7 @@ import { Response } from '@angular/http';
 })
 export class LoginComponent implements OnInit {
 
-  constructor(private authSer: AuthServiceService, 
+  constructor(public authSer: AuthServiceService, 
     private router: Router, 
     private route: ActivatedRoute, 
     private location: Location,
@@ -62,10 +62,9 @@ export class LoginComponent implements OnInit {
       (responce: Response) => {
         localStorage.setItem('token', responce['token']);
         localStorage.setItem('userType', responce['user'].type);
-        localStorage.setItem('adminId', this.authSer.dataLoginUser['adminstration_id']);
+        localStorage.setItem('adminId', responce['user'].adminstration_id);
 
         const id = responce['user'].id;
-        console.log(id);
         this.authSer.setDataUser(responce);
         this.loginFormData.reset();
         this.router.navigate(['/services/' + id]);

+ 2 - 1
src/app/auth-services/regester/regester.component.ts

@@ -50,13 +50,14 @@ export class RegesterComponent implements OnInit {
 
   
   constructor(private userService: UserService, 
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private router: Router, 
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private modal: Modal,
     private route: ActivatedRoute) { }
   
+  files:any;
   regesterForm: FormGroup;
   myInnerHeight = window.innerHeight;
   min = '1990-01-31';

+ 3 - 3
src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.html

@@ -40,7 +40,7 @@
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                       <label for="identity" style="float:right"> الهويه <span class="spanReqired-w">*</span></label>
-                      <select class="form-control select" id="identity" (change)="getSelectedOptionText($event)" ngModel name="identity_type_id" [(ngModel)]="userData.identity_type_id" [disabled]="disabledInput" required>
+                      <select class="form-control select" id="identity" ngModel name="identity_type_id" [(ngModel)]="userData.identity_type_id" [disabled]="disabledInput" required>
                         <option *ngFor="let identity of identities" [value]="identity.id">{{identity.name}}</option>
                       </select>
                     </div>
@@ -49,7 +49,7 @@
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
-                    <input type="number" class="form-control" placeholder="رقم الهويه" id="identityNumber" (input)="onIdentitiyChange($event.target.value)" ngModel name="identity_number" [(ngModel)]="userData.identity_number" [disabled]="disabledInput" required/>
+                    <input type="number" class="form-control" placeholder="رقم الهويه" id="identityNumber" ngModel name="identity_number" [(ngModel)]="userData.identity_number" [disabled]="disabledInput" required/>
                     <span class="errorMessage-w" *ngIf="identity_id == 1">أدخل رقم هويه مكون من 10 أرقام يبدأ برقم 1</span>
                     <span class="errorMessage-w" *ngIf="identity_id == 2">أدخل رقم هويه مكون من 10 أرقام </span>
                     <span class="errorMessage-w" *ngIf="identity_id == 3">أدخل رقم الإقامه مكون من 10 أرقام يبدأ برقم 2 </span>
@@ -59,7 +59,7 @@
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                       <div class="form-group">
                         <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
-                        <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
+                        <input type="date" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
                       </div>
                     </div>
 

+ 6 - 1
src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.ts

@@ -23,7 +23,7 @@ export class RegistrationTraineeMovementAddComponent implements OnInit {
     private dashBoardSer: DashboardService,
     private spinner: NgxSpinnerService,
     private location: Location,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
     
 
@@ -267,6 +267,11 @@ export class RegistrationTraineeMovementAddComponent implements OnInit {
     }
   }
 
+  changeType(event) {
+    console.log(event.target.value);
+    this.formData.type = event.target.value;
+  }
+
    //change file 
   onFileChanges(event, index:number) {
     console.log(event);

+ 1 - 1
src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-list/registration-trainee-movement-list.component.ts

@@ -23,7 +23,7 @@ export class RegistrationTraineeMovementListComponent implements OnInit {
     private modal: Modal,
     private dashBoardService: DashboardService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
     pageId: number;
     dataList = [];

+ 1 - 1
src/app/dashboard/absorpation-plan/absorpation-add/absorpation-add.component.ts

@@ -21,7 +21,7 @@ export class AbsorpationAddComponent implements OnInit {
     private spinner: NgxSpinnerService,
     private location: Location,
     private route: ActivatedRoute,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   absorpation = {
     name: '',

+ 1 - 1
src/app/dashboard/absorpation-plan/absorpation-list/absorpation-list.component.ts

@@ -39,7 +39,7 @@ export class AbsorpationListComponent implements OnInit {
     private spinner: NgxSpinnerService,
     private modal: Modal,
     private dashBoardService: DashboardService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
     

+ 1 - 1
src/app/dashboard/achievements/achievement-list/achievement.component.ts

@@ -19,7 +19,7 @@ export class AchievementComponent implements OnInit {
   constructor(private route: ActivatedRoute, 
     private router: Router,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private userSer: UserService,
     private toastr: ToastrService,
     private modal: Modal,

+ 1 - 1
src/app/dashboard/achievements/add-achievement/add-achievement.component.ts

@@ -19,7 +19,7 @@ export class AddAchievementComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer: UserService, 
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private toastr: ToastrService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,

+ 2 - 1
src/app/dashboard/add-join-us/add-join-us.component.ts

@@ -20,11 +20,12 @@ export class AddJoinUsComponent implements OnInit {
   constructor(private userSer: UserService,
     private spineer: NgxSpinnerService,
     private route: ActivatedRoute,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private location: Location,
     private toastr: ToastrService) { }
 
     adminstrations = [];
+    files: any;
     typeLink: string = 'إنشاء جديد';
     urlImg: string =  '../../assets/image/avatar.png';
     joinUsForm: FormGroup;

+ 1 - 1
src/app/dashboard/adminstration-contact-officers/adminstration-contact-officers-list/adminstration-contact-officers-list.component.ts

@@ -22,7 +22,7 @@ export class AdminstrationContactOfficersListComponent implements OnInit, OnDest
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 

+ 2 - 1
src/app/dashboard/advertisiment/add-advertisiment/add-adver/add-adver.component.ts

@@ -16,13 +16,14 @@ import { NgxSpinnerService } from 'ngx-spinner';
 export class AddAdverComponent implements OnInit {
 
   constructor(private userSer:UserService, 
-    private authSer:AuthServiceService, 
+    public authSer:AuthServiceService, 
     private toastr: ToastrService, 
     private spinner: NgxSpinnerService, 
     private dashboardSer: DashboardService,
     private location: Location, 
     private route:ActivatedRoute) { }
 
+    files: any;
     typeMode:boolean = false; //default false for create page 
     typeLink: string;
     fileUpload: any;

+ 1 - 1
src/app/dashboard/advertisiment/advertisiment.component.ts

@@ -21,7 +21,7 @@ export class AdvertisimentComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 

+ 2 - 1
src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.ts

@@ -18,13 +18,14 @@ export class AddAdvertisingServiceComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer:UserService,
-    private authSer:AuthServiceService,
+    public authSer:AuthServiceService,
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private dashboardSer: DashboardService,
     private location: Location,
     private route:ActivatedRoute) { }
 
+    files:any;
     urlImg: string =  '../../assets/image/avatar.png';
     imageBase64: string = '';
     photoType: string = '';

+ 1 - 1
src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.ts

@@ -22,7 +22,7 @@ export class AdvertisingServicesListComponent implements OnInit {
       private modal: Modal,
       private userSer: UserService,
       private spinner: NgxSpinnerService,
-      private authSer: AuthServiceService,
+      public authSer: AuthServiceService,
       private toastr: ToastrService,
       private dashboardSer: DashboardService) { }
 

+ 1 - 1
src/app/dashboard/bar-events/add-bar-event/add-bar-event.component.ts

@@ -18,7 +18,7 @@ export class AddBarEventComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer:UserService,
-    private authSer:AuthServiceService,
+    public authSer:AuthServiceService,
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private dashboardSer: DashboardService,

+ 2 - 2
src/app/dashboard/bar-events/bar-events-list/bar-events-list.component.ts

@@ -22,7 +22,7 @@ export class BarEventsListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 
@@ -110,7 +110,7 @@ export class BarEventsListComponent implements OnInit {
     } //end ngOnInit
 
     //make all checkbox of user checked
-    selectAll() {
+  selectAll() {
     for (var i = 0; i < this.barEventsList.length; i++) {
       this.barEventsList[i].selected = this.selectedAll;
     }

+ 1 - 1
src/app/dashboard/contact-us/add-contact-us/add-contact-us.component.ts

@@ -18,7 +18,7 @@ export class AddContactUsComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer:UserService,
-    private authSer:AuthServiceService,
+    public authSer:AuthServiceService,
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private dashboardSer: DashboardService,

+ 1 - 1
src/app/dashboard/contact-us/contact-us-list/contact-us-list.component.ts

@@ -21,7 +21,7 @@ export class ContactUsListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 

+ 2 - 2
src/app/dashboard/create-report/add-new-report/add-new-report.component.html

@@ -83,14 +83,14 @@
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
                         <label for="phoneNum"  style="float: right;margin-right: 5px"> الهاتف </label>
-                        <input type="number" placeholder=" الهاتف" class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum" [disabled]="true" required/>
+                        <input type="number" placeholNeedder=" الهاتف" class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum" [disabled]="true" required/>
                       </div>  
                   </div>
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
                           <label for="startDate" style="float:right" >التاريخ</label>
                           <div>
-                            <app-higri-date  class="disabledDiv" (onDatePicked)="getDate($event, 'start')" [myDate]="bindingDateSplitStart" [higriDisabled]="disabledVal"></app-higri-date>
+                            <app-higri-date  class="disabledDiv" [myDate]="bindingDateSplitStart" [higriDisabled]="disabledVal"></app-higri-date>
                           </div>
                       </div>
                     </div>

+ 8 - 1
src/app/dashboard/create-report/add-new-report/add-new-report.component.ts

@@ -23,7 +23,7 @@ export class AddNewReportComponent implements OnInit {
     private dashBoardSer: DashboardService,
     private spiner: NgxSpinnerService,
     private location: Location,
-    private authService: AuthServiceService,
+    public authService: AuthServiceService,
     private userService: UserService,
     private router: Router
     ) { }
@@ -168,6 +168,13 @@ export class AddNewReportComponent implements OnInit {
     );
 
   }
+
+  //  //get value date from child component
+  //  public getDate(date: any):void {
+  //   console.log( date);
+  //   this.higriDateVal = date.year + '-' + date.month + '-' + date.day;
+  //   console.log('higrii date', this.higriDateVal);
+  // }
   
   onChangemainLocation(event){
    const id = event.target.value

+ 1 - 1
src/app/dashboard/dashboard-content.ts

@@ -10,7 +10,7 @@ import { HostListener } from "@angular/core";
 })
 export class DashboardContent implements OnInit {
 
-  constructor(private authSer: AuthServiceService) { 
+  constructor(public authSer: AuthServiceService) { 
     this.getScreenSize();
   }
 

+ 0 - 3
src/app/dashboard/dashboard-routing.ts

@@ -252,9 +252,6 @@ const dashboardRouting: Routes = [
     {path: 'recordInfoBuilding/:listPageId', component: RecordInfoBuildingListComponent, canActivate: [AuthGuard]},
     {path: 'recordInfoBuilding', component: RecordInfoBuildingAddComponent, canActivate: [AuthGuard]},
     {path: 'recordInfoBuilding/edit/:listPagEditId', component: RecordInfoBuildingAddComponent, canActivate: [AuthGuard]},
-    
-    
-    
     ]},
 ];
 

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

@@ -30,7 +30,6 @@ import { HigriDateComponent } from '../higri-date/higri-date.component';
 import { DashBoardRouting } from './dashboard-routing';
 
 import { DashboardService } from './../shared/dashboard.service';
-import { EventService } from './../shared/event.service';
 import { ReportService } from './../shared/report.service';
 
 import { DashboardContent } from './dashboard-content';
@@ -145,7 +144,6 @@ import { RecordInfoBuildingAddComponent } from './record-info-building/record-in
     declarations: [
         DashboardContent,
         ServiceItemComponent,
-        ServiceItemComponent,
         UsersComponent,
         FormUserComponent,
         FiltterPipePipe,
@@ -274,7 +272,6 @@ import { RecordInfoBuildingAddComponent } from './record-info-building/record-in
     providers: [
         UserService,
         ReportService,
-        EventService,
         DashboardService,
     ],
 })

+ 1 - 1
src/app/dashboard/definition-of-classification/definition-add/definition-add.component.ts

@@ -17,7 +17,7 @@ export class DefinitionAddComponent implements OnInit {
 
   constructor(private dashBoardSer: DashboardService,
     private toastr: ToastrService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private location: Location,

+ 2 - 2
src/app/dashboard/definition-of-classification/definition-list/definition-list.component.ts

@@ -23,7 +23,7 @@ export class DefinitionListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 
@@ -116,7 +116,7 @@ selectAll() {
 }
 
 checkIfAllSelected() {
-  this.selectedAll = this.absorpationListIds.every(function(item: any) {
+  this.selectedAll = this.dataList.every(function(item: any) {
     return item.selected == true;
   });
 }

+ 1 - 1
src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.ts

@@ -18,7 +18,7 @@ export class DefinitionOfCovenantsAddComponent implements OnInit {
   constructor(
     private dashBoardSer: DashboardService,
     private toastr: ToastrService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private location: Location,

+ 1 - 1
src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts

@@ -37,7 +37,7 @@ export class DefinitionOfCovenantsListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService,
     private http: HttpClient

+ 1 - 1
src/app/dashboard/definition-of-location/location-add/location-add.component.ts

@@ -18,7 +18,7 @@ export class LocationAddComponent implements OnInit {
   
   constructor(private dashBoardSer: DashboardService,
     private toastr: ToastrService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private location: Location,

+ 2 - 2
src/app/dashboard/definition-of-location/location-list/location-list.component.ts

@@ -22,7 +22,7 @@ export class LocationListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 
@@ -116,7 +116,7 @@ selectAll() {
   }
 }
 checkIfAllSelected() {
-  this.selectedAll = this.absorpationListIds.every(function(item:any) {
+  this.selectedAll = this.dataList.every(function(item:any) {
     return item.selected == true;
   });
 }

+ 1 - 1
src/app/dashboard/definition-of-time/definition-time-add/definition-time-add.component.html

@@ -29,7 +29,7 @@
               
           </div>
           <div class=" row col-6">
-              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveDisabled">حفظ</button>
+              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveclick">حفظ</button>
               <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
           </div>
         </form>

+ 1 - 1
src/app/dashboard/definition-of-time/definition-time-add/definition-time-add.component.ts

@@ -18,7 +18,7 @@ export class DefinitionTimeAddComponent implements OnInit {
 
   constructor(private dashBoardSer: DashboardService,
     private toastr: ToastrService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private location: Location,

+ 2 - 2
src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.ts

@@ -20,7 +20,7 @@ export class DefinitionTimeListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 
@@ -120,7 +120,7 @@ selectAll() {
 }
 
 checkIfAllSelected() {
-  this.selectedAll = this.absorpationListIds.every(function(item:any) {
+  this.selectedAll = this.dataList.every(function(item:any) {
     return item.selected == true;
   });
 }

+ 2 - 2
src/app/dashboard/department/add-department/add-department.component.ts

@@ -15,13 +15,13 @@ import { Router, ActivatedRoute, Params } from '@angular/router';
 
 export class AddDepartmentComponent implements OnInit {
 
-  constructor(private authService: AuthServiceService,
+  constructor(public authService: AuthServiceService,
       private userService: UserService,
       private dashboardSer: DashboardService,
       private spinner: NgxSpinnerService,
       private toastr: ToastrService,
       private router: Router,
-      private authSer: AuthServiceService,
+      public authSer: AuthServiceService,
       private route: ActivatedRoute,
       private location: Location) {
         this.spinner.show();

+ 1 - 1
src/app/dashboard/department/department-list/department-list.component.ts

@@ -20,7 +20,7 @@ export class DepartmentListComponent implements OnInit {
     private router: Router,
     private spinner: NgxSpinnerService,
     private modal: Modal,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private userSer: UserService,
     private toastr: ToastrService) { }
 

+ 0 - 31
src/app/dashboard/english.directive.ts

@@ -1,31 +0,0 @@
-import { Directive, HostListener, ElementRef, Input } from '@angular/core';
-
-@Directive({
-  selector: '[appEnglish]'
-})
-export class EnglishDirective {
-
-  regexStr = '^[a-zA-Z0-@-.-9_]*$';
-  @Input() isAlphaNumeric: boolean;
-
-  constructor(private el: ElementRef) { }
-
-
-  @HostListener('keypress', ['$event']) onKeyPress(event) {
-    return new RegExp(this.regexStr).test(event.key);
-  }
-
-  @HostListener('paste', ['$event']) blockPaste(event: KeyboardEvent) {
-    this.validateFields(event);
-  }
-
-  validateFields(event) {
-    setTimeout(() => {
-
-      this.el.nativeElement.value = this.el.nativeElement.value.replace(/[^A-Za-z ]/g, '').replace(/\s/g, '');
-      event.preventDefault();
-
-    }, 100)
-  }
-
-}

+ 1 - 1
src/app/dashboard/event-calendars/add-event-calendar/add-event-calendar.component.ts

@@ -18,7 +18,7 @@ export class AddEventCalendarComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer:UserService,
-    private authSer:AuthServiceService,
+    public authSer:AuthServiceService,
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private dashboardSer: DashboardService,

+ 1 - 1
src/app/dashboard/event-calendars/event-calendars-list/event-calendars-list.component.ts

@@ -22,7 +22,7 @@ export class EventCalendarsListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 

+ 7 - 7
src/app/dashboard/events/add-event/add-event.component.ts

@@ -2,11 +2,11 @@ import { AuthServiceService } from './../../../shared/auth-service.service';
 import { Location } from '@angular/common';
 import { Component, OnInit, ViewChild } from '@angular/core';
 import { Router, ActivatedRoute, Params } from '@angular/router';
-import { EventService } from '../../../shared/event.service';
 import { UserService } from '../../../shared/user.service';
 import { ToastrService } from 'ngx-toastr';
 import { NgxSpinnerService } from 'ngx-spinner';
 import { FormGroup, NgForm } from '@angular/forms';
+import { DashboardService } from 'src/app/shared/dashboard.service';
 
 @Component({
   selector: 'app-add-event',
@@ -36,11 +36,11 @@ export class AddEventComponent implements OnInit {
     time: '',
   }
 
-  constructor(private eventService: EventService,
+  constructor(private dashboard: DashboardService,
     private userService: UserService,
     private location: Location,
     private toastr: ToastrService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute, 
     private spineer: NgxSpinnerService) { }
 
@@ -62,8 +62,8 @@ export class AddEventComponent implements OnInit {
           this.typeMode = true;
           this.typeLink = 'تعديل';
           this.spineer.show();
-          this.eventId = params['editEventId'];
-          this.eventService.getEventData(this.eventId).subscribe(
+          this.eventId = +params['editEventId'];
+          this.dashboard.getItemData(this.eventId, "events").subscribe(
             (responce) => {
               console.log(responce);
               const eventData = responce['event'][0];
@@ -124,7 +124,7 @@ export class AddEventComponent implements OnInit {
 
     console.log(this.eventForm.value); 
     if(this.typeMode) {
-      this.eventService.editEvent(this.eventForm.value , this.eventId).subscribe(
+      this.dashboard.editItem( this.eventId ,this.eventForm.value , "events").subscribe(
         (responce) => {
           console.log(responce);
           this.toastr.success('تمت التعديل بنجاح');
@@ -145,7 +145,7 @@ export class AddEventComponent implements OnInit {
         }
       );
     } else {
-      this.eventService.addEvent(this.eventForm.value).subscribe(
+      this.dashboard.addItem(this.eventForm.value, "events").subscribe(
         (responce) => {
           console.log(responce);
           this.toastr.success('تمت الاضافه بنجاح');

+ 10 - 10
src/app/dashboard/events/events.component.ts

@@ -1,5 +1,4 @@
 import { HttpClient } from '@angular/common/http';
-import { EventService } from './../../shared/event.service';
 import { AuthServiceService } from './../../shared/auth-service.service';
 import { UserService } from './../../shared/user.service';
 import { ActivatedRoute, Router, Params } from '@angular/router';
@@ -7,6 +6,7 @@ import { Component, OnInit } from '@angular/core';
 import { NgxSpinnerService } from 'ngx-spinner';
 import { ToastrService } from 'ngx-toastr';
 import { Modal } from 'ngx-modialog/plugins/bootstrap';
+import { DashboardService } from 'src/app/shared/dashboard.service';
 
 @Component({
   selector: 'app-events',
@@ -18,11 +18,11 @@ export class EventsComponent implements OnInit {
   constructor(private route: ActivatedRoute,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private http: HttpClient,
     private modal: Modal,
-    private eventService: EventService,
+    private dashboardSer: DashboardService,
     private router: Router) { }
 
     pageId: number;
@@ -97,7 +97,7 @@ export class EventsComponent implements OnInit {
     );
 
     //get list data 
-    this.eventService.getEventsList(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+    this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
       (responce) => {
         console.log(responce);
         this.eventsList = responce['events'];
@@ -135,7 +135,7 @@ export class EventsComponent implements OnInit {
     this.currentPage = 1;
     console.log('search curent page', this.currentPage);
     console.log('search page id', this.pageId);
-    this.eventService.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
       (responce) => {
         console.log(responce);
         this.eventsList = responce['events'];
@@ -157,7 +157,7 @@ export class EventsComponent implements OnInit {
     this.eventsList = [];
     //console.log(pagenationNumber);
     //console.log(this.pageId);
-    this.eventService.getEventsList(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+    this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
       (responce) => {
         console.log(responce);
         this.eventsList = responce['events'];
@@ -182,7 +182,7 @@ export class EventsComponent implements OnInit {
     this.http.post(this.authSer.pathApi + '/rank_event', data).subscribe(
       (responce) => {
         console.log(responce);
-        this.eventService.getEventsList(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+        this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
           (responce) => {
             console.log(responce);
             this.count = responce['count'];
@@ -205,7 +205,7 @@ onGetValue(event) {
   this.spinner.show();
   this.eventsList = [];
   this.dataTableNumber = event.target.value;
-  this.eventService.getEventsList(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+  this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
     (responce) => {
       console.log(responce);
       this.eventsList = responce['events'];
@@ -244,13 +244,13 @@ onGetValue(event) {
   
         dialogRef.result
         .then( result => 
-          this.eventService.deleteEvent(this.eventsListIds).subscribe(
+          this.dashboardSer.deleteItem(this.eventsListIds, this.pageId).subscribe(
             (responce) => {
               console.log(responce);
               this.toastr.success('تم الحذف');
               this.spinner.show();
               this.eventsList = [];
-              this.eventService.getEventsList(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+              this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
                 (responce) => {
                   console.log(responce);
                   this.eventsList = responce['events'];

+ 1 - 1
src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.ts

@@ -18,7 +18,7 @@ export class AddExternalAchievementComponent implements OnInit {
   @ViewChild('f') dataForm: NgForm;
 
   constructor(private userSer:UserService,
-    private authSer:AuthServiceService,
+    public authSer:AuthServiceService,
     private toastr: ToastrService,
     private spinner: NgxSpinnerService,
     private dashboardSer: DashboardService,

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

@@ -22,7 +22,7 @@ export class ExternalAchievementsListComponent implements OnInit {
     private modal: Modal,
     private userSer: UserService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private toastr: ToastrService,
     private dashboardSer: DashboardService) { }
 

+ 0 - 1
src/app/dashboard/external-services/add-external/add-external.component.html

@@ -23,7 +23,6 @@
                         <input type="file" name="file" id="file" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event)" (change)="getUrl($event)" [(fileModel)]="files" />
                         <label for="file" class="iconUpload-w"><i class="fas fa-upload"></i></label>
                     </div>
-                    <!-- <span class="validateImageMsg" *ngIf="checkValidImg">must be in 'png' format</span> -->
                   </div>
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                     <div class="form-group">

+ 3 - 2
src/app/dashboard/external-services/add-external/add-external.component.ts

@@ -16,6 +16,7 @@ export class AddExternalComponent implements OnInit {
 
   @ViewChild('f') externalFormData: NgForm;
 
+  files:any;
   urlImg: string =  '../../assets/image/avatar.png';
   imageBase64: string = '';
   photoType: string = '';
@@ -42,9 +43,9 @@ export class AddExternalComponent implements OnInit {
     private spinner: NgxSpinnerService,
     private location: Location,
     private route: ActivatedRoute,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private dashBoardService: DashboardService,
-    private authService: AuthServiceService) { }
+    public authService: AuthServiceService) { }
 
   ngOnInit() {
     

+ 1 - 1
src/app/dashboard/external-services/external-list/external-list.component.ts

@@ -37,7 +37,7 @@ export class ExternalListComponent implements OnInit {
     private spinner: NgxSpinnerService,
     private modal: Modal,
     private dashBoardService: DashboardService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
     

+ 2 - 2
src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.html

@@ -58,7 +58,7 @@
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                       <div class="form-group">
                         <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
-                        <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
+                        <input type="date" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
                       </div>
                     </div>
 
@@ -190,7 +190,7 @@
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                     <div class="form-group">
                       <label for="department" style="float:right;">القسم المناسب</label>
-                      <select class="form-control selectStyle-w" id="department" name="department" (input)="changeDepartment($event , 1)" [ngModel]="formData.department" [disabled]="disabledInput">
+                      <select class="form-control selectStyle-w" id="department" name="department" (input)="changeDepartment($event)" [ngModel]="formData.department" [disabled]="disabledInput">
                         <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
                       </select>
                     </div>

+ 24 - 2
src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.ts

@@ -7,7 +7,7 @@ import { FormGroup, Validators, FormControl, NgForm } from '@angular/forms';
 import { Component, OnInit, ViewChild } from '@angular/core';
 import { AuthServiceService } from '../../../shared/auth-service.service';
 import { ToastrService } from 'ngx-toastr';
-import { Location } from '@angular/common';
+import { Location, formatDate } from '@angular/common';
 @Component({
   selector: 'app-final-accerditation-add',
   templateUrl: './final-accerditation-add.component.html',
@@ -23,7 +23,7 @@ export class FinalAccerditationAddComponent implements OnInit {
     private router: Router,
     private spinner: NgxSpinnerService,
     private location: Location,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
     
 
@@ -294,6 +294,28 @@ export class FinalAccerditationAddComponent implements OnInit {
    
     }
 
+    changeDepartment(event) {
+      console.log(event.target.value);
+      this.formData.department = event.target.value;
+    }
+
+    changeType(event) {
+      console.log(event.target.value);
+      this.formData.type = event.target.value;
+    }
+
+    getSelectedOptionText(event) {
+      this.userData.identity_type_id = event.target.value;
+    }
+
+    onIdentitiyChange(event) {
+      console.log(event);
+      this.userData.identity_number = event;
+    }
+
+
+ 
+
   //submitted form 
   onSubmittedForm() {
 

+ 1 - 1
src/app/dashboard/final-accreditation-of-trainees/final-accerditation-list/final-accerditation-list.component.ts

@@ -24,7 +24,7 @@ export class FinalAccerditationListComponent implements OnInit {
     private modal: Modal,
     private dashBoardService: DashboardService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
     pageId: number;
     dataList = [];

+ 2 - 1
src/app/dashboard/final-trainee-report/final-trainee-report.component.ts

@@ -1,3 +1,4 @@
+import { AuthServiceService } from './../../shared/auth-service.service';
 import { Component, OnInit } from '@angular/core';
 
 @Component({
@@ -7,7 +8,7 @@ import { Component, OnInit } from '@angular/core';
 })
 export class FinalTraineeReportComponent implements OnInit {
 
-  constructor() { }
+  constructor(public authSer: AuthServiceService) { }
 
   ngOnInit() {
   }

+ 2 - 23
src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.html

@@ -151,16 +151,7 @@
                       </select>
                     </div>
                   </div>
-                  <!-- <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="checkStatusClosed">
-                    <div class="form-group">
-                      <label style="float:right" for="reopen_reason">سبب إعاده فتح البلاغ</label>
-                      <select class="form-control" id="reopen_reason" style="padding:0 5px" ngModel name="reopen_reason" (input)="getReopenReason($event)" [(ngModel)]="reOpenReasonObject.reopen_closed_communication" >
-                        <option value="ظهور المشكلة مجددا">ظهور المشكلة مجددا</option>
-                        <option value="عدم حل المشكلة من البداية">عدم حل المشكلة من البداية</option>
-                        <option value="إغلاق البلاغ دون موافقتنا">إغلاق البلاغ دون موافقتنا</option>
-                      </select>
-                    </div>
-                  </div> -->
+
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                       <label style="float:right" for="child_category_id">التصنيف الفرعي</label>
@@ -184,16 +175,6 @@
                       <textarea cols="3" class="form-control" name="maintenance_notes" id="maintenance_notes" [(ngModel)]="communicationData.maintenance_notes" [disabled]="disabledInput"> </textarea>
                     </div>
                   </div>
-
-               
-
-                  <!-- <div class="col-12 col-md-4">
-                    <div style="float:right">
-                      <input type="checkbox" class="form-check-input" name="urgent_communication" id="urgent_communication" [(ngModel)]="communicationData.urgent_communication" [value]="communicationData.urgent_communication">
-                      <label class="form-check-label" for="urgent_communication" style="margin: 0 20px;">بلاغ عاجل</label>
-                    </div>
-                  </div> -->
-
               </div>
             </div>
           </div>
@@ -229,7 +210,6 @@
                   </div>
                 </div>
               </div>
-          
             </div>
 
             <div class="col-12">
@@ -283,7 +263,7 @@
               <div class="row">
                 <div class="wrapper">
                   <!-- Button trigger modal -->
-                  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" style="float: right; margin: 20px 0;" [disabled]="communicationData.status">
+                  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" style="float: right; margin: 20px 0;">
                       الأقسام الموجه لها البلاغ
                   </button>
 
@@ -369,7 +349,6 @@
 
             <div class="col-12">
               <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveClick" *ngIf="!checkStatusClosed">حفظ</button>
-              <!-- <button type="button" class="btn btn-primary rightW" *ngIf="checkStatusClosed" (click)="reOpenMaintenance()">إعاده فتح البلاغ</button> -->
               <button type="button" class="btn btn-primary rightW" (click)="onPrint()" *ngIf="maintData.reopen == 1">طباعه</button>
               <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()" style="margin:20px 10px;">إلغاء</button>
             </div>

+ 28 - 2
src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.ts

@@ -57,7 +57,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
   formData = {
     communication_id: null,
     closed_status_reason: '',
-    department_notes: '',
+    adminstration_notes: '',
     status: null,
   }
 
@@ -79,7 +79,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
     private toastr: ToastrService,
     private location: Location,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
 
@@ -169,6 +169,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
         this.communicationData.parent_category_id = this.maintData.parent_category_id;
         this.getChildGategories(this.communicationData.parent_category_id);
         this.communicationData.child_category_id = this.maintData.child_category_id;
+        this.formData.adminstration_notes = this.maintData.adminstration_notes;
         //get main_location_id
         this.mainLocationVal = this.maintData.main_location_id;
         this.getSublocationList(this.mainLocationVal);
@@ -256,6 +257,21 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
     );
   };
 
+  onChangemainLocation(event){
+    const id = event.target.value
+    this.mainLocationVal = id;
+     this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
+       (response)  => {
+         console.log(id);
+         this.subLocationList = response['locations'];
+         
+       },
+       (error) => {
+         console.log(error)
+       }
+      );
+   }
+   
   //get adminstration list 
   getsectionsList(dataSearch) {
     const searchKey = dataSearch ? dataSearch : '';
@@ -305,6 +321,11 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
     console.log(this.selectedDepartments);
   }
 
+  
+ 
+
+ 
+
   //get sub location list 
   getSublocationList(parentId: any) {
     this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + parentId).subscribe(  
@@ -318,6 +339,11 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
      );
   }
 
+  changeSubLocation(event){
+    console.log(event.target.value);
+    this.subLocationVal = event.target.value;
+  }
+
   //get value of reason reOpen
   getReopenReason(event) {
     console.log(event.target.value);

+ 1 - 20
src/app/dashboard/follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component.html

@@ -1,7 +1,6 @@
 <div class="addHospital-w">
   <div class="container">
     
-    <!-- <h3 style="font-size: 18px; color: red">سيتم تحديث الصفحه بعد  <countdown #countdown [config]="{leftTime: 180}">$!m!:$!s!</countdown></h3> -->
     <h3 style="font-size: 18px; color: red">سيتم تحديث الصفحه بعد  {{counter$ | async }} ثانيه </h3>
 
 
@@ -152,16 +151,7 @@
                       </select>
                     </div>
                   </div>
-                  <!-- <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="checkStatusClosed">
-                    <div class="form-group">
-                      <label style="float:right" for="reopen_reason">سبب إعاده فتح البلاغ</label>
-                      <select class="form-control" id="reopen_reason" style="padding:0 5px" ngModel name="reopen_reason" (input)="getReopenReason($event)" [(ngModel)]="reOpenReasonObject.reopen_closed_communication" >
-                        <option value="ظهور المشكلة مجددا">ظهور المشكلة مجددا</option>
-                        <option value="عدم حل المشكلة من البداية">عدم حل المشكلة من البداية</option>
-                        <option value="إغلاق البلاغ دون موافقتنا">إغلاق البلاغ دون موافقتنا</option>
-                      </select>
-                    </div>
-                  </div> -->
+                 
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                       <label style="float:right" for="child_category_id">التصنيف الفرعي</label>
@@ -186,15 +176,6 @@
                     </div>
                   </div>
 
-               
-
-                  <!-- <div class="col-12 col-md-4">
-                    <div style="float:right">
-                      <input type="checkbox" class="form-check-input" name="urgent_communication" id="urgent_communication" [(ngModel)]="communicationData.urgent_communication" [value]="communicationData.urgent_communication">
-                      <label class="form-check-label" for="urgent_communication" style="margin: 0 20px;">بلاغ عاجل</label>
-                    </div>
-                  </div> -->
-
               </div>
             </div>
           </div>

+ 23 - 2
src/app/dashboard/follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component.ts

@@ -58,7 +58,8 @@ export class FollowCommunicationSectionsDetailsComponent implements OnInit {
   formData = {
     communication_id: null,
     closed_status_reason: '',
-    adminstration_notes: '',
+    department_notes: '',
+    status: null,
     department_status: null,
   }
 
@@ -80,7 +81,7 @@ export class FollowCommunicationSectionsDetailsComponent implements OnInit {
     private toastr: ToastrService,
     private location: Location,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
 
@@ -363,6 +364,26 @@ export class FollowCommunicationSectionsDetailsComponent implements OnInit {
       }
     }
 
+    onChangemainLocation(event){
+      const id = event.target.value
+      this.mainLocationVal = id;
+       this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
+         (response)  => {
+           console.log(id);
+           this.subLocationList = response['locations'];
+         },
+         (error) => {
+           console.log(error)
+         }
+        );
+     }
+   
+     
+     changeSubLocation(event){
+       console.log(event.target.value);
+       this.subLocationVal = event.target.value;
+     }
+
 
     //on print
     onPrint() {

+ 3 - 5
src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.html

@@ -217,7 +217,7 @@
               <h2 class="title">الإدارات الموجه لها البلاغ</h2>
               <div class="row">
                 <div class="wrapper">
-                  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" style="float: right; margin: 20px 0;" [disabled]="disabledInput">
+                  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal" style="float: right; margin: 20px 0;">
                       الإدارات الموجه لها البلاغ
                   </button>
 
@@ -235,10 +235,10 @@
                             <input type="text" placeholder="البحث" class="form-control inputSearchTable-w" style="margin-top:0;" (input)="filtterFunc($event)"/>
                             <hr>
                           </div>
-                          <table class="table table-bordered" *ngIf="this.count != 0">
+                          <table class="table table-bordered" *ngIf="adminstrations.length > 0">
                             <thead class="headBackground-w">
                               <tr>
-                                  <th style="text-align:right">
+                                <th style="text-align:right">
                                   <div class="custom-control custom-checkbox">
                                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
                                   </div>
@@ -275,7 +275,6 @@
                         <th>ملاحظات</th>
                         <th>حاله البلاغ</th>
                         <th>مده التأخير</th>
-                        <!-- <th>حذف</th> -->
                       </tr>
                     </thead>
                     <tbody>
@@ -291,7 +290,6 @@
                             : selectAdmin.adminstration_status == 'redirect_to_adminstrations' ? 'العائد للإدارات' : 'لايوجد'}}
                         </td>
                         <td style="font-size: 14px;">{{selectAdmin.countdown}}</td>
-                        <!-- <td><button type="button" class="btn btn-danger" (click)="removeSelectedAdminsration(selectAdmin)">حذف</button></td> -->
                       </tr>
                   </tbody>
                 </table>

+ 36 - 12
src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.ts

@@ -67,7 +67,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
 
   counter$: Observable<number>;
   counter = 180;
-
+  
   constructor(private route: ActivatedRoute, 
     private dashBoardSer: DashboardService,
     private userSer: UserService,
@@ -75,7 +75,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
     private toastr: ToastrService,
     private location: Location,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
 
@@ -145,6 +145,17 @@ export class FollowCommunicationsAddComponent implements OnInit {
       }
     );
 
+    //get location parent
+    this.http.get(this.authSer.pathApi + '/parent_locations_list').subscribe(
+      (response) => {
+        this.locationList = response['locations'];
+        console.log('parent location' , this.locationList);
+      },
+      (error) => {
+        console.log(error);
+      }
+    );
+
     //get maintanence data by id
     this.dashBoardSer.getItemData(this.pageId, 'maintenance').subscribe(
       (responce) => {
@@ -158,6 +169,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
         this.communicationData.parent_category_id = this.maintData.parent_category_id;
         this.getChildGategories(this.communicationData.parent_category_id);
         this.communicationData.child_category_id = this.maintData.child_category_id;
+        
         //get main_location_id
         this.mainLocationVal = this.maintData.main_location_id;
         this.getSublocationList(this.mainLocationVal);
@@ -219,16 +231,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
       }
     );
 
-    //get location parent
-    this.http.get(this.authSer.pathApi + '/parent_locations_list').subscribe(
-      (response) => {
-        this.locationList = response['locations'];
-        console.log('parent location' , this.locationList);
-      },
-      (error) => {
-        console.log(error);
-      }
-    );
+  
 
   }
 
@@ -266,6 +269,27 @@ export class FollowCommunicationsAddComponent implements OnInit {
     );
   };
 
+  onChangemainLocation(event){
+    const id = event.target.value
+    this.mainLocationVal = id;
+     this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
+       (response)  => {
+         console.log(id);
+         this.subLocationList = response['locations'];
+         
+       },
+       (error) => {
+         console.log(error)
+       }
+      );
+   }
+ 
+   
+   changeSubLocation(event){
+     console.log(event.target.value);
+     this.subLocationVal = event.target.value;
+   }
+
   //search function 
   filtterFunc(event) {
     this.adminstrations = [];

+ 2 - 1
src/app/dashboard/footer/add-footer/add-footer.component.ts

@@ -15,6 +15,7 @@ export class AddFooterComponent implements OnInit {
 
   @ViewChild('f') footerFormData: NgForm;
 
+  files: any;
   urlImg: string =  '../../assets/image/avatar.png';
   imageBase64: string = '';
   photoType: string = '';
@@ -49,7 +50,7 @@ export class AddFooterComponent implements OnInit {
   constructor(private toastr: ToastrService, 
     private spinner: NgxSpinnerService,
     private location: Location,
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private route: ActivatedRoute,
     private dashBoardService: DashboardService) { }
 

+ 1 - 1
src/app/dashboard/footer/footer-list/footer-list.component.ts

@@ -41,7 +41,7 @@ export class FooterListComponent implements OnInit {
     private toastr: ToastrService,
     private dashboardService: DashboardService,
     private spinner: NgxSpinnerService,
-    private authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) { }
 
   ngOnInit() {
     

+ 3 - 3
src/app/dashboard/header/header.component.html

@@ -18,8 +18,8 @@
                           <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" alt="" />
-                                        {{authSer.dataLoginUser['name']}} 
+                                    <img src="{{dataLoginUser.photo ? authSer.pathImg + dataLoginUser.photo : authSer.imgSrc}}" title="imageProfile" alt="" />
+                                        {{dataLoginUser.name}} 
                                 </button>
                   
                             <div class="dropdown-menu" style="text-align:right" ngbDropdownMenu>
@@ -98,7 +98,7 @@
     </div>     
     
     <!-- services content -->
-    <div class="pagesHeader-w" style="    display: none;height: 50px;background: #777777bd;margin-top: -6px;width: 100%;">
+    <div class="pagesHeader-w" style="display: none;height: 50px;background: #777777bd;margin-top: -6px;width: 100%;">
       
     </div>
 </div>

+ 11 - 11
src/app/dashboard/header/header.component.ts

@@ -15,13 +15,16 @@ export class HeaderComponent implements OnInit {
 
   imgSrc: string = '../../../assets/image'; 
 
-
-  constructor(private authSer: AuthServiceService ,
+  constructor(public authSer: AuthServiceService ,
     private userSer: UserService,
     private router: Router) { }
     
-    currentDate: any = Date.now();
-
+  currentDate: any = Date.now();
+  
+  dataLoginUser = {
+    name: '',
+    photo: '',
+  }
 
   ngOnInit() {
 
@@ -31,8 +34,10 @@ export class HeaderComponent implements OnInit {
 
     this.authSer.checkExternalFooter = false;
 
+    this.dataLoginUser.name = this.authSer.returnUserData().name;
+    this.dataLoginUser.photo = this.authSer.returnUserData().photo;
+
     if(this.authSer.checkExternalFooter) {
-      alert('external');
     } else {
       this.authSer.onGetFooterData('internal').subscribe(
         (responce) => {
@@ -49,16 +54,11 @@ export class HeaderComponent implements OnInit {
     // const m = moment().format('iYYYY/iM/iD');
     // console.log(m);
     this.currentDate = this.authSer.writeHijri(new Date(this.currentDate), 'ar', 'header');
-
-   
-    this.userSer.getUserDataProfile();
-    console.log();
-   
   }
 
   onGetProfile() {
     console.log('profile/'  + this.authSer.dataLoginUser['id']);
-    this.router.navigate(['profile/'  + this.authSer.dataLoginUser['id']]);
+    this.router.navigate(['auth/profile/'  + this.authSer.dataLoginUser['id']]);
   }
 
   //log out function

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

@@ -46,7 +46,7 @@
                   </div>
                 </div>
               
-                <div formArrayName="fields" *ngFor="let titleControl of addHospitalForm.get('fields').controls; let i = index" style="padding: 20px 0;">
+                <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">

+ 5 - 1
src/app/dashboard/hospitals/add-hospital/add-hospital.component.ts

@@ -22,7 +22,7 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private toastr: ToastrService, 
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private dashboardService: DashboardService,
     private location: Location) { }
 
@@ -202,6 +202,8 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
     this.fields.removeAt(index);
   }
 
+
+
   //submitted form
   onSubmitted() {
     this.checkSaveClick = true;
@@ -354,6 +356,8 @@ export class AddHospitalComponent implements OnInit, OnDestroy {
 
   };
 
+
+
   ngOnDestroy() {
     this.editSubscription.unsubscribe();
   }

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

@@ -16,7 +16,7 @@ export class HospitalListComponent implements OnInit {
 
   constructor(private route: ActivatedRoute, 
     private router: Router,
-    private authSer: AuthServiceService, 
+    public authSer: AuthServiceService, 
     private userSer: UserService,
     private spinner: NgxSpinnerService,
     private toastr: ToastrService,
@@ -272,6 +272,29 @@ export class HospitalListComponent implements OnInit {
       }
   };
 
+      //change page 
+    onPageChange(pagenationNumber) {
+      this.spinner.show();
+      this.currentPage = pagenationNumber;
+      this.dataList = [];
+      //console.log(pagenationNumber);
+      //console.log(this.pageId);
+      this.dashboardService.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+        (responce) => {
+          console.log(responce);
+          this.dataList = responce['footers'];
+          this.count = responce['count'];
+          this.perPagePagenation = responce['per_page'];
+          console.log(this.dataList);
+          this.spinner.hide();
+        },
+        (error) => {
+          console.log(error);
+          this.spinner.hide();
+        }
+      );
+    }
+
   //filtter function
   filtterFunc(data) {
     this.dataList = [];

+ 1 - 1
src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.html

@@ -51,7 +51,7 @@
           <hr>
           <div class="descriptionContainer">
             <div class="row">
-              <div class="col-12 col-md-6"  formArrayName="fields" *ngFor="let titleControl of addInternalForm.get('fields').controls; let i = index">
+              <div class="col-12 col-md-6"  formArrayName="fields" *ngFor="let titleControl of addInternalForm.get('fields')['controls']; let i = index">
                 <div class="form-group  arrayGroupForm-w" [formGroupName]="i">
                   <div class="row">
                       <div class="col-12 col-sm-12 col-md-12 col-lg-12" style="margin-bottom:30px;">

+ 1 - 1
src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.ts

@@ -23,7 +23,7 @@ export class AddInternalServicesComponent implements OnInit {
     private route: ActivatedRoute,
     private spinner: NgxSpinnerService,
     private toastr: ToastrService, 
-    private authSer: AuthServiceService,
+    public authSer: AuthServiceService,
     private http: HttpClient,
     private location: Location) { }
 

+ 0 - 0
src/app/dashboard/internal-services/internal-services.component.ts


Some files were not shown because too many files changed in this diff