17 Commits aebd810345 ... bc3e37606a

Author SHA1 Message Date
  Amr bc3e37606a s 5 years ago
  Hima f6cc81e530 fff 5 years ago
  Hima 0cf2eab4df fff 5 years ago
  Hima a8d48202d6 ffff 5 years ago
  Hima 607e35e4a1 dddd 5 years ago
  Hima c1e081ccff ff 5 years ago
  Hima 695612970d ff 5 years ago
  Hima c99a4501d2 ff 5 years ago
  Hima 19faa00b8d ff 5 years ago
  Hima 7605b29ac4 dd 5 years ago
  Hima 296b024cd6 new fix 5 years ago
  Hima cd1ef71b21 ddd 5 years ago
  Hima 6f8496c8c0 dd 5 years ago
  Hima b63aafde83 ggg 5 years ago
  Hima a1f4ca8af2 ff 5 years ago
  Hima e6175d7634 ddd 5 years ago
  Hima ad608f6c05 switched amr 5 years ago
92 changed files with 1698 additions and 1006 deletions
  1. 9 7
      src/app/External-Page/external-page-content/external-page-content.component.html
  2. 1 0
      src/app/External-Page/external-page-content/external-page-content.component.ts
  3. 44 44
      src/app/External-Page/external-page-header/external-page-header.component.css
  4. 11 6
      src/app/External-Page/external-page-header/external-page-header.component.html
  5. 8 2
      src/app/External-Page/external-page-header/external-page-header.component.ts
  6. 2 0
      src/app/External-Page/more-news/more-news.component.ts
  7. 22 19
      src/app/Internal-Page/news-pages/news-pages.component.ts
  8. 0 1
      src/app/app-routing.module.ts
  9. 0 3
      src/app/app.module.ts
  10. 1 0
      src/app/auth-services/login/login.component.ts
  11. 10 39
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.html
  12. 11 3
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-add/registration-trainee-movement-add.component.ts
  13. 5 2
      src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-list/registration-trainee-movement-list.component.html
  14. 6 3
      src/app/dashboard/absorpation-plan/absorpation-list/absorpation-list.component.html
  15. 0 1
      src/app/dashboard/achievements/add-achievement/add-achievement.component.html
  16. 5 5
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.html
  17. 2 2
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.ts
  18. 206 206
      src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.ts
  19. 26 16
      src/app/dashboard/create-report/add-new-report/add-new-report.component.html
  20. 39 21
      src/app/dashboard/create-report/add-new-report/add-new-report.component.ts
  21. 7 7
      src/app/dashboard/department/add-department/add-department.component.html
  22. 2 2
      src/app/dashboard/events/add-event/add-event.component.html
  23. 41 42
      src/app/dashboard/events/add-event/add-event.component.ts
  24. 1 2
      src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.html
  25. 11 3
      src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.ts
  26. 10 10
      src/app/dashboard/external-services/add-external/add-external.component.ts
  27. 5 0
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.css
  28. 25 0
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.html
  29. 5 0
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.ts
  30. 2 0
      src/app/dashboard/final-accreditation-of-trainees/final-accerditation-list/final-accerditation-list.component.html
  31. 5 1
      src/app/dashboard/final-trainee-report/final-trainee-report.component.html
  32. 51 1
      src/app/dashboard/final-trainee-report/final-trainee-report.component.ts
  33. 36 34
      src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.html
  34. 41 9
      src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.ts
  35. 26 26
      src/app/dashboard/follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component.html
  36. 5 1
      src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.css
  37. 38 26
      src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.html
  38. 10 2
      src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.ts
  39. 1 4
      src/app/dashboard/footer/add-footer/add-footer.component.html
  40. 11 4
      src/app/dashboard/footer/add-footer/add-footer.component.ts
  41. 6 5
      src/app/dashboard/hospitals/add-hospital/add-hospital.component.html
  42. 7 0
      src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.css
  43. 2 2
      src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.html
  44. 2 2
      src/app/dashboard/main-footer/footer.component.html
  45. 4 1
      src/app/dashboard/main-menu/add-menu/add-menu.component.css
  46. 1 2
      src/app/dashboard/main-menu/add-menu/add-menu.component.html
  47. 4 2
      src/app/dashboard/main-menu/add-menu/add-menu.component.ts
  48. 57 58
      src/app/dashboard/maintenance-communications/maintenance-communication-edit/maintenance-communication-edit.component.html
  49. 59 52
      src/app/dashboard/maintenance-communications/maintenance-communication-edit/maintenance-communication-edit.component.ts
  50. 7 4
      src/app/dashboard/maintenance-communications/maintenance-communications-list/maintenance-communications-list.component.html
  51. 9 1
      src/app/dashboard/maintenance-communications/maintenance-communications-list/maintenance-communications-list.component.ts
  52. 24 0
      src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.css
  53. 23 0
      src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.html
  54. 12 5
      src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.ts
  55. 11 22
      src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.html
  56. 159 126
      src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.ts
  57. 2 3
      src/app/dashboard/report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component.html
  58. 85 3
      src/app/dashboard/report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component.ts
  59. 10 10
      src/app/dashboard/report-list/report-list.component.html
  60. 7 5
      src/app/dashboard/report-list/report-list.component.ts
  61. 1 1
      src/app/dashboard/roles/add-roles/add-roles.component.html
  62. 1 0
      src/app/dashboard/roles/add-roles/add-roles.component.ts
  63. 16 17
      src/app/dashboard/roles/role-report/role-report.component.html
  64. 101 4
      src/app/dashboard/roles/role-report/role-report.component.ts
  65. 7 7
      src/app/dashboard/roles/role-report2/role-report2.component.html
  66. 97 2
      src/app/dashboard/roles/role-report2/role-report2.component.ts
  67. 1 33
      src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.html
  68. 1 1
      src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.ts
  69. 1 1
      src/app/dashboard/section-review-for-trainee/section-review-trainee-list/section-review-trainee-list.component.html
  70. 3 3
      src/app/dashboard/sections/add-section/add-section.component.html
  71. 3 3
      src/app/dashboard/sections/section-list/section-list.component.html
  72. 9 11
      src/app/dashboard/statistics/add-statistic/add-statistic.component.html
  73. 12 0
      src/app/dashboard/statistics/add-statistic/add-statistic.component.ts
  74. 1 0
      src/app/dashboard/supervisor/supervisor-add/supervisor-add.component.ts
  75. 7 2
      src/app/dashboard/supervisor/supervisor-list/supervisor-list.component.ts
  76. 19 0
      src/app/dashboard/tabs/add-tab/add-tab.component.css
  77. 10 1
      src/app/dashboard/tabs/add-tab/add-tab.component.html
  78. 20 14
      src/app/dashboard/tabs/add-tab/add-tab.component.ts
  79. 12 10
      src/app/dashboard/tabs/tab-list/tab-list.component.ts
  80. 4 3
      src/app/dashboard/users/form-user/form-user.component.html
  81. 3 4
      src/app/dashboard/users/form-user/form-user.component.ts
  82. 16 15
      src/app/dashboard/users/user-report/user-report.component.html
  83. 85 3
      src/app/dashboard/users/user-report/user-report.component.ts
  84. 2 6
      src/app/dashboard/users/users.component.html
  85. 1 1
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.html
  86. 1 1
      src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.html
  87. 4 2
      src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.ts
  88. 0 1
      src/app/dashboard/visiting-times/visiting-times-list/visiting-times-list.component.ts
  89. 4 0
      src/app/shared/auth-service.service.ts
  90. 2 2
      src/app/shared/dashboard.service.ts
  91. 6 1
      src/app/shared/user.service.ts
  92. 16 0
      src/styles.css

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

@@ -72,7 +72,7 @@
                           <div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
                           <div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
                             <div class="carousel-inner row w-100 mx-auto" role="listbox">
                             <div class="carousel-inner row w-100 mx-auto" role="listbox">
                                 <div class="carousel-item cslide" *ngFor="let image of firstAdvertisiment;let i = index" [ngClass]="i == 0 ? 'active' : '' ">
                                 <div class="carousel-item cslide" *ngFor="let image of firstAdvertisiment;let i = index" [ngClass]="i == 0 ? 'active' : '' ">
-                                    <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + image.photo}}" alt="slide 1">
+                                   <a target="_blank" href="{{image.link}}"> <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + image.photo}}" alt="slide 1"></a>
                                 </div>
                                 </div>
                             </div>
                             </div>
                             <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
                             <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
@@ -88,7 +88,7 @@
                           <div id="carouselExample2" class="carousel slide" data-ride="carousel" data-interval="9000">
                           <div id="carouselExample2" class="carousel slide" data-ride="carousel" data-interval="9000">
                             <div class="carousel-inner row w-100 mx-auto" role="listbox">
                             <div class="carousel-inner row w-100 mx-auto" role="listbox">
                               <div class="carousel-item cslide" *ngFor="let slide2 of secondAdvertisiment;let i = index" [ngClass]=" i == 0 ? 'active' : '' ">
                               <div class="carousel-item cslide" *ngFor="let slide2 of secondAdvertisiment;let i = index" [ngClass]=" i == 0 ? 'active' : '' ">
-                                  <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + slide2.photo}}" alt="slide 1">
+                                <a target="_blank" href="{{slide2.link}}"><img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + slide2.photo}}" alt="slide 1"></a>
                               </div>
                               </div>
                             </div>
                             </div>
                             <a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">
                             <a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">
@@ -162,7 +162,7 @@
                           <div class="col-12 col-sm-12 col-md-6">
                           <div class="col-12 col-sm-12 col-md-6">
                             <div class="records">
                             <div class="records">
                               <span class="rightArrow-w" (click)="prevMonth()"><i class="fas fa-angle-right"></i></span>
                               <span class="rightArrow-w" (click)="prevMonth()"><i class="fas fa-angle-right"></i></span>
-                              <h1> إحصائيات شهر  {{recordsOfMonth.statistics_month}}</h1>
+                              <h1> إحصائيات شهر  {{recordsOfMonth.statistics_month}} لعام {{recordsOfMonth.year}}</h1>
                               <span class="leftArrow-w" (click)="nextMonth()"><i class="fas fa-angle-left"></i></span>
                               <span class="leftArrow-w" (click)="nextMonth()"><i class="fas fa-angle-left"></i></span>
                               <div class="body">
                               <div class="body">
                                 <div class="spinnerContainer-w" *ngIf="showSmallSpinner">
                                 <div class="spinnerContainer-w" *ngIf="showSmallSpinner">
@@ -188,7 +188,9 @@
                                   <div class="carousel-inner">
                                   <div class="carousel-inner">
                                       <div class="carousel-item" *ngFor="let achievement of achievements; let i = index" [ngClass]="i == 0 ? 'active' : ''">
                                       <div class="carousel-item" *ngFor="let achievement of achievements; let i = index" [ngClass]="i == 0 ? 'active' : ''">
                                           <div class="carousel-caption">
                                           <div class="carousel-caption">
-                                              <p [innerHtml]="achievement.description"></p>
+                                            <h3>{{achievement.name}}</h3>
+                                            <p>{{achievement.achievement_time}}</p>
+                                            <p [innerHtml]="achievement.description"></p>
                                           </div>   
                                           </div>   
                                       </div>
                                       </div>
                                   </div>
                                   </div>
@@ -205,7 +207,7 @@
   
   
               <div class="col-12">
               <div class="col-12">
                 <div class="maps">
                 <div class="maps">
-                  <h1>إتصل بنا</h1>
+                  <h1>لتصل إلينا</h1>
                   <agm-map [latitude]="lat" [longitude]="lng">
                   <agm-map [latitude]="lat" [longitude]="lng">
                       <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
                       <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
                   </agm-map>
                   </agm-map>
@@ -285,7 +287,7 @@
                       <div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
                       <div id="carouselExample" class="carousel slide" data-ride="carousel" data-interval="9000">
                         <div class="carousel-inner row w-100 mx-auto" role="listbox">
                         <div class="carousel-inner row w-100 mx-auto" role="listbox">
                             <div class="carousel-item col-md-4" *ngFor="let image of firstAdvertisiment;let i = index" [ngClass]="i == 0 ? 'active' : '' ">
                             <div class="carousel-item col-md-4" *ngFor="let image of firstAdvertisiment;let i = index" [ngClass]="i == 0 ? 'active' : '' ">
-                                <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + image.photo}}" alt="slide 1">
+                                <a target="_blank" href="{{image.link}}"><img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + image.photo}}" alt="slide 1"></a>
                             </div>
                             </div>
                         </div>
                         </div>
                         <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
                         <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
@@ -301,7 +303,7 @@
                       <div id="carouselExample2" class="carousel slide" data-ride="carousel" data-interval="9000">
                       <div id="carouselExample2" class="carousel slide" data-ride="carousel" data-interval="9000">
                         <div class="carousel-inner row w-100 mx-auto" role="listbox">
                         <div class="carousel-inner row w-100 mx-auto" role="listbox">
                           <div class="carousel-item col-md-4" *ngFor="let slide2 of secondAdvertisiment;let i = index" [ngClass]=" i == 0 ? 'active' : '' ">
                           <div class="carousel-item col-md-4" *ngFor="let slide2 of secondAdvertisiment;let i = index" [ngClass]=" i == 0 ? 'active' : '' ">
-                              <img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + slide2.photo}}" alt="slide 1">
+                             <a target="_blank" href="{{slide2.link}}"><img class="img-fluid mx-auto d-block" src="{{authSer.pathImg + slide2.photo}}" alt="slide 1"></a> 
                           </div>
                           </div>
                         </div>
                         </div>
                         <a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">
                         <a class="carousel-control-prev" href="#carouselExample2" role="button" data-slide="prev">

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

@@ -91,6 +91,7 @@ export class ExternalPageContentComponent implements OnInit, OnDestroy {
         this.events = responce['data'].events;
         this.events = responce['data'].events;
         this.services = responce['data'].external_services;
         this.services = responce['data'].external_services;
         this.firstAdvertisiment = responce['data'].first_advertising_services_row;
         this.firstAdvertisiment = responce['data'].first_advertising_services_row;
+        console.log('first adverrrr', this.firstAdvertisiment);
         this.secondAdvertisiment = responce['data'].second_advertising_services_row;
         this.secondAdvertisiment = responce['data'].second_advertising_services_row;
         this.hypnosisSections = responce['data'].visiting_times_hs;
         this.hypnosisSections = responce['data'].visiting_times_hs;
         this.intensiveCare = responce['data'].visiting_times_ic;
         this.intensiveCare = responce['data'].visiting_times_ic;

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

@@ -11,14 +11,9 @@ input,button {
     border: 1px solid #cec8c8;
     border: 1px solid #cec8c8;
 }
 }
 
 
