Hima 5 anni fa
parent
commit
695612970d
22 ha cambiato i file con 257 aggiunte e 268 eliminazioni
  1. 4 2
      src/app/External-Page/external-page-content/external-page-content.component.html
  2. 1 1
      src/app/app-routing.module.ts
  3. 1 5
      src/app/auth-services/regester/regester.component.ts
  4. 6 3
      src/app/dashboard/absorpation-plan/absorpation-list/absorpation-list.component.html
  5. 0 1
      src/app/dashboard/achievements/add-achievement/add-achievement.component.html
  6. 5 5
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.html
  7. 2 2
      src/app/dashboard/advertising-services/add-advertising-service/add-advertising-service.component.ts
  8. 206 206
      src/app/dashboard/advertising-services/advertising-services-list/advertising-services-list.component.ts
  9. 0 1
      src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.html
  10. 1 1
      src/app/dashboard/external-achievements/add-external-achievement/add-external-achievement.component.ts
  11. 1 4
      src/app/dashboard/footer/add-footer/add-footer.component.html
  12. 11 4
      src/app/dashboard/footer/add-footer/add-footer.component.ts
  13. 2 2
      src/app/dashboard/main-footer/footer.component.html
  14. 4 20
      src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.html
  15. 1 1
      src/app/dashboard/roles/role-report/role-report.component.ts
  16. 3 3
      src/app/dashboard/sections/section-list/section-list.component.html
  17. 1 0
      src/app/dashboard/supervisor/supervisor-add/supervisor-add.component.ts
  18. 0 1
      src/app/dashboard/tabs/add-tab/add-tab.component.css
  19. 1 0
      src/app/dashboard/tabs/add-tab/add-tab.component.html
  20. 2 3
      src/app/dashboard/users/form-user/form-user.component.ts
  21. 1 1
      src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.html
  22. 4 2
      src/app/dashboard/visiting-times/add-visiting-time/add-visiting-time.component.ts

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

@@ -188,7 +188,9 @@
                                   <div class="carousel-inner">
                                       <div class="carousel-item" *ngFor="let achievement of achievements; let i = index" [ngClass]="i == 0 ? 'active' : ''">
                                           <div class="carousel-caption">
-                                              <p [innerHtml]="achievement.description"></p>
+                                            <h3>{{achievement.name}}</h3>
+                                            <p>{{achievement.achievement_time}}</p>
+                                            <p [innerHtml]="achievement.description"></p>
                                           </div>   
                                       </div>
                                   </div>
@@ -205,7 +207,7 @@
   
               <div class="col-12">
                 <div class="maps">
-                  <h1>إتصل بنا</h1>
+                  <h1>لتصل إلينا</h1>
                   <agm-map [latitude]="lat" [longitude]="lng">
                       <agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
                   </agm-map>

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

