Hima 6 years ago
parent
commit
28aee72604

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

@@ -97,7 +97,6 @@ export class AbsorpationListComponent implements OnInit {
           (error) => {console.log(error)}
         );
       }
-
     );
 
     //get list data 
@@ -143,6 +142,9 @@ export class AbsorpationListComponent implements OnInit {
       (responce) => {
         console.log(responce);
         this.absorpationList = responce['absorption_plans'];
+        if(this.absorpationList.length == 0) {
+          this.toastr.warning('لا يوجد بيانات لعرضها الأن !');
+        }
         this.count = responce['count'];
         this.perPagePagenation = responce['per_page'];
         console.log('filtter count', this.count);

+ 8 - 7
src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.html

@@ -67,11 +67,11 @@
                   </div>
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
-                      <div class="form-group">
-                        <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
-                        <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
-                      </div>
+                    <div class="form-group">
+                      <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
+                      <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" ngModel name="birthday" [(ngModel)]="userData.birthday" [disabled]="disabledInput" required/> 
                     </div>
+                  </div>
 
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
@@ -100,13 +100,14 @@
                   <div class="col-12 col-sm-12 col-md-6 col-lg-4">
                     <div class="form-group">
                       <label for="phone" style="float:right">رقم الجوال <span class="spanReqired-w">*</span></label>
-                      <input type="text" id="phone" appNumberDerictive class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" ngModel name="phone" [(ngModel)]="userData.phone" [disabled]="disabledInput" required/>
+                      <input type="text" id="phone" appOnlyNumber class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" ngModel name="phone" [(ngModel)]="userData.phone" [disabled]="disabledInput" required/>
                     </div>
                   </div>
                   <div class="col-12 col-md-4">
                     <div class="form-group">
                       <label for="email" style="float:right">البريد الإلكتروني <span class="spanReqired-w">*</span></label>
-                      <input id="email" type="email" class="form-control" placeholder="الإيميل" ngModel name="email"  [(ngModel)]="userData.email" [disabled]="disabledInput" required/>
+                      <input id="email" type="email" class="form-control" placeholder="الإيميل" ngModel name="email" email #email="ngModel" appEnglishCharacters [(ngModel)]="userData.email" [disabled]="disabledInput" required/>
+                      <span *ngIf="!email.valid && email.touched" style="color:red; margin: 5px 0;">أدخل بريد إالكترونب صحيح ex@jfk.cde</span>
                     </div>
                   </div>
               </div>
@@ -247,7 +248,7 @@
                     <div class="form-group">
                       <label for="status" style="float:right; display:block"> الأوامر <span class="spanReqired-w">*</span></label>
                       <button type="button" class="btn btn-success statusBtn-w" (click)="statusShow('accepted')">قبول</button>
-                      <button type="button" class="btn btn-danger statusBtn-w" (click)="statusShow('refuced')">رفض</button>
+                      <button type="button" class="btn btn-danger statusBtn-w" (click)="statusShow('refused')">رفض</button>
                       <button type="button" class="btn btn-default statusBtn-w" (click)="statusShow('asked_for_opinion')">طلب رأي</button>
                       <input type="text" placeholder="سبب الرفض" class="form-control" name="status_description" ngModel [(ngModel)]="formData.status_description" *ngIf="showRefusedCause" required>
                     </div>

+ 7 - 2
src/app/dashboard/reivew-trainee-data/review-trainee-add/review-trainee-add.component.ts

@@ -165,6 +165,11 @@ export class ReviewTraineeAddComponent implements OnInit {
           this.formData.authority_card_number = responce['data']['request'].authority_card_number;
           this.formData.training_period = responce['data']['request'].training_period;
           this.formData.status = responce['data']['request'].status;
+          if(this.formData.status == 'refused') {
+            this.showRefusedCause = true;
+          } else {
+            this.showRefusedCause = false;
+          }
           this.formData.status_description = responce['data']['request'].status_description;
           this.formData.functional_number = responce['data']['request'].functional_number;
           this.formData.organization_affiliated_with = responce['data']['request'].organization_affiliated_with;
@@ -224,7 +229,7 @@ export class ReviewTraineeAddComponent implements OnInit {
       this.formData.status = typeStatus;
       this.toastr.success('تم تسجيل الحاله مقبول');
       this.showRefusedCause = false;
-    } else if(typeStatus == 'refuced') {
+    } else if(typeStatus == 'refused') {
       this.formData.status = typeStatus;
       this.showRefusedCause = true;
       this.toastr.error('تم تسجيل الحاله بالرفض');
@@ -293,7 +298,7 @@ export class ReviewTraineeAddComponent implements OnInit {
       (error) => {
         console.log(error);
       }
-    )
+    );
   }
 
   //change file 

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

@@ -75,7 +75,7 @@
             <th>الجامعه</th>
             <th>نوع التدريب</th>
             <th>الحاله</th>
-            <th *ngIf="authSer.showEditBtn">تفاصيل المتدرب</th>
+            <th *ngIf="authSer.showEditBtn">تفاصيل الطلب</th>
           </tr>
         </thead>
         <tbody>

+ 4 - 0
src/app/dashboard/supervisor/supervisor-list/supervisor-list.component.ts

@@ -95,6 +95,7 @@ export class SupervisorListComponent implements OnInit {
           },
           (error) => {console.log(error)}
         );
+
       }
     );
 
@@ -231,6 +232,9 @@ export class SupervisorListComponent implements OnInit {
                     this.count = responce['count'];
                     this.perPagePagenation = responce['per_page'];
                     this.superDepartList = responce['departments'];
+                    if(this.superDepartList.length == 0) {
+                      this.toastr.warning('لا يوجد بيانات لعرضها الأن !');
+                    }
                     console.log(this.superDepartList);
                     this.spinner.hide();
                   },

+ 3 - 0
src/app/dashboard/trainner-data/trainner-data-list/trainner-data-list.component.ts

@@ -175,6 +175,9 @@ onGetValue(event) {
     (responce) => {
       console.log(responce);
       this.trainnersData = responce['users'];
+      if(this.trainnersData.length == 0) {
+        this.toastr.warning('لا يوجد بيانات لعرضها الأن !');
+      }
       this.count = responce['count'];
       this.perPagePagenation = responce['per_page'];
       this.spinner.hide();

+ 1 - 1
src/app/regester/regester.component.html

@@ -60,7 +60,7 @@
 							  <div class="form-group">
 								<label style="float:right">الجنسية <span class="spanReqired-w">*</span></label>
 								<select class="form-control" formControlName="nationality_id" style="padding:0 5px">
-								  <option *ngFor="let country of countries; let i = index" [value]="country.id">{{country.country_arName}}</option>
+								  <option *ngFor="let country of countries; let i = index" [value]="country.id">{{country.country_arNationality}}</option>
 								</select>
 							  </div>
 							</div>