-.pagesHeader-w .dropdown-menu {
-    top: 30px;
-    right: 0 !important;
-    border-radius: 2px !important;
-    background-color: #ffffffe0;
-    box-shadow: 0px 3px 9px #00000030;
-    border: 1px solid #cec8c8;
-}
+
+
+
 
 
 .pagesHeader-w .dropdown-item {
 .pagesHeader-w .dropdown-item {
     font-size: 14px !important;
     font-size: 14px !important;
@@ -374,30 +369,17 @@ input,button {
     text-decoration: none;
     text-decoration: none;
 }
 }
 
 
-.ar,.en {
-    /* margin: 0 10px;
-    padding: 5px;
-    color: #03887f;
-    font-weight: bold;
-    width: 30px;
-    height: 30px;
-    border-radius: 5px;
-    background-color: #FAFAFA;
-    cursor: pointer;
-    transition: all 0.5s; */
+.pagesHeader-w .dropdown-menu {
+    top: 50px !important;
+    right: 0 !important;
+    border-radius: 2px !important;
+    background-color: #fff;
+    box-shadow: 0px 3px 9px #00000030;
+    border: 1px solid #cec8c8;
+}
 
 
-    /* margin: 2px 10px;
-    padding: 5px;
-    padding: 2px 5px;
-    color: #03887f;
-    font-weight: bold;
-    width: 30px;
-    border: 1px solid #bda380;
-    height: 30px;
-    background-color: #FAFAFA;
-    cursor: pointer;
-    transition: all 0.5s;
-    display: inline-block;  */
+.ar,.en {
+    
 
 
     margin: 4px 10px;
     margin: 4px 10px;
     padding: 5px;
     padding: 5px;
@@ -544,20 +526,12 @@ input,button {
     transition: all 0.5s;
     transition: all 0.5s;
   }
   }
 
 
-  /* .menuHeaderEn-w li:hover {
-    background-color: #02635c;
-    color: #fff !important;
-  } */
+
 
 
   .menuHeaderEn-w li:hover a {
   .menuHeaderEn-w li:hover a {
       color: #00a99d !important;
       color: #00a99d !important;
   }
   }
 
 
-  /* .menuHeader-w li:hover {
-    background-color: #02635c;
-    color: #fff !important;
-  } */
-
   .menuHeader-w li:hover a {
   .menuHeader-w li:hover a {
       color: #00a99d !important;
       color: #00a99d !important;
   }
   }
@@ -741,9 +715,29 @@ a.dropdown-item.ng-star-inserted {
     width: 100% !important;
     width: 100% !important;
 }
 }
 
 
-.pagesHeader-w[_ngcontent-c5] .dropdown-menu[_ngcontent-c5] {
-    top: 30px !important;
-  
+.pagesHeader-w .dropdown-menu {
+    top: 50px !important;
+    background: #fff !important;
+}
+
+.pagesHeader-w .dropdown-menu ul li {
+    display: block !important; 
+    direction: rtl;
+}
+
+.pagesHeader-w .dropdown-menu ul li .dropDownItem-w {
+    display: block !important; 
+    float: inherit;
+    clear: inherit;
+    padding: 5px !important;
+    width: 100% !important;
+    text-align: right !important;
+    transition: all 0.5s;
+    text-decoration: none !important;
+}
+
+.pagesHeader-w .dropdown-menu ul li .dropDownItem-w:hover{
+    background: #f5f5f5 !important;
 }
 }
 
 
 @media(min-width: 992px) and (max-width: 1199px) {
 @media(min-width: 992px) and (max-width: 1199px) {
@@ -776,4 +770,10 @@ a.dropdown-item.ng-star-inserted {
 
 
   .btn:focus {
   .btn:focus {
       box-shadow: none;
       box-shadow: none;
-  }
+  }
+
+  .exernal-menu {
+      top: 50px !important;
+  }
+
+ 

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

@@ -89,8 +89,6 @@
             <div class="row">
             <div class="row">
                 <div class="navbar" style="padding:0">
                 <div class="navbar" style="padding:0">
                     <nav class="navbar navbar-expand-lg navbar-light bg-light">
                     <nav class="navbar navbar-expand-lg navbar-light bg-light">
-                        
-                        <!-- <a class="navbar-brand" href="#">Navbar</a> -->
                         <button class="navbar-toggler buttonMobileHeader-w" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                         <button class="navbar-toggler buttonMobileHeader-w" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                             <span class="navbar-toggler-icon"></span>
                             <span class="navbar-toggler-icon"></span>
                         </button>
                         </button>
@@ -107,13 +105,16 @@
                                     <a class="nav-link" [ngClass]="{ 'dropdown-toggle' : menu['childs'].length > 0 }" href="{{menu.link}}" id="navbarDropdown" role="button" [attr.data-toggle]=" menu['childs'].length > 0 ? 'dropdown' : '' " aria-haspopup="true" aria-expanded="false">
                                     <a class="nav-link" [ngClass]="{ 'dropdown-toggle' : menu['childs'].length > 0 }" href="{{menu.link}}" id="navbarDropdown" role="button" [attr.data-toggle]=" menu['childs'].length > 0 ? 'dropdown' : '' " aria-haspopup="true" aria-expanded="false">
                                         {{menu.name}} <img src="{{authSer.pathImg + menu.photo}}" />
                                         {{menu.name}} <img src="{{authSer.pathImg + menu.photo}}" />
                                     </a>
                                     </a>
-                                    <div class="dropdown-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
-                                        <a class="dropdown-item" href="{{child.link}}" *ngFor="let child of menu['childs']">{{child.name}}</a>
+                                    <div class="dropdown-menu exernal-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
+                                        <ul class="list-unstyled">
+                                            <li *ngFor="let child of menu['childs']">
+                                                <a class="dropDownItem-w" href="{{child.link}}">{{child.name}}</a>
+                                            </li>
+                                        </ul>
                                     </div>
                                     </div>
                                 </li>
                                 </li>
                             </ul>
                             </ul>
                         </div>
                         </div>
-
                     </nav>
                     </nav>
                 </div>
                 </div>
             </div>
             </div>
@@ -231,7 +232,11 @@
                                         {{menu.name_en}} <img src="{{authSer.pathImg + menu.photo}}" /> 
                                         {{menu.name_en}} <img src="{{authSer.pathImg + menu.photo}}" /> 
                                     </a>
                                     </a>
                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
                                     <div class="dropdown-menu" aria-labelledby="navbarDropdown" *ngIf="menu['childs'].length > 0">
-                                        <a class="dropdown-item" href="{{child.link}}" *ngFor="let child of menu['childs']">{{child.name_en}}</a>
+                                        <ul class="list-unstyled">
+                                            <li *ngFor="let child of menu['childs']">
+                                                <a class="dropdown-item" href="{{child.link}}">{{child.name_en}}</a>
+                                            </li>
+                                        </ul>
                                     </div>
                                     </div>
                                 </li>
                                 </li>
                             </ul>
                             </ul>

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

@@ -14,18 +14,24 @@ export class ExternalPageHeaderComponent implements OnInit {
     private externalService: ExternalPageService,
     private externalService: ExternalPageService,
     private router: Router) { }
     private router: Router) { }
     
     
-    currentDate: any = Date.now();//ararbic date 
+    currentDate: any = Date.now()//ararbic date 
+   
     currentEnglishDate: any = Date.now(); //english date
     currentEnglishDate: any = Date.now(); //english date
 
 
+    372
+
+
 
 
     dataLoginUser:any;
     dataLoginUser:any;
 
 
   ngOnInit() {
   ngOnInit() {
 
 
-
     this.authSer.arabicTemplate = true;
     this.authSer.arabicTemplate = true;
     this.authSer.showDashboardHeader = false;
     this.authSer.showDashboardHeader = false;
     this.authSer.setLocalLang(); //set languages icons
     this.authSer.setLocalLang(); //set languages icons
+
+    console.log('current data ', this.currentDate);
+
     this.currentDate = this.authSer.writeHijri(new Date(this.currentDate), 'ar', 'header');
     this.currentDate = this.authSer.writeHijri(new Date(this.currentDate), 'ar', 'header');
     
     
     if(!this.authSer.isAuthenticated()) {
     if(!this.authSer.isAuthenticated()) {

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

@@ -68,6 +68,7 @@ export class MoreNewsComponent implements OnInit {
    // /change page 
    // /change page 
    onPageChange(pagenationNumber) {
    onPageChange(pagenationNumber) {
     this.spinner.show();
     this.spinner.show();
+    this.currentPage = pagenationNumber;
     this.http.get(this.authSer.pathApi + '/get_reports_list/1/' + this.currentPage + '/' + this.perPagePagenation + '/internal').subscribe(
     this.http.get(this.authSer.pathApi + '/get_reports_list/1/' + this.currentPage + '/' + this.perPagePagenation + '/internal').subscribe(
       (responce) => {
       (responce) => {
         console.log(responce);
         console.log(responce);
@@ -79,6 +80,7 @@ export class MoreNewsComponent implements OnInit {
             this.dataPagesNews[i].description_en = this.dataPagesNews[i].description_en.substring(0,200) + '......';
             this.dataPagesNews[i].description_en = this.dataPagesNews[i].description_en.substring(0,200) + '......';
           }
           }
         }
         }
+        this.spinner.hide();
       },
       },
       (error) => {
       (error) => {
         console.log(error);      
         console.log(error);      

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

@@ -59,26 +59,29 @@ export class NewsPagesComponent implements OnInit {
 
 
   }
   }
 
 
-      // /change page 
-      onPageChange(pagenationNumber) {
-        this.spinner.show();
-        this.http.get(this.authSer.pathApi + '/reports_list_gate/' + this.currentPage + '/' + this.perPagePagenation + '/internal').subscribe(
-          (responce) => {
-            console.log(responce);
-            this.dataPagesNews = responce['reports'];
-            this.count = responce['count'];
-            for(let i = 0 ; i < this.dataPagesNews.length ; i++) {
-              if(this.dataPagesNews[i].description.length > 60) {
-                this.dataPagesNews[i].description = this.dataPagesNews[i].description.substring(0,200) + '........' ;
-                this.dataPagesNews[i].description_en = this.dataPagesNews[i].description_en.substring(0,200) + '......';
-              }
-            }
-          },
-          (error) => {
-            console.log(error);      
+  // /change page 
+  onPageChange(pagenationNumber) {
+    this.spinner.show();
+    console.log(pagenationNumber);
+    this.currentPage = pagenationNumber;
+    this.http.get(this.authSer.pathApi + '/reports_list_gate/' + this.currentPage + '/' + this.perPagePagenation + '/internal').subscribe(
+      (responce) => {
+        console.log(responce);
+        this.dataPagesNews = responce['reports'];
+        this.count = responce['count'];
+        for(let i = 0 ; i < this.dataPagesNews.length ; i++) {
+          if(this.dataPagesNews[i].description.length > 60) {
+            this.dataPagesNews[i].description = this.dataPagesNews[i].description.substring(0,200) + '........' ;
+            this.dataPagesNews[i].description_en = this.dataPagesNews[i].description_en.substring(0,200) + '......';
           }
           }
-        )
-      };
+        }
+        this.spinner.hide();
+      },
+      (error) => {
+        console.log(error);      
+      }
+    )
+  };
 
 
   onGetNew(id) {
   onGetNew(id) {
     this.router.navigate(['InternalPage/news/' + id])
     this.router.navigate(['InternalPage/news/' + id])

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

@@ -4,7 +4,6 @@ import { CanDeactivateGuard } from './shared/can-deactivate-guards.service';
 import { NgModule } from '@angular/core';
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
 import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
 import { LoginComponent } from './auth-services/login/login.component';
 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 { PageNotFoundComponent } from './page-not-found/page-not-found.component';
 import { AuthGuardService as AuthGuard } from './shared/auth-guard.service';
 import { AuthGuardService as AuthGuard } from './shared/auth-guard.service';
 import { ServicesComponent } from './servicesItems/services.component';
 import { ServicesComponent } from './servicesItems/services.component';

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

@@ -48,7 +48,6 @@ import { JwSocialButtonsModule } from 'jw-angular-social-buttons';
 
 
 import { Ng2CarouselamosModule } from 'ng2-carouselamos';
 import { Ng2CarouselamosModule } from 'ng2-carouselamos';
 import { NumberDerictiveDirective } from './number-derictive.directive';
 import { NumberDerictiveDirective } from './number-derictive.directive';
-import { OnlyNumberDirective } from './shared/only-number.directive';
 import {SharedModule} from './shared/shared.module';
 import {SharedModule} from './shared/shared.module';
 import { AddRequestComponent } from './trainning-service/add-request/add-request.component';
 import { AddRequestComponent } from './trainning-service/add-request/add-request.component';
 import { AllRequestsComponent } from './trainning-service/all-requests/all-requests.component';
 import { AllRequestsComponent } from './trainning-service/all-requests/all-requests.component';
@@ -61,8 +60,6 @@ import { AuthServicesModule } from './auth-services/auth-services.module';
     AppComponent,
     AppComponent,
     HeaderComponent,
     HeaderComponent,
     FooterComponent,
     FooterComponent,
-    // LoginComponent,
-    // RegesterComponent,
     ServicesComponent,
     ServicesComponent,
     PageNotFoundComponent,
     PageNotFoundComponent,
     NumberDerictiveDirective,
     NumberDerictiveDirective,

+ 1 - 0
src/app/auth-services/login/login.component.ts

@@ -76,6 +76,7 @@ export class LoginComponent implements OnInit {
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
+        this.saveDisabled = false;
         this.toastr.error( 'حدث خطأ' ,' تأكد من رقم الهويه او كلمه المرور ');
         this.toastr.error( 'حدث خطأ' ,' تأكد من رقم الهويه او كلمه المرور ');
       }
       }
     );
     );

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

@@ -35,8 +35,6 @@
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                
-
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="identity" style="float:right"> الهويه <span class="spanReqired-w">*</span></label>
                       <label for="identity" style="float:right"> الهويه <span class="spanReqired-w">*</span></label>
@@ -57,11 +55,11 @@
                   </div>
                   </div>
 
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <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" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
-                      </div>
+                    <div class="form-group">
+                      <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
+                      <input type="date" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
                     </div>
                     </div>
+                  </div>
 
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
@@ -109,14 +107,17 @@
                 <div class="wrapper">
                 <div class="wrapper">
                   
                   
                   <div class="col-12">
                   <div class="col-12">
-                    <h2 style="margin: 10px 0; font-size:19px;">حاله الطلب : <span>
+                    <h2 style="margin: 10px 0; font-size:19px;">حاله المتدرب : {{proper_department_status == 'stopped' ? 'إيقاف' : 
+                        proper_department_status == 'ended' ? 'إنهاء' : 
+                        proper_department_status == 'in_training' ? 'إستئناف التدريب' : ''}}</h2>
+                    <!-- <h2 style="margin: 10px 0; font-size:19px;">حاله الطلب : <span>
                       {{formData.status == 'pending' ? 'تحت الإجراء' 
                       {{formData.status == 'pending' ? 'تحت الإجراء' 
                     : formData.status == 'accepted' ? 'مقبول' 
                     : formData.status == 'accepted' ? 'مقبول' 
                     : formData.status == 'replayed_opinion' ? 'رأي القسم'
                     : formData.status == 'replayed_opinion' ? 'رأي القسم'
                     : formData.status == 'refused' ? 'مرفوض' 
                     : formData.status == 'refused' ? 'مرفوض' 
                     : formData.status == 'canceled' ? 'ملغي'
                     : formData.status == 'canceled' ? 'ملغي'
                     : formData.status == 'asked_for_opinion' ? 'طلب رأي القسم' : 'لايوجد '}}
                     : formData.status == 'asked_for_opinion' ? 'طلب رأي القسم' : 'لايوجد '}}
-                    </span></h2>
+                    </span></h2> -->
                   </div>
                   </div>
 
 
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
@@ -199,35 +200,6 @@
                       <input type="text" id="field" placeholder="الجهه التابع لها المتدرب" class="form-control" name="organization_affiliated_with" ngModel [(ngModel)]="formData.organization_affiliated_with" [disabled]="disabledInput" required/>
                       <input type="text" id="field" placeholder="الجهه التابع لها المتدرب" class="form-control" name="organization_affiliated_with" ngModel [(ngModel)]="formData.organization_affiliated_with" [disabled]="disabledInput" required/>
                     </div>
                     </div>
                   </div>
                   </div>
-
-                <!-- <h2 class="departmentHeading-w">أختر الأقسام <span>(قم بإختيار قسم كحد أدني)</span></h2> -->
-                  <!-- <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department1" style="float:right;">القسم الأول</label>
-                      <select class="form-control selectStyle-w" id="department1" name="department1" (input)="changeDepartment($event , 1)" [(ngModel)]="formData.department1" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2001">حذف</option>
-                      </select>
-                    </div>
-                  </div>
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department2" style="float:right;">القسم الثاني</label>
-                      <select class="form-control selectStyle-w" id="department2" name="department2" (input)="changeDepartment($event , 2)" [(ngModel)]="formData.department2" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2002">حذف</option>
-                      </select>
-                    </div>
-                  </div>
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department3" style="float:right;">القسم الثالث</label>
-                      <select class="form-control selectStyle-w" id="department3" name="department3" (input)="changeDepartment($event , 3)" [(ngModel)]="formData.department3" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2003">حذف</option>
-                      </select>
-                    </div>
-                  </div> -->
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
@@ -310,8 +282,7 @@
           </div>
           </div>
         </form>
         </form>
       </div>
       </div>
-  
-  
+
     </div>
     </div>
   </div>
   </div>
   
   

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

@@ -87,6 +87,7 @@ export class RegistrationTraineeMovementAddComponent implements OnInit {
   identity_id: number = 0; //to determine te number of identity to validation
   identity_id: number = 0; //to determine te number of identity to validation
   identity_type: number;
   identity_type: number;
   typeMode:boolean = false;
   typeMode:boolean = false;
+  proper_department_status: string = '';
 
 
   files = [{
   files = [{
     title : '',
     title : '',
@@ -218,6 +219,7 @@ export class RegistrationTraineeMovementAddComponent implements OnInit {
           for(let i = 0; i < responce['data']['request'].departments.length; i++) {
           for(let i = 0; i < responce['data']['request'].departments.length; i++) {
             if(responce['data']['request'].departments[i].is_confirmed == 1) {
             if(responce['data']['request'].departments[i].is_confirmed == 1) {
               this.actionForm.department_id = responce['data']['request'].departments[i].department_id;
               this.actionForm.department_id = responce['data']['request'].departments[i].department_id;
+              this.proper_department_status = responce['data']['request'].departments[i].trainee_status;
             }
             }
           }
           }
 
 
@@ -251,19 +253,22 @@ export class RegistrationTraineeMovementAddComponent implements OnInit {
   traineeStatus(status: string) {
   traineeStatus(status: string) {
     console.log(status);
     console.log(status);
     if(status == 'ended') {
     if(status == 'ended') {
-      this.toastr.warning('تم الانهاء للمتدرب ، قم بتسجيل تققيم القسم للمتدرب');
+      this.toastr.warning('تم الانهاء للمتدرب ، قم بتسجيل تققيم القسم للمتدرب، ثم إضغط حفظ لإتمام العمليه بنجاح');
       this.actionForm.trainee_status = status;
       this.actionForm.trainee_status = status;
+      this.proper_department_status = 'ended';
       this.endedShow = true;
       this.endedShow = true;
       this.stoppedShow = false;
       this.stoppedShow = false;
     } else if (status == 'stopped') {
     } else if (status == 'stopped') {
-      this.toastr.error('تم الإيقاف للمتدرب');
+      this.toastr.error('تم الإيقاف للمتدرب ، من فضلك أدخل السبب ثم أضغط حفظ لإتمام العمليه بنجاح');
       this.actionForm.trainee_status = status;
       this.actionForm.trainee_status = status;
       this.stoppedShow = true;
       this.stoppedShow = true;
+      this.proper_department_status = 'stopped';
     } else if(status == 'in_training') {
     } else if(status == 'in_training') {
-      this.toastr.success('تم الإستئناف للمتدرب');
+      this.toastr.success('تم الإستئناف للمتدرب ، ثوم إضغط حفظ لإتمام العمليه بنجاح ');
       this.actionForm.trainee_status = status;
       this.actionForm.trainee_status = status;
       this.stoppedShow = false;
       this.stoppedShow = false;
       this.endedShow = false;
       this.endedShow = false;
+      this.proper_department_status = 'in_training';
     }
     }
   }
   }
 
 
@@ -376,6 +381,9 @@ plusImage() {
     if(this.actionForm.trainee_status == 'ended' && this.actionForm.trainee_evaluation == ''){
     if(this.actionForm.trainee_status == 'ended' && this.actionForm.trainee_evaluation == ''){
       this.toastr.warning('قم بتسجيل تقييم القسم للمتدرب !');
       this.toastr.warning('قم بتسجيل تقييم القسم للمتدرب !');
       this.checkSaveClick = false;
       this.checkSaveClick = false;
+    } else if(this.actionForm.trainee_status_description == ''){
+      this.toastr.warning('أدخل سبب الإيقاف !');
+      this.checkSaveClick = false;
     } else {
     } else {
       this.http.post(this.authSer.pathApi + '/trace_trainee_movement', this.actionForm).subscribe(
       this.http.post(this.authSer.pathApi + '/trace_trainee_movement', this.actionForm).subscribe(
         (responce) => {
         (responce) => {

+ 5 - 2
src/app/dashboard/Registration-trainee-movement/registration-trainee-movement-list/registration-trainee-movement-list.component.html

@@ -59,12 +59,15 @@
                 <td> {{data.specialization_name}}</td>
                 <td> {{data.specialization_name}}</td>
                 <td>{{data.specific_specialization}}</td>
                 <td>{{data.specific_specialization}}</td>
                 <td> 
                 <td> 
-                  {{data.status == 'pending' ? 'تحت الإجراء' 
+                  <!-- {{data.status == 'pending' ? 'تحت الإجراء' 
                   : data.status == 'accepted' ? 'مقبول' 
                   : data.status == 'accepted' ? 'مقبول' 
                   : data.status == 'replayed_opinion' ? 'رأي القسم'
                   : data.status == 'replayed_opinion' ? 'رأي القسم'
                   : data.status == 'refused' ? 'مرفوض' 
                   : data.status == 'refused' ? 'مرفوض' 
                   : data.status == 'canceled' ? 'ملغي'
                   : data.status == 'canceled' ? 'ملغي'
-                  : data.status == 'asked_for_opinion' ? 'طلب رأي القسم' : 'لايوجد '}}
+                  : data.status == 'asked_for_opinion' ? 'طلب رأي القسم' : 'لايوجد '}} -->
+                  {{data.trainee_status == 'stopped' ? 'إيقاف' : 
+                  data.trainee_status == 'ended' ? 'إنهاء' : 
+                  data.trainee_status == 'in_training' ? 'إستئناف التدريب' : ''}}
                 </td>
                 </td>
                 <td>{{data.university}}</td>
                 <td>{{data.university}}</td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>

+ 6 - 3
src/app/dashboard/absorpation-plan/absorpation-list/absorpation-list.component.html

@@ -49,11 +49,12 @@
                 <th>
                 <th>
                   <div class="custom-control custom-checkbox">
                   <div class="custom-control custom-checkbox">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
-                    <!-- <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor: pointer;"></label> -->
                   </div>
                   </div>
                 </th>
                 </th>
-                <th> إسم القسم</th>
-                <th>تاريخ الإبتداء</th>
+                <th> إسم الخطه</th>
+                <th>إسم القسم</th>
+                <th>تاريخ البدايه</th>
+                <th>تاريخ النهايه</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
               </tr>
               </tr>
             </thead>
             </thead>
@@ -65,7 +66,9 @@
                   </div>
                   </div>
                 </td>
                 </td>
                 <td>{{data.name}}</td>
                 <td>{{data.name}}</td>
+                <td>{{data.department_name ? data.department_name : '-'}}</td>
                 <td> {{data.start_date}}</td>
                 <td> {{data.start_date}}</td>
+                <td> {{data.end_date}}</td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
               </tr>
               </tr>
             </tbody>
             </tbody>

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

@@ -56,7 +56,6 @@
                   <option value="2">2</option>
                   <option value="2">2</option>
                   <option value="3">3</option>
                   <option value="3">3</option>
                   <option value="4">4</option>
                   <option value="4">4</option>
-                  <option value="10000">المزيد</option>
                 </select>
                 </select>
             </div>
             </div>
           </div>
           </div>

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

@@ -49,21 +49,21 @@
 
 
               <div class="col-12 col-sm-12 col-md-4">
               <div class="col-12 col-sm-12 col-md-4">
                 <label for="type" style="float: right; margin-right: 5px">نوع الخدمة <span class="spanReqired-w">*</span></label>
                 <label for="type" style="float: right; margin-right: 5px">نوع الخدمة <span class="spanReqired-w">*</span></label>
-                <select class="form-control" name="type" ngModel [ngModel]="advertising.type" id="type" required>
+                <select class="form-control" name="type" ngModel [(ngModel)]="advertising.type" id="type" required>
                   <option value="link">رابط</option>
                   <option value="link">رابط</option>
                   <option value="content">محتوي </option>
                   <option value="content">محتوي </option>
                 </select>
                 </select>
               </div>
               </div>
 
 
 
 
-              <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+              <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="advertising.type == 'link'">
                 <div class="form-group">
                 <div class="form-group">
                   <label for="link" style="float: right; margin-right: 5px"> الرابط <span class="spanReqired-w">*</span></label>
                   <label for="link" style="float: right; margin-right: 5px"> الرابط <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="link" name="link" ngModel [ngModel]="advertising.link" #name="ngModel" />
                   <input type="text" class="form-control" id="link" name="link" ngModel [ngModel]="advertising.link" #name="ngModel" />
                 </div>
                 </div>
               </div>
               </div>
 
 
-              <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0">
+              <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="advertising.type == 'content'">
                 <div class="form-group">
                 <div class="form-group">
                   <label for="description" style="float: right;margin-right: 5px"> المحتوي باللغه العربيه <span class="spanReqired-w">*</span></label>
                   <label for="description" style="float: right;margin-right: 5px"> المحتوي باللغه العربيه <span class="spanReqired-w">*</span></label>
                   <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
                   <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
@@ -72,7 +72,7 @@
                 </div>
                 </div>
               </div>
               </div>
 
 
-              <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0">
+              <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="advertising.type == 'content'">
                 <div class="form-group">
                 <div class="form-group">
                   <label for="description" style="float: right;margin-right: 5px">المحتوي باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
                   <label for="description" style="float: right;margin-right: 5px">المحتوي باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
                   <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
                   <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
@@ -90,7 +90,7 @@
               </div>
               </div>
 
 
               <div class="col-6">
               <div class="col-6">
-                <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</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>
                 <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
               </div>
               </div>
 
 

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

@@ -57,7 +57,7 @@ export class AddAdvertisingServiceComponent implements OnInit {
       this.route.params.subscribe(
       this.route.params.subscribe(
         (params: Params) => {
         (params: Params) => {
           console.log(params)
           console.log(params)
-          if(params['typeAdvertising'] == 'add'){
+          if(!params['typeAdvertising']){
             this.typeMode = false;
             this.typeMode = false;
             this.typeLink = 'إنشاء خدمة إعلانية';
             this.typeLink = 'إنشاء خدمة إعلانية';
           } else if(params['typeAdvertising'] == 'edit') {
           } else if(params['typeAdvertising'] == 'edit') {
@@ -82,7 +82,7 @@ export class AddAdvertisingServiceComponent implements OnInit {
             );
             );
 
 
           } else {
           } else {
-            this.toastr.warning('Catch Error Go To Home !');
+            console.log('ddd');
           }
           }
         }
         }
       );
       );

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

@@ -16,164 +16,208 @@ import { ToastrService } from 'ngx-toastr';
 })
 })
 export class AdvertisingServicesListComponent implements OnInit {
 export class AdvertisingServicesListComponent implements OnInit {
 
 
-    constructor(private http: HttpClient,
-      private route: ActivatedRoute,
-      private router: Router,
-      private modal: Modal,
-      private userSer: UserService,
-      private spinner: NgxSpinnerService,
-      public authSer: AuthServiceService,
-      private toastr: ToastrService,
-      private dashboardSer: DashboardService) { }
+  constructor(private http: HttpClient,
+    private route: ActivatedRoute,
+    private router: Router,
+    private modal: Modal,
+    private userSer: UserService,
+    private spinner: NgxSpinnerService,
+    public authSer: AuthServiceService,
+    private toastr: ToastrService,
+    private dashboardSer: DashboardService) { }
 
 
-      advertisingList = [];
-      pages= [];
-      pageId: number;
-      advertisingListIds = [];
-      count: number;
-      perPagePagenation: number;
-      currentPage:number = 1;
-      filtterStatus = '';
-      selectedAll: any;
-      userLoginId:number;
-      serviceId:number;
-      dataTableNumber: number = 5;
+    advertisingList = [];
+    pages= [];
+    pageId: number;
+    advertisingListIds = [];
+    count: number;
+    perPagePagenation: number;
+    currentPage:number = 1;
+    filtterStatus = '';
+    selectedAll: any;
+    userLoginId:number;
+    serviceId:number;
+    dataTableNumber: number = 5;
 
 
-      ngOnInit() {
-        //init values of permisions
-        this.authSer.showAddBtn = false;
-        this.authSer.showDeleteBtn = false;
-        this.authSer.showEditBtn = false;
-        this.authSer.showPermissionsBtn = false;
-        //show / hide notification search in header
-        this.authSer.notificationLogin = true;
-        this.authSer.showSearchHeader = false;
-        this.authSer.showHeaderLogin = false;
-        this.authSer.showHeaderDashBoard = true;
-        this.authSer.showDashboardHeader = true;
-        this.authSer.internalHeader = false;
-        //to show / hide permissions
+    ngOnInit() {
+      //init values of permisions
+      this.authSer.showAddBtn = false;
+      this.authSer.showDeleteBtn = false;
+      this.authSer.showEditBtn = false;
+      this.authSer.showPermissionsBtn = false;
+      //show / hide notification search in header
+      this.authSer.notificationLogin = true;
+      this.authSer.showSearchHeader = false;
+      this.authSer.showHeaderLogin = false;
+      this.authSer.showHeaderDashBoard = true;
+      this.authSer.showDashboardHeader = true;
+      this.authSer.internalHeader = false;
+      //to show / hide permissions
 
 
-        this.route.params.subscribe(
-          (parmas: Params) => {
-            this.pageId = parmas['listPageId'];
-            localStorage.setItem('pageIdActive', parmas['listPageId']);
-          }
-        );
-        
-        this.route.parent.params.subscribe(
-          (params:Params) => {
-            this.userLoginId = params['userID'];
-            this.serviceId = params['serviceID'];
-            this.userSer.getPagesPermetiotns(this.userLoginId, this.serviceId).subscribe(
-              (responce) => {
-                console.log(responce);
-                this.pages = responce['pages'];
-                for(let i = 0; i< this.pages.length; i++) {
-                  if(this.pages[i].id == 22) {
-                    for(let j = 0; j < this.pages[i].permissions.length; j++) {
-                      if(this.pages[i].permissions[j].name == "add_advertising_service"){
-                        this.authSer.showAddBtn = true;
-                      }
-                      if(this.pages[i].permissions[j].name == "edit_advertising_service"){
-                        this.authSer.showEditBtn = true;
-                      }
-                      if(this.pages[i].permissions[j].name == "delete_advertising_services"){
-                        this.authSer.showDeleteBtn = true;
-                      }
+      this.route.params.subscribe(
+        (parmas: Params) => {
+          this.pageId = parmas['listPageId'];
+          localStorage.setItem('pageIdActive', parmas['listPageId']);
+        }
+      );
+      
+      this.route.parent.params.subscribe(
+        (params:Params) => {
+          this.userLoginId = params['userID'];
+          this.serviceId = params['serviceID'];
+          this.userSer.getPagesPermetiotns(this.userLoginId, this.serviceId).subscribe(
+            (responce) => {
+              console.log(responce);
+              this.pages = responce['pages'];
+              for(let i = 0; i< this.pages.length; i++) {
+                if(this.pages[i].id == 22) {
+                  for(let j = 0; j < this.pages[i].permissions.length; j++) {
+                    if(this.pages[i].permissions[j].name == "add_advertising_service"){
+                      this.authSer.showAddBtn = true;
+                    }
+                    if(this.pages[i].permissions[j].name == "edit_advertising_service"){
+                      this.authSer.showEditBtn = true;
+                    }
+                    if(this.pages[i].permissions[j].name == "delete_advertising_services"){
+                      this.authSer.showDeleteBtn = true;
                     }
                     }
-                  }else {
-                    console.log('no advertising services ');
                   }
                   }
+                }else {
+                  console.log('no advertising services ');
                 }
                 }
-                this.spinner.hide();
-              },
-              (error) => {console.log(error)}
-            );
-          }
-        );
+              }
+              this.spinner.hide();
+            },
+            (error) => {console.log(error)}
+          );
+        }
+      );
 
 
-       
+      
 
 
-        this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-          (responce) => {
-            console.log(responce);
-            this.advertisingList = responce['advertising_services'];
-            this.count = responce['count'];
-            this.perPagePagenation = responce['per_page'];
-          },
-          (error) => {
-            console.log(error);
-          }
-        );
+      this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+        (responce) => {
+          console.log(responce);
+          this.advertisingList = responce['advertising_services'];
+          this.count = responce['count'];
+          this.perPagePagenation = responce['per_page'];
+        },
+        (error) => {
+          console.log(error);
+        }
+      );
 
 
-      } //ngOnInit
+    } //ngOnInit
 
 
 
 
-                  //make all checkbox of user checked
-                  selectAll() {
-                  for (var i = 0; i < this.advertisingList.length; i++) {
-                    this.advertisingList[i].selected = this.selectedAll;
-                  }
-                };
+      //make all checkbox of user checked
+    selectAll() {
+      for (var i = 0; i < this.advertisingList.length; i++) {
+        this.advertisingList[i].selected = this.selectedAll;
+      }
+    };
 
 
-                checkIfAllSelected() {
-                  this.selectedAll = this.advertisingList.every(function(item:any) {
-                    return item.selected == true;
-                  });
-                };
+    checkIfAllSelected() {
+      this.selectedAll = this.advertisingList.every(function(item:any) {
+        return item.selected == true;
+      });
+    };
 
 
-                //filtter function
-                filtterFunc(data) {
-                this.advertisingList = [];
-                console.log(data.target.value);
-                const dataSearch = data.target.value;
-                this.currentPage = 1;
-                console.log('search curent page', this.currentPage);
-                this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-                  (responce) => {
-                    console.log(responce);
-                    this.advertisingList = responce['advertising_services'];
-                    this.count = responce['count'];
-                    this.perPagePagenation = responce['per_page'];
-                    console.log('filtter count', this.count);
-                    console.log('filtter perPagePAgenation', this.perPagePagenation);
-                  },
-                  (error) => {
-                    console.log(error)
-                  }
-                );
-              };
+    //filtter function
+    filtterFunc(data) {
+    this.advertisingList = [];
+    console.log(data.target.value);
+    const dataSearch = data.target.value;
+    this.currentPage = 1;
+    console.log('search curent page', this.currentPage);
+    this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+      (responce) => {
+        console.log(responce);
+        this.advertisingList = responce['advertising_services'];
+        this.count = responce['count'];
+        this.perPagePagenation = responce['per_page'];
+        console.log('filtter count', this.count);
+        console.log('filtter perPagePAgenation', this.perPagePagenation);
+      },
+      (error) => {
+        console.log(error)
+      }
+    );
+  };
 
 
-              //change page
-              onPageChange(pagenationNumber) {
-              this.spinner.show();
-              this.currentPage = pagenationNumber;
-              this.advertisingList = [];
-              //console.log(pagenationNumber);
-              //console.log(this.pageId);
-              this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
-              (responce) => {
-                console.log(responce);
-                this.advertisingList = responce['advertising_services'];
-                this.count = responce['count'];
-                this.perPagePagenation = responce['per_page'];
-                console.log(this.advertisingList);
-                this.spinner.hide();
-              },
-              (error) => {
-                console.log(error);
-                this.spinner.hide();
-              }
-              );
-              };
+  //change page
+  onPageChange(pagenationNumber) {
+  this.spinner.show();
+  this.currentPage = pagenationNumber;
+  this.advertisingList = [];
+  //console.log(pagenationNumber);
+  //console.log(this.pageId);
+  this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+  (responce) => {
+    console.log(responce);
+    this.advertisingList = responce['advertising_services'];
+    this.count = responce['count'];
+    this.perPagePagenation = responce['per_page'];
+    console.log(this.advertisingList);
+    this.spinner.hide();
+  },
+  (error) => {
+    console.log(error);
+    this.spinner.hide();
+  }
+  );
+  };
+
+
+  //determine the list count from select element
+  onGetValue(event) {
+  this.spinner.show();
+  this.advertisingList = [];
+  this.dataTableNumber = event.target.value;
+  this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    (responce) => {
+      console.log(responce);
+      this.advertisingList = responce['advertising_services'];
+      this.count = responce['count'];
+      this.perPagePagenation = responce['per_page'];
+      this.spinner.hide();
+    },
+    (error) => {
+      console.log(error);
+      this.spinner.hide();
+    }
+  );
+  }
 
 
+  onDelete() {
 
 
-              //determine the list count from select element
-              onGetValue(event) {
+    this.advertisingListIds = [];
+    for(let i = 0; i < this.advertisingList.length; i++) {
+      if(this.advertisingList[i].selected == true) {
+        this.advertisingListIds.push(this.advertisingList[i].id);
+      }
+    }
+
+    console.log(this.advertisingListIds);
+
+    if(this.advertisingListIds.length > 0) {
+      const dialogRef = this.modal.alert()
+      .size('sm')
+      .showClose(true)
+      .title('تأكيد الحذف')
+      .body(`
+        <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
+        `)
+        .open();
+
+        dialogRef.result
+        .then( result =>
+          this.dashboardSer.deleteItem(this.advertisingListIds, this.pageId).subscribe(
+            (responce) => {
+              console.log(responce);
+              this.toastr.success('تم الحذف');
               this.spinner.show();
               this.spinner.show();
               this.advertisingList = [];
               this.advertisingList = [];
-              this.dataTableNumber = event.target.value;
               this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
               this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
                 (responce) => {
                 (responce) => {
                   console.log(responce);
                   console.log(responce);
@@ -187,73 +231,29 @@ export class AdvertisingServicesListComponent implements OnInit {
                   this.spinner.hide();
                   this.spinner.hide();
                 }
                 }
               );
               );
-              }
-
-              onDelete() {
-
-                this.advertisingListIds = [];
-                for(let i = 0; i < this.advertisingList.length; i++) {
-                  if(this.advertisingList[i].selected == true) {
-                    this.advertisingListIds.push(this.advertisingList[i].id);
-                  }
-                }
-
-                console.log(this.advertisingListIds);
-
-                if(this.advertisingListIds.length > 0) {
-                  const dialogRef = this.modal.alert()
-                  .size('sm')
-                  .showClose(true)
-                  .title('تأكيد الحذف')
-                  .body(`
-                    <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
-                    `)
-                    .open();
-
-                    dialogRef.result
-                    .then( result =>
-                      this.dashboardSer.deleteItem(this.advertisingListIds, this.pageId).subscribe(
-                        (responce) => {
-                          console.log(responce);
-                          this.toastr.success('تم الحذف');
-                          this.spinner.show();
-                          this.advertisingList = [];
-                          this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-                            (responce) => {
-                              console.log(responce);
-                              this.advertisingList = responce['advertising_services'];
-                              this.count = responce['count'];
-                              this.perPagePagenation = responce['per_page'];
-                              this.spinner.hide();
-                            },
-                            (error) => {
-                              console.log(error);
-                              this.spinner.hide();
-                            }
-                          );
-                        },
-                        (error) => {
-                          console.log(error);
-                          this.spinner.hide();
-                        },
-                      )
-                    );
-                  } else {
-                    this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
-                  }
-                };
+            },
+            (error) => {
+              console.log(error);
+              this.spinner.hide();
+            },
+          )
+        );
+      } else {
+        this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
+      }
+    };
 
 
-                //add function
-                onAdd() {
-                console.log('service/' + this.userLoginId + '/' + this.serviceId + '/addAdvertising');
-                this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/addAdvertising']);
-              }
+    //add function
+    onAdd() {
+    console.log('service/' + this.userLoginId + '/' + this.serviceId + '/addAdvertising');
+    this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/addAdvertising']);
+  }
 
 
-              //edit function
-              onEdit(editTabID) {
-              // localStorage.setItem('editeventCalendarIdStorage', editTabID);
-              this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/advertising/edit/' + editTabID]);
-              console.log('service/' + this.userLoginId + '/' + this.serviceId + '/advertising/edit/' + editTabID);
-              };
+  //edit function
+  onEdit(editTabID) {
+  // localStorage.setItem('editeventCalendarIdStorage', editTabID);
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/advertising/edit/' + editTabID]);
+  console.log('service/' + this.userLoginId + '/' + this.serviceId + '/advertising/edit/' + editTabID);
+  };
 
 
 }
 }

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

@@ -55,7 +55,7 @@
                   <div class="col-12 col-md-4">
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="phone" style="float:right">رقم الجوال<span class="spanReqired-w">*</span></label>
                       <label for="phone" style="float:right">رقم الجوال<span class="spanReqired-w">*</span></label>
-                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [ngModelOptions]="{standalone: true}"/>
+                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [disabled]="true" [ngModelOptions]="{standalone: true}"/>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -83,24 +83,36 @@
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
                       <div class="form-group">
                         <label for="phoneNum"  style="float: right;margin-right: 5px"> رقم الجوال </label>
                         <label for="phoneNum"  style="float: right;margin-right: 5px"> رقم الجوال </label>
-                        <input type="number" placeholNeedder=" " class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum"  required/>
+                        <input type="number" placeholNeedder=" " class="form-control" name="phoneNum" [ngModel]="dataForm.phoneNum" [disabled]="true"/>
                       </div>  
                       </div>  
                   </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" [myDate]="bindingDateSplitStart" [higriDisabled]="disabledVal"></app-higri-date>
-                          </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" [myDate]="bindingDateSplitStart" [higriDisabled]="disabledVal"></app-higri-date>
                       </div>
                       </div>
                     </div>
                     </div>
-                    <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                        <div class="form-group">
-                          <label for="created_time"  style="float: right;margin-right: 5px">الوقت</label>
-                          <input type="text" placeholder="الوقت" class="form-control" name="created_time" [ngModel]="dataForm.created_time" [disabled]="true" />
-                        </div>
+                  </div>
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                    <div class="form-group">
+                      <label for="created_time"  style="float: right;margin-right: 5px">الوقت</label>
+                      <input type="text" placeholder="الوقت" class="form-control" name="created_time" [ngModel]="dataForm.created_time" [disabled]="true" />
                     </div>
                     </div>
                   </div>
                   </div>
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                    <div class="form-group">
+                      <label for="adminstartions"  style="float: right;margin-right: 5px">الإداره</label>
+                      <input type="text" placeholder="الإداره" class="form-control" name="adminstartions" [ngModel]="dataForm.adminstartion_name" [disabled]="true" />
+                    </div>
+                  </div>
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                    <div class="form-group">
+                      <label for="switch_phone"  style="float: right;margin-right: 5px">رقم التحويله</label>
+                      <input type="text" placeholder="رقم التحويله" class="form-control" name="switch_phone" [ngModel]="dataForm.switch_phone" [disabled]="true" />
+                    </div>
+                  </div>
+                </div>
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
@@ -195,8 +207,7 @@
                       <thead class="headBackground-w">
                       <thead class="headBackground-w">
                         <tr>
                         <tr>
                           <th> إسم المرفق</th>
                           <th> إسم المرفق</th>
-                          <th>رفع الملف ( بصيغه pdf )</th>
-                          <!-- <th>عرض الملف</th> -->
+                          <th>رفع الملف</th>
                           <th>حذف</th>
                           <th>حذف</th>
                         </tr>
                         </tr>
                       </thead>
                       </thead>
@@ -209,7 +220,6 @@
                             <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
                             <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
                             </span>
                             </span>
                           </td>
                           </td>
-                          <!-- <td><a href="{{authSer.pathImg + file.nameFile}}" target="_blank"><i class="fas fa-download"></i></a></td> -->
                           <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                           <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                         </tr>
                         </tr>
                       </tbody>
                       </tbody>

+ 39 - 21
src/app/dashboard/create-report/add-new-report/add-new-report.component.ts

@@ -66,6 +66,8 @@ export class AddNewReportComponent implements OnInit {
       created_time : "",
       created_time : "",
       subject : '',
       subject : '',
       message : '',
       message : '',
+      adminstartion_name: '',
+      switch_phone: '',
       main_location_id : '',
       main_location_id : '',
       sub_location_id : '',
       sub_location_id : '',
       files: []
       files: []
@@ -76,8 +78,8 @@ export class AddNewReportComponent implements OnInit {
   departmentUserLoginId: number;
   departmentUserLoginId: number;
 
 
        //higri date array
        //higri date array
-  month = ['محرم', 'صفر', 'ربيع الأول', 'ربيع الآخر', 'جمادى الأولى', 'جمادى الآخرة', 'رجب', 'Shaʻban', 'Ramadan', 'شوال',
-  'ذو القعدة', 'ذو الحجة'];
+  month = ['Muharram', 'Safar', "Rabi'ul Awwal", "Rabi'ul Akhir" , 'Jumadal Ula', 'Jumadal Akhira', 'Rajab', 'Shaʻban', 'Ramadan', 'Shawwal',
+  'Dhuʻl-Qiʻdah', 'Dhul Hijja'];
 
 
 
 
 
 
@@ -163,6 +165,8 @@ export class AddNewReportComponent implements OnInit {
        this.dataForm.phoneNum = responce['user'].phone;
        this.dataForm.phoneNum = responce['user'].phone;
        this.departmentUserLoginId = responce['user'].adminstration_id;
        this.departmentUserLoginId = responce['user'].adminstration_id;
        this.dataForm.user_id = responce['user'].id;
        this.dataForm.user_id = responce['user'].id;
+       this.dataForm.adminstartion_name = responce['adminstraion'].name;
+       this.dataForm.switch_phone = responce['adminstraion'].switch_phone;
        console.log('dsf',responce)
        console.log('dsf',responce)
       },
       },
       (error) => {console.log(error)},
       (error) => {console.log(error)},
@@ -170,12 +174,7 @@ 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){
   onChangemainLocation(event){
    const id = event.target.value
    const id = event.target.value
@@ -248,9 +247,18 @@ export class AddNewReportComponent implements OnInit {
   }
   }
   
   
   onSubmitted(){
   onSubmitted(){
+    
+    this.checkSaveClick = true;
+
+    let checkFilesExtensions: boolean = false;//check extension file
+
     for (let i = 0; i < this.files.length; i++) {
     for (let i = 0; i < this.files.length; i++) {
+
       if(this.files[i].file_type){
       if(this.files[i].file_type){
         this.files[i].file_type = this.files[i].file_type.toLowerCase();
         this.files[i].file_type = this.files[i].file_type.toLowerCase();
+        if(this.files[i].file_type == 'word'){
+          checkFilesExtensions = true;
+        }
       }
       }
       if(this.files[i].file != null && this.files[i].title == null){
       if(this.files[i].file != null && this.files[i].title == null){
        this.toastr.warning('ادخل عنوان الملف رقم ' + (i+1) );
        this.toastr.warning('ادخل عنوان الملف رقم ' + (i+1) );
@@ -264,6 +272,7 @@ export class AddNewReportComponent implements OnInit {
         this.dataForm.files.push(this.files[i]);
         this.dataForm.files.push(this.files[i]);
       }
       }
     }
     }
+
     if(!this.checked){
     if(!this.checked){
       delete this.dataForm.id_number;
       delete this.dataForm.id_number;
       delete this.dataForm.name;
       delete this.dataForm.name;
@@ -276,19 +285,28 @@ export class AddNewReportComponent implements OnInit {
         this.dataForm.user_id = this.reportAuthor.id
         this.dataForm.user_id = this.reportAuthor.id
       } 
       } 
     console.log(this.dataForm);
     console.log(this.dataForm);
-  //  this.http.post(this.authService.pathApi + '/add_communication' , this.dataForm )
-  //     .subscribe(
-  //        res => {
-  //          console.log(res);
-  //          this.checked = false;
-  //          this.toastr.success('تم حفظ البلاغ ');
-  //          this.router.navigate(['/service/' + this.userId + '/' +  this.serviceId + '/followCommunicationList/58']);
-  //         },
-  //         err => {
-  //          console.log(err)
-  //          this.toastr.error('حدث خطأ في الاتصال ');
-  //         }
-  //      );
+
+
+    if(checkFilesExtensions) {
+      this.toastr.warning("لا يجب أن تكون صيغه الملفات 'word'");
+    } else {
+      this.http.post(this.authService.pathApi + '/add_communication' , this.dataForm )
+        .subscribe(
+          res => {
+            console.log(res);
+            this.checked = false;
+            this.checkSaveClick = false;
+            this.toastr.success('تم حفظ البلاغ ');
+            this.router.navigate(['/service/' + this.userId + '/' +  this.serviceId + '/followCommunicationList/56']);
+          },
+            err => {
+            console.log(err);
+            this.checkSaveClick = false;
+            this.toastr.error('حدث خطأ في الاتصال ');
+          }
+        );
+    }
+  
     }else{
     }else{
       console.log('i cant send the request');
       console.log('i cant send the request');
     }
     }

+ 7 - 7
src/app/dashboard/department/add-department/add-department.component.html

@@ -24,20 +24,20 @@
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
                   <label for="email">الأيميل <span class="spanReqired-w">*</span></label>
                   <label for="email">الأيميل <span class="spanReqired-w">*</span></label>
-                  <input type="email" class="form-control" name="email" placeholder="الإيميل" appEnglishCharacters ngModel #email="ngModel" [ngModel]="admin.email" required/>
+                  <input type="email" class="form-control" name="email" placeholder="الإيميل" appEnglishCharacters ngModel #email="ngModel" email [ngModel]="admin.email" required/>
                   <span class="help-block" *ngIf="!email.valid && email.touched" style="color:red">من فضلك أدخل إيميل صحيح</span>
                   <span class="help-block" *ngIf="!email.valid && email.touched" style="color:red">من فضلك أدخل إيميل صحيح</span>
                 </div>
                 </div>
               </div>
               </div>
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="phone">رقم الجوال</label>
-                  <input type="phone" class="form-control" appNumberDerictive name="phone" ngModel #phone="ngModel" [ngModel]="admin.phone"/>
+                  <label for="phone">رقم الهاتف</label>
+                  <input type="phone" class="form-control" appOnlyNumber name="phone" ngModel #phone="ngModel" [ngModel]="admin.phone"/>
                 </div>
                 </div>
               </div>
               </div>
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="switch_phone">رقم الجوال البديل</label>
-                  <input type="phone" class="form-control" appNumberDerictive name="switch_phone" ngModel #switchPhone="ngModel" [ngModel]="admin.switch_phone"/>
+                  <label for="switch_phone">رقم التحويله</label>
+                  <input type="phone" class="form-control" appOnlyNumber name="switch_phone" ngModel #switchPhone="ngModel" [ngModel]="admin.switch_phone"/>
                 </div>
                 </div>
               </div>
               </div>
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
@@ -51,8 +51,8 @@
               </div>
               </div>
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
               <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="description">الوصف <span class="spanReqired-w">*</span></label>
-                  <textarea cols="3" name="description" class="form-control" ngModel #description="ngModel" [ngModel]="admin.description" required>
+                  <label for="description">الوصف</label>
+                  <textarea cols="3" name="description" class="form-control" [ngModel]="admin.description" >
                   </textarea>
                   </textarea>
                 </div>
                 </div>
               </div>
               </div>

+ 2 - 2
src/app/dashboard/events/add-event/add-event.component.html

@@ -86,8 +86,8 @@
               </div>
               </div>
 
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                <label for="time" style="float: right; margin-right: 5px">الوقت</label>
-                <input type="time" class="form-control" [ngModel]="event.time" id="time" name="time" />
+                <label for="time" style="float: right; margin-right: 5px">الوقت <span class="spanReqired-w">*</span></label>
+                <input type="time" class="form-control" [(ngModel)]="event.time" id="time" name="time" required/>
               </div>
               </div>
 
 
               <div class="col-12">
               <div class="col-12">

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

@@ -112,11 +112,10 @@ export class AddEventComponent implements OnInit {
   onSubmitted() {
   onSubmitted() {
     this.checkSaveClick = true;
     this.checkSaveClick = true;
     console.log(this.eventForm.value);
     console.log(this.eventForm.value);
+    console.log(this.eventForm.value.time);
     this.eventForm.value['date'] = this.higriDateVal;
     this.eventForm.value['date'] = this.higriDateVal;
-    if(this.eventForm.value.time) {
-      this.eventForm.value.event_time = this.eventForm.value.date + ' ' + this.eventForm.value.time;
-    } else {
-      this.eventForm.value.event_time = this.eventForm.value.date + this.event.time;
+    if(this.event.time) {
+      this.eventForm.value.event_time = this.eventForm.value.date + ' ' + this.event.time;
     }
     }
     console.log(this.eventForm.value.event_time);
     console.log(this.eventForm.value.event_time);
     delete this.eventForm.value.time;
     delete this.eventForm.value.time;
@@ -124,47 +123,47 @@ export class AddEventComponent implements OnInit {
 
 
     console.log(this.eventForm.value); 
     console.log(this.eventForm.value); 
     if(this.typeMode) {
     if(this.typeMode) {
-      this.dashboard.editItem( this.eventId ,this.eventForm.value , "events").subscribe(
-        (responce) => {
-          console.log(responce);
-          this.toastr.success('تمت التعديل بنجاح');
-          this.location.back();
-          this.checkSaveClick = false;
-        },
-        (error) => {
-          console.log(error.error['status']);
-          if(error.error.status == 'invalid event_time') {
-            this.toastr.warning('يجب ان يكون الحدث في وقت سابق !');
-          }else if(error.error['status'] == 'active status for only 4 records') {
-            this.toastr.warning('لديك أربعه أحداث في الحاله فعال بالفعل ، قم بعدم تفعيل أو مسح أحدهم ');
-          }else {
-            this.toastr.error('حدث خطأ !');
+        this.dashboard.editItem( this.eventId ,this.eventForm.value , "events").subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تمت التعديل بنجاح');
+            this.location.back();
+            this.checkSaveClick = false;
+          },
+          (error) => {
+            console.log(error.error['status']);
+            if(error.error.status == 'invalid event_time') {
+              this.toastr.warning('يجب ان يكون الحدث في وقت سابق !');
+            }else if(error.error['status'] == 'active status for only 4 records') {
+              this.toastr.warning('لديك أربعه أحداث في الحاله فعال بالفعل ، قم بعدم تفعيل أو مسح أحدهم ');
+            }else {
+              this.toastr.error('حدث خطأ !');
+            }
+            console.log(error);
+            this.checkSaveClick = false;
           }
           }
-          console.log(error);
-          this.checkSaveClick = false;
-        }
-      );
+        );
     } else {
     } else {
-      this.dashboard.addItem(this.eventForm.value, "events").subscribe(
-        (responce) => {
-          console.log(responce);
-          this.toastr.success('تمت الاضافه بنجاح');
-          this.location.back();
-          this.checkSaveClick = false;
-        },
-        (error) => {
-          console.log(error.error['status']);
-          if(error.error.status == 'invalid event_time') {
-            this.toastr.warning('يجب ان يكون الحدث في وقت سابق !');
-          } else if(error.error['status'] == 'active status for only 4 records') {
-            this.toastr.warning('لديك أربعه أحداث في الحاله فعال بالفعل ، قم بعدم تفعيل أو مسح أحدهم ');
-          }else {
-            this.toastr.error('حدث خطأ !');
+        this.dashboard.addItem(this.eventForm.value, "events").subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تمت الاضافه بنجاح');
+            this.location.back();
+            this.checkSaveClick = false;
+          },
+          (error) => {
+            console.log(error.error['status']);
+            if(error.error.status == 'invalid event_time') {
+              this.toastr.warning('يجب ان يكون الحدث في وقت سابق !');
+            } else if(error.error['status'] == 'active status for only 4 records') {
+              this.toastr.warning('لديك أربعه أحداث في الحاله فعال بالفعل ، قم بعدم تفعيل أو مسح أحدهم ');
+            }else {
+              this.toastr.error('حدث خطأ !');
+            }
+            console.log(error);
+            this.checkSaveClick = false;
           }
           }
-          console.log(error);
-          this.checkSaveClick = false;
-        }
-      );
+        ); 
     }
     }
   }
   }
 
 

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

@@ -69,7 +69,6 @@
                     <option value="2">2</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="4">4</option>
-                    <option value="10000">المزيد</option>
                   </select>
                   </select>
                   <!-- <span *ngIf="!name.valid && name.touched"></span>  -->
                   <!-- <span *ngIf="!name.valid && name.touched"></span>  -->
                 </div>
                 </div>
@@ -85,7 +84,7 @@
               </div>
               </div>
 
 
               <div class="col-6">
               <div class="col-6">
-                <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+                <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkDisabledSave">حفظ</button>
                 <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
                 <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
               </div>
               </div>
 
 

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

@@ -46,7 +46,7 @@ export class AddExternalAchievementComponent implements OnInit {
       this.route.params.subscribe(
       this.route.params.subscribe(
         (params: Params) => {
         (params: Params) => {
           console.log(params)
           console.log(params)
-          if(params['typeExternalAchievement'] == 'add'){
+          if(!params['typeExternalAchievement']){
             this.typeMode = false;
             this.typeMode = false;
             this.typeLink = 'إنشاء إنجاز';
             this.typeLink = 'إنشاء إنجاز';
           } else if(params['typeExternalAchievement'] == 'edit') {
           } else if(params['typeExternalAchievement'] == 'edit') {
@@ -110,7 +110,11 @@ export class AddExternalAchievementComponent implements OnInit {
                 (error) => {
                 (error) => {
                   console.log(error);
                   console.log(error);
                   this.checkDisabledSave = false;
                   this.checkDisabledSave = false;
-                  this.toastr.error(' خطأ في التعديل !');
+                  if(error.error['error'] == 'ranking number is already taken') {
+                    this.toastr.warning('لديك أربع إنجازات في الحاله فعال ، وتم حجز الترتيب رقم 3 لانجاز سابق !');
+                  } else {
+                    this.toastr.error(' خطأ في التعديل !');
+                  }
                 }
                 }
               );
               );
             } else {
             } else {
@@ -125,7 +129,11 @@ export class AddExternalAchievementComponent implements OnInit {
                 (error) => {
                 (error) => {
                   console.log(error);
                   console.log(error);
                   this.checkDisabledSave = false;
                   this.checkDisabledSave = false;
-                  this.toastr.error('خطأ في الاضافه');
+                  if(error.error['error'] == 'ranking number is already taken') {
+                    this.toastr.warning('لديك أربع إنجازات في الحاله فعال ، وتم حجز الترتيب رقم 3 لانجاز سابق !');
+                  } else {
+                    this.toastr.error(' خطأ في التعديل !');
+                  }
                 }
                 }
               );
               );
             }
             }

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

@@ -93,7 +93,7 @@ export class AddExternalComponent implements OnInit {
             }
             }
           );
           );
         } else {
         } else {
-          this.typeLink = 'أنشاء جديد';
+          this.typeLink = 'إنشاء جديد';
         }
         }
       }
       }
     );
     );
@@ -169,10 +169,10 @@ export class AddExternalComponent implements OnInit {
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
             this.checkSaveClick = false;
             this.checkSaveClick = false;
-            if(error.error['status'] == 'active status for only 6 records') {
-              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات ، قم بعدم تفعيل أو مسح أحدهم');
+            if(error.error['error'] == 'ranking number is already taken') {
+              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات الفعاله ، قم بعدم تفعيل أو مسح الخدمه التي لديها نفس الترتيب');
             } else {
             } else {
-              this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
+              this.toastr.error('خطأ في الحفظ ، ستتم المعالجه لاحقاً !');
             }
             }
           }
           }
         );
         );
@@ -187,10 +187,10 @@ export class AddExternalComponent implements OnInit {
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
             this.checkSaveClick = false;
             this.checkSaveClick = false;
-            if(error.error['status'] == 'active status for only 6 records') {
-              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات ، قم بعدم تفعيل أو مسح أحدهم');
+            if(error.error['error'] == 'ranking number is already taken') {
+              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات الفعاله ، قم بعدم تفعيل أو مسح الخدمه التي لديها نفس الترتيب');
             } else {
             } else {
-              this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
+              this.toastr.error('خطأ في الحفظ ، ستتم المعالجه لاحقاً !');
             }
             }
           }
           }
         );
         );