@@ -11,7 +11,7 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
 
 
 const routes: Routes = [
-  {path: '', redirectTo: '/InternalPage', pathMatch: 'full'},
+  {path: '', redirectTo: '/ExternalPage', pathMatch: 'full'},
   {path: 'auth', loadChildren:'./auth-services/auth-services.module#AuthServicesModule'},
   {path: 'InternalPage' , loadChildren: './Internal-Page/internal-page.module#InternalPageModule', canLoad: [AuthGuard]},
   {path: 'ExternalPage', loadChildren: './External-Page/external-page.module#ExternalPageModule', canLoad: [AuthGuard]},

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

@@ -568,9 +568,7 @@ export class RegesterComponent implements OnInit {
           //visitor added submited
           if(this.regesterForm.get('password').value != this.regesterForm.get('password_confirmation').value){
             this.toastr.warning('  من فضلك تأكد أن كلمه المرور نفس تأكيد كلمه المرور !');
-          } else if(this.imageBase64 == '') {
-            this.toastr.warning('قم بإختيار صوره شخصيه !');
-          }  else if(this.regesterForm.get('phone').value.substring(0,2) != '05') {
+          } else if(this.regesterForm.get('phone').value.substring(0,2) != '05') {
             this.toastr.warning('رقم الجوال يجب أن يبدأ ب 05');
           } else if(userDataRegester['identity_number'].substring(0,1) != 1 && this.regesterForm.get('identity_type_id').value == 1){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 1');
@@ -597,8 +595,6 @@ export class RegesterComponent implements OnInit {
           //employee added submited
           if(this.regesterForm.get('password').value != this.regesterForm.get('password_confirmation').value){
             this.toastr.warning('  من فضلك تأكد أن كلمه المرور نفس تأكيد كلمه المرور !');
-          } else if(this.imageBase64 == '') {
-            this.toastr.warning('قم بإختيار صوره شخصيه !');
           } else if(userDataRegester['identity_number'].substring(0,1) != 1 && this.regesterForm.get('identity_type_id').value == 1){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 1');
           } else if(userDataRegester['identity_number'].substring(0,1) != 2 && this.regesterForm.get('identity_type_id').value == 3){

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

@@ -49,11 +49,12 @@
                 <th>
                   <div class="custom-control custom-checkbox">
                     <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>
                 </th>
-                <th> إسم القسم</th>
-                <th>تاريخ الإبتداء</th>
+                <th> إسم الخطه</th>
+                <th>إسم القسم</th>
+                <th>تاريخ البدايه</th>
+                <th>تاريخ النهايه</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
               </tr>
             </thead>
@@ -65,7 +66,9 @@
                   </div>
                 </td>
                 <td>{{data.name}}</td>
+                <td>{{data.department_name ? data.department_name : '-'}}</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>
               </tr>
             </tbody>

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

@@ -56,7 +56,6 @@
                   <option value="2">2</option>
                   <option value="3">3</option>
                   <option value="4">4</option>
-                  <option value="10000">المزيد</option>
                 </select>
             </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">
                 <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="content">محتوي </option>
                 </select>
               </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">
                   <label for="link" style="float: right; margin-right: 5px"> الرابط <span class="spanReqired-w">*</span></label>
                   <input type="text" class="form-control" id="link" name="link" ngModel [ngModel]="advertising.link" #name="ngModel" />
                 </div>
               </div>
 
-              <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">
                   <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> -->
@@ -72,7 +72,7 @@
                 </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">
                   <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> -->
@@ -90,7 +90,7 @@
               </div>
 
               <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>
               </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(
         (params: Params) => {
           console.log(params)
-          if(params['typeAdvertising'] == 'add'){
+          if(!params['typeAdvertising']){
             this.typeMode = false;
             this.typeLink = 'إنشاء خدمة إعلانية';
           } else if(params['typeAdvertising'] == 'edit') {
@@ -82,7 +82,7 @@ export class AddAdvertisingServiceComponent implements OnInit {
             );
 
           } 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 {
 
-    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.advertisingList = [];
-              this.dataTableNumber = event.target.value;
               this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
                 (responce) => {
                   console.log(responce);
@@ -187,73 +231,29 @@ export class AdvertisingServicesListComponent implements OnInit {
                   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);
+  };
 
 }

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

@@ -69,7 +69,6 @@
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
-                    <option value="10000">المزيد</option>
                   </select>
                   <!-- <span *ngIf="!name.valid && name.touched"></span>  -->
                 </div>

+ 1 - 1
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(
         (params: Params) => {
           console.log(params)
-          if(params['typeExternalAchievement'] == 'add'){
+          if(!params['typeExternalAchievement']){
             this.typeMode = false;
             this.typeLink = 'إنشاء إنجاز';
           } else if(params['typeExternalAchievement'] == 'edit') {

+ 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" />
                   <label for="file" class="iconUpload-w"><i class="fas fa-upload"></i></label>
                 </div>
-                <!-- <span *ngIf="checkValidImg" style="color: red; position: absolute; right:0;bottom:0">must be in 'png' format</span> -->
               </div>
               <div class="col-12 col-sm-12 col-md-4">
                 <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="form-group">
                     <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>
                 </div>
@@ -83,14 +81,13 @@
               <div class="col-12 col-sm-12 col-md-12" style="margin:20px 0" *ngIf="showDescriptionField">
                 <div class="form-group">
                     <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>
                 </div>
               </div>
 
               <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>
               </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;
   checkNotContactUs:boolean = false;
   contactUsPage: boolean = false;
+  checkSaveButton:boolean = false;
   serviceName: string = '';
 
   footer = {
@@ -101,9 +102,9 @@ export class AddFooterComponent implements OnInit {
                 this.contactUsPage = true;
               } else {
                 this.checkNotContactUs = true;
-                this.showDescriptionField = true;
+                this.showDescriptionField = false;
                 this.showEmailField = false;
-                this.showLinkField = false;
+                this.showLinkField = true;
                 this.footer.email = '';
                 this.footer.link = '';
                 
@@ -198,6 +199,7 @@ export class AddFooterComponent implements OnInit {
  onSubmitted() {
   const formData = this.footerFormData.value;
   console.log(formData);
+  this.checkSaveButton = true;
  
   if(this.checkChangeImage){
     formData['photo'] = this.imageBase64;
@@ -211,8 +213,10 @@ export class AddFooterComponent implements OnInit {
   if(this.typeMode){
     if(this.photoType[1] != 'png' && this.photoEdit == true) {
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
+      this.checkSaveButton = false;
     } else if(this.imageBase64 == '' && this.photoEdit == true){
       this.toastr.warning('قم باختيار صوره !');
+      this.checkSaveButton = false;
     } else {
       if(this.serviceId == 2) {
         this.dashBoardService.editItem( this.externalId, formData, 'internalFooter').subscribe(
@@ -223,6 +227,7 @@ export class AddFooterComponent implements OnInit {
           },
           (error) => {
             console.log(error);
+            this.checkSaveButton = false;
             this.toastr.error('خطأ في التعديل !');
           }
         );
@@ -243,11 +248,11 @@ export class AddFooterComponent implements OnInit {
   } else {
     if(this.photoType[1] != 'png') {
       this.toastr.warning('الصوره يجب أن تكون بصيغه Png');
+      this.checkSaveButton = false;
     } else if(this.imageBase64 == ''){
       this.toastr.warning('قم باختيار صوره !');
+      this.checkSaveButton = false;
     } else {
-      // formData['photo'] = this.imageBase64;
-      // formData['photo_type'] = this.photoType[1];
       if(this.serviceId == 2) {
         this.dashBoardService.addItem(formData, 'externalFooter').subscribe(
           (responce) => {
@@ -258,6 +263,7 @@ export class AddFooterComponent implements OnInit {
           (error) => {
             console.log(error);
             this.toastr.error('خطأ في الحفظ !');
+            this.checkSaveButton = false;
           }
         );
       } else if(this.serviceId == 6){
@@ -269,6 +275,7 @@ export class AddFooterComponent implements OnInit {
           },
           (error) => {
             console.log(error);
+            this.checkSaveButton = false;
             this.toastr.error('خطأ في الحفظ !');
           }
         );

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

@@ -39,7 +39,7 @@
               <div class="leftFooter-w text-center">
                 <ul class="list-unstyled">
                   <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>
                 </ul>
               </div>
@@ -84,7 +84,7 @@
               <div class="leftFooter-w text-center">
                 <ul class="list-unstyled">
                   <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>
                 </ul>
               </div>

+ 4 - 20
src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.html

@@ -37,7 +37,8 @@
               </select>
               من العناصر يتم عرضها
             </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;">
                 <option value="all">الكل</option>
                 <option value="pending">تحت الإجراء</option>
@@ -48,12 +49,8 @@
                 <option value="asked_for_opinion">طلب رأي القسم</option>
                 <option value="replayed_opinion">رأي القسم</option>
               </select>
-              حاله الطلب
             </span>
           </div>
-          <!-- <div class="form-group">
-           
-          </div> -->
         </div>
         <div class="col-12 col-sm-12 col-md-12 col-lg-12"  style="margin-top:20px;">
           
@@ -71,13 +68,9 @@
           <table class="table table-bordered">
               <thead class="headBackground-w">
                 <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>
@@ -87,20 +80,11 @@
               </thead>
               <tbody>
                 <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.specialization_name}}</td>
+                  <td>{{data.department_name ? data.department_name : '-'}}</td>
                   <td>{{data.country_arNationality}}</td>
                   <td>{{data.university}}</td>
-                  <!-- <td>{{data.type == 'trainees' ? 'متدربين' 
-                    : data.type == 'fellowship' ? 'زماله' 
-                    : data.type == 'university_administrators' : 'مشرفي الجامعات'
-                    : 'لايوجد'}}
-                  </td> -->
                   <td>{{data.type == 'trainees' ? 'متدربين' 
                       : data.type == 'fellowship' ? 'زماله' 
                       : data.type == 'university_administrators' ? 'مشرفي الجامعات'

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

@@ -15,7 +15,7 @@ import { DashboardService } from '../../../shared/dashboard.service';
 export class RoleReportComponent implements OnInit {
   
   roleId: number;
-  rolesList: any [];
+  rolesList: any;
   selectedAll: any;
   showRoleReport: boolean = false;
 

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

@@ -48,10 +48,10 @@
                 <th>
                   <div class="custom-control custom-checkbox">
                     <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>
                 </th>
-                <th>الاسم</th>
+                <th>إسم القسم</th>
+                <th>إسم الإداره</th>
                 <th *ngIf="authSer.showEditBtn">تعديل</th>
               </tr>
             </thead>
@@ -60,10 +60,10 @@
                 <td>
                   <div class="custom-control custom-checkbox centerIneerItem">
                     <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>
                 </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>
               </tr>
             </tbody>

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

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

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

@@ -36,7 +36,6 @@ input[type="file"] {
 .iconUpload-w {
     width: 100%;
     border: 2px solid #bda380;
-    margin-top: 30px;
     /* padding: 5px 0; */
     border-radius: 5px;
     background-color: #f9f9f9;

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

@@ -73,6 +73,7 @@
             
             <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>

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

@@ -400,9 +400,6 @@ export class FormUserComponent implements OnInit {
       if(this.signupForm.get('password').value != this.signupForm.get('password_confirmation').value){
         this.toastr.warning('من فضلك تأكد أن كلمه المرور هي نفس تأكيد كلمه المرور ');
         this.checkSaveDisabled = false;
-      } else if(this.imageBase64 == ''){
-        this.toastr.warning('قم بإختيار صوره المستخدم !');
-        this.checkSaveDisabled = false;
       } else if(userData['date_of_employment_hij'] == "") {
           this.toastr.warning('من فضلك ، أدخل تاريخ التوظيف الهجري !');
           this.checkSaveDisabled = false;
@@ -434,6 +431,8 @@ export class FormUserComponent implements OnInit {
               this.toastr.warning('الايميل تم التسجيل به من قبل !');
             } else if(error.error['error'].identity_number) {
               this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
+            } else if(error.error['error'].phone) {
+              this.toastr.warning('رقم الهاتف تم التسجيل به من قبل !');
             }
           }
         );

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

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