Hima 6 years ago
parent
commit
5e16cad79f

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

@@ -107,6 +107,8 @@ import { TrainnerDataListComponent } from './trainner-data/trainner-data-list/tr
 import { ReviewTraineeDataListComponent } from './reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component';
 import { TrainnerDataAddComponent } from './trainner-data/trainner-data-add/trainner-data-add.component';
 import { ReviewTraineeAddComponent } from './reivew-trainee-data/review-trainee-add/review-trainee-add.component';
+import { SectionReviewTraineeListComponent } from './section-review-for-trainee/section-review-trainee-list/section-review-trainee-list.component';
+import { SectionReviewTraineeAddComponent } from './section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component';
 
 
 @NgModule({
@@ -180,6 +182,8 @@ import { ReviewTraineeAddComponent } from './reivew-trainee-data/review-trainee-
         TrainnerDataAddComponent,
         ReviewTraineeDataListComponent,
         ReviewTraineeAddComponent,
+        SectionReviewTraineeListComponent,
+        SectionReviewTraineeAddComponent,
     ],
     imports: [
         CommonModule,

+ 17 - 1
src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.html

@@ -9,6 +9,7 @@
     </div>
   
     <div class="containerContent-w">
+
       <div class="row">
         <div class="col-12 col-sm-12 col-md-6 col-lg-6">
             <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
@@ -21,6 +22,8 @@
           </div>
         </div>
       </div>
+
+      
   
       <div class="row">
           <div class="col-12 col-sm-12 col-md-12 col-lg-6">
@@ -37,7 +40,20 @@
             </div>
           </div>
           <div class="col-12 col-sm-12 col-md-12 col-lg-6">
-  
+            <div class="form-group">
+              <span class="spanSelect-w">
+                  حاله الطلب
+                <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:200px;">
+                  <option value="pending">تحت الإجراء</option>
+                  <option value="accepted">مقبول</option>
+                  <option value="refused">مرفوض</option>
+                  <option value="canceled">ملغي</option>
+                  <option value="ended">مغلق</option>
+                  <option value="asked_for_opinion">طلب رأي</option>
+                  <option value="replayed_opinion">رأي القسم</option>
+                </select>
+              </span>
+            </div>
           </div>
       </div>
   

+ 20 - 0
src/app/dashboard/reivew-trainee-data/review-trainee-data-list/review-trainee-data-list.component.ts

@@ -208,6 +208,26 @@ onGetValue(event) {
     }
   );
 };
+
+onFiltterChosen(event) {
+  this.spinner.show();
+  this.dataList = [];
+  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.count = responce['count'];
+      this.perPagePagenation = responce['per_page'];
+      this.spinner.hide();
+    },
+    (error) => {
+      console.log(error);
+    }
+  )
+}
     
 // onDelete() {
 //   for(let i = 0; i < this.dataList.length; i++) {

+ 0 - 0
src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.css


+ 3 - 0
src/app/dashboard/section-review-for-trainee/section-review-trainee-add/section-review-trainee-add.component.html

@@ -0,0 +1,3 @@
+<p>
+  section-review-trainee-add works!
+</p>

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

@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-section-review-trainee-add',
+  templateUrl: './section-review-trainee-add.component.html',
+  styleUrls: ['./section-review-trainee-add.component.css']
+})
+export class SectionReviewTraineeAddComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

+ 30 - 0
src/app/dashboard/section-review-for-trainee/section-review-trainee-list/section-review-trainee-list.component.css

@@ -0,0 +1,30 @@
+.table {
+    margin: 30px 0;
+}
+
+.dashButton-w {
+    float: right;
+    margin: 10px;
+}
+
+.custom-control-label::after,
+.custom-control-label::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.fixedWidthLabel-w::after,
+.fixedWidthLabel-w::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.disblayBlock-w {
+    display: block;
+}
+
+/* .centerIneerItem {
+    display: flex;
+    justify-content: center;
+    text-align: center;
+} */

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

@@ -0,0 +1,97 @@
+<div class="container">
+    <div class="row">
+      <div class="col-12">
+          <ul class="list-unstyled titileLi-w">
+            <li class="headingText-w">خدمه التدريب</li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px">إستعراض بيانات المتدربين</li>
+          </ul>
+      </div>
+    </div>
+  
+    <div class="containerContent-w">
+
+      <div class="row">
+        <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+            <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
+            <!-- <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()" *ngIf="authSer.showDeleteBtn"><i class="fas fa-times marginFontAowsome-w"></i>حذف</button> -->
+        </div>
+        <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+          <div class="form-group">
+            <input type="text" placeholder="البحث" class="form-control inputSearchTable-w" style="margin-top:13px;" (input)="filtterFunc($event)"/>
+            <hr>
+          </div>
+        </div>
+      </div>
+
+      
+  
+      <div class="row">
+          <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+            <div class="form-group">
+              <span class="spanSelect-w">
+                <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onGetValue($event)">
+                  <option value="5">5</option>
+                  <option value="10">10</option>
+                  <option value="15">15</option>
+                  <option value="20">20</option>
+                </select>
+                من العناصر يتم عرضها
+              </span>
+            </div>
+          </div>
+          <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+            <div class="form-group">
+              <span class="spanSelect-w">
+                  حاله الطلب
+                <select [ngModel]="dataTableNumber" class="form-control selectButton-w" (input)="onFiltterChosen($event)" style="width:200px;">
+                  <option value="pending">تحت الإجراء</option>
+                  <option value="accepted">مقبول</option>
+                  <option value="refused">مرفوض</option>
+                  <option value="canceled">ملغي</option>
+                  <option value="ended">مغلق</option>
+                  <option value="asked_for_opinion">طلب رأي</option>
+                  <option value="replayed_opinion">رأي القسم</option>
+                </select>
+              </span>
+            </div>
+          </div>
+      </div>
+  
+      <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">
+                  <!-- <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 *ngIf="authSer.showEditBtn">تفاصيل المتدرب</th>
+          </tr>
+        </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();">
+                <!-- <label class="custom-control-label disblayBlock-w" for="{{news.id}}" style="color:#2a2a2a;cursor: pointer;"></label> -->
+              </div>
+            </td>
+            <td>{{data.trainee_name}}</td>
+            <td> {{data.specialization_name}}</td>
+            <td>{{data.specific_specialization}}</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>
+          </tr>
+        </tbody>
+      </table>
+      <pagination-controls nextLabel="التالي" previousLabel="السابق" (pageChange)="onPageChange($event)"></pagination-controls>
+    </div>
+  
+  
+  </div>
+  

+ 15 - 0
src/app/dashboard/section-review-for-trainee/section-review-trainee-list/section-review-trainee-list.component.ts

@@ -0,0 +1,15 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-section-review-trainee-list',
+  templateUrl: './section-review-trainee-list.component.html',
+  styleUrls: ['./section-review-trainee-list.component.css']
+})
+export class SectionReviewTraineeListComponent implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {
+  }
+
+}

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

@@ -173,6 +173,8 @@ getDataService(dataService){
             this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/absorpationList/' + this.pages[0].id]);
           } else if(this.pages[0].id == 35) {
             this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/reviewTrainerData/' + this.pages[0].id]);
+          } else if(this.pages[0].id == 37) {
+
           } else if(this.pages[0].id == 40) {
             console.log('trainnngg data !');
             this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/trainnerList/' + this.pages[0].id]);