@@ -215,7 +215,7 @@ export class AddExternalComponent implements OnInit {
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
             this.checkSaveClick = false;
             this.checkSaveClick = false;
-            if(error.error['status'] == 'active status for only 6 records') {
+            if(error.error['error'] == 'ranking number is already taken') {
               this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات ، قم بعدم تفعيل أو مسح أحدهم');
               this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات ، قم بعدم تفعيل أو مسح أحدهم');
             } else {
             } else {
               this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
               this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
@@ -233,8 +233,8 @@ export class AddExternalComponent implements OnInit {
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
             this.checkSaveClick = false;
             this.checkSaveClick = false;
-            if(error.error['status'] == 'active status for only 6 records') {
-              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات ، قم بعدم تفعيل أو مسح أحدهم');
+            if(error.error['error'] == 'ranking number is already taken') {
+              this.toastr.warning('لقد تخطيت الحد الأقصي للخدمات الفعاله ، قم بعدم تفعيل أو مسح الخدمه التي لديها نفس الترتيب');
             } else {
             } else {
               this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
               this.toastr.error('خطأ في السيرفر ، ستتم المعالجه لاحقاً !');
             }
             }

+ 5 - 0
src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.css

@@ -261,6 +261,11 @@ select.ng-invalid{
     float: right;
     float: right;
 }
 }
 
 
+.p {
+    text-align: right;
+    margin: 0 10px;
+}
+
 /* start media query style */
 /* start media query style */
 
 
 @media(max-width: 767px){
 @media(max-width: 767px){

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

@@ -14,6 +14,17 @@
         <form (ngSubmit)="onSubmittedForm()" #f="ngForm">
         <form (ngSubmit)="onSubmittedForm()" #f="ngForm">
           <div class="row">
           <div class="row">
             <div class="col-12">
             <div class="col-12">
+              <h2 class="title">معلومات الطلب</h2>
+              <div class="row">
+                <div class="wrapper" style="text-align:right">
+                  <p class="p">حاله الطلب :  {{ 
+                    formData.status == 'accepted' ? 'مقبول' 
+                    : formData.status == 'closed' ? 'مغلق' : 'N/A'}}</p>
+                    <!-- <p class="p" *ngIf="formData.status_description">  وصف الطلب : {{formData.status_description ? formData.status_description : 'لايوجد'}}</p> -->
+                </div>
+              </div>
+            </div>
+            <div class="col-12">
               <h2 class="title">المعلومات الشخصيه</h2>
               <h2 class="title">المعلومات الشخصيه</h2>
               <div class="row">
               <div class="row">
                 <div class="wrapper">
                 <div class="wrapper">
@@ -195,6 +206,20 @@
                       </select>
                       </select>
                     </div>
                     </div>
                   </div>
                   </div>
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                    <div class="form-group">
+                      <label for="startData" style="float:right;">تاريخ بدايه التدريب</label>
+                      <input type="text" id="startData" class="form-control" name="start_date" ngModel [(ngModel)]="formData.start_date" [disabled]="disabledInput" required/>
+                    </div>
+                  </div>
+
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                    <div class="form-group">
+                      <label for="endDate" style="float:right;">تاريخ نهايه التدريب</label>
+                      <input type="text" id="endDate" class="form-control" name="end_date" ngModel [(ngModel)]="formData.end_date" [disabled]="disabledInput" required/>
+                    </div>
+                  </div>
+
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>

+ 5 - 0
src/app/dashboard/final-accreditation-of-trainees/final-accerditation-add/final-accerditation-add.component.ts

@@ -61,6 +61,8 @@ export class FinalAccerditationAddComponent implements OnInit {
     status: '',
     status: '',
     organization_affiliated_with: '',
     organization_affiliated_with: '',
     department: '',
     department: '',
+    start_date: '',
+    end_date: ''
   }
   }
 
 
   //user data object
   //user data object
@@ -183,6 +185,7 @@ export class FinalAccerditationAddComponent implements OnInit {
           console.log('get request by id', responce);
           console.log('get request by id', responce);
           this.formData.trainee = responce['data']['user'].id;
           this.formData.trainee = responce['data']['user'].id;
           this.formData.type = responce['data']['request'].type;
           this.formData.type = responce['data']['request'].type;
+          this.formData.status = responce['data']['request'].status;
           this.formData.specialization_name = responce['data']['request'].specialization_name;
           this.formData.specialization_name = responce['data']['request'].specialization_name;
           this.formData.specific_specialization = responce['data']['request'].specific_specialization;
           this.formData.specific_specialization = responce['data']['request'].specific_specialization;
           this.formData.level = responce['data']['request'].level;
           this.formData.level = responce['data']['request'].level;
@@ -193,6 +196,8 @@ export class FinalAccerditationAddComponent implements OnInit {
           this.formData.functional_number = responce['data']['request'].functional_number;
           this.formData.functional_number = responce['data']['request'].functional_number;
           this.formData.organization_affiliated_with = responce['data']['request'].organization_affiliated_with;
           this.formData.organization_affiliated_with = responce['data']['request'].organization_affiliated_with;
           this.formData.registration_number = responce['data']['request'].registration_number;
           this.formData.registration_number = responce['data']['request'].registration_number;
+          this.formData.start_date = responce['data']['request'].start_date;
+          this.formData.end_date = responce['data']['request'].end_date;
           this.userData.name = responce['data']['user'].name;
           this.userData.name = responce['data']['user'].name;
           this.userData.email = responce['data']['user'].email;
           this.userData.email = responce['data']['user'].email;
           this.userData.identity_number = responce['data']['user'].identity_number;
           this.userData.identity_number = responce['data']['user'].identity_number;

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

@@ -53,6 +53,7 @@
               <tr>
               <tr>
                 <th> إسم المتدرب</th>
                 <th> إسم المتدرب</th>
                 <th>إسم التخصص</th>
                 <th>إسم التخصص</th>
+                <th>إسم القسم</th>
                 <th>إسم التخصص الدقيق</th>
                 <th>إسم التخصص الدقيق</th>
                 <th> الجامعه</th>
                 <th> الجامعه</th>
                 <th *ngIf="authSer.showEditBtn">تفاصيل المتدرب</th>
                 <th *ngIf="authSer.showEditBtn">تفاصيل المتدرب</th>
@@ -62,6 +63,7 @@
               <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
               <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
                 <td>{{data.trainee_name}}</td>
                 <td>{{data.trainee_name}}</td>
                 <td> {{data.specialization_name}}</td>
                 <td> {{data.specialization_name}}</td>
+                <td>{{data.department_name ? data.department_name : '-'}}</td>
                 <td>{{data.specific_specialization}}</td>
                 <td>{{data.specific_specialization}}</td>
                 <td>{{data.university}}</td>
                 <td>{{data.university}}</td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>

File diff suppressed because it is too large
+ 5 - 1
src/app/dashboard/final-trainee-report/final-trainee-report.component.html


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

@@ -23,7 +23,57 @@ export class FinalTraineeReportComponent implements OnInit {
         <head>
         <head>
           <title>الإعتماد النهائي للمتدرب</title>
           <title>الإعتماد النهائي للمتدرب</title>
           <style>
           <style>
-          //........Customized style.......
+            //........Customized style.......
+            .row{
+              display: flex;
+              flex-wrap: wrap;
+              margin-right: -15px;
+              margin-left: -15px;
+            }
+            .col-6{
+              float: right;
+              flex: 0 0 50%;
+              max-width: 50%
+            }
+            .col-12{
+              flex-basis: 0;
+              flex-grow: 1;
+              max-width: 100%;
+            }
+            table {
+              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+              border-collapse: collapse;
+              width: 100%;
+              direction: rtl;
+              text-align: center;
+              
+            }
+            
+            table td, table th {
+              border: 1px solid #ddd;
+              padding: 8px;
+            }
+            
+            table tr:nth-child(even){background-color: #f2f2f2;}
+            
+            table tr:hover {background-color: #ddd;}
+            
+            table th {
+              padding-top: 12px;
+              padding-bottom: 12px;
+              text-align: center;
+              background-color: #4CAF50;
+              color: white;
+            }
+            .rightLogo {
+              text-align: left;
+              direction: rtl;
+            }
+
+            .printSpan {
+              direction: ltr;
+              text-align: right;
+            }
           </style>
           </style>
         </head>
         </head>
     <body onload="window.print();window.close()">${printContents}</body>
     <body onload="window.print();window.close()">${printContents}</body>

+ 36 - 34
src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.html

@@ -8,8 +8,9 @@
     <div class="row">
     <div class="row">
       <div class="col-12">
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
         <ul class="list-unstyled titileLi-w">
-          <li class="headingText-w">خدمه البلاغات  </li>
-          <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> عرض التفاصيل</li>
+          <li class="headingText-w">خدمه البلاغات</li>
+          <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()">متابعه البلاغات الوارده للإداره</li>
+          <li class="headingText-w"> عرض التفاصيل</li>
         </ul>
         </ul>
       </div>
       </div>
     </div>
     </div>
@@ -22,12 +23,7 @@
               <div class="row">
               <div class="row">
                 <div class="wrapper">
                 <div class="wrapper">
                   
                   
-                  <div class="col-12 col-md-4">
-                    <div class="form-group">
-                      <label for="name" style="float:right">رقم البلاغ</label>
-                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
-                    </div>
-                  </div>
+                  
 
 
                   <div class="col-12 col-md-4">
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                     <div class="form-group">
@@ -46,14 +42,30 @@
 
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
-                    <label style="float:right">رقم الجوال <span class="spanReqired-w">*</span></label>
+                    <label style="float:right">رقم الجوال </label>
                     <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                     <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                     </div>
                     </div>
                   </div>
                   </div>
       
       
+                </div>
+              </div>
+            </div>
+
+           <div class="col-12">
+              <h2 class="title">بيانات البلاغ</h2>
+              <div class="row">
+                <div class="wrapper">
+                  
+                  <div class="col-12 col-md-4">
+                    <div class="form-group">
+                      <label for="name" style="float:right">رقم البلاغ</label>
+                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
+                    </div>
+                  </div>
+
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
-                      <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
+                      <label for="endDate" style="float:right" >التاريخ</label>
                       <div *ngIf='bindingDateSplitEnd'>
                       <div *ngIf='bindingDateSplitEnd'>
                         <app-end-higri-date  (onDatePicked)="getDate($event, 'end')" [myEndDate]="bindingDateSplitEnd" [higriDisabled]="disabledVal"> </app-end-higri-date>
                         <app-end-higri-date  (onDatePicked)="getDate($event, 'end')" [myEndDate]="bindingDateSplitEnd" [higriDisabled]="disabledVal"> </app-end-higri-date>
                       </div>
                       </div>
@@ -62,36 +74,19 @@
 
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
-                      <label for="time" style="float:right"> الوقت<span class="spanReqired-w">*</span></label>
+                      <label for="time" style="float:right"> الوقت</label>
                       <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
                       <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                 
-
-                </div>
-              </div>
-            </div>
-
-           <div class="col-12">
-              <h2 class="title">بيانات البلاغ</h2>
-              <div class="row">
-                <div class="wrapper">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
-                      <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
+                      <label for="subject"  style="float: right; margin-right:5px;">موضوع البلاغ</label>
                       <input type="text" id="subject" class="form-control" placeholder="موضوع البلاغ" name="subject" ngModel [(ngModel)]="maintData.subject" [disabled]="disabledInput" />
                       <input type="text" id="subject" class="form-control" placeholder="موضوع البلاغ" name="subject" ngModel [(ngModel)]="maintData.subject" [disabled]="disabledInput" />
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                  <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                    <div class="form-group">
-                      <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
-                      <input type="text" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" />
-                    </div>
-                  </div>
-
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
+                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                       <div class="form-group">
                       <div class="form-group">
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
                         <select name="main_location_id" class="form-control" [ngModel]="mainLocationVal" (change)="onChangemainLocation($event)" [disabled]="disabledInput" >
                         <select name="main_location_id" class="form-control" [ngModel]="mainLocationVal" (change)="onChangemainLocation($event)" [disabled]="disabledInput" >
@@ -109,6 +104,13 @@
                       </div>
                       </div>
                    </div>
                    </div>
 
 
+                   <div class="col-12 col-sm-12 col-md-12 col-lg-12">
+                    <div class="form-group">
+                      <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
+                      <textarea cols="3"  id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" style="height:100px;"></textarea>
+                    </div>
+                  </div>
+
                    <div class="col-12">
                    <div class="col-12">
                       <h2 class="title">المرفقات</h2>
                       <h2 class="title">المرفقات</h2>
                       <div class="row">
                       <div class="row">
@@ -138,8 +140,8 @@
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
-
-          <div class="col-12">
+ 
+          <div class="col-12" *ngIf="formData.status">
               <h2 class="title">عمليات البلاغ</h2>
               <h2 class="title">عمليات البلاغ</h2>
               <div class="row">
               <div class="row">
                 <div class="wrapper">
                 <div class="wrapper">
@@ -237,7 +239,7 @@
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
-                            : selectAdmin.adminstration_status == 'redirect_to_adminstrations' ? 'العائد للإدارات' : 'لايوجد'}}
+                            : selectAdmin.adminstration_status == 'adminstration_redirection' ? 'العائد للإدارات' : 'لايوجد'}}
                         </td>
                         </td>
                         <th style="text-align:center">
                         <th style="text-align:center">
                           <div class="dropdown">
                           <div class="dropdown">
@@ -335,7 +337,7 @@
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
-                            : selectAdmin.adminstration_status == 'redirect_to_adminstrations' ? 'العائد للإدارات' : 'لايوجد'}}
+                            : selectAdmin.adminstration_status == 'adminstration_redirection' ? 'العائد للإدارات' : '-'}}
                         </td>
                         </td>
                         <td style="font-size: 12px;">{{selectAdmin.countdown}}</td>
                         <td style="font-size: 12px;">{{selectAdmin.countdown}}</td>
                         <td><button type="button" class="btn btn-danger" (click)="removeSelectedAdminsration(selectAdmin)">حذف</button></td>
                         <td><button type="button" class="btn btn-danger" (click)="removeSelectedAdminsration(selectAdmin)">حذف</button></td>

+ 41 - 9
src/app/dashboard/follow-communications-adminstrations/follow-communications-adminstration-edit/follow-communications-adminstration-edit.component.ts

@@ -33,6 +33,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
   departmentsIds: any = [];
   departmentsIds: any = [];
   departments: any = [];
   departments: any = [];
   selectedDepartments: any = [];
   selectedDepartments: any = [];
+  saveCheckDisabled: boolean = false;
 
 
 
 
   //reopen object 
   //reopen object 
@@ -161,7 +162,17 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
         } else {
         } else {
           this.checkStatusClosed = false;
           this.checkStatusClosed = false;
         }
         }
