IbrahimNour 5 years ago
parent
commit
632cb59bec

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

@@ -11,7 +11,7 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
 
 
 const routes: Routes = [
-  {path: '', redirectTo: '/ExternalPage', pathMatch: 'full'},
+  {path: '', redirectTo: '/InternalPage', 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]},

+ 2 - 24
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;">
@@ -37,9 +37,8 @@
                 <input type="radio" class="custom-control-input customStyleInput" id="defaultRadio" value="0" formControlName="type" name="type" (change)="checkTypeUser($event)">
                 <label class="custom-control-label" for="defaultRadio" style="cursor: pointer;">موظف</label>
               </div>
-
             </div>
-          </div>
+          </div> -->
 			
 			<div class="col-sm-12 col-md-12 col-lg-12">
 				<div class="row">
@@ -106,18 +105,6 @@
                     <option *ngFor="let day of days" [value]="day">{{day}}</option>
                   </select>
                 </div>
-                
-                <!-- <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" formControlName="birthday" />  -->
-                <!-- <app-end-higri-date *ngIf="higri_birth_date && typeMode"  (onDatePicked)="getDate($event, 'higri_birthDate')" [myEndDate]="higri_birth_date" [higriDisabled]="disabledVal"> </app-end-higri-date>
-                <app-end-higri-date *ngIf="!typeMode"  (onDatePicked)="getDate($event, 'higri_birthDate')"> </app-end-higri-date> -->
-                <!-- <input class="form-control"  
-                placeholder="yyyy-mm-dd"
-                formControlName="birthday" 
-                ngbDatepicker #d="ngbDatepicker" />
-                        
-                <div class="input-group-append">
-                    <button class="btn calendar higriButton" (click)="d.toggle()" type="button"><i class="fas fa-calendar-minus"></i></button>
-                </div> -->
               </div>
             </div>
 						 <div class="col-12 col-sm-12 col-md-6 col-lg-4">
@@ -243,15 +230,6 @@
                       <option *ngFor="let day of days" [value]="day">{{day}}</option>
                     </select>
                   </div>
-                  
-                  <!-- <input class="form-control"  
-                    placeholder="yyyy-mm-dd"
-                    formControlName="date_of_employment_hij" 
-                    ngbDatepicker #d="ngbDatepicker" />
-                            
-                <div class="input-group-append">
-                    <button class="btn calendar higriButton" (click)="d.toggle()" type="button"><i class="fas fa-calendar-minus"></i></button>
-                </div> -->
                 </div>
               </div>
             

+ 2 - 7
src/app/auth-services/regester/regester.component.ts

@@ -344,12 +344,10 @@ export class RegesterComponent implements OnInit {
               password_confirmation: new FormControl(null, [Validators.minLength(6)]),
               phone: new FormControl(null,Validators.required),
               gender: new FormControl(null, Validators.required),
-              //birthday: new FormControl(null, Validators.required),
               adminstration_id: new FormControl(null, Validators.required),
               department_id: new FormControl(null, Validators.required),
               nationality_id: new FormControl(null, Validators.required),
               date_of_employment_gre: new FormControl(null, Validators.required),
-              //date_of_employment_hij: new FormControl(null,Validators.required),
               job_title_id: new FormControl(null),
               specialization_id: new FormControl(null),
               functional_number: new FormControl(null, Validators.required),
@@ -375,7 +373,6 @@ export class RegesterComponent implements OnInit {
               position: responce['user'].position,
               phone: responce['user'].phone,
               gender: responce['user'].gender,
-              //birthday: responce['user'].birthday,
               adminstration_id: responce['user'].adminstration_id,
               department_id: responce['user'].department_id,
               nationality_id: responce['user'].nationality_id,
@@ -386,7 +383,6 @@ export class RegesterComponent implements OnInit {
               staff_id: responce['user'].staff_id,
               functional_number: responce['user'].functional_number,
               status: responce['user'].status,
-              //date_of_employment_hij: this.bindingDateSplit, //responce['user'].date_of_employment_hij//
             });
             console.log(this.bindingDateSplit);
 
@@ -493,7 +489,6 @@ export class RegesterComponent implements OnInit {
             password: new FormControl(null, [Validators.required, Validators.minLength(6)]),
             password_confirmation: new FormControl(null, [Validators.required, Validators.minLength(6)]),
             gender: new FormControl(null, Validators.required),
-            //birthday: new FormControl(null, Validators.required),
             nationality_id: new FormControl(null, Validators.required),
             phone: new FormControl(null, Validators.required),
           });
@@ -509,12 +504,10 @@ export class RegesterComponent implements OnInit {
             password_confirmation: new FormControl(null, [Validators.required, Validators.minLength(6)]),
             phone: new FormControl(null, Validators.required),
             gender: new FormControl(null, Validators.required),
-            //birthday: new FormControl(null, Validators.required),
             adminstration_id: new FormControl(null, Validators.required),
             department_id: new FormControl(null, Validators.required),
             nationality_id: new FormControl(null, Validators.required),
             date_of_employment_gre: new FormControl(null, Validators.required),
-            //date_of_employment_hij: new FormControl(null,Validators.required),
             job_title_id: new FormControl(null),
             specialization_id: new FormControl(null),
             functional_number: new FormControl(null, Validators.required),
@@ -578,6 +571,8 @@ export class RegesterComponent implements OnInit {
     onSubmittedForm() {
 
       this.changesSave = true;
+      this.saveDisabled = true;
+      
       const userDataRegester = this.regesterForm.value;
       let joinJobDate;