Amr 5 years ago
parent
commit
bc3e37606a

+ 4 - 4
src/app/auth-services/regester/regester.component.html

@@ -25,7 +25,7 @@
             </div>
           </div>
 
-          <!-- <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="showTypeInput">
+          <div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="showTypeInput">
             <div class="form-group">
               <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;">
@@ -39,7 +39,7 @@
               </div>
 
             </div>
-          </div> -->
+          </div>
 			
 			<div class="col-sm-12 col-md-12 col-lg-12">
 				<div class="row">
@@ -78,7 +78,7 @@
 							<div class="col-12 col-sm-12 col-md-6 col-lg-4" *ngIf="identity_id != 4">
 							  <div class="form-group">
 								<label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
-								<input type="number" class="form-control" placeholder="رقم الهويه" id="identityNumber" formControlName="identity_number" appOnlyNumber (input)="onIdentitiyChange($event.target.value)" />
+								<input type="number" class="form-control" placeholder="رقم الهويه" id="identityNumber" formControlName="identity_number" appNumberDerictive (input)="onIdentitiyChange($event.target.value)" />
 								<span class="errorMessage-w" *ngIf="identity_id == 1">أدخل رقم هويه مكون من 10 أرقام يبدأ برقم 1</span>
 								<span class="errorMessage-w" *ngIf="identity_id == 2">أدخل رقم هويه مكون من 10 أرقام </span>
 								<span class="errorMessage-w" *ngIf="identity_id == 3">أدخل رقم الإقامه مكون من 10 أرقام يبدأ برقم 2 </span>
@@ -262,7 +262,7 @@
             <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" appOnlyNumber class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" formControlName="phone" />
+                <input type="text" id="phone" appNumberDerictive class="form-control" placeholder="رقم الجوال يبدأ ب 05 ومكون من 10 أرقام" formControlName="phone" />
               </div>
             </div>
 

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

@@ -568,7 +568,9 @@ 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.regesterForm.get('phone').value.substring(0,2) != '05') {
+          } else if(this.imageBase64 == '') {
+            this.toastr.warning('قم بإختيار صوره شخصيه !');
+          }  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');
@@ -595,6 +597,8 @@ 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){