+
         console.log('main data ', this.maintData);
         console.log('main data ', this.maintData);
+        if(this.maintData.adminstrations.length > 0) {
+          for(let i = 0; i < this.maintData.adminstrations.length; i++) {
+            for(let k = 0; k < this.maintData['adminstrations'][i].departments.length; k++){
+              this.maintData['adminstrations'][i].departments[k].id = this.maintData['adminstrations'][i].departments[k].department_id;
+            }
+          }
+        }
+        console.log('maindata afteeeeeeeeeeeeeer', this.maintData);
+
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.formData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
         this.formData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
         this.communicationData.time_period_id = this.maintData.time_period_id;
         this.communicationData.time_period_id = this.maintData.time_period_id;
@@ -184,8 +195,26 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
         }
         }
 
 
         this.userData = responce['communication']['user'];
         this.userData = responce['communication']['user'];
-        
-        console.log('gggg', this.maintData);
+
+        this.selectedDepartments = [];
+        if(this.maintData.adminstrations.length > 0) {
+          for(let i = 0; i < this.maintData.adminstrations.length; i++) {
+            for(let k = 0; k < this.maintData['adminstrations'][i].departments.length; k++){
+              this.selectedDepartments.push(this.maintData['adminstrations'][i].departments[k]);
+            }
+          }
+        }
+
+        console.log('selected departmen ', this.selectedDepartments);
+
+        for(let j = 0; j < this.departments.length; j++) {
+          for(let i = 0; i < this.selectedDepartments.length; i++){
+            if(this.departments[j].id == this.selectedDepartments[i].department_id) {
+              this.departments[j].selected = true;
+            }
+          }
+        }
+
         if(this.maintData['files'].length > 0) {
         if(this.maintData['files'].length > 0) {
           this.showAttachements = true;
           this.showAttachements = true;
         } else {
         } else {
@@ -263,9 +292,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
     console.log('urrrl', this.authSer.pathApi + '/page_list/4/1/1000/' + this.userAdminstrationId);
     console.log('urrrl', this.authSer.pathApi + '/page_list/4/1/1000/' + this.userAdminstrationId);
      this.http.get(this.authSer.pathApi + '/page_list/4/1/1000/' + this.userAdminstrationId  + searchKey).subscribe(
      this.http.get(this.authSer.pathApi + '/page_list/4/1/1000/' + this.userAdminstrationId  + searchKey).subscribe(
       (responce) => {
       (responce) => {
-        console.log('sections', responce);
         this.departments = responce['departments'];
         this.departments = responce['departments'];
-        console.log('sections', responce);
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
@@ -371,12 +398,12 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
   }
   }
 
 
   //return substring of subject and check negaive and positive time 
   //return substring of subject and check negaive and positive time 
-    returnEditData() {
-      for(let i = 0; i < this.maintData['adminstrations'].length; i++) {
-          this.maintData['adminstrations'][i].countdown = this.maintData['adminstrations'][i].countdown ? this.dashBoardSer.secondsToDhms(this.maintData['adminstrations'][i].countdown) : '-';
-          console.log(this.maintData['adminstrations'][i].countdown);
-      }
+  returnEditData() {
+    for(let i = 0; i < this.maintData['adminstrations'].length; i++) {
+        this.maintData['adminstrations'][i].countdown = this.maintData['adminstrations'][i].countdown ? this.dashBoardSer.secondsToDhms(this.maintData['adminstrations'][i].countdown) : '-';
+        console.log(this.maintData['adminstrations'][i].countdown);
     }
     }
+  }
 
 
     //on print
     //on print
     onPrint() {
     onPrint() {
@@ -388,6 +415,7 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
     
     
     //this.checkSaveClick = true; //make save btn disabled till request is success 
     //this.checkSaveClick = true; //make save btn disabled till request is success 
 
 
+    this.checkSaveClick = true;
 
 
     if(this.formData.status) {
     if(this.formData.status) {
       this.formData.status = 'closed';
       this.formData.status = 'closed';
@@ -408,19 +436,23 @@ export class FollowCommunicationsAdminstrationEditComponent implements OnInit {
 
 
    if(this.formData.status == 'closed' && this.formData.closed_status_reason == '') {
    if(this.formData.status == 'closed' && this.formData.closed_status_reason == '') {
      this.toastr.warning('أدخل سبب الرفض !');
      this.toastr.warning('أدخل سبب الرفض !');
+     this.checkSaveClick = false;
    } else {
    } else {
       this.http.post(this.authSer.pathApi + '/adminstration_handle_communication', this.formData).subscribe(
       this.http.post(this.authSer.pathApi + '/adminstration_handle_communication', this.formData).subscribe(
       (responce) => {
       (responce) => {
         console.log(responce['status']);
         console.log(responce['status']);
         if(responce['status'] == 'some adminstrations didnt closed yet') {
         if(responce['status'] == 'some adminstrations didnt closed yet') {
           this.toastr.warning('بعض الأقسام لم تقم بإغلاق البلاغ بعد !');
           this.toastr.warning('بعض الأقسام لم تقم بإغلاق البلاغ بعد !');
+          this.checkSaveClick = false;
         } else {
         } else {
           this.toastr.success('تم الحفظ بنجاح');
           this.toastr.success('تم الحفظ بنجاح');
           this.location.back();
           this.location.back();
+          this.checkSaveClick = false;
         }
         }
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
+        this.checkSaveClick = false;
         this.toastr.error('خطأ في الحفظ حاول لاحقاً');
         this.toastr.error('خطأ في الحفظ حاول لاحقاً');
       }
       }
     );
     );

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

@@ -8,6 +8,7 @@
       <div class="col-12">
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
         <ul class="list-unstyled titileLi-w">
           <li class="headingText-w">خدمه البلاغات  </li>
           <li class="headingText-w">خدمه البلاغات  </li>
+          <li class="headingText-w">متابعه البلاغات الوارده للقسم</li>
           <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> عرض التفاصيل</li>
           <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> عرض التفاصيل</li>
         </ul>
         </ul>
       </div>
       </div>
@@ -24,13 +25,6 @@
                   
                   
                   <div class="col-12 col-md-4">
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                     <div class="form-group">
-                      <label for="name" style="float:right">رقم البلاغ</label>
-                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
-                    </div>
-                  </div>
-
-                  <div class="col-12 col-md-4">
-                    <div class="form-group">
                       <label for="name" style="float:right">إسم المستخدم</label>
                       <label for="name" style="float:right">إسم المستخدم</label>
                       <input id="name" type="text" class="form-control" placeholder="الإسم" ngModel name="name"  [(ngModel)]="userData.comm_creator_name" [disabled]="disabledInput" />
                       <input id="name" type="text" class="form-control" placeholder="الإسم" ngModel name="name"  [(ngModel)]="userData.comm_creator_name" [disabled]="disabledInput" />
                     </div>
                     </div>
@@ -50,7 +44,23 @@
                     <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                     <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                     </div>
                     </div>
                   </div>
                   </div>
-      
+
+                </div>
+              </div>
+            </div>
+
+           <div class="col-12">
+              <h2 class="title">بيانات البلاغ</h2>
+              <div class="row">
+                <div class="wrapper">
+                  
+                  <div class="col-12 col-md-4">
+                    <div class="form-group">
+                      <label for="name" style="float:right">رقم البلاغ</label>
+                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
+                    </div>
+                  </div>
+
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
                       <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
@@ -67,16 +77,6 @@
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                 
-
-                </div>
-              </div>
-            </div>
-
-           <div class="col-12">
-              <h2 class="title">بيانات البلاغ</h2>
-              <div class="row">
-                <div class="wrapper">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
                       <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
@@ -84,13 +84,6 @@
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                  <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                    <div class="form-group">
-                      <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
-                      <input type="text" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" />
-                    </div>
-                  </div>
-
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                       <div class="form-group">
                       <div class="form-group">
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
@@ -109,6 +102,13 @@
                       </div>
                       </div>
                    </div>
                    </div>
 
 
+                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
+                      <div class="form-group">
+                        <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
+                        <textarea cols="3" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" style="height:100px;" ></textarea>
+                      </div>
+                    </div>
+
                    <div class="col-12">
                    <div class="col-12">
                       <h2 class="title">المرفقات</h2>
                       <h2 class="title">المرفقات</h2>
                       <div class="row">
                       <div class="row">
@@ -239,7 +239,7 @@
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             selectAdmin.adminstration_status == 'new' ? 'جديد' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
                             : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
-                            : selectAdmin.adminstration_status == 'redirect_to_adminstrations' ? 'العائد للإدارات' : 'لايوجد'}}
+                            : selectAdmin.adminstration_status == 'adminstration_redirection' ? 'العائد للإدارات' : 'لايوجد'}}
                         </td>
                         </td>
                         <th style="text-align:center">
                         <th style="text-align:center">
                           <div class="dropdown">
                           <div class="dropdown">

+ 5 - 1
src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.css

@@ -282,7 +282,11 @@ select.ng-invalid{
 .table th {
 .table th {
     font-size: 15px;
     font-size: 15px;
 }
 }
-    
+  
+
+.report_status {
+    font-weight: bold;
+}
 
 
 
 
 /* .centerIneerItem {
 /* .centerIneerItem {

+ 38 - 26
src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.html

@@ -8,7 +8,8 @@
       <div class="col-12">
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
         <ul class="list-unstyled titileLi-w">
           <li class="headingText-w">خدمه البلاغات  </li>
           <li class="headingText-w">خدمه البلاغات  </li>
-          <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> عرض التفاصيل</li>
+          <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()">متابعه البلاغات الصادره</li>
+          <li class="headingText-w"> عرض التفاصيل</li>
         </ul>
         </ul>
       </div>
       </div>
     </div>
     </div>
@@ -20,13 +21,13 @@
               <h2 class="title">بيانات منشئ البلاغ</h2>
               <h2 class="title">بيانات منشئ البلاغ</h2>
               <div class="row">
               <div class="row">
                 <div class="wrapper">
                 <div class="wrapper">
-                  
-                  <div class="col-12 col-md-4">
-                    <div class="form-group">
-                      <label for="name" style="float:right">رقم البلاغ</label>
-                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
-                    </div>
-                  </div>
+                  <p *ngIf="statsType">حاله البلاغ <span class="report_status">{{statsType == 'new' ? '(جديد)' 
+                      : statsType == 'closed' ? '(مغلق)' 
+                      : statsType == 'reopen' ? '(إستأنف)' 
+                      : statsType == 'adminstration_redirection'? '(العائد للإدارات)' : ''}}</span>
+                  </p>
+                 
+               
 
 
                   <div class="col-12 col-md-4">
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                     <div class="form-group">
@@ -50,6 +51,23 @@
                     </div>
                     </div>
                   </div>
                   </div>
       
       
+                </div>
+              </div>
+            </div>
+
+           <div class="col-12">
+              <h2 class="title">بيانات البلاغ</h2>
+              <div class="row">
+                <div class="wrapper">
+                  
+                  <div class="col-12 col-md-4">
+                    <div class="form-group">
+                      <label for="name" style="float:right">رقم البلاغ</label>
+                      <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
+                    </div>
+                  </div>
+
+
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
                       <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
@@ -58,21 +76,15 @@
                       </div>
                       </div>
                     </div>
                     </div>
                   </div>
                   </div>
-
+  
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="time" style="float:right"> الوقت<span class="spanReqired-w">*</span></label>
                       <label for="time" style="float:right"> الوقت<span class="spanReqired-w">*</span></label>
                       <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
                       <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
                     </div>
                     </div>
                   </div>
                   </div>
-                </div>
-              </div>
-            </div>
-
-           <div class="col-12">
-              <h2 class="title">بيانات البلاغ</h2>
-              <div class="row">
-                <div class="wrapper">
+                  
+                    
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
                       <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
@@ -80,13 +92,6 @@
                     </div>
                     </div>
                   </div>
                   </div>
 
 
-                  <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                    <div class="form-group">
-                      <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
-                      <input type="text" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" />
-                    </div>
-                  </div>
-
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                       <div class="form-group">
                       <div class="form-group">
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
                         <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
@@ -96,7 +101,7 @@
                       </div>     
                       </div>     
                    </div>
                    </div>
                    
                    
-                   <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                       <div class="form-group">
                       <div class="form-group">
                         <label for="sub_location_id"  style="float: right;margin-right: 5px">  الموقع الفرعي </label>
                         <label for="sub_location_id"  style="float: right;margin-right: 5px">  الموقع الفرعي </label>
                         <select name="sub_location_id" class="form-control" [ngModel]="subLocationVal" (change)="changeSubLocation($event)" [disabled]="disabledInput">
                         <select name="sub_location_id" class="form-control" [ngModel]="subLocationVal" (change)="changeSubLocation($event)" [disabled]="disabledInput">
@@ -105,6 +110,13 @@
                       </div>
                       </div>
                    </div>
                    </div>
 
 
+                   <div class="col-12 col-sm-12 col-md-12 col-lg-12">
+                      <div class="form-group">
+                        <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
+                        <textarea cols="3" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" style="height:100px"></textarea>
+                      </div>
+                    </div>
+
                    <div class="col-12">
                    <div class="col-12">
                       <h2 class="title">المرفقات</h2>
                       <h2 class="title">المرفقات</h2>
                       <div class="row">
                       <div class="row">
@@ -135,7 +147,7 @@
                 </div>
                 </div>
               </div>
               </div>
 
 
-          <div class="col-12">
+          <div class="col-12" *ngIf="communicationData.status">
               <h2 class="title">عمليات البلاغ</h2>
               <h2 class="title">عمليات البلاغ</h2>
               <div class="row">
               <div class="row">
                 <div class="wrapper">
                 <div class="wrapper">

+ 10 - 2
src/app/dashboard/follow-communications/follow-communications-add/follow-communications-add.component.ts

@@ -67,6 +67,8 @@ export class FollowCommunicationsAddComponent implements OnInit {
 
 
   counter$: Observable<number>;
   counter$: Observable<number>;
   counter = 180;
   counter = 180;
+
+  statsType: string;
   
   
   constructor(private route: ActivatedRoute, 
   constructor(private route: ActivatedRoute, 
     private dashBoardSer: DashboardService,
     private dashBoardSer: DashboardService,
@@ -75,7 +77,9 @@ export class FollowCommunicationsAddComponent implements OnInit {
     private toastr: ToastrService,
     private toastr: ToastrService,
     private location: Location,
     private location: Location,
     private spinner: NgxSpinnerService,
     private spinner: NgxSpinnerService,
-    public authSer: AuthServiceService) { }
+    public authSer: AuthServiceService) {
+
+     }
 
 
   ngOnInit() {
   ngOnInit() {
 
 
@@ -161,6 +165,8 @@ export class FollowCommunicationsAddComponent implements OnInit {
       (responce) => {
       (responce) => {
         
         
         this.maintData = responce['communication'];
         this.maintData = responce['communication'];
+        this.statsType = this.maintData.status;
+
         console.log('main data ', this.maintData);
         console.log('main data ', this.maintData);
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.communicationData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
         this.communicationData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
@@ -184,6 +190,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
           this.checkStatusClosed = false;
           this.checkStatusClosed = false;
         }
         }
 
 
+        console.log('main data', this.maintData);
         this.selectedAdminstrations = [];
         this.selectedAdminstrations = [];
         if(this.maintData.adminstrations.length > 0) {
         if(this.maintData.adminstrations.length > 0) {
           for(let i = 0; i < this.maintData.adminstrations.length; i++) {
           for(let i = 0; i < this.maintData.adminstrations.length; i++) {
@@ -206,7 +213,6 @@ export class FollowCommunicationsAddComponent implements OnInit {
         }
         }
 
 
         this.userData = responce['communication']['user'];
         this.userData = responce['communication']['user'];
-        this.spinner.hide();
         console.log('gggg', this.maintData);
         console.log('gggg', this.maintData);
         if(this.maintData['files'].length > 0) {
         if(this.maintData['files'].length > 0) {
           this.showAttachements = true;
           this.showAttachements = true;
@@ -214,6 +220,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
           this.showAttachements = false;
           this.showAttachements = false;
         }
         }
         console.log('user data ', this.userData);
         console.log('user data ', this.userData);
+        this.spinner.hide();
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
@@ -271,6 +278,7 @@ export class FollowCommunicationsAddComponent implements OnInit {
 
 
   onChangemainLocation(event){
   onChangemainLocation(event){
     const id = event.target.value
     const id = event.target.value
+    console.log(id);
     this.mainLocationVal = id;
     this.mainLocationVal = id;
      this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
      this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
        (response)  => {
        (response)  => {

+ 1 - 4
src/app/dashboard/footer/add-footer/add-footer.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" />
                   <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>
                   <label for="file" class="iconUpload-w"><i class="fas fa-upload"></i></label>
                 </div>
                 </div>
-                <!-- <span *ngIf="checkValidImg" style="color: red; position: absolute; right:0;bottom:0">must be in 'png' format</span> -->
               </div>
               </div>
               <div class="col-12 col-sm-12 col-md-4">
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
                 <div class="form-group">
@@ -74,7 +73,6 @@
               <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="showDescriptionField">
               <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="showDescriptionField">
                 <div class="form-group">
                 <div class="form-group">
                     <label for="description" style="float: right;margin-right: 5px"> التفاصيل باللغه العربيه <span class="spanReqired-w">*</span></label>
                     <label for="description" style="float: right;margin-right: 5px"> التفاصيل باللغه العربيه <span class="spanReqired-w">*</span></label>
-                    <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
                   <quill-editor id="description" name="description" [ngModel]="footer.description" required>
                   <quill-editor id="description" name="description" [ngModel]="footer.description" required>
                   </quill-editor>
                   </quill-editor>
                 </div>
                 </div>
@@ -83,14 +81,13 @@
               <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="showDescriptionField">
               <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="showDescriptionField">
                 <div class="form-group">
                 <div class="form-group">
                     <label for="description_en" style="float: right;margin-right: 5px">  التفاصيل باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
                     <label for="description_en" style="float: right;margin-right: 5px">  التفاصيل باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
-                    <!-- <textarea cols="3" class="form-control" id="description" name="description" [ngModel]="new.description" required></textarea> -->
                   <quill-editor id="description_en" name="description_en" [ngModel]="footer.description_en" required>
                   <quill-editor id="description_en" name="description_en" [ngModel]="footer.description_en" required>
                   </quill-editor>
                   </quill-editor>
                 </div>
                 </div>
               </div>
               </div>
 
 
               <div class="col-12">
               <div class="col-12">
-                  <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+                  <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveButton">حفظ</button>
                   <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
                   <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
               </div>
               </div>
               
               

+ 11 - 4
src/app/dashboard/footer/add-footer/add-footer.component.ts

@@ -34,6 +34,7 @@ export class AddFooterComponent implements OnInit {
   checkOtherField: boolean = false;
   checkOtherField: boolean = false;
   checkNotContactUs:boolean = false;
   checkNotContactUs:boolean = false;
   contactUsPage: boolean = false;
   contactUsPage: boolean = false;
+  checkSaveButton:boolean = false;
   serviceName: string = '';
   serviceName: string = '';
 
 
   footer = {
   footer = {
@@ -101,9 +102,9 @@ export class AddFooterComponent implements OnInit {
                 this.contactUsPage = true;
                 this.contactUsPage = true;
               } else {
               } else {
                 this.checkNotContactUs = true;
                 this.checkNotContactUs = true;
-                this.showDescriptionField = true;
+                this.showDescriptionField = false;
                 this.showEmailField = false;
                 this.showEmailField = false;
-                this.showLinkField = false;
+                this.showLinkField = true;
                 this.footer.email = '';
                 this.footer.email = '';
                 this.footer.link = '';
                 this.footer.link = '';
                 
                 
@@ -198,6 +199,7 @@ export class AddFooterComponent implements OnInit {
  onSubmitted() {
  onSubmitted() {
   const formData = this.footerFormData.value;
   const formData = this.footerFormData.value;
   console.log(formData);
   console.log(formData);
+  this.checkSaveButton = true;
  
  
   if(this.checkChangeImage){
   if(this.checkChangeImage){
     formData['photo'] = this.imageBase64;
     formData['photo'] = this.imageBase64;
@@ -211,8 +213,10 @@ export class AddFooterComponent implements OnInit {
   if(this.typeMode){
   if(this.typeMode){
     if(this.photoType[1] != 'png' && this.photoEdit == true) {
     if(this.photoType[1] != 'png' && this.photoEdit == true) {
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
+      this.checkSaveButton = false;
     } else if(this.imageBase64 == '' && this.photoEdit == true){
     } else if(this.imageBase64 == '' && this.photoEdit == true){
       this.toastr.warning('قم باختيار صوره !');
       this.toastr.warning('قم باختيار صوره !');
+      this.checkSaveButton = false;
     } else {
     } else {
       if(this.serviceId == 2) {
       if(this.serviceId == 2) {
         this.dashBoardService.editItem( this.externalId, formData, 'internalFooter').subscribe(
         this.dashBoardService.editItem( this.externalId, formData, 'internalFooter').subscribe(
@@ -223,6 +227,7 @@ export class AddFooterComponent implements OnInit {
           },
           },
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
+            this.checkSaveButton = false;
             this.toastr.error('خطأ في التعديل !');
             this.toastr.error('خطأ في التعديل !');
           }
           }
         );
         );
@@ -243,11 +248,11 @@ export class AddFooterComponent implements OnInit {
   } else {
   } else {
     if(this.photoType[1] != 'png') {
     if(this.photoType[1] != 'png') {
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
+      this.checkSaveButton = false;
     } else if(this.imageBase64 == ''){
     } else if(this.imageBase64 == ''){
       this.toastr.warning('قم باختيار صوره !');
       this.toastr.warning('قم باختيار صوره !');
+      this.checkSaveButton = false;
     } else {
     } else {
-      // formData['photo'] = this.imageBase64;
-      // formData['photo_type'] = this.photoType[1];
       if(this.serviceId == 2) {
       if(this.serviceId == 2) {
         this.dashBoardService.addItem(formData, 'externalFooter').subscribe(
         this.dashBoardService.addItem(formData, 'externalFooter').subscribe(
           (responce) => {
           (responce) => {
@@ -258,6 +263,7 @@ export class AddFooterComponent implements OnInit {
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
             this.toastr.error('خطأ في الحفظ !');
             this.toastr.error('خطأ في الحفظ !');
+            this.checkSaveButton = false;
           }
           }
         );
         );
       } else if(this.serviceId == 6){
       } else if(this.serviceId == 6){
@@ -269,6 +275,7 @@ export class AddFooterComponent implements OnInit {
           },
           },
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
+            this.checkSaveButton = false;
             this.toastr.error('خطأ في الحفظ !');
             this.toastr.error('خطأ في الحفظ !');
           }
           }
         );
         );

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

@@ -29,11 +29,7 @@
                       <input type="text" class="form-control" placeholder="الأسم باللغه الإنجليزيه" formControlName="name_en"/>
                       <input type="text" class="form-control" placeholder="الأسم باللغه الإنجليزيه" formControlName="name_en"/>
                     </div>
                     </div>
                   </div>
                   </div>
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                        <button class="btn btn-secondary rightW" type="button" style="margin-top:33px" (click)="onAddTitle()">أضف المزيد من العناوين </button>
-                    </div>
-                  </div>
+                  
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="showAppearance">
                   <div class="col-12 col-sm-12 col-md-4 col-lg-4" *ngIf="showAppearance">
                     <div class="form-group">
                     <div class="form-group">
                       <label style="float: right; margin: 5px 0">الظهور<span class="spanReqired-w">*</span></label>
                       <label style="float: right; margin: 5px 0">الظهور<span class="spanReqired-w">*</span></label>
@@ -44,6 +40,11 @@
                       </select>
                       </select>
                     </div>
                     </div>
                   </div>
                   </div>
+                  <div class="col-12 col-sm-12 col-md-12 col-lg-12">
+                    <div class="form-group">
+                        <button class="btn btn-secondary rightW" type="button" style="margin-top:33px" (click)="onAddTitle()">أضف المزيد من العناوين الفرعيه</button>
+                    </div>
+                  </div>
                 </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;">

+ 7 - 0
src/app/dashboard/internal-services/add-internal-services/add-internal-services.component.css

@@ -97,3 +97,10 @@ input,select {
     padding: 20px;
     padding: 20px;
     border-radius: 20px;
     border-radius: 20px;
 }
 }
+
+
+.custom-control-input {
+    z-index: 1;
+    opacity: 1;
+    margin-top: 7px;
+}

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

@@ -92,12 +92,12 @@
                               <div class="form-group">
                               <div class="form-group">
                                 <div class="custom-control custom-radio inlineBlock-w">
                                 <div class="custom-control custom-radio inlineBlock-w">
                                   <input type="radio" class="custom-control-input" id="defaultUnchecked{{i}}" (change)="showCahngeRadio('internal',i)" value="internal" formControlName="link_type">
                                   <input type="radio" class="custom-control-input" id="defaultUnchecked{{i}}" (change)="showCahngeRadio('internal',i)" value="internal" formControlName="link_type">
-                                  <label class="custom-control-label" for="defaultUnchecked{{i}}" style="cursor: pointer;">داخلي</label>
+                                  <label class="custom-control-label" for="defaultUnchecked{{i}}" style="cursor: pointer; margin:0 20px;">داخلي</label>
                                 </div>
                                 </div>
                                 
                                 
                                 <div class="custom-control custom-radio inlineBlock-w">
                                 <div class="custom-control custom-radio inlineBlock-w">
                                   <input type="radio" class="custom-control-input" id="defaultChecked{{i}}" value="external" (change)="showCahngeRadio('external',i)" formControlName="link_type">
                                   <input type="radio" class="custom-control-input" id="defaultChecked{{i}}" value="external" (change)="showCahngeRadio('external',i)" formControlName="link_type">
-                                  <label class="custom-control-label" for="defaultChecked{{i}}" style="cursor: pointer;">خارجي</label>
+                                  <label class="custom-control-label" for="defaultChecked{{i}}" style="cursor: pointer; margin:0 20px;">خارجي</label>
                                 </div>
                                 </div>
                               </div>
                               </div>
                           </div>    
                           </div>    

+ 2 - 2
src/app/dashboard/main-footer/footer.component.html

@@ -39,7 +39,7 @@
               <div class="leftFooter-w text-center">
               <div class="leftFooter-w text-center">
                 <ul class="list-unstyled">
                 <ul class="list-unstyled">
                   <li *ngFor="let award of authSer.footerData['awards_section']">
                   <li *ngFor="let award of authSer.footerData['awards_section']">
-                    <img src="{{authSer.pathImg + award.photo }}" />
+                   <a href="{{award.link}}" target="_blank"> <img src="{{authSer.pathImg + award.photo }}" /> </a> 
                   </li>
                   </li>
                 </ul>
                 </ul>
               </div>
               </div>
@@ -84,7 +84,7 @@
               <div class="leftFooter-w text-center">
               <div class="leftFooter-w text-center">
                 <ul class="list-unstyled">
                 <ul class="list-unstyled">
                   <li *ngFor="let award of authSer.footerData['awards_section']">
                   <li *ngFor="let award of authSer.footerData['awards_section']">
-                    <img src="{{authSer.pathImg + award.photo }}" />
+                   <a href="{{award.link}}" target="_blank"> <img src="{{authSer.pathImg + award.photo }}" /></a>
                   </li>
                   </li>
                 </ul>
                 </ul>
               </div>
               </div>

+ 4 - 1
src/app/dashboard/main-menu/add-menu/add-menu.component.css

@@ -51,6 +51,8 @@ input,select {
 }
 }
 
 
 
 
+
+
 /* .inputfile + label {
 /* .inputfile + label {
     width: 100%;
     width: 100%;
     font-size: 1.25em;
     font-size: 1.25em;
@@ -91,4 +93,5 @@ input,select {
 
 
 .ql-container  {
 .ql-container  {
     min-height: 100px !important;
     min-height: 100px !important;
-}
+}
+

+ 1 - 2
src/app/dashboard/main-menu/add-menu/add-menu.component.html

@@ -51,7 +51,6 @@
                           <option value="4">4</option>
                           <option value="4">4</option>
                           <option value="5">5</option>
                           <option value="5">5</option>
                           <option value="6">6</option>
                           <option value="6">6</option>
-                          <option value="1000">المزيد</option>
                         </select>
                         </select>
                       </div>
                       </div>
                     </div>
                     </div>
@@ -88,7 +87,7 @@
                     </div>
                     </div>
 
 
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin: 10px 0;" *ngIf="menu.link_type == 'internal'">
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin: 10px 0;" *ngIf="menu.link_type == 'internal'">
-                      <label for="link" style="float: right; margin-right: 5px">الصفحات الخارجيه <span class="spanReqired-w">*</span> </label>
+                      <label for="link" style="float: right; margin-right: 5px"> أختر الصفحه الداخليه<span class="spanReqired-w">*</span> </label>
                       <select class="form-control" name="link" [ngModel]="menu.link" required>
                       <select class="form-control" name="link" [ngModel]="menu.link" required>
                         <option *ngFor="let page of internalPages" [value]="page.id">{{page.name}}</option>
                         <option *ngFor="let page of internalPages" [value]="page.id">{{page.name}}</option>
                       </select>
                       </select>

+ 4 - 2
src/app/dashboard/main-menu/add-menu/add-menu.component.ts

@@ -182,6 +182,7 @@ export class AddMenuComponent implements OnInit {
     console.log(formData);
     console.log(formData);
   }
   }
   if(this.typeMode){
   if(this.typeMode){
+    //Edit mode
     if(this.imageBase64 == '' && this.photoEdit == true){
     if(this.imageBase64 == '' && this.photoEdit == true){
       this.toastr.warning('قم باختيار صوره !');
       this.toastr.warning('قم باختيار صوره !');
       this.checkSaveClick = false;
       this.checkSaveClick = false;
@@ -220,10 +221,11 @@ export class AddMenuComponent implements OnInit {
       }
       }
     }
     }
   } else {
   } else {
-    if(this.imageBase64 == ''){
+    //create mode
+    if(this.imageBase64 == '' && !formData.parent_id){
       this.toastr.warning('قم باختيار صوره !');
       this.toastr.warning('قم باختيار صوره !');
       this.checkSaveClick = false;
       this.checkSaveClick = false;
-    } else if(formData.photo_type != 'png'){
+    } else if(formData.photo_type != 'png' && !formData.parent_id){
       this.toastr.warning('الصوره يجب أن تكون بصيغه png');
       this.toastr.warning('الصوره يجب أن تكون بصيغه png');
       this.checkSaveClick = false;
       this.checkSaveClick = false;
     } else {
     } else {

+ 57 - 58
src/app/dashboard/maintenance-communications/maintenance-communication-edit/maintenance-communication-edit.component.html

@@ -1,7 +1,6 @@
 <div class="addHospital-w">
 <div class="addHospital-w">
     <div class="container">
     <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>
       <h3 style="font-size: 18px; color: red">سيتم تحديث الصفحه بعد  {{counter$ | async }} ثانيه</h3>
 
 
 
 
@@ -9,7 +8,8 @@
         <div class="col-12">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
           <ul class="list-unstyled titileLi-w">
             <li class="headingText-w">خدمه البلاغات  </li>
             <li class="headingText-w">خدمه البلاغات  </li>
-            <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> عرض التفاصيل</li>
+            <li class="headingText-w" style="cursor:pointer" (click)="authSer.perviousLocation()"> متابعه البلاغات الوارده للصيانه</li>
+            <li class="headingText-w"> عرض التفاصيل</li>
           </ul>
           </ul>
         </div>
         </div>
       </div>
       </div>
@@ -22,12 +22,7 @@
                 <div class="row">
                 <div class="row">
                   <div class="wrapper">
                   <div class="wrapper">
                     
                     
-                    <div class="col-12 col-md-4">
-                      <div class="form-group">
-                        <label for="name" style="float:right">رقم البلاغ</label>
-                        <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
-                      </div>
-                    </div>
+                   
 
 
                     <div class="col-12 col-md-4">
                     <div class="col-12 col-md-4">
                       <div class="form-group">
                       <div class="form-group">
@@ -46,29 +41,10 @@
   
   
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                       <div class="form-group">
                       <div class="form-group">
-                      <label style="float:right">رقم الجوال <span class="spanReqired-w">*</span></label>
+                      <label style="float:right">رقم الجوال</label>
                       <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                       <input type="phone" placeholder="رقم الجوال" class="form-control" ngModel name="phone" [(ngModel)]="userData.comm_creator_phone" [disabled]="disabledInput" />
                       </div>
                       </div>
                     </div>
                     </div>
-        
-                    <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                      <div class="form-group">
-                        <label for="endDate" style="float:right" >التاريخ<span class="spanReqired-w">*</span></label>
-                        <div *ngIf='bindingDateSplitEnd'>
-                          <app-end-higri-date  (onDatePicked)="getDate($event, 'end')" [myEndDate]="bindingDateSplitEnd" [higriDisabled]="disabledVal"> </app-end-higri-date>
-                        </div>
-                      </div>
-                    </div>
-
-                    <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                      <div class="form-group">
-                        <label for="time" style="float:right"> الوقت<span class="spanReqired-w">*</span></label>
-                        <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
-                      </div>
-                    </div>
-  
-                   
-  
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
@@ -77,30 +53,47 @@
                 <h2 class="title">بيانات البلاغ</h2>
                 <h2 class="title">بيانات البلاغ</h2>
                 <div class="row">
                 <div class="row">
                   <div class="wrapper">
                   <div class="wrapper">
+                    
+                    <div class="col-12 col-md-4">
+                      <div class="form-group">
+                        <label for="name" style="float:right">رقم البلاغ</label>
+                        <input id="name" type="text" class="form-control" placeholder="رقم البلاغ" ngModel name="commmun_number"  [(ngModel)]="maintData.id" [disabled]="disabledInput" />
+                      </div>
+                    </div>
+
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                       <div class="form-group">
                       <div class="form-group">
-                        <label for="subject"  style="float: right; margin-right:5px;margin-top:10px">موضوع البلاغ</label>
+                        <label for="subject"  style="float: right; margin-right:5px">موضوع البلاغ</label>
                         <input type="text" id="subject" class="form-control" placeholder="موضوع البلاغ" name="subject" ngModel [(ngModel)]="maintData.subject" [disabled]="disabledInput" />
                         <input type="text" id="subject" class="form-control" placeholder="موضوع البلاغ" name="subject" ngModel [(ngModel)]="maintData.subject" [disabled]="disabledInput" />
                       </div>
                       </div>
                     </div>
                     </div>
-
+                    
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                       <div class="form-group">
                       <div class="form-group">
-                        <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
-                        <input type="text" id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" />
+                        <label for="endDate" style="float:right" >التاريخ</label>
+                        <div *ngIf='bindingDateSplitEnd'>
+                          <app-end-higri-date  (onDatePicked)="getDate($event, 'end')" [myEndDate]="bindingDateSplitEnd" [higriDisabled]="disabledVal"> </app-end-higri-date>
+                        </div>
+                      </div>
+                    </div>
+
+                    <div class="col-12 col-sm-12 col-md-6 col-lg-4" style="margin-top: 10px;">
+                      <div class="form-group">
+                        <label for="time" style="float:right"> الوقت</label>
+                        <input type="time" id="time" placeholder="الوقت" class="form-control" ngModel name="time" [(ngModel)]="maintData.created_time" [disabled]="disabledInput" /> 
                       </div>
                       </div>
                     </div>
                     </div>
 
 
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                     <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
-                        <div class="form-group">
-                          <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
-                          <select name="main_location_id" class="form-control" [ngModel]="mainLocationVal" (change)="onChangemainLocation($event)" [disabled]="disabledInput" >
-                            <option *ngFor="let location of locationList" [value]="location.id" required> {{location.name}} </option>    
-                          </select>                  
-                        </div>     
-                     </div>
+                      <div class="form-group">
+                        <label for="reportTopic" style="float: right;margin-right: 5px">  الموقع الرئيسي </label>
+                        <select name="main_location_id" class="form-control" [ngModel]="mainLocationVal" (change)="onChangemainLocation($event)" [disabled]="disabledInput" >
+                          <option *ngFor="let location of locationList" [value]="location.id" required> {{location.name}} </option>    
+                        </select>                  
+                      </div>     
+                    </div>
                      
                      
-                     <div class="col-12 col-sm-12 col-md-4 col-lg-4">
+                     <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 10px;">
                         <div class="form-group">
                         <div class="form-group">
                           <label for="sub_location_id"  style="float: right;margin-right: 5px">  الموقع الفرعي </label>
                           <label for="sub_location_id"  style="float: right;margin-right: 5px">  الموقع الفرعي </label>
                           <select name="sub_location_id" class="form-control" [ngModel]="subLocationVal" (change)="changeSubLocation($event)" [disabled]="disabledInput">
                           <select name="sub_location_id" class="form-control" [ngModel]="subLocationVal" (change)="changeSubLocation($event)" [disabled]="disabledInput">
@@ -108,6 +101,13 @@
                           </select>
                           </select>
                         </div>
                         </div>
                      </div>
                      </div>
+                     
+                    <div class="col-12 col-sm-12 col-md-12 col-lg-12">
+                      <div class="form-group">
+                        <label for="message"  style="float: right; margin-right:5px;margin-top:10px">نص البلاغ</label>
+                        <textarea id="message" class="form-control" placeholder="نص البلاغ" name="message" ngModel [(ngModel)]="maintData.message" [disabled]="disabledInput" style="height:100px;"></textarea>
+                      </div>
+                    </div>
 
 
                      <div class="col-12">
                      <div class="col-12">
                         <h2 class="title">المرفقات</h2>
                         <h2 class="title">المرفقات</h2>
@@ -139,7 +139,7 @@
                   </div>
                   </div>
                 </div>
                 </div>
 
 
-            <div class="col-12">
+            <div class="col-12" *ngIf="!communicationData.status">
                 <h2 class="title">عمليات البلاغ</h2>
                 <h2 class="title">عمليات البلاغ</h2>
                 <div class="row">
                 <div class="row">
                   <div class="wrapper">
                   <div class="wrapper">
@@ -151,20 +151,11 @@
                         </select>
                         </select>
                       </div>
                       </div>
                     </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="col-12 col-md-4">
                       <div class="form-group">
                       <div class="form-group">
                         <label style="float:right" for="child_category_id">التصنيف الفرعي</label>
                         <label style="float:right" for="child_category_id">التصنيف الفرعي</label>
-                        <select class="form-control" id="child_category_id" style="padding:0 5px" ngModel name="child_category_id" (input)="getChildGategories($event)" [(ngModel)]="communicationData.child_category_id">
+                        <select class="form-control" id="child_category_id" style="padding:0 5px" ngModel name="child_category_id" (input)="getChildGategoriesVal($event)" [(ngModel)]="communicationData.child_category_id">
                           <option *ngFor="let childCategorie of childsCategoriesList; let i = index" [value]="childCategorie.id">{{childCategorie.name}}</option>
                           <option *ngFor="let childCategorie of childsCategoriesList; let i = index" [value]="childCategorie.id">{{childCategorie.name}}</option>
                         </select>
                         </select>
                       </div>
                       </div>
@@ -185,11 +176,9 @@
                       </div>
                       </div>
                     </div>
                     </div>
 
 
-                 
-
                     <div class="col-12 col-md-4">
                     <div class="col-12 col-md-4">
                       <div style="float:right">
                       <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">
+                        <input type="checkbox" class="form-check-input" name="urgent_communication" id="urgent_communication" [(ngModel)]="communicationData.urgent_communication">
                         <label class="form-check-label" for="urgent_communication" style="margin: 0 20px;">بلاغ عاجل</label>
                         <label class="form-check-label" for="urgent_communication" style="margin: 0 20px;">بلاغ عاجل</label>
                       </div>
                       </div>
                     </div>
                     </div>
@@ -256,8 +245,8 @@
                                 <tr *ngFor="let data of adminstrations ">
                                 <tr *ngFor="let data of adminstrations ">
                                   <td>
                                   <td>
                                     <div class="custom-control custom-checkbox centerIneerItem">
                                     <div class="custom-control custom-checkbox centerIneerItem">
-                                      <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();" [ngModelOptions]="{standalone: true}">
-                                      <label class="custom-control-label disblayBlock-w" for="{{data.id}}" style="color:#2a2a2a"></label>
+                                      <input type="checkbox" class="custom-control-input" id="{{data.adminstration_id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();" [ngModelOptions]="{standalone: true}">
+                                      <label class="custom-control-label disblayBlock-w" for="{{data.adminstration_id}}" style="color:#2a2a2a"></label>
                                     </div>
                                     </div>
                                   </td>
                                   </td>
                                   <td>{{data.name}}</td>
                                   <td>{{data.name}}</td>
@@ -294,7 +283,7 @@
                               selectAdmin.adminstration_status == 'new' ? 'جديد' 
                               selectAdmin.adminstration_status == 'new' ? 'جديد' 
                               : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                               : selectAdmin.adminstration_status == 'closed' ? 'مغلق' 
                               : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
                               : selectAdmin.adminstration_status == 'reopen' ? 'إستأنف' 
-                              : selectAdmin.adminstration_status == 'redirect_to_adminstrations' ? 'العائد للإدارات' : 'لايوجد'}}
+                              : selectAdmin.adminstration_status == 'adminstration_redirection' ? 'العائد للإدارات' : 'لايوجد'}}
                           </td>
                           </td>
                           <td style="font-size: 12px;">{{selectAdmin.countdown}}</td>
                           <td style="font-size: 12px;">{{selectAdmin.countdown}}</td>
                           <td><button type="button" class="btn btn-danger" (click)="removeSelectedAdminsration(selectAdmin)">حذف</button></td>
                           <td><button type="button" class="btn btn-danger" (click)="removeSelectedAdminsration(selectAdmin)">حذف</button></td>
@@ -312,6 +301,16 @@
                 <button type="button" class="btn btn-primary rightW" (click)="onPrint()" *ngIf="maintData.reopen == 1">طباعه</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>
                 <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()" style="margin:20px 10px;">إلغاء</button>
               </div>
               </div>
+              <div class="col-6" *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_status_reason">
+                    <option value="ظهور المشكلة مجددا">ظهور المشكلة مجددا</option>
+                    <option value="عدم حل المشكلة من البداية">عدم حل المشكلة من البداية</option>
+                    <option value="إغلاق البلاغ دون موافقتنا">إغلاق البلاغ دون موافقتنا</option>
+                  </select>
+                </div>
+              </div>
             </div>
             </div>
           </form>
           </form>
         </div>
         </div>

+ 59 - 52
src/app/dashboard/maintenance-communications/maintenance-communication-edit/maintenance-communication-edit.component.ts

@@ -37,7 +37,7 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
   //reopen object 
   //reopen object 
   reOpenReasonObject = {
   reOpenReasonObject = {
     communication_id: null,
     communication_id: null,
-    reopen_closed_communication: '',
+    reopen_status_reason: '',
   }
   }
 
 
   selectedAll: any;
   selectedAll: any;
@@ -54,7 +54,7 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     maintenance_notes: '',
     maintenance_notes: '',
     status: null,
     status: null,
     closed_status_reason: '',
     closed_status_reason: '',
-    urgent_communication: '',
+    urgent_communication: null,
   };
   };
 
 
   countries = [];
   countries = [];
@@ -93,9 +93,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
         location.reload(); 
         location.reload(); 
       },180000);
       },180000);
 
 
-
-  
-
       this.counter$ = timer(0,1000).pipe(
       this.counter$ = timer(0,1000).pipe(
         take(this.counter),
         take(this.counter),
         map(() => --this.counter)
         map(() => --this.counter)
@@ -116,7 +113,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
      //get nationality data
      //get nationality data
      this.userSer.getNationality().subscribe(
      this.userSer.getNationality().subscribe(
       (responce) => {
       (responce) => {
-        console.log(responce);
         this.countries = responce['countries'];
         this.countries = responce['countries'];
       },
       },
       (error) => {
       (error) => {
@@ -128,7 +124,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
       this.userSer.onGetIdentities().subscribe(
       this.userSer.onGetIdentities().subscribe(
         (responce) => {
         (responce) => {
           this.identities = responce['identities'];
           this.identities = responce['identities'];
-          console.log('idddentiiiesssssssssss', this.identities);
         },
         },
         (error) => {
         (error) => {
           console.log(error);
           console.log(error);
@@ -139,7 +134,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
       //get parent_categories_list
       //get parent_categories_list
       this.http.get(this.authSer.pathApi + '/parent_categories_list').subscribe(
       this.http.get(this.authSer.pathApi + '/parent_categories_list').subscribe(
         (responce) => {
         (responce) => {
-          console.log('parent_categories_list', responce);
           this.parentCategoriesList = responce['categories'];
           this.parentCategoriesList = responce['categories'];
         },
         },
         (error) => {
         (error) => {
@@ -147,23 +141,34 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
         }
         }
       );
       );
 
 
+    
     //get maintanence data by id
     //get maintanence data by id
     this.dashBoardSer.getItemData(this.pageId, 'maintenance').subscribe(
     this.dashBoardSer.getItemData(this.pageId, 'maintenance').subscribe(
       (responce) => {
       (responce) => {
         
         
         this.maintData = responce['communication'];
         this.maintData = responce['communication'];
-        console.log('main data ', this.maintData);
+        console.log('main data request ', this.maintData);
+        this.maintData.adminstrations.map(admin => admin.id = admin.adminstration_id);
+        console.log('after ediiiiiiiiiiiiiiit', this.maintData);
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.communicationData.maintenance_notes = this.maintData.maintenance_notes;
         this.communicationData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
         this.communicationData.status = this.maintData.status == 'closed' ? this.maintData.status : false;
         this.communicationData.time_period_id = this.maintData.time_period_id;
         this.communicationData.time_period_id = this.maintData.time_period_id;
         this.communicationData.closed_status_reason = this.maintData.closed_status_reason ? this.maintData.closed_status_reason : '';
         this.communicationData.closed_status_reason = this.maintData.closed_status_reason ? this.maintData.closed_status_reason : '';
+        
         this.communicationData.parent_category_id = this.maintData.parent_category_id;
         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;
+        if(this.communicationData.parent_category_id) {
+          this.getChildGategories(this.communicationData.parent_category_id);
+          this.communicationData.child_category_id = this.maintData.child_category_id;
+        }
+        
         //get main_location_id
         //get main_location_id
         this.mainLocationVal = this.maintData.main_location_id;
         this.mainLocationVal = this.maintData.main_location_id;
-        this.getSublocationList(this.mainLocationVal);
-        this.subLocationVal = this.maintData.sub_location_id;
+
+        if(this.mainLocationVal) {
+          this.getSublocationList(this.mainLocationVal);
+          this.subLocationVal = this.maintData.sub_location_id;
+        }
+
 
 
         this.returnEditData();
         this.returnEditData();
         
         
@@ -174,20 +179,23 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
           this.checkStatusClosed = false;
           this.checkStatusClosed = false;
         }
         }
 
 
+       
+
+        
+
+        //make selected adminstarations is true in checkbox and full array of selectedAdminstrations
         this.selectedAdminstrations = [];
         this.selectedAdminstrations = [];
         if(this.maintData.adminstrations.length > 0) {
         if(this.maintData.adminstrations.length > 0) {
           for(let i = 0; i < this.maintData.adminstrations.length; i++) {
           for(let i = 0; i < this.maintData.adminstrations.length; i++) {
             this.selectedAdminstrations.push(this.maintData.adminstrations[i]);
             this.selectedAdminstrations.push(this.maintData.adminstrations[i]);
             for(let j = 0; j < this.adminstrations.length; j++) {
             for(let j = 0; j < this.adminstrations.length; j++) {
-              if(this.maintData.adminstrations[i].id == this.adminstrations[j].id) {
-                this.adminstrations[i].selected = true;
+              if(this.maintData.adminstrations[i].adminstration_id == this.adminstrations[j].id) {
+                this.adminstrations[j].selected = true;
               }
               }
             }
             }
           }
           }
         }
         }
 
 
-        console.log('selected adminstrations', this.selectedAdminstrations);
-        console.log('adminstrations ids ', this.adminstrationsIds);
         
         
         this.bindingDateSplitEnd = {
         this.bindingDateSplitEnd = {
           year: parseInt(this.maintData.created_date.split('-')[0]),
           year: parseInt(this.maintData.created_date.split('-')[0]),
@@ -197,13 +205,11 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
 
 
         this.userData = responce['communication']['user'];
         this.userData = responce['communication']['user'];
         this.spinner.hide();
         this.spinner.hide();
-        console.log('gggg', this.maintData);
         if(this.maintData['files'].length > 0) {
         if(this.maintData['files'].length > 0) {
           this.showAttachements = true;
           this.showAttachements = true;
         } else {
         } else {
           this.showAttachements = false;
           this.showAttachements = false;
         }
         }
-        console.log('user data ', this.userData);
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
@@ -213,7 +219,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     //get time period 
     //get time period 
     this.http.get(this.authSer.pathApi + '/page_list/53/1/1000/for_communication').subscribe(
     this.http.get(this.authSer.pathApi + '/page_list/53/1/1000/for_communication').subscribe(
       (response) => {
       (response) => {
-        console.log('time period', response);
         this.times = response['time_periods'];
         this.times = response['time_periods'];
       },
       },
       (error) => {
       (error) => {
@@ -225,7 +230,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     this.http.get(this.authSer.pathApi + '/parent_locations_list').subscribe(
     this.http.get(this.authSer.pathApi + '/parent_locations_list').subscribe(
       (response) => {
       (response) => {
         this.locationList = response['locations'];
         this.locationList = response['locations'];
-        console.log('parent location' , this.locationList);
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
@@ -235,16 +239,15 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
   }
   }
 
 
   changeParentCategory(event) {
   changeParentCategory(event) {
-    console.log(event.target.value);
     this.getChildGategories(event.target.value);
     this.getChildGategories(event.target.value);
   }  
   }  
 
 
 
 
   //get child gategories 
   //get child gategories 
   getChildGategories(parentId: number) {
   getChildGategories(parentId: number) {
+    this.communicationData.parent_category_id = parentId;
     this.http.get(this.authSer.pathApi + '/childs_categories_list_by_parent_id/' + parentId).subscribe(
     this.http.get(this.authSer.pathApi + '/childs_categories_list_by_parent_id/' + parentId).subscribe(
       (responce) => {
       (responce) => {
-        console.log('childs_categories_list_by_parent_id', responce);
         this.childsCategoriesList = responce['categories'];
         this.childsCategoriesList = responce['categories'];
       },
       },
       (error) => {
       (error) => {
@@ -253,12 +256,15 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     );
     );
   };
   };
 
 
+  getChildGategoriesVal(event) {
+    this.communicationData.child_category_id = event.target.value;
+  }
+
   onChangemainLocation(event){
   onChangemainLocation(event){
     const id = event.target.value
     const id = event.target.value
     this.mainLocationVal = id;
     this.mainLocationVal = id;
      this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
      this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + id).subscribe(  
        (response)  => {
        (response)  => {
-         console.log(id);
          this.subLocationList = response['locations'];
          this.subLocationList = response['locations'];
        },
        },
        (error) => {
        (error) => {
@@ -269,7 +275,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
  
  
    
    
    changeSubLocation(event){
    changeSubLocation(event){
-     console.log(event.target.value);
      this.subLocationVal = event.target.value;
      this.subLocationVal = event.target.value;
    }
    }
 
 
@@ -279,8 +284,8 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
 
 
      this.http.get(this.authSer.pathApi + '/page_list/3/1/1000/all'  + searchKey).subscribe(
      this.http.get(this.authSer.pathApi + '/page_list/3/1/1000/all'  + searchKey).subscribe(
       (responce) => {
       (responce) => {
-        console.log('adminstraitions', responce);
         this.adminstrations = responce['adminstrations'];
         this.adminstrations = responce['adminstrations'];
+        console.log('adminstrationnns', this.adminstrations);
       },
       },
       (error) => {
       (error) => {
         console.log(error);
         console.log(error);
@@ -291,7 +296,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
   //search function 
   //search function 
   filtterFunc(event) {
   filtterFunc(event) {
     this.adminstrations = [];
     this.adminstrations = [];
-    console.log(event.target.value);
     this.getAdminstrationList(event.target.value);
     this.getAdminstrationList(event.target.value);
   }
   }
 
 
@@ -320,8 +324,9 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
         this.selectedAdminstrations.push(this.adminstrations[i]);
         this.selectedAdminstrations.push(this.adminstrations[i]);
       }
       }
     }
     }
-    console.log(this.adminstrationsIds);
-    console.log(this.selectedAdminstrations);
+
+    console.log('adminstartion id', this.adminstrationsIds);
+    console.log('selectedAdminstrations', this.selectedAdminstrations);
   }
   }
 
 
   //get sub location list 
   //get sub location list 
@@ -329,7 +334,6 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + parentId).subscribe(  
     this.http.get(this.authSer.pathApi + '/childs_locations_list_by_parent_id/' + parentId).subscribe(  
       (response)  => {
       (response)  => {
         this.subLocationList = response['locations'];
         this.subLocationList = response['locations'];
-        console.log('sub Location', this.subLocationList);
       },
       },
       (error) => {
       (error) => {
         console.log(error)
         console.log(error)
@@ -339,31 +343,30 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
 
 
   //get value of reason reOpen
   //get value of reason reOpen
   getReopenReason(event) {
   getReopenReason(event) {
-    console.log(event.target.value);
-    console.log(this.reOpenReasonObject);
-    this.reOpenReasonObject.reopen_closed_communication = event.target.value;
+    this.reOpenReasonObject.reopen_status_reason = event.target.value;
   }
   }
 
 
   //reOpen mentainence function
   //reOpen mentainence function
   reOpenMaintenance() {
   reOpenMaintenance() {
-    this.http.post(this.authSer.pathApi + '/reopen_closed_communication', this.reOpenReasonObject).subscribe(
-      (responce) => {
-        console.log(responce);
-        this.toastr.success('تم إعاده الفتح بنجاح');
-        this.location.back();
-      },
-      (error) => {
-        console.log(error);
-        this.toastr.error('حدث خطا في الحفظ ، حاول لاحقاً');
-        this.location.back();
-      }
-    );
+    if(!this.reOpenReasonObject.reopen_status_reason){
+      this.toastr.warning('أدخل إعاده سبب فتح البلاغ !');
+    } else {
+       this.http.post(this.authSer.pathApi + '/reopen_closed_communication', this.reOpenReasonObject).subscribe(
+        (responce) => {
+          this.toastr.success('تم إعاده الفتح بنجاح');
+          this.location.back();
+        },
+        (error) => {
+          console.log(error);
+          this.toastr.error('حدث خطا في الحفظ ، حاول لاحقاً');
+        }
+      );
+    }
   }
   }
 
 
 
 
   //remove remove selected adminsration 
   //remove remove selected adminsration 
   removeSelectedAdminsration(adminstrationData) {
   removeSelectedAdminsration(adminstrationData) {
-    console.log(adminstrationData);
 
 
     //to remove checked from adminstrations list
     //to remove checked from adminstrations list
       for(let j = 0; j < this.adminstrations.length; j++) {
       for(let j = 0; j < this.adminstrations.length; j++) {
@@ -375,14 +378,12 @@ export class MaintenanceCommunicationEditComponent implements OnInit {
     const index = this.selectedAdminstrations.indexOf(adminstrationData);
     const index = this.selectedAdminstrations.indexOf(adminstrationData);
     this.selectedAdminstrations.splice(index, 1);
     this.selectedAdminstrations.splice(index, 1);
     
     
-    console.log(index);
   }
   }
 
 
   //return substring of subject and check negaive and positive time 
   //return substring of subject and check negaive and positive time 
 returnEditData() {
 returnEditData() {
   for(let i = 0; i < this.maintData['adminstrations'].length; i++) {
   for(let i = 0; i < this.maintData['adminstrations'].length; i++) {
       this.maintData['adminstrations'][i].countdown = this.maintData['adminstrations'][i].countdown ? this.dashBoardSer.secondsToDhms(this.maintData['adminstrations'][i].countdown) : '-';
       this.maintData['adminstrations'][i].countdown = this.maintData['adminstrations'][i].countdown ? this.dashBoardSer.secondsToDhms(this.maintData['adminstrations'][i].countdown) : '-';
-      console.log(this.maintData['adminstrations'][i].countdown);
   }
   }
 }
 }
 
 
@@ -424,9 +425,10 @@ onPrint(): void {
 
 
     if(this.communicationData.urgent_communication) {
     if(this.communicationData.urgent_communication) {
       this.communicationData.urgent_communication = '1';
       this.communicationData.urgent_communication = '1';
-    } else {
-      this.communicationData.urgent_communication = '0';
     }
     }
+    // } else {
+    //   this.communicationData.urgent_communication = '0';
+    // }
 
 
     for(let i = 0; i < this.selectedAdminstrations.length; i++) {
     for(let i = 0; i < this.selectedAdminstrations.length; i++) {
       this.adminstrationsIds.push(this.selectedAdminstrations[i].id);
       this.adminstrationsIds.push(this.selectedAdminstrations[i].id);
@@ -434,15 +436,19 @@ onPrint(): void {
 
 
     this.communicationData['adminstrations_ids'] = this.adminstrationsIds;
     this.communicationData['adminstrations_ids'] = this.adminstrationsIds;
 
 
-    console.log(this.communicationData);
 
 
     if(this.adminstrationsIds.length == 0 && this.communicationData.urgent_communication == '1') {
     if(this.adminstrationsIds.length == 0 && this.communicationData.urgent_communication == '1') {
       this.toastr.warning('قم بإختيار الإدارات');
       this.toastr.warning('قم بإختيار الإدارات');
       this.checkSaveClick = false;
       this.checkSaveClick = false;
+    }else if( this.communicationData.status == 'closed' && !this.communicationData.closed_status_reason){
+      this.toastr.warning('قم بإختيار سبب غلق البلاغ !');
+      this.checkSaveClick = false;
     } else {
     } else {
+      if(this.communicationData.urgent_communication != '1'){
+        this.communicationData.urgent_communication = '0';
+      }
       this.http.post(this.authSer.pathApi + '/maintenance_handle_communication', this.communicationData).subscribe(
       this.http.post(this.authSer.pathApi + '/maintenance_handle_communication', this.communicationData).subscribe(
         (responce) => {
         (responce) => {
-          console.log(responce['status']);
           if(responce['status'] == 'some adminstrations didnt closed yet') {
           if(responce['status'] == 'some adminstrations didnt closed yet') {
             this.toastr.warning('بعض الإدارات لم تقم بإغلاق البلاغ بعد !');
             this.toastr.warning('بعض الإدارات لم تقم بإغلاق البلاغ بعد !');
           } else {
           } else {
@@ -452,6 +458,7 @@ onPrint(): void {
         },
         },
         (error) => {
         (error) => {
           console.log(error);
           console.log(error);
+          this.checkSaveClick = false;
           this.toastr.error('خطأ في الحفظ حاول لاحقاً');
           this.toastr.error('خطأ في الحفظ حاول لاحقاً');
         }
         }
       );
       );

+ 7 - 4
src/app/dashboard/maintenance-communications/maintenance-communications-list/maintenance-communications-list.component.html

@@ -11,7 +11,7 @@
     <div class="col-12">
     <div class="col-12">
       <ul class="list-unstyled titileLi-w">
       <ul class="list-unstyled titileLi-w">
         <li class="headingText-w">خدمه البلاغات  </li>
         <li class="headingText-w">خدمه البلاغات  </li>
-        <li class="headingText-w activeLi-w" style="margin-right:5px"> تعريف الموقع</li>
+        <li class="headingText-w activeLi-w" style="margin-right:5px">{{typeList}}</li>
       </ul>
       </ul>
     </div>
     </div>
   </div>
   </div>
@@ -48,7 +48,7 @@
       </div>
       </div>
       <div class="col-12 col-sm-12 col-md-6 col-lg-6">
       <div class="col-12 col-sm-12 col-md-6 col-lg-6">
         <div class="form-group">
         <div class="form-group">
-          <input type="text" placeholder=" البحث ( رقم البلاغ - إداره منشأ البلاغ )" class="form-control inputSearchTable-w" style="margin-top:0;" (input)="filtterFunc($event)"/>
+          <input type="text" placeholder=" البحث (رقم البلاغ - إداره منشأ البلاغ - عنوان البلاغ )" class="form-control inputSearchTable-w" style="margin-top:0;" (input)="filtterFunc($event)"/>
           <hr>
           <hr>
         </div>
         </div>
       </div>
       </div>
@@ -62,6 +62,7 @@
           <th>وقت انشاء البلاغ</th>
           <th>وقت انشاء البلاغ</th>
           <th>موضوع البلاغ</th>
           <th>موضوع البلاغ</th>
           <th>الادارات / الاقسام / الموظفين الموجه لهم</th> 
           <th>الادارات / الاقسام / الموظفين الموجه لهم</th> 
+          <!-- <th>إداره منشئ البلاغ</th> -->
           <th>الفئة</th>
           <th>الفئة</th>
           <th>مده التأخير</th>
           <th>مده التأخير</th>
           <th>الحالة</th>
           <th>الحالة</th>
@@ -74,16 +75,18 @@
           <td>{{data.id}}</td>
           <td>{{data.id}}</td>
           <td>{{data.created_date + " " + data.created_time }}</td>
           <td>{{data.created_date + " " + data.created_time }}</td>
           <td>{{data.subject }}</td>
           <td>{{data.subject }}</td>
-          <td >
+          <td>
             <div class="dropdown">
             <div class="dropdown">
               <button class="btn btn-secondary dropdown-toggle buttonW" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
               <button class="btn btn-secondary dropdown-toggle buttonW" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                 عرض
                 عرض
               </button>
               </button>
               <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" style="text-align:right;"> 
               <div class="dropdown-menu" aria-labelledby="dropdownMenuButton" style="text-align:right;"> 
-                <a class="dropdown-item" *ngFor="let admin of dataList[i]['adminstrations']"> {{ admin.adminstration_name ? admin.adminstration_name : 'لا يوجد'}} </a>
+                <a class="dropdown-item" *ngFor="let admin of dataList[i]['adminstrations']"> {{ admin.name ? admin.name : 'لا يوجد'}} </a>
+                <span *ngIf="dataList[i]['adminstrations'].length == 0" class="check-data-span">لاتوجد بيانات</span>
               </div>
               </div>
             </div>
             </div>
           </td>
           </td>
+          <!-- <td>{{data.adminstration_name}}</td> -->
           <td>{{data.time_period_name ? data.time_period_name : '-'}}</td>
           <td>{{data.time_period_name ? data.time_period_name : '-'}}</td>
           <td>{{data.total_count_down == 0 ? '-' : data.total_count_down }}</td>
           <td>{{data.total_count_down == 0 ? '-' : data.total_count_down }}</td>
           <td>{{ 
           <td>{{ 

+ 9 - 1
src/app/dashboard/maintenance-communications/maintenance-communications-list/maintenance-communications-list.component.ts

@@ -49,6 +49,8 @@ export class MaintenanceCommunicationsListComponent implements OnInit {
     counter$: Observable<number>;
     counter$: Observable<number>;
     counter = 180;
     counter = 180;
 
 
+    typeList: string;
+
   ngOnInit() {
   ngOnInit() {
 
 
       //init values of permisions
       //init values of permisions
@@ -81,6 +83,8 @@ export class MaintenanceCommunicationsListComponent implements OnInit {
 
 
           if(this.pageId == 56) {
           if(this.pageId == 56) {
 
 
+            this.typeList = 'متابعه البلاغات الصادره';
+
             this.route.parent.params.subscribe(
             this.route.parent.params.subscribe(
               (params:Params) => {
               (params:Params) => {
                   this.userLoginId = params['userID'];
                   this.userLoginId = params['userID'];
@@ -125,6 +129,8 @@ export class MaintenanceCommunicationsListComponent implements OnInit {
               );
               );
           } else if(this.pageId == 58) {
           } else if(this.pageId == 58) {
 
 
+            this.typeList = 'متابعه البلاغات الوارده للصيانه';
+
             this.route.parent.params.subscribe(
             this.route.parent.params.subscribe(
               (params:Params) => {
               (params:Params) => {
                   this.userLoginId = params['userID'];
                   this.userLoginId = params['userID'];
@@ -169,6 +175,8 @@ export class MaintenanceCommunicationsListComponent implements OnInit {
               );
               );
           } else if(this.pageId == 59) {
           } else if(this.pageId == 59) {
 
 
+            this.typeList = 'متابعه البلاغات الوارده للإداره';
+
             this.route.parent.params.subscribe(
             this.route.parent.params.subscribe(
               (params:Params) => {
               (params:Params) => {
                   this.userLoginId = params['userID'];
                   this.userLoginId = params['userID'];
@@ -213,7 +221,7 @@ export class MaintenanceCommunicationsListComponent implements OnInit {
                 }
                 }
               );
               );
           } else if(this.pageId == 60) {
           } else if(this.pageId == 60) {
-
+            this.typeList = 'متابعه البلاغات الوارده للقسم';
             this.route.parent.params.subscribe(
             this.route.parent.params.subscribe(
               (params:Params) => {
               (params:Params) => {
                   this.userLoginId = params['userID'];
                   this.userLoginId = params['userID'];

+ 24 - 0
src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.css

@@ -255,6 +255,30 @@ select.ng-invalid{
     color: green;
     color: green;
 }
 }
 
 
+.department-opinion {
+    text-align: right;
+    font-size: 18px;
+    margin: 10px;
+}
+
+
+.saveHint {
+    width: 100%;
+    text-align: right;
+    display: block;
+}
+
+.department_detail {
+    color: #252525;
+    text-align: right;
+    margin: 20px;
+}
+
+.span-detail{
+    color: blue;
+    font-size: 15px;
+}
+
 /* start media query style */
 /* start media query style */
 
 
 @media(max-width: 767px){
 @media(max-width: 767px){

+ 23 - 0
src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.html

@@ -302,10 +302,33 @@
                   </div>
                   </div>
                 </div>
                 </div>
 
 
+                <div class="col-12" *ngIf="showSaveHint">
+                  <p class="saveHint">برجاء الضغط علي زر الحفظ لإتمام عمليه حفظ البيانات</p>
+                </div>
+
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
 
 
+          <div class="col-12">
+            <h2 class="title">معلومات القسم المناسب</h2>
+            <div class="row">
+              <div class="wrapper">
+                <p class="department_detail">إسم القسم :  <span class="span-detail">{{proper_department_name}}</span></p>
+                <p class="department_detail">رأي القسم :  <span class="span-detail" [innerHTML]="department_opinion ? department_opinion : 'القسم لم يبدي رأيه إلي الأن'"></span></p>
+                <p class="department_detail">حاله المتدرب بالنسبه للقسم :  <span class="span-detail">
+                    {{department_status == 'pending' ? 'تحت الإجراء' 
+                          : department_status == 'accepted' ? 'مقبول' 
+                          : department_status == 'replayed_opinion' ? 'رأي القسم'
+                          : department_status == 'refused' ? 'مرفوض' 
+                          : department_status == 'canceled' ? 'ملغي'
+                          : department_status == 'asked_for_opinion' ? 'طلب رأي القسم'
+                          : 'لم يتم تسجيل حاله الطلب'}}
+                  </span>
+                </p>
+              </div>
+            </div>
+          </div>
 
 
             <div class="col-12">
             <div class="col-12">
               <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveClick">حفظ</button>
               <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveClick">حفظ</button>

+ 12 - 5
src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.ts

@@ -28,13 +28,18 @@ export class ReviewTraineeAddComponent implements OnInit {
   typeLink:string = '';
   typeLink:string = '';
   userId: number;
   userId: number;
   checkSaveClick:boolean = false; //to make save button is disabled when click save 
   checkSaveClick:boolean = false; //to make save button is disabled when click save 
-  disabledInput: boolean = false; //to make button dsabled in create mode 
+  disabledInput: boolean = true; //to make button dsabled in create mode 
   showEditField: boolean = false; //to show the field in edit mode 
   showEditField: boolean = false; //to show the field in edit mode 
   showRefusedCause: boolean = false; //to show the cause of refused when ststus is refused
   showRefusedCause: boolean = false; //to show the cause of refused when ststus is refused
   editMode: boolean = false; //true in edit mode 
   editMode: boolean = false; //true in edit mode 
   showPersonalData: boolean = false;
   showPersonalData: boolean = false;
+  showSaveHint:boolean = false;
   reportId: number;
   reportId: number;
   departmentNameOpinion: string = "";
   departmentNameOpinion: string = "";
+  department_opinion: string = "";
+  department_status: string = "";
+  proper_department_name: string = "";
+
   attachments_ids = []; //for edit mode;
   attachments_ids = []; //for edit mode;
 
 
   countries: any[] = [];
   countries: any[] = [];
@@ -194,6 +199,9 @@ export class ReviewTraineeAddComponent implements OnInit {
               this.chosenDepartments[i] = responce['data']['request'].departments[i];
               this.chosenDepartments[i] = responce['data']['request'].departments[i];
               if(this.chosenDepartments[i].is_confirmed == 1){
               if(this.chosenDepartments[i].is_confirmed == 1){
                 this.formData.department4 = responce['data']['request'].departments[i].department_id;
                 this.formData.department4 = responce['data']['request'].departments[i].department_id;
+                this.department_opinion = responce['data']['request'].departments[i].department_opinion;
+                this.department_status = responce['data']['request'].departments[i].trainee_status;
+                this.proper_department_name = responce['data']['request'].departments[i].department_name;
               }
               }
               if(this.chosenDepartments[i].asked_for_opinion == '1') {
               if(this.chosenDepartments[i].asked_for_opinion == '1') {
                 this.departmentNameOpinion = this.chosenDepartments[i].department_name;
                 this.departmentNameOpinion = this.chosenDepartments[i].department_name;
@@ -260,23 +268,22 @@ export class ReviewTraineeAddComponent implements OnInit {
         this.formData.status = typeStatus;
         this.formData.status = typeStatus;
         this.formData.status_description = '';
         this.formData.status_description = '';
         this.toastr.success('تم تسجيل الحاله مقبول');
         this.toastr.success('تم تسجيل الحاله مقبول');
+        this.showSaveHint = true;
         this.showRefusedCause = false;
         this.showRefusedCause = false;
       } else if(typeStatus == 'refused') {
       } else if(typeStatus == 'refused') {
         statusData.status_description = this.formData.status_description;
         statusData.status_description = this.formData.status_description;
         console.log( statusData.status_description);
         console.log( statusData.status_description);
         this.formData.status = typeStatus;
         this.formData.status = typeStatus;
         this.toastr.error('تم تسجيل الحاله بالرفض ');
         this.toastr.error('تم تسجيل الحاله بالرفض ');
+        this.showSaveHint = true;
       } else if(typeStatus == 'asked_for_opinion') {
       } else if(typeStatus == 'asked_for_opinion') {
         this.formData.status = typeStatus;
         this.formData.status = typeStatus;
         this.showRefusedCause = false;
         this.showRefusedCause = false;
+        this.showSaveHint = true;
         this.formData.status_description = '';
         this.formData.status_description = '';
         this.toastr.warning('تم تسجيل الحاله طلب رأي ');
         this.toastr.warning('تم تسجيل الحاله طلب رأي ');
       }
       }
 
 
-
-
-    
-
       console.log ('status data', statusData);
       console.log ('status data', statusData);
 
 
       this.http.post(this.authSer.pathApi + '/change_reuqest_status', statusData).subscribe(
       this.http.post(this.authSer.pathApi + '/change_reuqest_status', statusData).subscribe(

+ 11 - 22
src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.html

@@ -26,7 +26,7 @@
       
       
   
   
       <div class="row">
       <div class="row">
-        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-12 col-sm-12 col-md-12 col-lg-12">
           <div class="form-group">
           <div class="form-group">
             <span class="spanSelect-w">
             <span class="spanSelect-w">
               <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onGetValue($event)">
               <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onGetValue($event)">
@@ -37,7 +37,8 @@
               </select>
               </select>
               من العناصر يتم عرضها
               من العناصر يتم عرضها
             </span>
             </span>
-            <span class="spanSelect-w">
+            <span class="spanSelect-w" style="margin: 0 10px;">
+               / حاله الطلب  
               <select [ngModel]="viewTableData" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:130px; margin-right:15px;">
               <select [ngModel]="viewTableData" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:130px; margin-right:15px;">
                 <option value="all">الكل</option>
                 <option value="all">الكل</option>
                 <option value="pending">تحت الإجراء</option>
                 <option value="pending">تحت الإجراء</option>
@@ -48,18 +49,19 @@
                 <option value="asked_for_opinion">طلب رأي القسم</option>
                 <option value="asked_for_opinion">طلب رأي القسم</option>
                 <option value="replayed_opinion">رأي القسم</option>
                 <option value="replayed_opinion">رأي القسم</option>
               </select>
               </select>
-              حاله الطلب
+            </span>
+            <span class="spanSelect-w">
+              / بيانات القسم المراد عرضه 
+              <select [ngModel]="filtterDepartmentVal" class="form-control selectButton-w" (input)="onFiltterDepartment($event)">
+              </select>
             </span>
             </span>
           </div>
           </div>
-          <!-- <div class="form-group">
-           
-          </div> -->
         </div>
         </div>
         <div class="col-12 col-sm-12 col-md-12 col-lg-12"  style="margin-top:20px;">
         <div class="col-12 col-sm-12 col-md-12 col-lg-12"  style="margin-top:20px;">
           
           
         </div>
         </div>
       </div>
       </div>
-  
+
       <div class="row" *ngIf="dataList.length == 0">
       <div class="row" *ngIf="dataList.length == 0">
         <div class="col-12">
         <div class="col-12">
           <h2>لايوجد بيانات لعرضها</h2>
           <h2>لايوجد بيانات لعرضها</h2>
@@ -71,13 +73,9 @@
           <table class="table table-bordered">
           <table class="table table-bordered">
               <thead class="headBackground-w">
               <thead class="headBackground-w">
                 <tr>
                 <tr>
-                  <!-- <th>
-                    <div class="custom-control custom-checkbox">
-                        <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
-                    </div>
-                  </th> -->
                   <th> إسم المتدرب</th>
                   <th> إسم المتدرب</th>
                   <th>إسم التخصص</th>
                   <th>إسم التخصص</th>
+                  <th>إسم القسم</th>
                   <th>الجنسيه</th>
                   <th>الجنسيه</th>
                   <th>الجامعه</th>
                   <th>الجامعه</th>
                   <th>نوع التدريب</th>
                   <th>نوع التدريب</th>
@@ -87,20 +85,11 @@
               </thead>
               </thead>
               <tbody>
               <tbody>
                 <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
                 <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
-                  <!-- <td>
-                    <div class="custom-control custom-checkbox centerIneerItem">
-                      <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();">
-                    </div>
-                  </td> -->
                   <td>{{data.trainee_name}}</td>
                   <td>{{data.trainee_name}}</td>
                   <td> {{data.specialization_name}}</td>
                   <td> {{data.specialization_name}}</td>
+                  <td>{{data.department_name ? data.department_name : '-'}}</td>
                   <td>{{data.country_arNationality}}</td>
                   <td>{{data.country_arNationality}}</td>
                   <td>{{data.university}}</td>
                   <td>{{data.university}}</td>
-                  <!-- <td>{{data.type == 'trainees' ? 'متدربين' 
-                    : data.type == 'fellowship' ? 'زماله' 
-                    : data.type == 'university_administrators' : 'مشرفي الجامعات'
-                    : 'لايوجد'}}
-                  </td> -->
                   <td>{{data.type == 'trainees' ? 'متدربين' 
                   <td>{{data.type == 'trainees' ? 'متدربين' 
                       : data.type == 'fellowship' ? 'زماله' 
                       : data.type == 'fellowship' ? 'زماله' 
                       : data.type == 'university_administrators' ? 'مشرفي الجامعات'
                       : data.type == 'university_administrators' ? 'مشرفي الجامعات'

+ 159 - 126
src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.ts

@@ -39,6 +39,7 @@ export class ReviewTraineeDataListComponent implements OnInit {
     dataTableNumber: number = 5;
     dataTableNumber: number = 5;
     viewTableData: string = 'all';
     viewTableData: string = 'all';
     serviceName: string = '';
     serviceName: string = '';
+    filtterDepartmentVal: string = 'all';
     pages = [];
     pages = [];
 
 
   
   
@@ -113,24 +114,27 @@ export class ReviewTraineeDataListComponent implements OnInit {
     );
     );
 
 
      //get list data 
      //get list data 
-     this.dashBoardService.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
-      (responce) => {
-        console.log(responce);
-        this.dataList = responce['requests'];
+     this.getListData(this.currentPage, 
+      this.dataTableNumber , 
+      this.viewTableData, 
+      this.filtterDepartmentVal, 
+      '').subscribe(
+       (response) => {
+        console.log(response);
+        this.dataList = response['requests'];
         if(this.dataList.length == 0) {
         if(this.dataList.length == 0) {
           this.toastr.warning('القائمه فارغه من الطلبات ');
           this.toastr.warning('القائمه فارغه من الطلبات ');
         }
         }
-        this.count = responce['count'];
-        this.perPagePagenation = responce['per_page'];
+        this.count = response['count'];
+        this.perPagePagenation = response['per_page'];
         console.log('evennnnts', this.dataList);
         console.log('evennnnts', this.dataList);
         this.spinner.hide();
         this.spinner.hide();
-      },
-      (error) => {
-        console.log(error);
-        this.spinner.hide();
-      }
-    );
-    
+       },
+       (error) => {
+         console.log('error list =>', error);
+         this.spinner.hide();
+       }
+     )  
   }
   }
 
 
   //make all checkbox of user checked 
   //make all checkbox of user checked 
@@ -152,19 +156,27 @@ export class ReviewTraineeDataListComponent implements OnInit {
     console.log(data.target.value);
     console.log(data.target.value);
     const dataSearch = data.target.value;     
     const dataSearch = data.target.value;     
     this.currentPage = 1;
     this.currentPage = 1;
-    this.dashBoardService.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-      (responce) => {
-        console.log(responce);
-        this.dataList = responce['requests'];
-        this.count = responce['count'];
-        this.perPagePagenation = responce['per_page'];
-        console.log('filtter count', this.count);
-        console.log('filtter perPagePAgenation', this.perPagePagenation);
-      },
-      (error) => {
-        console.log(error)
-      }
-    );
+    this.filtterSearch(this.currentPage, 
+      this.dataTableNumber , 
+      this.viewTableData, 
+      this.filtterDepartmentVal, 
+      dataSearch).subscribe(
+        (response) => {
+          console.log(response);
+          this.dataList = response['requests'];
+          if(this.dataList.length == 0) {
+            this.toastr.warning('القائمه فارغه من الطلبات ');
+          }
+          this.count = response['count'];
+          this.perPagePagenation = response['per_page'];
+          console.log('evennnnts', this.dataList);
+          this.spinner.hide();
+         },
+         (error) => {
+           console.log('error list =>', error);
+           this.spinner.hide();
+         }
+      )
   };
   };
 
 
   //change page 
   //change page 
@@ -172,22 +184,29 @@ export class ReviewTraineeDataListComponent implements OnInit {
     this.spinner.show();
     this.spinner.show();
     this.currentPage = pagenationNumber;
     this.currentPage = pagenationNumber;
     this.dataList = [];
     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['requests'];
-        this.count = responce['count'];
-        this.perPagePagenation = responce['per_page'];
-        console.log(this.dataList);
-        this.spinner.hide();
-      },
-      (error) => {
-        console.log(error);
+    //get list data 
+    this.getListData(this.currentPage, 
+      this.dataTableNumber , 
+      this.viewTableData, 
+      this.filtterDepartmentVal, 
+      '').subscribe(
+       (response) => {
+        console.log(response);
+        this.dataList = response['requests'];
+        if(this.dataList.length == 0) {
+          this.toastr.warning('القائمه فارغه من الطلبات ');
+        }
+        this.count = response['count'];
+        this.perPagePagenation = response['per_page'];
+        console.log('evennnnts', this.dataList);
         this.spinner.hide();
         this.spinner.hide();
-      }
-    );
+       },
+       (error) => {
+         console.log('error list =>', error);
+         this.spinner.hide();
+       }
+     )
+
   }
   }
 
 
 //determine the list count from select element 
 //determine the list count from select element 
@@ -195,109 +214,123 @@ onGetValue(event) {
   this.spinner.show();
   this.spinner.show();
   this.dataList = [];
   this.dataList = [];
   this.dataTableNumber = event.target.value;
   this.dataTableNumber = event.target.value;
-  this.dashBoardService.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-    (responce) => {
-      console.log(responce);
-      this.dataList = responce['requests'];
-      this.count = responce['count'];
-      this.perPagePagenation = responce['per_page'];
+   //get list data 
+   this.getListData(this.currentPage, 
+    this.dataTableNumber , 
+    this.viewTableData, 
+    this.filtterDepartmentVal, 
+    '').subscribe(
+     (response) => {
+      console.log(response);
+      this.dataList = response['requests'];
       if(this.dataList.length == 0) {
       if(this.dataList.length == 0) {
-        this.toastr.warning('لا يوجد بيانات لعرضها');
+        this.toastr.warning('القائمه فارغه من الطلبات ');
       }
       }
+      this.count = response['count'];
+      this.perPagePagenation = response['per_page'];
+      console.log('evennnnts', this.dataList);
       this.spinner.hide();
       this.spinner.hide();
-    },
-    (error) => {
-      console.log(error);
-      this.spinner.hide();
-    }
-  );
+     },
+     (error) => {
+       console.log('error list =>', error);
+       this.spinner.hide();
+     }
+   )
 };
 };
 
 
 onFiltterChosen(event) {
 onFiltterChosen(event) {
   this.spinner.show();
   this.spinner.show();
   this.dataList = [];
   this.dataList = [];
   console.log(event.target.value);
   console.log(event.target.value);
-  console.log(this.authSer.pathApi + '/page_list/' +this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + event.target.value);
-  this.http.get(this.authSer.pathApi + '/page_list/' +this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + event.target.value).subscribe(
-    (responce) => {
-      console.log(responce);
-      console.log(responce);
-      this.dataList = responce['requests'];
+  this.viewTableData = event.target.value;
+  //get list data 
+  this.getListData(this.currentPage, 
+    this.dataTableNumber , 
+    this.viewTableData, 
+    this.filtterDepartmentVal, 
+    '').subscribe(
+     (response) => {
+      console.log(response);
+      this.dataList = response['requests'];
       if(this.dataList.length == 0) {
       if(this.dataList.length == 0) {
-        this.toastr.warning('لا يوجد بيانات لعرضها');
+        this.toastr.warning('القائمه فارغه من الطلبات ');
       }
       }
-      this.count = responce['count'];
-      this.perPagePagenation = responce['per_page'];
+      this.count = response['count'];
+      this.perPagePagenation = response['per_page'];
+      console.log('evennnnts', this.dataList);
       this.spinner.hide();
       this.spinner.hide();
-    },
-    (error) => {
-      console.log(error);
-    }
-  )
+     },
+     (error) => {
+       console.log('error list =>', error);
+       this.spinner.hide();
+     }
+   )
 }
 }
-    
-// onDelete() {
-//   for(let i = 0; i < this.dataList.length; i++) {
-//     if(this.dataList[i].selected == true) {
-//       this.dataListIds.push(this.dataList[i].id);
-//     }
-//   }
 
 
-//   console.log(this.dataListIds);
 
 
-//   if(this.dataListIds.length > 0) {
-//     const dialogRef = this.modal.alert()
-//     .size('sm')
-//     .showClose(true)
-//     .title('تأكيد الحذف')
-//     .body(`
-//         <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
-//         `)
-//     .open();
-//     dialogRef.result
-//     .then( result =>  
-//       this.dashBoardService.deleteItem(this.dataListIds, this.pageId).subscribe(
-//         (responce) => {
-//           console.log(responce);
-//           this.toastr.success('تم الحذف');
-//           this.spinner.show();
-//           this.dataList = [];
-//           this.dashBoardService.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
-//             (responce) => {
-//               console.log(responce);
-//               this.dataList = responce['requests'];
-//               this.count = responce['count'];
-//               this.perPagePagenation = responce['per_page'];
-//               this.spinner.hide();
-//             },
-//             (error) => {
-//               console.log(error);
-//               this.spinner.hide();
-//             }
-//           );
-//         },
-//         (error) => {
-//           this.toastr.success('يوجد خطأ إنتظر قليلا وأعد المحاوله ');
-//           console.log(error);
-//           this.spinner.hide();
-//         },
-//       )
-//     );
-//   } else {
-//     this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
-//   }
-// };
-  
-//add function
-onAdd() {
-  console.log('service/' + this.userLoginId + '/' + this.serviceId + '/reviewTraineeData/add');
-  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/reviewTraineeData/add']);
+onFiltterDepartment(event) {
+  console.log(event.target.value);
+  this.filtterDepartmentVal = event.target.value;
+   //get list data 
+   this.getListData(this.currentPage, 
+    this.dataTableNumber , 
+    this.viewTableData, 
+    this.filtterDepartmentVal, 
+    '').subscribe(
+     (response) => {
+      console.log(response);
+      this.dataList = response['requests'];
+      if(this.dataList.length == 0) {
+        this.toastr.warning('القائمه فارغه من الطلبات ');
+      }
+      this.count = response['count'];
+      this.perPagePagenation = response['per_page'];
+      console.log('evennnnts', this.dataList);
+      this.spinner.hide();
+     },
+     (error) => {
+       console.log('error list =>', error);
+       this.spinner.hide();
+     }
+   )
 }
 }
 
 
-//edit function
+  
+  //add function
+  onAdd() {
+    console.log('service/' + this.userLoginId + '/' + this.serviceId + '/reviewTraineeData/add');
+    this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/reviewTraineeData/add']);
+  }
+
+  //edit function
   onEdit(editNewID) {
   onEdit(editNewID) {
-  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'reviewTraineeData/edit/' + editNewID]);
-}
+    this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'reviewTraineeData/edit/' + editNewID]);
+  }
+
+  //function get list 
+  getListData(currentPage: number, per_page: number, status: string, department: string, keySearch: string) {
+    return this.http.get(this.authSer.pathApi + '/training_requests_list/' 
+    + currentPage + '/' 
+    + per_page + '/' 
+    + status + '/' 
+    + department);
+  }
+
+  //filtter search function
+  filtterSearch(currentPage: number, per_page: number, status: string, department: string, keySearch: string) {
+    console.log(this.authSer.pathApi + '/training_requests_list/' 
+    + this.currentPage + '/' 
+    + this.dataTableNumber + '/' 
+    + this.viewTableData + '/' 
+    + this.filtterDepartmentVal + '/' + keySearch);
+
+    return this.http.get(this.authSer.pathApi + '/training_requests_list/' 
+    + currentPage + '/' 
+    + per_page + '/' 
+    + status + '/' 
+    + department + '/' 
+    + keySearch);
+  }
     
     
 
 
 }
 }

+ 2 - 3
src/app/dashboard/report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component.html

@@ -36,8 +36,7 @@
           </div>
           </div>
         </div>
         </div>
 
 
-        <div class="col-12" *ngIf="adminstraion_officers.length > 0">
-          <!-- <button class="btn btn-success" style="float: right; margin: 10px 0;" (click)="onPrint()">طباعه</button>  -->
+        <div class="col-12" *ngIf="adminstraion_officers.length > 0" id="print-section">
           <h3 class="heading">ظباط إتصال الإداره</h3>
           <h3 class="heading">ظباط إتصال الإداره</h3>
           <table class="table table-bordered text-center">
           <table class="table table-bordered text-center">
             <thead class="headBackground-w">
             <thead class="headBackground-w">
@@ -57,7 +56,7 @@
           </table>
           </table>
         </div>
         </div>
 
 
-        <div class="col-12" *ngIf="department_officers.length > 0">
+        <div class="col-12" *ngIf="department_officers.length > 0" id="print-section">
             <h3 class="heading">ظباط إتصال القسم</h3>
             <h3 class="heading">ظباط إتصال القسم</h3>
             <table class="table table-bordered text-center">
             <table class="table table-bordered text-center">
               <thead class="headBackground-w">
               <thead class="headBackground-w">

+ 85 - 3
src/app/dashboard/report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component.ts

@@ -92,9 +92,91 @@ export class ReportCurrentEmployeeOfficerComponent implements OnInit {
     }
     }
   }
   }
 
 
-  //print function 
-  onPrint() {
-    window.print();
+  // //print function 
+  // onPrint() {
+  //   window.print();
+  // }
+
+  onPrint(): void {
+    let printContents, popupWin;
+    printContents = document.getElementById('print-section').innerHTML;
+    popupWin = window.open('', '_blank', 'top=0,left=0,height=100%,width=auto');
+    popupWin.document.open();
+    popupWin.document.write(`
+      <html>
+        <head>
+          <title></title>
+          <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> </link>
+          <style>
+            .row{
+              display: flex;
+              flex-wrap: wrap;
+              margin-right: -15px;
+              margin-left: -15px;
+            }
+            .col-6{
+              float: right;
+              flex: 0 0 50%;
+              max-width: 50%
+            }
+            .col-12{
+              flex-basis: 0;
+              flex-grow: 1;
+              max-width: 100%;
+            }
+            table {
+              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+              border-collapse: collapse;
+              width: 100%;
+              direction: rtl;
+              text-align: center;
+            }
+            .heading {
+              text-align: center;
+            }
+            
+            table td, table th {
+              border: 1px solid #ddd;
+              padding: 8px;
+            }
+            
+            table tr:nth-child(even){background-color: #f2f2f2;}
+            
+            table tr:hover {background-color: #ddd;}
+            
+            table th {
+              padding-top: 12px;
+              padding-bottom: 12px;
+              text-align: center;
+              background-color: #4CAF50;
+              color: white;
+            }
+          </style>
+        </head>
+    <body onload="window.print();window.close()">
+   <div class="row">
+      <div class="col-6" style="float: left">
+        <img class="logo1" src="../../assets/image/logo2.png" style="width: 130px;float: left; margin-left: 20px;">
+      </div>
+      <div class="col-6" style="float: right">
+        <img  class="logo2" src="../../assets/image/logo1.png" style="width: 200px;float: right; margin-right: 20px;">
+       </div>
+    </div>
+    <div class="row">
+    <div class="col-12" style="width:100%;text-align: center">
+    <h1>تقرير ضابط الموظفين الحالي</h1>
+    </div>
+    </div>
+  
+   <div class="row">
+      <div class="col-12">
+      ${printContents}
+      </div>
+   </div>
+    </body>
+      </html>`
+    );
+    popupWin.document.close();
   }
   }
 
 
 }
 }

+ 10 - 10
src/app/dashboard/report-list/report-list.component.html

@@ -1,10 +1,10 @@
 <div class="reportList-w">
 <div class="reportList-w">
   <div class="container">
   <div class="container">
       <div class="containerContent-w">
       <div class="containerContent-w">
-          <div class="row" *ngIf="permissionsTable">
+            <div class="row" *ngIf="!pagesTable">
               <div class="col-12 col-sm-12 col-md-6 col-lg-6">
               <div class="col-12 col-sm-12 col-md-6 col-lg-6">
                 <div class="form-group">
                 <div class="form-group">
-                  <input type="text" placeholder="البحث عن الأسم" class="form-control rightFloat searchInput-w" style="margin-top:13px;" [(ngModel)]="name"/>
+                  <input type="text" placeholder="البحث ( بالاسم - رقم الهويه - الهاتف - الرقم الوظيفي )" class="form-control rightFloat searchInput-w" style="margin-top:13px;" [(ngModel)]="name"/>
                   <button class="btn btn-success leftFloat" (click)="onSearchName()">ابحث</button>
                   <button class="btn btn-success leftFloat" (click)="onSearchName()">ابحث</button>
                 </div>
                 </div>
               </div>
               </div>
@@ -13,20 +13,20 @@
             <table class="table table-bordered text-center" *ngIf="permissionsTable">
             <table class="table table-bordered text-center" *ngIf="permissionsTable">
               <thead>
               <thead>
                 <tr>
                 <tr>
-                  <th>الاسم</th>
-                  <th>البريد الإلكتروني</th>
-                  <th>التقارير</th>
+                  <th class="text-center">الاسم</th>
+                  <th class="text-center">البريد الإلكتروني</th>
+                  <th class="text-center">التقارير</th>
                 </tr>
                 </tr>
               </thead>
               </thead>
               <tbody>
               <tbody>
-                <tr *ngFor="let user of usersList; let i = index ">
-                  <td>{{user.name}}</td>
-                  <td>{{user.email}}</td>
-                  <td><button class="btn btn-outline-secondary" (click)="onGetReport(user.id)"><i class="fas fa-address-card"></i></button></td>
+                <tr>
+                  <td>{{usersList?.name ? usersList.name : ''}}</td>
+                  <td>{{usersList?.email ? usersList.email : ''}}</td>
+                  <td (click)="onGetReport(usersList.id)" style="cursor:pointer"><button class="btn btn-outline-secondary"><i class="fas fa-address-card"></i></button></td>
                 </tr>
                 </tr>
               </tbody>
               </tbody>
             </table>
             </table>
-            <div class="row"  *ngIf="pagesTable">
+            <div class="row" *ngIf="pagesTable">
               <div class="col-6">
               <div class="col-6">
                 <div class="form-group">
                 <div class="form-group">
                   <label style="float:right">المجموعات</label>
                   <label style="float:right">المجموعات</label>

+ 7 - 5
src/app/dashboard/report-list/report-list.component.ts

@@ -58,7 +58,7 @@ export class ReportListComponent implements OnInit {
       (params: Params) => {
       (params: Params) => {
         this.reportType = params['reportName'];
         this.reportType = params['reportName'];
         if(this.reportType == 'reportPermissions') {
         if(this.reportType == 'reportPermissions') {
-          this.permissionsTable = true;
+          //this.permissionsTable = true;
         } else if(this.reportType == 'reportPages') {
         } else if(this.reportType == 'reportPages') {
           this.typeRoleReport = 'reportPages';
           this.typeRoleReport = 'reportPages';
           this.spinner.show();
           this.spinner.show();
@@ -97,11 +97,12 @@ export class ReportListComponent implements OnInit {
     console.log(this.name);
     console.log(this.name);
     this.http.get(this.authSer.pathApi + '/find_user/' + this.name).subscribe(
     this.http.get(this.authSer.pathApi + '/find_user/' + this.name).subscribe(
       (responce) => {
       (responce) => {
-        console.log(responce);
-        if(responce['users'].length == 0) {
+        console.log('reprt data ', responce);
+        if(responce['user'] == null) {
           this.toastr.warning('لا يوجد مستخدمين بهذا الاسم');
           this.toastr.warning('لا يوجد مستخدمين بهذا الاسم');
         } else {
         } else {
-          this.usersList = responce['users'];
+          this.usersList = responce['user'];
+          this.permissionsTable = true;
           console.log(this.usersList);
           console.log(this.usersList);
         }
         }
 
 
@@ -120,7 +121,8 @@ export class ReportListComponent implements OnInit {
 
 
   //on get user  report
   //on get user  report
   onGetReport(user_id) {
   onGetReport(user_id) {
-    this.router.navigate(['userreport/' + user_id]);
+    console.log(user_id);
+    this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/userreport/' + user_id]);
   }
   }
 
 
   getRoleReport() {
   getRoleReport() {

+ 1 - 1
src/app/dashboard/roles/add-roles/add-roles.component.html

@@ -34,7 +34,7 @@
                 <div class="col-12 col-sm-12 col-md-4">
                 <div class="col-12 col-sm-12 col-md-4">
                     <div class="form-group">
                     <div class="form-group">
                       <label style="float: right;margin: 5px 0">الأنظمه</label>
                       <label style="float: right;margin: 5px 0">الأنظمه</label>
-                      <select class="form-control" name="service_val" (change)="onSelectChange($event)">
+                      <select class="form-control" name="service_val" (change)="onSelectChange($event)" [ngModel]="serviceVal">
                           <option *ngFor="let service of pages" [value]="service.id">{{service.name}}</option>
                           <option *ngFor="let service of pages" [value]="service.id">{{service.name}}</option>
                       </select>
                       </select>
                     </div>
                     </div>

+ 1 - 0
src/app/dashboard/roles/add-roles/add-roles.component.ts

@@ -33,6 +33,7 @@ export class AddRolesComponent implements OnInit, OnDestroy {
   typeLink: string = '';
   typeLink: string = '';
   roleId: number;
   roleId: number;
   checkSaveDisabled:boolean = false;
   checkSaveDisabled:boolean = false;
+  serviceVal:string = '';
 
 
   pages = []; //فيها كل حاجه السيرفيس والصفحات والصلاحيات
   pages = []; //فيها كل حاجه السيرفيس والصفحات والصلاحيات
   permisionsId = [];
   permisionsId = [];

+ 16 - 17
src/app/dashboard/roles/role-report/role-report.component.html

@@ -1,33 +1,32 @@
 <div class="reprot">
 <div class="reprot">
   <div class="container">
   <div class="container">
     <div class="containerContent-w">
     <div class="containerContent-w">
-        <div class="row">
+        <div class="row" id="print-section">
             <div class="col-12">
             <div class="col-12">
-              <button class="btn btn-success" style="float: right; margin: 10px 0;" (click)="onPrint()">طباعه</button> 
-              <!-- <table class="table table-bordered">
+              <table class="table table-bordered">
                   <thead class="headBackground-w">
                   <thead class="headBackground-w">
                     <tr>
                     <tr>
-                      <th>
-                        <div class="custom-control custom-checkbox">
-                            <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
-                        </div>
-                      </th>
-                      <th>الاسم</th>
+                      <th>إسم المجموغه</th>
+                      <th *ngIf="rolesList['pages'].length > 0">إسم الصفحه</th>
+                      <th>إسم النظام</th>
+                      <th>تاريخ الإضافه</th>
+                      <th>المستخدم</th>
                     </tr>
                     </tr>
                   </thead>
                   </thead>
                   <tbody>
                   <tbody>
-                    <tr *ngFor="let role of rolesList; let i = index ">
-                      <td>
-                        <div class="custom-control custom-checkbox centerIneerItem">
-                          <input type="checkbox" class="custom-control-input" id="{{role.id}}" [(ngModel)]="role.selected" [value]='role' (change)="checkIfAllSelected();">
-                        </div>
-                      </td>
-                      <td>{{role.role_name}}</td>
+                    <tr>
+                      <td>{{rolesList.role_name}}</td>
+                      <td *ngIf="rolesList['pages'].length > 0"><p *ngFor="let page of rolesList['pages']">{{page.name}}</p></td>
+                      <td>{{rolesList.role_name}}</td>
+                      <td>{{rolesList.created_at}}</td>
+                      <td>{{rolesList.name}}</td>
                     </tr>
                     </tr>
                   </tbody>
                   </tbody>
-                </table> -->
+                </table>
             </div>
             </div>
         </div>
         </div>
+        <button class="btn btn-success" style="float: right; margin: 10px 0;" (click)="onPrint()">طباعه</button> 
+
     </div>
     </div>
   </div>
   </div>
 </div> 
 </div> 

+ 101 - 4
src/app/dashboard/roles/role-report/role-report.component.ts

@@ -1,3 +1,4 @@
+import { AuthServiceService } from 'src/app/shared/auth-service.service';
 import { UserService } from './../../../shared/user.service';
 import { UserService } from './../../../shared/user.service';
 import { ActivatedRoute, Params } from '@angular/router';
 import { ActivatedRoute, Params } from '@angular/router';
 import { Component, OnInit } from '@angular/core';
 import { Component, OnInit } from '@angular/core';
@@ -14,18 +15,33 @@ import { DashboardService } from '../../../shared/dashboard.service';
 export class RoleReportComponent implements OnInit {
 export class RoleReportComponent implements OnInit {
   
   
   roleId: number;
   roleId: number;
-  rolesList: any [];
+  rolesList: any;
   selectedAll: any;
   selectedAll: any;
+  showRoleReport: boolean = false;
 
 
   constructor(private route: ActivatedRoute, 
   constructor(private route: ActivatedRoute, 
     private dashboardSer: DashboardService, 
     private dashboardSer: DashboardService, 
     private userService: UserService,
     private userService: UserService,
+    public authSer: AuthServiceService,
     private spinner: NgxSpinnerService ) { 
     private spinner: NgxSpinnerService ) { 
       this.spinner.show();
       this.spinner.show();
     }
     }
 
 
   ngOnInit() {
   ngOnInit() {
     
     
+   //init values of permisions
+   this.authSer.showAddBtn = false;
+   this.authSer.showDeleteBtn = false;
+   this.authSer.showEditBtn = false;
+   this.authSer.showPermissionsBtn = false;
+    //show / hide notification search in header
+    this.authSer.notificationLogin = true;
+    this.authSer.showSearchHeader = false;
+    this.authSer.showHeaderLogin = false;
+    this.authSer.showHeaderDashBoard = true;
+    this.authSer.showDashboardHeader = true;
+    this.authSer.internalHeader = false;
+
     this.userService.getUserDataProfile();
     this.userService.getUserDataProfile();
     
     
     this.route.params.subscribe(
     this.route.params.subscribe(
@@ -36,6 +52,7 @@ export class RoleReportComponent implements OnInit {
             //console.log(responce);
             //console.log(responce);
             this.rolesList = responce['role'];
             this.rolesList = responce['role'];
             console.log('role list', this.rolesList);
             console.log('role list', this.rolesList);
+            this.showRoleReport = true;
             this.spinner.hide();
             this.spinner.hide();
           }, 
           }, 
           (error) => {
           (error) => {
@@ -47,8 +64,88 @@ export class RoleReportComponent implements OnInit {
   };
   };
 
 
   //print function
   //print function
-  onPrint() {
-    window.print();
-  }
+  // onPrint() {
+  //   window.print();
+  // }
+
+  onPrint(): void {
+    let printContents, popupWin;
+    printContents = document.getElementById('print-section').innerHTML;
+    popupWin = window.open('', '_blank', 'top=0,left=0,height=100%,width=auto');
+    popupWin.document.open();
+    popupWin.document.write(`
+      <html>
+        <head>
+          <title></title>
+          <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> </link>
+          <style>
+            .row{
+              display: flex;
+              flex-wrap: wrap;
+              margin-right: -15px;
+              margin-left: -15px;
+            }
+            .col-6{
+              float: right;
+              flex: 0 0 50%;
+              max-width: 50%
+            }
+            .col-12{
+              flex-basis: 0;
+              flex-grow: 1;
+              max-width: 100%;
+            }
+            table {
+              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+              border-collapse: collapse;
+              width: 100%;
+              direction: rtl;
+              text-align: center;
+              
+            }
+            
+            table td, table th {
+              border: 1px solid #ddd;
+              padding: 8px;
+            }
+            
+            table tr:nth-child(even){background-color: #f2f2f2;}
+            
+            table tr:hover {background-color: #ddd;}
+            
+            table th {
+              padding-top: 12px;
+              padding-bottom: 12px;
+              text-align: center;
+              background-color: #4CAF50;
+              color: white;
+            }
+          </style>
+        </head>
+    <body onload="window.print();window.close()">
+   <div class="row">
+      <div class="col-6" style="float: left">
+        <img class="logo1" src="../../assets/image/logo2.png" style="width: 130px;float: left; margin-left: 20px;">
+      </div>
+      <div class="col-6" style="float: right">
+        <img  class="logo2" src="../../assets/image/logo1.png" style="width: 200px;float: right; margin-right: 20px;">
+       </div>
+    </div>
+    <div class="row">
+    <div class="col-12" style="width:100%;text-align: center">
+    <h1>تقرير الصفحات التابعه لمجموعه</h1>
+    </div>
+    </div>
+  
+   <div class="row">
+      <div class="col-12">
+      ${printContents}
+      </div>
+   </div>
+    </body>
+      </html>`
+    );
+    popupWin.document.close();
+}
 
 
 }
 }

+ 7 - 7
src/app/dashboard/roles/role-report2/role-report2.component.html

@@ -1,17 +1,16 @@
 <div class="reprot">
 <div class="reprot">
   <div class="container">
   <div class="container">
       <div class="containerContent-w">
       <div class="containerContent-w">
-          <div class="row">
-              <button class="btn btn-success" style="float:right;margin:10px 0;" (click)="onPrint()">طباعه</button>
+          <div class="row" id="print-section">
               <div class="col-12">
               <div class="col-12">
                 <table class="table table-bordered text-center">
                 <table class="table table-bordered text-center">
                   <thead>
                   <thead>
                     <tr>
                     <tr>
-                      <th>إسم المجموعه</th>
-                      <th>اسم الموظف</th>
-                      <th>اسم الاداره</th>
-                      <th>أسم الموظف مانح الصلاحيه</th>
-                      <th>تاريخ المنح</th>
+                      <th class="text-center">إسم المجموعه</th>
+                      <th class="text-center">اسم الموظف</th>
+                      <th class="text-center">اسم الاداره</th>
+                      <th class="text-center">أسم الموظف مانح الصلاحيه</th>
+                      <th class="text-center">تاريخ المنح</th>
                     </tr>
                     </tr>
                   </thead>
                   </thead>
                   <tbody>
                   <tbody>
@@ -42,6 +41,7 @@
                 </table>
                 </table>
               </div>
               </div>
             </div>
             </div>
+            <button class="btn btn-success" style="float:right;margin:10px 0;" (click)="onPrint()">طباعه</button>
       </div>
       </div>
   </div>
   </div>
 </div> 
 </div> 

+ 97 - 2
src/app/dashboard/roles/role-report2/role-report2.component.ts

@@ -1,3 +1,4 @@
+import { AuthServiceService } from 'src/app/shared/auth-service.service';
 import { DashboardService } from './../../../shared/dashboard.service';
 import { DashboardService } from './../../../shared/dashboard.service';
 import { ActivatedRoute, Params } from '@angular/router';
 import { ActivatedRoute, Params } from '@angular/router';
 import { Component, OnInit } from '@angular/core';
 import { Component, OnInit } from '@angular/core';
@@ -16,12 +17,26 @@ export class RoleReport2Component implements OnInit {
   reportData = [];
   reportData = [];
   constructor(private dashboardSer: DashboardService, 
   constructor(private dashboardSer: DashboardService, 
     private route: ActivatedRoute, 
     private route: ActivatedRoute, 
+    public authSer: AuthServiceService,
     private userService: UserService,
     private userService: UserService,
     private spinner: NgxSpinnerService) { 
     private spinner: NgxSpinnerService) { 
       this.spinner.show();
       this.spinner.show();
     }
     }
 
 
   ngOnInit() {
   ngOnInit() {
+     //init values of permisions
+     this.authSer.showAddBtn = false;
+     this.authSer.showDeleteBtn = false;
+     this.authSer.showEditBtn = false;
+     this.authSer.showPermissionsBtn = false;
+      //show / hide notification search in header
+      this.authSer.notificationLogin = true;
+      this.authSer.showSearchHeader = false;
+      this.authSer.showHeaderLogin = false;
+      this.authSer.showHeaderDashBoard = true;
+      this.authSer.showDashboardHeader = true;
+      this.authSer.internalHeader = false;
+
     this.userService.getUserDataProfile();
     this.userService.getUserDataProfile();
     this.route.params.subscribe(
     this.route.params.subscribe(
       (params:Params) => {
       (params:Params) => {
@@ -41,8 +56,88 @@ export class RoleReport2Component implements OnInit {
     );
     );
   };
   };
 
 
-  onPrint() {
-    window.print();
+  // onPrint() {
+  //   window.print();
+  // }
+
+  onPrint(): void {
+    let printContents, popupWin;
+    printContents = document.getElementById('print-section').innerHTML;
+    popupWin = window.open('', '_blank', 'top=0,left=0,height=100%,width=auto');
+    popupWin.document.open();
+    popupWin.document.write(`
+      <html>
+        <head>
+          <title></title>
+          <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> </link>
+          <style>
+            .row{
+              display: flex;
+              flex-wrap: wrap;
+              margin-right: -15px;
+              margin-left: -15px;
+            }
+            .col-6{
+              float: right;
+              flex: 0 0 50%;
+              max-width: 50%
+            }
+            .col-12{
+              flex-basis: 0;
+              flex-grow: 1;
+              max-width: 100%;
+            }
+            table {
+              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+              border-collapse: collapse;
+              width: 100%;
+              direction: rtl;
+              text-align: center;
+              
+            }
+            
+            table td, table th {
+              border: 1px solid #ddd;
+              padding: 8px;
+            }
+            
+            table tr:nth-child(even){background-color: #f2f2f2;}
+            
+            table tr:hover {background-color: #ddd;}
+            
+            table th {
+              padding-top: 12px;
+              padding-bottom: 12px;
+              text-align: center;
+              background-color: #4CAF50;
+              color: white;
+            }
+          </style>
+        </head>
+    <body onload="window.print();window.close()">
+   <div class="row">
+      <div class="col-6" style="float: left">
+        <img class="logo1" src="../../assets/image/logo2.png" style="width: 130px;float: left; margin-left: 20px;">
+      </div>
+      <div class="col-6" style="float: right">
+        <img  class="logo2" src="../../assets/image/logo1.png" style="width: 200px;float: right; margin-right: 20px;">
+       </div>
+    </div>
+    <div class="row">
+    <div class="col-12" style="width:100%;text-align: center">
+    <h1>تقرير الصفحات التابعه لمجموعه</h1>
+    </div>
+    </div>
+  
+   <div class="row">
+      <div class="col-12">
+      ${printContents}
+      </div>
+   </div>
+    </body>
+      </html>`
+    );
+    popupWin.document.close();
   }
   }
 
 
 }
 }

+ 1 - 33
src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.html

@@ -195,34 +195,6 @@
                       <input type="text" id="field" placeholder="الجهه التابع لها المتدرب" class="form-control" name="organization_affiliated_with" ngModel [(ngModel)]="formData.organization_affiliated_with" [disabled]="disabledInput" required/>
                       <input type="text" id="field" placeholder="الجهه التابع لها المتدرب" class="form-control" name="organization_affiliated_with" ngModel [(ngModel)]="formData.organization_affiliated_with" [disabled]="disabledInput" required/>
                     </div>
                     </div>
                   </div>
                   </div>
-
-                  <!-- <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department1" style="float:right;">القسم الأول</label>
-                      <select class="form-control selectStyle-w" id="department1" name="department1" (input)="changeDepartment($event , 1)" [(ngModel)]="formData.department1" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2001">حذف</option>
-                      </select>
-                    </div>
-                  </div>
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department2" style="float:right;">القسم الثاني</label>
-                      <select class="form-control selectStyle-w" id="department2" name="department2" (input)="changeDepartment($event , 2)" [(ngModel)]="formData.department2" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2002">حذف</option>
-                      </select>
-                    </div>
-                  </div>
-                  <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                    <div class="form-group">
-                      <label for="department3" style="float:right;">القسم الثالث</label>
-                      <select class="form-control selectStyle-w" id="department3" name="department3" (input)="changeDepartment($event , 3)" [(ngModel)]="formData.department3" [disabled]="disabledInput">
-                        <option *ngFor="let department of departments" [value]="department.id">{{department.name}}</option>
-                        <option [value]="2003">حذف</option>
-                      </select>
-                    </div>
-                  </div> -->
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
@@ -236,11 +208,7 @@
                 </div>
                 </div>
 
 
                 <div class="wrapper" *ngIf="files.length > 0">
                 <div class="wrapper" *ngIf="files.length > 0">
-                  
-                  <!-- <div class="col-12">
-                    <button type="button" class="btn btn-default" (click)="plusImage()" style="margin:20px 0; float:right;">إضافه مرفق</button>
-                  </div> -->
-
+              
                   <table class="table table-bordered">
                   <table class="table table-bordered">
                     <thead class="headBackground-w">
                     <thead class="headBackground-w">
                       <tr>
                       <tr>

+ 1 - 1
src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.ts

@@ -289,7 +289,7 @@ export class SectionReviewTraineeAddComponent implements OnInit {
   //when click in start trianning
   //when click in start trianning
   beginTrainning() {
   beginTrainning() {
     this.actionConfirmedForm.in_training = 1;
     this.actionConfirmedForm.in_training = 1;
-    this.toastr.success('لقد تم تسجيل البدأ ');
+    this.toastr.success('لقد تم تسجيل البدأ ، من فضلك أضغط حفظ لإكمال العمليه ');
   }
   }
 
 
 
 

+ 1 - 1
src/app/dashboard/section-review-for-trainee/section-review-trainee-list/section-review-trainee-list.component.html

@@ -26,6 +26,7 @@
 
 
           <div class="form-group" style="float:right; margin:0 10px;">
           <div class="form-group" style="float:right; margin:0 10px;">
             <span class="spanSelect-w">
             <span class="spanSelect-w">
+                / حاله الطلب 
               <select [ngModel]="defaultValueFiltter" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:200px;">
               <select [ngModel]="defaultValueFiltter" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:200px;">
                 <option value="all">الكل</option>
                 <option value="all">الكل</option>
                 <option value="asked_for_opinion">طلبات مطلوب الرأي بها</option>
                 <option value="asked_for_opinion">طلبات مطلوب الرأي بها</option>
@@ -33,7 +34,6 @@
                 <option value="stopped">الطلبات الموقوفه</option>
                 <option value="stopped">الطلبات الموقوفه</option>
                 <option value="ended">الطلبات المنتهيه</option>
                 <option value="ended">الطلبات المنتهيه</option>
               </select>
               </select>
-              حاله الطلب
             </span>
             </span>
           </div>
           </div>
 
 

+ 3 - 3
src/app/dashboard/sections/add-section/add-section.component.html

@@ -22,19 +22,19 @@
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                   <div class="form-group">
                   <div class="form-group">
                     <label for="email">الأيميل <span class="spanReqired-w">*</span></label>
                     <label for="email">الأيميل <span class="spanReqired-w">*</span></label>
-                    <input type="email" class="form-control" name="email" placeholder="الإيميل" ngModel email #email="ngModel" [ngModel]="section.email" required/>
+                    <input type="email" class="form-control" name="email" placeholder="الإيميل" appEnglishCharacters ngModel email #email="ngModel" [ngModel]="section.email" required/>
                     <span class="help-block" *ngIf="!email.valid && email.touched" style="color:red">من فضلك أدخل إيميل صحيح</span>
                     <span class="help-block" *ngIf="!email.valid && email.touched" style="color:red">من فضلك أدخل إيميل صحيح</span>
                   </div>
                   </div>
                 </div>
                 </div>
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                   <div class="form-group">
                   <div class="form-group">
-                    <label for="phone">رقم الجوال</label>
+                    <label for="phone">رقم الهاتف</label>
                     <input type="phone" appNumberDerictive class="form-control" placeholder="الهاتف" name="phone" ngModel #phone="ngModel" [ngModel]="section.phone"/>
                     <input type="phone" appNumberDerictive class="form-control" placeholder="الهاتف" name="phone" ngModel #phone="ngModel" [ngModel]="section.phone"/>
                   </div>
                   </div>
                 </div>
                 </div>
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                 <div class="col-12 col-sm-6 col-md-4 col-lg-4">
                   <div class="form-group">
                   <div class="form-group">
-                    <label for="switch_phone">رقم الجوال البديل</label>
+                    <label for="switch_phone">رقم التحويله</label>
                     <input type="phone" appNumberDerictive class="form-control" placeholder="الهاتف البديل" name="switch_phone" ngModel #switchPhone="ngModel" [ngModel]="section.switch_phone"/>
                     <input type="phone" appNumberDerictive class="form-control" placeholder="الهاتف البديل" name="switch_phone" ngModel #switchPhone="ngModel" [ngModel]="section.switch_phone"/>
                   </div>
                   </div>
                 </div>
                 </div>

+ 3 - 3
src/app/dashboard/sections/section-list/section-list.component.html

@@ -48,10 +48,10 @@
                 <th>
                 <th>
                   <div class="custom-control custom-checkbox">
                   <div class="custom-control custom-checkbox">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
-                    <!-- <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor: pointer;"></label> -->
                   </div>
                   </div>
                 </th>
                 </th>
-                <th>الاسم</th>
+                <th>إسم القسم</th>
+                <th>إسم الإداره</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
               </tr>
               </tr>
             </thead>
             </thead>
@@ -60,10 +60,10 @@
                 <td>
                 <td>
                   <div class="custom-control custom-checkbox centerIneerItem">
                   <div class="custom-control custom-checkbox centerIneerItem">
                     <input type="checkbox" class="custom-control-input" id="{{section.id}}" [(ngModel)]="section.selected" [value]='section' (change)="checkIfAllSelected()">
                     <input type="checkbox" class="custom-control-input" id="{{section.id}}" [(ngModel)]="section.selected" [value]='section' (change)="checkIfAllSelected()">
-                    <!-- <label class="custom-control-label disblayBlock-w" for="{{section.id}}" style="color:#2a2a2a; cursor: pointer;"></label> -->
                   </div>
                   </div>
                 </td>
                 </td>
                 <td>{{section.name}}</td>
                 <td>{{section.name}}</td>
+                <td>{{section.department_name ? section.department_name : '-'}}</td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(section.id)"><i class="fas fa-edit"></i></button></td>
                 <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(section.id)"><i class="fas fa-edit"></i></button></td>
               </tr>
               </tr>
             </tbody>
             </tbody>

+ 9 - 11
src/app/dashboard/statistics/add-statistic/add-statistic.component.html

@@ -20,13 +20,13 @@
 
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="name" style="float: right; margin-right: 5px"> الإسم باللغه العربيه <span class="spanReqired-w">*</span></label>
+                  <label for="name" style="float: right; margin-right: 5px"> إسم الإحصائيه باللغه العربيه <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="name" name="name" ngModel [ngModel]="statistic.name" #name="ngModel" required/>
                   <input type="text" class="form-control" id="name" name="name" ngModel [ngModel]="statistic.name" #name="ngModel" required/>
                 </div>
                 </div>
               </div>
               </div>
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="name" style="float: right; margin-right: 5px"> الإسم باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
+                  <label for="name" style="float: right; margin-right: 5px"> إسم الإحصائيه باللغه الإنجليزيه <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="name_en" name="name_en" ngModel [ngModel]="statistic.name_en" #name="ngModel" required/>
                   <input type="text" class="form-control" id="name_en" name="name_en" ngModel [ngModel]="statistic.name_en" #name="ngModel" required/>
                 </div>
                 </div>
               </div>
               </div>
@@ -40,21 +40,19 @@
 
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label style="float:right">الشهر <span class="spanReqired-w">*</span></label>
-                  <!-- <select class="form-control"  ngModel [ngModel]="statistic.month_id">
-                    <option value="1">فعال</option>
-                    <option value="0">غير فعال</option>
+                  <label style="float:right" for="month_id">الشهر <span class="spanReqired-w">*</span></label>
+                  <select class="form-control" name="month_id" id="month_id" ngModel [ngModel]="statistic.month_id" required>
                     <option *ngFor="let month of months; let i = index" [value]="month.id">{{month.name}}</option>
                     <option *ngFor="let month of months; let i = index" [value]="month.id">{{month.name}}</option>
-                  </select> -->
-                  <input type="text" class="form-control" id="month_id" name="month_id" ngModel [ngModel]="statistic.month_id" #name="ngModel" required/>
-
+                  </select>
                 </div>
                 </div>
               </div>
               </div>
 
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
                 <div class="form-group">
                 <div class="form-group">
-                  <label for="name" style="float: right; margin-right: 5px"> السنة<span class="spanReqired-w">*</span></label>
-                  <input type="number" class="form-control" placeholder="2019"  min="1950" max="2099" step="1"  id="year" name="year" ngModel [ngModel]="statistic.year" #name="ngModel" required/>
+                  <label for="year" style="float: right; margin-right: 5px"> السنة<span class="spanReqired-w">*</span></label>
+                  <select class="form-control" name="year" id="year" ngModel [ngModel]="statistic.year" required>
+                      <option *ngFor="let year of years; let i = index" [value]="year.id">{{year.value}}</option>
+                    </select>
                 </div>
                 </div>
               </div>
               </div>
 
 

+ 12 - 0
src/app/dashboard/statistics/add-statistic/add-statistic.component.ts

@@ -26,6 +26,7 @@ export class AddStatisticComponent implements OnInit {
     private route:ActivatedRoute) { }
     private route:ActivatedRoute) { }
 
 
     months = [];
     months = [];
+    years = [];
     typeMode:boolean = false; //default false for create page
     typeMode:boolean = false; //default false for create page
     typeLink: string;
     typeLink: string;
     statisticId:number;
     statisticId:number;
@@ -48,12 +49,23 @@ export class AddStatisticComponent implements OnInit {
         (responce) => {
         (responce) => {
           console.log(responce);
           console.log(responce);
           this.months = responce['months'];
           this.months = responce['months'];
+          console.log('months ', this.months);
         },
         },
         (error) => {
         (error) => {
           console.log(error)
           console.log(error)
         }
         }
       );
       );
 
 
+      this.userSer.getYear().subscribe(
+        (response) => {
+          console.log('yeaaaaaaaaars', this.years);
+          this.years = response['years'];
+        },
+        (error) => {
+          console.log(error);
+        }
+      )
+
       this.route.params.subscribe(
       this.route.params.subscribe(
         (params: Params) => {
         (params: Params) => {
           console.log(params)
           console.log(params)

+ 1 - 0
src/app/dashboard/supervisor/supervisor-add/supervisor-add.component.ts

@@ -139,6 +139,7 @@ export class SupervisorAddComponent implements OnInit {
 
 
   onSubmitted(form: NgForm) {
   onSubmitted(form: NgForm) {
     this.formData = form.value;
     this.formData = form.value;
+    this.checkSaveClick = true;
     if(this.supervisorId){
     if(this.supervisorId){
       this.formData['department_id'] = this.superDeaprt.department_id;
       this.formData['department_id'] = this.superDeaprt.department_id;
     }
     }

+ 7 - 2
src/app/dashboard/supervisor/supervisor-list/supervisor-list.component.ts

@@ -239,12 +239,17 @@ export class SupervisorListComponent implements OnInit {
                   },
                   },
                   (error) => {
                   (error) => {
                     console.log(error);
                     console.log(error);
+                    
                   }
                   }
                 )
                 )
               },
               },
               (error) => {
               (error) => {
-                console.log(error);
-                this.toastr.error('حدث خطأ رجاء الانتظار وحاول ثانيه');
+                console.log(error.error.error);
+                if(error['error'].error == 'department already has trainees') {
+                  this.toastr.warning('القسم به متدربين لايمكن حذفه !');
+                } else {
+                  this.toastr.error('حدث خطأ رجاء الانتظار وحاول ثانيه');
+                }
                 this.spinner.hide();
                 this.spinner.hide();
               }
               }
           )
           )

+ 19 - 0
src/app/dashboard/tabs/add-tab/add-tab.component.css

@@ -31,4 +31,23 @@ input[type="file"] {
     background-color: #f9f9f9;
     background-color: #f9f9f9;
     border: 2px solid #bda380;
     border: 2px solid #bda380;
     
     
+}
+
+.iconUpload-w {
+    width: 100%;
+    border: 2px solid #bda380;
+    /* padding: 5px 0; */
+    border-radius: 5px;
+    background-color: #f9f9f9;
+    padding: 4px 0;
+    cursor: pointer;
+    /* margin: 2px 0; */
+}
+
+
+.fileName-w {
+    color: green;
+    position: absolute;
+    top: 35px;
+    left: 30px;
 }
 }

+ 10 - 1
src/app/dashboard/tabs/add-tab/add-tab.component.html

@@ -65,10 +65,19 @@
               </select>
               </select>
             </div>
             </div>
 
 
-            <div class="col-12 col-sm-12 col-md-4" style="margin-bottom:30px">
+            <!-- <div class="col-12 col-sm-12 col-md-4" style="margin-bottom:30px">
                 <div class="form-group text-center imgContainer">
                 <div class="form-group text-center imgContainer">
                   <button class="btn btn-default" *ngIf="checkShowDownloadFile" type="button" style="position: absolute; background:transparent; border:none; left:17px; top:32px"> <a href="{{authSer.pathImg + tab.file}}"><i class="fas fa-download"></i></a></button>
                   <button class="btn btn-default" *ngIf="checkShowDownloadFile" type="button" style="position: absolute; background:transparent; border:none; left:17px; top:32px"> <a href="{{authSer.pathImg + tab.file}}"><i class="fas fa-download"></i></a></button>
                 </div>
                 </div>
+            </div> -->
+            
+            <div class="col-12 col-sm-12 col-md-4">
+              <div class="form-group">
+                <label for="status" style="float: right; margin-right: 5px">الملف <span class="spanReqired-w">*</span></label>
+                <input type="file" name="file" id="file" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event)"/>
+                <label for="file" class="iconUpload-w"><i class="fas fa-upload"></i></label>
+                <span class="fileName-w" *ngIf="nameLink" style="color:green"> <i class='fa fa-check'style=" float: left; padding-top: 4px; "></i></span>
+              </div>
             </div>
             </div>
 
 
             <div class="col-6">
             <div class="col-6">

+ 20 - 14
src/app/dashboard/tabs/add-tab/add-tab.component.ts

@@ -74,7 +74,7 @@ export class AddTabComponent implements OnInit {
               this.tab.type = tabData.type;
               this.tab.type = tabData.type;
               this.tab.status = tabData.status;
               this.tab.status = tabData.status;
               this.tab.file = tabData.file;
               this.tab.file = tabData.file;
-              responce['tab'].file ? this.checkShowDownloadFile = true : this.checkShowDownloadFile = false;
+              responce['tab'].file ? this.nameLink = responce['tab'].file : '';
               this.spineer.hide();
               this.spineer.hide();
             },
             },
             (error) => {
             (error) => {
@@ -167,19 +167,25 @@ export class AddTabComponent implements OnInit {
       }
       }
      
      
     } else {
     } else {
-      this.dashboardSer.addItem(this.formTabData.value, 'tab').subscribe(
-        (responce) => {
-          console.log(responce);
-          this.toastr.success('تم الاضافه بنجاح');
-          this.location.back();
-          this.checkSaveclick = false;
-        },
-        (error) => {
-          console.log(error);
-          this.toastr.error('خطأ في الأضافه ');
-          this.checkSaveclick = false;
-        }
-      );
+      if(this.formTabData.value.file) {
+        this.dashboardSer.addItem(this.formTabData.value, 'tab').subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تم الاضافه بنجاح');
+            this.location.back();
+            this.checkSaveclick = false;
+          },
+          (error) => {
+            console.log(error);
+            this.toastr.error('خطأ في الأضافه ');
+            this.checkSaveclick = false;
+          }
+        );
+      } else {
+        this.toastr.warning('قم بإضافه ملف !');
+        this.checkSaveclick = false;
+      }
+      
     }
     }
     
     
   };
   };

+ 12 - 10
src/app/dashboard/tabs/tab-list/tab-list.component.ts

@@ -42,16 +42,18 @@ export class TabListComponent implements OnInit {
   ngOnInit() {
   ngOnInit() {
 
 
     this.spinner.show();
     this.spinner.show();
-    //init the values of permision boolean
-    this.authSer.showAddBtn = false;
-    this.authSer.showDeleteBtn = false;
-    this.authSer.showEditBtn = false;
-    //show / hide notification search in header
-    this.authSer.notificationLogin = true;
-    this.authSer.showSearchHeader = false;
-    this.authSer.showHeaderLogin = false;
-    this.authSer.showHeaderDashBoard = true;
-    this.authSer.internalHeader = false;
+     //init values of permisions
+     this.authSer.showAddBtn = false;
+     this.authSer.showDeleteBtn = false;
+     this.authSer.showEditBtn = false;
+     this.authSer.showPermissionsBtn = false;
+      //show / hide notification search in header
+      this.authSer.notificationLogin = true;
+      this.authSer.showSearchHeader = false;
+      this.authSer.showHeaderLogin = false;
+      this.authSer.showHeaderDashBoard = true;
+      this.authSer.showDashboardHeader = true;
+      this.authSer.internalHeader = false;
 
 
     this.route.params.subscribe(
     this.route.params.subscribe(
       (params: Params) => {
       (params: Params) => {

+ 4 - 3
src/app/dashboard/users/form-user/form-user.component.html

@@ -15,7 +15,7 @@
         <form [formGroup]="signupForm" (ngSubmit)="onSubmittedForm()">
         <form [formGroup]="signupForm" (ngSubmit)="onSubmittedForm()">
           <div class="row">
           <div class="row">
             
             
-            <div class="col-12 col-sm-12 col-md-6 col-lg-4">
+            <!-- <div class="col-12 col-sm-12 col-md-6 col-lg-4">
               <div class="form-group">
               <div class="form-group">
                 <label style="float: right; margin-right:5px;margin-top:10px">الحاله <span class="spanReqired-w">*</span></label>
                 <label style="float: right; margin-right:5px;margin-top:10px">الحاله <span class="spanReqired-w">*</span></label>
                 <div class="custom-control custom-radio inlineBlock-w" style="padding: 2px 31px;background: #bd90592e;color: #a98559;border: 1px solid #b38553c2;">
                 <div class="custom-control custom-radio inlineBlock-w" style="padding: 2px 31px;background: #bd90592e;color: #a98559;border: 1px solid #b38553c2;">
@@ -29,7 +29,7 @@
                 </div>
                 </div>
 
 
               </div>
               </div>
-            </div>
+            </div> -->
 
 
             <div class="col-12 col-sm-12 col-md-12 col-lg-12" style="margin-bottom:30px">
             <div class="col-12 col-sm-12 col-md-12 col-lg-12" style="margin-bottom:30px">
               <div class="form-group text-center imgContainer">
               <div class="form-group text-center imgContainer">
@@ -203,7 +203,8 @@
             <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="signupForm.controls.type.value == '0' ">
             <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="signupForm.controls.type.value == '0' ">
               <div class="form-group">
               <div class="form-group">
                 <label style="float:right">الاداره <span class="spanReqired-w">*</span></label>
                 <label style="float:right">الاداره <span class="spanReqired-w">*</span></label>
-                <select class="form-control" formControlName="adminstration_id" (change)="getDepartment()">
+                <select class="form-control" (change)="getDepartment()" formControlName="adminstration_id">
+                  <option>أختر إداره</option>
                   <option *ngFor="let admin of adminstration; let i = index" [value]="admin.id">{{admin.name}}</option>
                   <option *ngFor="let admin of adminstration; let i = index" [value]="admin.id">{{admin.name}}</option>
                 </select>
                 </select>
               </div>
               </div>

+ 3 - 4
src/app/dashboard/users/form-user/form-user.component.ts

@@ -227,7 +227,7 @@ export class FormUserComponent implements OnInit {
               
               
               this.urlImg = responce['user'].photo ? this.authSer.pathImg + responce['user'].photo : this.urlImg;
               this.urlImg = responce['user'].photo ? this.authSer.pathImg + responce['user'].photo : this.urlImg;
               console.log(this.urlImg);
               console.log(this.urlImg);
-              const date = responce['user'].date_of_employment_hij.split('-');
+              const date = responce['user'].date_of_employment_hij ? responce['user'].date_of_employment_hij.split('-') : '';
             
             
               this.bindingDateSplit = {
               this.bindingDateSplit = {
                 'year': parseInt(date[0]),
                 'year': parseInt(date[0]),
@@ -400,9 +400,6 @@ export class FormUserComponent implements OnInit {
       if(this.signupForm.get('password').value != this.signupForm.get('password_confirmation').value){
       if(this.signupForm.get('password').value != this.signupForm.get('password_confirmation').value){
         this.toastr.warning('من فضلك تأكد أن كلمه المرور هي نفس تأكيد كلمه المرور ');
         this.toastr.warning('من فضلك تأكد أن كلمه المرور هي نفس تأكيد كلمه المرور ');
         this.checkSaveDisabled = false;
         this.checkSaveDisabled = false;
-      } else if(this.imageBase64 == ''){
-        this.toastr.warning('قم بإختيار صوره المستخدم !');
-        this.checkSaveDisabled = false;
       } else if(userData['date_of_employment_hij'] == "") {
       } else if(userData['date_of_employment_hij'] == "") {
           this.toastr.warning('من فضلك ، أدخل تاريخ التوظيف الهجري !');
           this.toastr.warning('من فضلك ، أدخل تاريخ التوظيف الهجري !');
           this.checkSaveDisabled = false;
           this.checkSaveDisabled = false;
@@ -434,6 +431,8 @@ export class FormUserComponent implements OnInit {
               this.toastr.warning('الايميل تم التسجيل به من قبل !');
               this.toastr.warning('الايميل تم التسجيل به من قبل !');
             } else if(error.error['error'].identity_number) {
             } else if(error.error['error'].identity_number) {
               this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
               this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
+            } else if(error.error['error'].phone) {
+              this.toastr.warning('رقم الهاتف تم التسجيل به من قبل !');
             }
             }
           }
           }
         );
         );

+ 16 - 15
src/app/dashboard/users/user-report/user-report.component.html

@@ -1,38 +1,39 @@
 <div class="reprot">
 <div class="reprot">
   <div class="container">
   <div class="container">
       <div class="containerContent-w">
       <div class="containerContent-w">
-          <div class="row">
+          <div class="row" id="print-section">
               <div class="col-12">
               <div class="col-12">
-                <button class="btn btn-success" style="float:right; margin: 10px 0;" (click)="onPrint()" *ngIf="authSer.showPrintBtn">طباعه</button>
-                 <table class="table table-bordered text-center">
+                 <table class="table table-bordered text-center" >
                   <thead>
                   <thead>
                     <tr>
                     <tr>
-                      <th>إسم الموظف</th>
-                      <th>إسم المجموعه</th>
-                      <th>إسم الصفحه</th>
-                      <th>نوع الصلاحيه</th>
-                      <th>إسم الموظف مانح الصلاحيه</th>
-                      <th>تاريخ المنح</th>
+                      <th class="text-center">إسم الموظف</th>
+                      <th class="text-center">إسم المجموعه</th>
+                      <th class="text-center">إسم الصفحه</th>
+                      <th class="text-center">نوع الصلاحيه</th>
+                      <th class="text-center">إسم الموظف مانح الصلاحيه</th>
+                      <th class="text-center">تاريخ المنح</th>
                     </tr>
                     </tr>
                   </thead>
                   </thead>
                   <tbody>
                   <tbody>
                     <tr *ngFor="let data of reportData; let i = index">
                     <tr *ngFor="let data of reportData; let i = index">
-                      <td><p>{{data['user'].name}}</p></td>
-                      <td><p *ngFor="let role of data['roles']">{{role.role_name}}</p></td>
+                      <td><p>{{data['user']?.name? data['user'].name : ''}}</p></td>
+                      <td><p *ngFor="let role of data['roles']">{{role.role_name ? role.role_name : ''}}</p></td>
                       <td><p *ngFor="let role of data['roles']">
                       <td><p *ngFor="let role of data['roles']">
                         <span style="display:block; margin: 10px 0;" *ngFor="let page of role['pages']">
                         <span style="display:block; margin: 10px 0;" *ngFor="let page of role['pages']">
-                          {{page.name}}
+                          {{page.name ? page.name : ''}}
                           <span style="display:block" *ngFor="let p of page.permissions"><br></span>
                           <span style="display:block" *ngFor="let p of page.permissions"><br></span>
                         </span>
                         </span>
                       </p></td>
                       </p></td>
-                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px;" *ngFor="let page of role['permissions']">{{page.permission_name}}</span></p></td>
-                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px;" *ngFor="let page of role['permissions']">{{page.asigned_by}}</span></p></td>
-                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px; font-size:14px" *ngFor="let page of role['permissions']">{{page.created_at}}</span></p></td>
+                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px;" *ngFor="let page of role['permissions']">{{page.permission_name ? page.permission_name : ''}}</span></p></td>
+                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px;" *ngFor="let page of role['permissions']">{{page.asigned_by ? page.asigned_by : ''}}</span></p></td>
+                      <td><p *ngFor="let role of data['roles'][i].pages"><span style="display: block; margin-bottom: 6px; font-size:14px" *ngFor="let page of role['permissions']">{{page.created_at ? page.created_at : ''}}</span></p></td>
                     </tr>
                     </tr>
                   </tbody>
                   </tbody>
                 </table>
                 </table>
               </div>
               </div>
             </div>
             </div>
+            <button class="btn btn-success" style="float:right; margin: 10px 0;" (click)="onPrint()" *ngIf="authSer.showPrintBtn">طباعه</button>
+
       </div>
       </div>
   </div>
   </div>
 </div>
 </div>

+ 85 - 3
src/app/dashboard/users/user-report/user-report.component.ts

@@ -86,8 +86,90 @@ export class UserReportComponent implements OnInit, OnDestroy {
     this.subscriptionReportData.unsubscribe();
     this.subscriptionReportData.unsubscribe();
   }
   }
 
 
-  onPrint(){
-    window.print();
-  }
+  // onPrint(){
+  //   //window.print();
+  // }
+
+   //print function
+
+   onPrint(): void {
+    let printContents, popupWin;
+    printContents = document.getElementById('print-section').innerHTML;
+    popupWin = window.open('', '_blank', 'top=0,left=0,height=100%,width=auto');
+    popupWin.document.open();
+    popupWin.document.write(`
+      <html>
+        <head>
+          <title></title>
+          <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> </link>
+          <style>
+            .row{
+              display: flex;
+              flex-wrap: wrap;
+              margin-right: -15px;
+              margin-left: -15px;
+            }
+            .col-6{
+              float: right;
+              flex: 0 0 50%;
+              max-width: 50%
+            }
+            .col-12{
+              flex-basis: 0;
+              flex-grow: 1;
+              max-width: 100%;
+            }
+            table {
+              font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
+              border-collapse: collapse;
+              width: 100%;
+              direction: rtl;
+              text-align: center;
+              
+            }
+            
+            table td, table th {
+              border: 1px solid #ddd;
+              padding: 8px;
+            }
+            
+            table tr:nth-child(even){background-color: #f2f2f2;}
+            
+            table tr:hover {background-color: #ddd;}
+            
+            table th {
+              padding-top: 12px;
+              padding-bottom: 12px;
+              text-align: center;
+              background-color: #4CAF50;
+              color: white;
+            }
+          </style>
+        </head>
+    <body onload="window.print();window.close()">
+   <div class="row">
+      <div class="col-6" style="float: left">
+        <img class="logo1" src="../../assets/image/logo2.png" style="width: 130px;float: left; margin-left: 20px;">
+      </div>
+      <div class="col-6" style="float: right">
+        <img  class="logo2" src="../../assets/image/logo1.png" style="width: 200px;float: right; margin-right: 20px;">
+       </div>
+    </div>
+    <div class="row">
+    <div class="col-12" style="width:100%;text-align: center">
+    <h1>تقرير  المستخدم</h1>
+    </div>
+    </div>
+  
+   <div class="row">
+      <div class="col-12">
+      ${printContents}
+      </div>
+   </div>
+    </body>
+      </html>`
+    );
+    popupWin.document.close();
+}
 
 
 }
 }

+ 2 - 6
src/app/dashboard/users/users.component.html

@@ -48,14 +48,12 @@
               <th>
               <th>
                 <div class="custom-control custom-checkbox">
                 <div class="custom-control custom-checkbox">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
                     <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
-                    <!-- <label class="custom-control-label fixedWidthLabel-w checkAll-w" for="customCheck" style="margin-bottom:20px; cursor:pointer"></label> -->
                 </div>
                 </div>
               </th>
               </th>
               <th>الاسم</th>
               <th>الاسم</th>
               <th *ngIf="checkListType">البريد الإلكتروني</th>
               <th *ngIf="checkListType">البريد الإلكتروني</th>
               <th *ngIf="authSer.showEditBtn">تعديل</th>
               <th *ngIf="authSer.showEditBtn">تعديل</th>
               <th *ngIf="authSer.showPermissionsBtn">الصلاحيات</th>
               <th *ngIf="authSer.showPermissionsBtn">الصلاحيات</th>
-              <!-- <th *ngIf="authSer.showReport">التقارير</th> -->
             </tr>
             </tr>
           </thead>
           </thead>
           <tbody>
           <tbody>
@@ -63,14 +61,12 @@
               <td>
               <td>
                 <div class="custom-control custom-checkbox centerIneerItem">
                 <div class="custom-control custom-checkbox centerIneerItem">
                   <input type="checkbox" class="custom-control-input" id="{{user.id}}" [(ngModel)]="user.selected" [value]='user' (change)="checkIfAllSelected()">
                   <input type="checkbox" class="custom-control-input" id="{{user.id}}" [(ngModel)]="user.selected" [value]='user' (change)="checkIfAllSelected()">
-                  <!-- <label class="custom-control-label disblayBlock-w" for="{{user.id}}" style="color:#2a2a2a; cursor:pointer"></label> -->
                 </div>
                 </div>
               </td>
               </td>
               <td>{{user.name}}</td>
               <td>{{user.name}}</td>
               <td *ngIf="checkListType">{{user.email}}</td>
               <td *ngIf="checkListType">{{user.email}}</td>
-              <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(user.id)"><i class="fas fa-edit"></i></button></td>
-              <td *ngIf="authSer.showPermissionsBtn"><button type="button" class="btn btn-outline-secondary" (click)="onGetPermission(user.id)"><i class="fas fa-hand-paper"></i></button></td>
-              <!-- <td *ngIf="authSer.showReport"><button class="btn btn-outline-secondary" (click)="onGetReport(user.id)"><i class="fas fa-address-card"></i></button></td> -->
+              <td *ngIf="authSer.showEditBtn" (click)="onEdit(user.id)" style="cursor: pointer;"><button type="button" class="btn btn-outline-secondary"><i class="fas fa-edit"></i></button></td>
+              <td *ngIf="authSer.showPermissionsBtn" (click)="onGetPermission(user.id)" style="cursor: pointer;"><button type="button" class="btn btn-outline-secondary"><i class="fas fa-hand-paper"></i></button></td>
             </tr>
             </tr>
           </tbody>
           </tbody>
         </table>
         </table>

+ 1 - 1
src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.html

@@ -12,7 +12,7 @@
 
 
     <div class="contentBorder-w">
     <div class="contentBorder-w">
 
 
-      <form (ngSubmit)="onSubmitted()" #f="ngForm">
+      <form #f="ngForm">
         <div class="row">
         <div class="row">
           <div class="col-12" >
           <div class="col-12" >
             <h2 class="title" >بيانات صاحب الطلب</h2>
             <h2 class="title" >بيانات صاحب الطلب</h2>

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

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

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

@@ -27,6 +27,7 @@ export class AddVisitingTimeComponent implements OnInit {
     typeLink: string;
     typeLink: string;
     visitingTimeId:number;
     visitingTimeId:number;
     checkDisabledSave:boolean = false;
     checkDisabledSave:boolean = false;
+    checkSaveClick: boolean = false;
 
 
     visitingTime = {
     visitingTime = {
       name: '',
       name: '',
@@ -73,6 +74,7 @@ export class AddVisitingTimeComponent implements OnInit {
     onSubmitted() {
     onSubmitted() {
       this.checkDisabledSave = true;
       this.checkDisabledSave = true;
       const dataFormContactUs = this.dataForm.value;
       const dataFormContactUs = this.dataForm.value;
+      this.checkSaveClick = true;
 
 
       console.log(dataFormContactUs)
       console.log(dataFormContactUs)
       if(this.typeMode) {
       if(this.typeMode) {
@@ -81,12 +83,12 @@ export class AddVisitingTimeComponent implements OnInit {
           (responce) => {
           (responce) => {
             console.log(responce);
             console.log(responce);
             this.toastr.success('تم التعديل بنجاح ');
             this.toastr.success('تم التعديل بنجاح ');
-            this.checkDisabledSave = false;
+            this.checkSaveClick = false;
             this.location.back();
             this.location.back();
           },
           },
           (error) => {
           (error) => {
             console.log(error);
             console.log(error);
-            this.checkDisabledSave = false;
+            this.checkSaveClick = false;
             this.toastr.error(' خطأ في التعديل !');
             this.toastr.error(' خطأ في التعديل !');
           }
           }
         );
         );

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

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

+ 4 - 0
src/app/shared/auth-service.service.ts

@@ -50,8 +50,12 @@ export class AuthServiceService {
   showArabicIcon:boolean;
   showArabicIcon:boolean;
   showEnglishIcon:boolean;
   showEnglishIcon:boolean;
 
 
+  // pathApi: string = 'http://10.93.50.2/kfmc_back_end/index.php/api';
+  // pathImg: string = "http://10.93.50.2/kfmc_back_end/public/";
+
   pathApi: string = 'http://kfmc.info/back_end/api';
   pathApi: string = 'http://kfmc.info/back_end/api';
   pathImg: string = "http://kfmc.info/back_end/public/";
   pathImg: string = "http://kfmc.info/back_end/public/";
+  
   myInnerHeight = window.innerHeight;
   myInnerHeight = window.innerHeight;
   imgSrc: string =  '../../assets/image/avatar.png'; //page profile default
   imgSrc: string =  '../../assets/image/avatar.png'; //page profile default
   iconImg: string = '../../assets/image/Group 92.png';
   iconImg: string = '../../assets/image/Group 92.png';

+ 2 - 2
src/app/shared/dashboard.service.ts

@@ -61,7 +61,7 @@ export class DashboardService {
         console.log('url', this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/1/' + data);
         console.log('url', this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/1/' + data);
         return this.http.get(this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/1/' + data);
         return this.http.get(this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/1/' + data);
       } else {
       } else {
-        console.log('urrrrrl',this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' );
+        console.log('urrrrrl',this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' + data);
         return this.http.get(this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' + data);
         return this.http.get(this.authService.pathApi + '/page_list' + '/' + pageId + '/' + pagenationNumber + '/' + dataTableNumber + '/all/' + data);
       }
       }
     }
     }
@@ -218,7 +218,7 @@ export class DashboardService {
       } else if(editPageName == 'lecture') {
       } else if(editPageName == 'lecture') {
         return this.http.post(this.authService.pathApi + '/edit_lecture', editData);
         return this.http.post(this.authService.pathApi + '/edit_lecture', editData);
       } else if(editPageName == 'internalSer'){
       } else if(editPageName == 'internalSer'){
-        return this.http.post(this.authService.pathApi + '/', editData);
+        return this.http.post(this.authService.pathApi + '/edit_internal_service', editData);
       } else if(editPageName == 'internalHospital') {
       } else if(editPageName == 'internalHospital') {
         return this.http.post(this.authService.pathApi + '/edit_hospitals_centers', editData);
         return this.http.post(this.authService.pathApi + '/edit_hospitals_centers', editData);
       } else if(editPageName == 'externalHospital') {
       } else if(editPageName == 'externalHospital') {

+ 6 - 1
src/app/shared/user.service.ts

@@ -49,6 +49,12 @@ export class UserService {
     return this.http.get(this.authService.pathApi + '/months_list');
     return this.http.get(this.authService.pathApi + '/months_list');
   }
   }
 
 
+  //get month
+  getYear(){
+    return this.http.get(this.authService.pathApi + '/years_list');
+  }
+
+    
   //get departments
   //get departments
   getDepartments(adminstrationId) {
   getDepartments(adminstrationId) {
     return this.http.get(this.authService.pathApi + '/admin_departments/' + adminstrationId);
     return this.http.get(this.authService.pathApi + '/admin_departments/' + adminstrationId);
@@ -153,7 +159,6 @@ export class UserService {
       console.log(userIds);
       console.log(userIds);
       return this.http.post(this.authService.pathApi + '/delete_join_us_users' , {'users_id' : userIds});
       return this.http.post(this.authService.pathApi + '/delete_join_us_users' , {'users_id' : userIds});
     }
     }
-
   }
   }
 
 
   //get permission list
   //get permission list

+ 16 - 0
src/styles.css

@@ -1108,6 +1108,22 @@ height: 7px !important;
 }
 }
 
 
 
 
+.exernal-menu {
+  top: 50px !important;
+  right: 0 !important;
+  border-radius: 2px !important;
+  background-color: #fff !important;
+  box-shadow: 0px 3px 9px #00000030;
+  border: 1px solid #cec8c8;
+}
+
+.check-data-span {
+  text-align: center;
+  font-size: 14px;
+  color: #ccc;
+  display: block;
+}
+
 /* ------black-----*/
 /* ------black-----*/
 @media screen and (min-width: 1200px) {
 @media screen and (min-width: 1200px) {
 	body{border-top: 1px solid black;}
 	body{border-top: 1px solid black;}