Forráskód Böngészése

Merge branch 'ibrahimBranch2' into amr2

amr 5 éve
szülő
commit
f7ba73fe9b

+ 10 - 0
src/app/External-Page/external-hospital/external-hospital.component.css

@@ -151,6 +151,16 @@
 
 
   
+  .btn-link {
+      width: 100%;
+      text-align: right;
+  }
+
+  .btn-link-en {
+    width: 100%;
+    text-align: left;
+    background-color: #00a99d;
+  }
 
 
 

+ 6 - 6
src/app/External-Page/external-hospital/external-hospital.component.html

@@ -17,7 +17,7 @@
                                 <div *ngFor="let field of item['fields']" [attr.id]="'collapse'+(i+1)" class="collapse" [ngClass]="{'show' : (i+1) == 1}" [attr.aria-labelledby]="'heading' + (i+1)" data-parent="#accordion">
                                   <div class="card-body testBody-w">
                                       <ul class="list-unstyled">
-                                        <li (click)="showDescriptionDetails(field)"  [className]=" authSer.arabicTemplate ? '' : 'achievementsLangHeading-w' " style="text-align:right;margin-right:-23px">
+                                        <li (click)="showDescriptionDetails(field)" [className]=" authSer.arabicTemplate ? '' : 'achievementsLangHeading-w' " style="text-align:right;margin-right:-23px">
                                             {{field.title}}
                                         </li>
                                       </ul>
@@ -44,11 +44,11 @@
                               <div id="accordion">
                                   <div class="card" *ngFor="let item of data; let i = index">
                                       <div class="card-header" [attr.id]="'heading'+(i+1)">
-                                      <h5 class="mb-0">
-                                          <button class="btn btn-link" data-toggle="collapse" [attr.data-target]="'#collapse'+(i+1)" [attr.aria-expanded]="(i+1)==1 ? true :false" [attr.aria-controls]="'collapse'+(i+1)">
-                                          <h4 class="panel-title">{{item.name_en}}</h4>
-                                          </button>
-                                      </h5>
+                                        <h5 class="mb-0">
+                                            <button class="btn btn-link-en" data-toggle="collapse" [attr.data-target]="'#collapse'+(i+1)" [attr.aria-expanded]="(i+1)==1 ? true :false" [attr.aria-controls]="'collapse'+(i+1)">
+                                            <h4 class="panel-title">{{item.name_en}}</h4>
+                                            </button>
+                                        </h5>
                                       </div>
                                   
                                       <div *ngFor="let field of item['fields']" [attr.id]="'collapse'+(i+1)" class="collapse" [ngClass]="{'show' : (i+1) == 1}" [attr.aria-labelledby]="'heading' + (i+1)" data-parent="#accordion">

+ 11 - 0
src/app/External-Page/external-managaments/external-managaments.component.css

@@ -43,6 +43,17 @@
     background-color: #f3f3f3;
 }
 
+.btn-link {
+    width: 100%;
+    text-align: right;
+}
+
+.btn-link-en {
+  width: 100%;
+  text-align: left;
+  background-color: #00a99d;
+}
+
 @media(max-width: 767px) {
     .hospitalContent-w .card-body ul li {
         font-size: 13px;

+ 3 - 3
src/app/Internal-Page/internal-page-content/internal-page-content.component.html

@@ -38,6 +38,7 @@
                                 </div>
                             </div>
                         </div> 
+                        
                      </div>
                 </div>
             </div>
@@ -156,7 +157,7 @@
             <div class="secondServices-w">
                 <div class="container containerPaddingEdit-w" style="height:560px; overflow-y:auto">
                     <div class="row" style="padding:0 10px;">
-                        <div class="col-12 col-sm-12 col-md-6 col-lg-4 editRowPadding-w" *ngFor="let ser of internalService">
+                        <div class="col-12 col-sm-12 col-md-6 col-lg-4 editRowPadding-w"  *ngFor="let ser of internalServices">
                             <div class="contentSecondSer-w">
                                 <div class="headerSer-w">
                                     {{ser.name}}
@@ -241,7 +242,6 @@
 </ng-template>
 
 
-
  <ng-template #englishTemplate>
     <div class="container">
     <div class="contentPage-w">
@@ -394,7 +394,7 @@
             <div class="secondServices-w">
                 <div class="container" style="height:560px; overflow-y:auto; padding-left:5px">
                     <div class="row" style="padding:0 10px;">
-                        <div class="col-12 col-sm-6 col-md-4 editRowPadding-w" *ngFor="let ser of internalService">
+                        <div class="col-12 col-sm-6 col-md-4 editRowPadding-w" *ngFor="let ser of internalServices">
                             <div class="contentSecondSer-w" style="float:left;">
                                 <div class="headerSer-w">
                                     {{ser.name_en}}

+ 3 - 2
src/app/Internal-Page/internal-page-content/internal-page-content.component.ts

@@ -44,7 +44,7 @@ export class InternalPageContentComponent implements OnInit {
     reportsData = [];
     externalServices = [];
     congratulations = [];
-    condolences = [];
+    condolences: any = [];
     internalServices = [];
     tabsData = [];
     achievements = [];
@@ -141,12 +141,13 @@ export class InternalPageContentComponent implements OnInit {
         this.showJoinData(this.joinUs[0]);
 
         this.condolences = responce['data'].condolences_events;
+        console.log('errorrrrrr loooooooooooooop => ', this.condolences);
         this.showTabData(this.condolences[0], 'sad');
 
         this.congratulations = responce['data'].congratulations_events;
         this.showTabData(this.congratulations[0], 'wedding');
 
-        this.internalService = responce['data'].internal_services;
+        this.internalServices = responce['data'].internal_services;
         console.log('internalService', this.internalService);
 
         this.tabsData = responce['data'].tabs;

+ 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]},

+ 24 - 24
src/app/auth-services/login/login.component.html

@@ -1,32 +1,32 @@
   <div class="login-dashBoard" [style.min-height.px]="screenHeight">
     <div class="container">
-        <div class="formContent-w">
-            <h2>تسجيل الدخول</h2>
-            <p>مرحباً ، قم بتسجيل الدخول الان</p>
-            <div class="container">
-              <div class="row">
-                <div class="col-12">
-                  <form (ngSubmit)="onSubmitedForm()" #f="ngForm">
-                    <div class="form-group">
-                      <label for="email">رقم الهويه</label>
-                      <input type="phone" id="email" class="form-control" placeholder="رقم الهويه" name="identity_number" appEnglishCharacters ngModel required  #identity_number="ngModel" />
-                      <span class="help-block" *ngIf="!identity_number.valid && identity_number.touched">من فضلك ، ادخل رقم الهويه صحيح</span>
-                    </div>
-                    <div class="form-group">
-                        <label for="password"> كلمه المرور</label>
-                        <input type="password" id="password" class="form-control" placeholder="كلمه المرور"  name="password" ngModel required #password="ngModel"/>
-                        <span class="help-block" *ngIf="!password.valid && password.touched">من فضلك ، قم بادخال كود صحيح</span>
-                    </div>
-                    <div class="form-group">
-                      <a (click)="registerFun()" class="signUp-w" style="float: left; margin-left:10px; cursor: pointer">إنشاء حساب جديد</a>
-                      <a routerLink="/page-not-found" class="forgetPassword-w" style="margin-right: 10px">نسيت كلمه المرور ؟</a>
-                    </div>
-                    <button class="btn btn-success form-control" type="submit" [disabled]="!f.valid || saveDisabled">الدخول</button>
-                  </form>
-                </div>
+      <div class="formContent-w">
+        <h2>تسجيل الدخول</h2>
+        <p>مرحباً ، قم بتسجيل الدخول الان</p>
+          <div class="container">
+            <div class="row">
+              <div class="col-12">
+                <form (ngSubmit)="onSubmitedForm()" #f="ngForm">
+                  <div class="form-group">
+                    <label for="email">رقم الهويه</label>
+                    <input type="phone" id="email" class="form-control" placeholder="رقم الهويه" name="identity_number" ngModel required  #identity_number="ngModel" />
+                    <span class="help-block" *ngIf="!identity_number.valid && identity_number.touched">من فضلك ، ادخل رقم الهويه صحيح</span>
+                  </div>
+                  <div class="form-group">
+                      <label for="password"> كلمه المرور</label>
+                      <input type="password" id="password" class="form-control" placeholder="كلمه المرور"  name="password" ngModel required #password="ngModel"/>
+                      <span class="help-block" *ngIf="!password.valid && password.touched">من فضلك ، قم بادخال كود صحيح</span>
+                  </div>
+                  <div class="form-group">
+                    <a (click)="registerFun()" class="signUp-w" style="float: left; margin-left:10px; cursor: pointer">إنشاء حساب جديد</a>
+                    <a routerLink="/page-not-found" class="forgetPassword-w" style="margin-right: 10px">نسيت كلمه المرور ؟</a>
+                  </div>
+                  <button class="btn btn-success form-control" type="submit" [disabled]="!f.valid || saveDisabled">الدخول</button>
+                </form>
               </div>
             </div>
           </div>
+        </div>
     </div>
   </div>
 

+ 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;
 

+ 1 - 1
src/app/dashboard/advertisiment/advertisiment.component.ts

@@ -56,7 +56,7 @@ export class AdvertisimentComponent implements OnInit {
 
       this.route.params.subscribe(
         (parmas: Params) => {
-          this.pageId = parmas['listPageId'];
+          this.pageId = parmas['adverId'];
           localStorage.setItem('pageIdActive', '24');
         }
       );

+ 17 - 3
src/app/dashboard/events/add-event/add-event.component.html

@@ -74,20 +74,34 @@
               </div>
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                <label for="date" style="float: right; margin-right: 5px">التاريخ</label>
+                <label for="date" style="float: right; margin-right: 5px">تاريخ الإبتداء</label>
                 <div *ngIf='bindingDateSplit && typeMode'>
                   <app-higri-date (onDatePicked)="getDate($event)" [myDate]="bindingDateSplit"></app-higri-date>
                 </div>
                 <div *ngIf='!typeMode'>
-                  <app-higri-date (onDatePicked)="getDate($event)" ></app-higri-date>
+                  <app-higri-date (onDatePicked)="getDate($event, 'start')" ></app-higri-date>
                 </div>
               </div>
 
               <div class="col-12 col-sm-12 col-md-4 col-lg-4">
-                <label for="time" style="float: right; margin-right: 5px">الوقت <span class="spanReqired-w">*</span></label>
+                <label for="time" style="float: right; margin-right: 5px">وقت الإبتداء <span class="spanReqired-w">*</span></label>
                 <input type="time" class="form-control" [(ngModel)]="event.time" id="time" name="time" required/>
               </div>
 
+              <div class="col-12 col-sm-12 col-md-6 col-lg-4" style="margin-top: 20px">
+                <div class="form-group">
+                  <label for="endDate" style="float:right" >تاريخ الإنتهاء<span class="spanReqired-w">*</span></label>
+                  <div>
+                    <app-end-higri-date  (onDatePicked)="getDate($event, 'end')" [myEndDate]="bindingDateSplitEnd"> </app-end-higri-date>
+                  </div>
+                </div>
+              </div>
+
+              <div class="col-12 col-sm-12 col-md-4 col-lg-4" style="margin-top: 20px">
+                <label for="endTime" style="float: right; margin-right: 5px">وقت الإنتهاء <span class="spanReqired-w">*</span></label>
+                <input type="time" class="form-control" [(ngModel)]="event.endTime" id="endTime" name="endTime" required/>
+              </div>
+
               <div class="col-12">
                   <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>

+ 44 - 13
src/app/dashboard/events/add-event/add-event.component.ts

@@ -24,6 +24,7 @@ export class AddEventComponent implements OnInit {
   bindingDateSplit;
   higriDateVal:string;
   checkSaveClick:boolean = false;
+  bindingDateSplitEnd: any;
 
   event = {
     employee_name: '',
@@ -34,6 +35,7 @@ export class AddEventComponent implements OnInit {
     type: '',
     status: '',
     time: '',
+    endTime: '',
   }
 
   constructor(private dashboard: DashboardService,
@@ -86,6 +88,12 @@ export class AddEventComponent implements OnInit {
                 'day': parseInt(higriDate[2])
               };
 
+              this.bindingDateSplitEnd = {
+                year: parseInt(eventData.created_date.split('-')[0]),
+                month: parseInt(eventData.created_date.split('-')[1]),
+                day: parseInt(eventData.created_date.split('-')[2]),
+              }
+
               console.log('hhhhhhhhhhhhhhh' , this.bindingDateSplit);
               this.spineer.hide();
             },
@@ -101,28 +109,43 @@ export class AddEventComponent implements OnInit {
   }
 
     //get value date from child component 
-    public getDate(date: any):void {
+    public getDate(date: any, type: string):void {
       console.log( date);
-      this.higriDateVal = date.year + '-' + date.month + '-' + date.day;
-      console.log('higrii date', this.higriDateVal);
+      if(type == 'start'){
+        this.higriDateVal = date.year + '-' + date.month + '-' + date.day;
+        console.log('higrii date', this.higriDateVal);
+      } else if(type == 'end') {
+        this.bindingDateSplitEnd = date.year + '-' + date.month + '-' + date.day;
+        console.log('end higrii date', this.bindingDateSplitEnd);
+      } else {
+        console.log('no date !');
+      }
+
     }
   
 
   //submitted form
   onSubmitted() {
-    this.checkSaveClick = true;
-    console.log(this.eventForm.value);
-    console.log(this.eventForm.value.time);
-    this.eventForm.value['date'] = this.higriDateVal;
-    if(this.event.time) {
-      this.eventForm.value.event_time = this.eventForm.value.date + ' ' + this.event.time;
+
+    //this.checkSaveClick = true;
+    if(this.higriDateVal) {
+      this.eventForm.value['event_time'] = this.higriDateVal + ' ' + this.event.time;
+      delete this.eventForm.value.time;
     }
-    console.log(this.eventForm.value.event_time);
-    delete this.eventForm.value.time;
-    delete this.eventForm.value.date;
+
+    if(this.bindingDateSplitEnd) {
+      this.eventForm.value['event_end_time'] = this.bindingDateSplitEnd + ' ' + this.event.endTime;
+      delete this.eventForm.value.endTime;
+    }
+
 
     console.log(this.eventForm.value); 
     if(this.typeMode) {
+      if(!this.higriDateVal){
+        this.toastr.warning('من فضلك أدخل تاريخ الإبتداء !');
+      } else if(!this.bindingDateSplitEnd) {
+        this.toastr.warning('من فضلك أدخل تاريخ الإنتهاء !');
+      } else {
         this.dashboard.editItem( this.eventId ,this.eventForm.value , "events").subscribe(
           (responce) => {
             console.log(responce);
@@ -143,7 +166,14 @@ export class AddEventComponent implements OnInit {
             this.checkSaveClick = false;
           }
         );
+      }
+        
     } else {
+      if(!this.higriDateVal){
+        this.toastr.warning('من فضلك أدخل تاريخ الإبتداء !');
+      } else if(!this.bindingDateSplitEnd) {
+        this.toastr.warning('من فضلك أدخل تاريخ الإنتهاء !');
+      } else {
         this.dashboard.addItem(this.eventForm.value, "events").subscribe(
           (responce) => {
             console.log(responce);
@@ -163,7 +193,8 @@ export class AddEventComponent implements OnInit {
             console.log(error);
             this.checkSaveClick = false;
           }
-        ); 
+        );
+      } 
     }
   }
 

+ 6 - 6
src/app/dashboard/register-movement-vehicle/register-movement-vehicle-add/register-movement-vehicle-add.component.html

@@ -19,7 +19,7 @@
 
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
-                  <label for="vehicle_type_id" style="float: right; margin-right: 5px">صنف المركبه</label>
+                  <label for="vehicle_type_id" style="float: right; margin-right: 5px">صنف المركبه <span class="spanReqired-w">*</span></label>
                   <select class="form-control" name="vehicle_type_id" (input)="onChangeVehicleType($event)" [disabled]="checkEdit" [(ngModel)]="formData.vehicle_type_id" required>
                     <option *ngFor="let type of vehicle_types" [value]="type.id">{{type.name}}</option>
                   </select>
@@ -28,7 +28,7 @@
 
               <div class="col-12 col-sm-12 col-md-4" *ngIf='show'>
                   <div class="form-group">
-                    <label for="vehicle_id" style="float: right; margin-right: 5px"> رقم اللوحات</label>
+                    <label for="vehicle_id" style="float: right; margin-right: 5px"> رقم اللوحات <span class="spanReqired-w">*</span></label>
                     <select class="form-control" name="vehicle_id" [(ngModel)]="formData.vehicle_id" [disabled]="checkEdit" required>
                       <option *ngFor="let num of licenseNum" [value]="num.id">{{num.plate_number}}</option>
                     </select>
@@ -37,14 +37,14 @@
 
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
-                   <label for="vehicle_recipient_name" style="float: right; margin-right: 5px">إسم الموظف</label>
+                   <label for="vehicle_recipient_name" style="float: right; margin-right: 5px">إسم الموظف <span class="spanReqired-w">*</span></label>
                    <input type="text" class="form-control" placeholder="إسم الموظف" name="vehicle_recipient_name" id="vehicle_recipient_name" [(ngModel)]="formData.vehicle_recipient_name" ngModel required />
                 </div>
               </div>
 
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
-                    <label for="phone" style="float: right; margin-right: 5px">الجوال</label>
+                    <label for="phone" style="float: right; margin-right: 5px">الجوال  <span class="spanReqired-w">*</span> </label>
                     <input type="text" class="form-control" placeholder="الهاتف" name="phone" id="phone" appOnlyNumber [(ngModel)]="formData.phone" ngModel required />
                 </div>
               </div>
@@ -92,14 +92,14 @@
                       </div>
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
-                    <label for="start_mileage_recording" style="float: right; margin-right: 5px">تسجيل عدد الكيلومترات البداية</label>
+                    <label for="start_mileage_recording" style="float: right; margin-right: 5px">تسجيل عدد الكيلومترات البداية <span class="spanReqired-w">*</span></label>
                     <input type="number" class="form-control" placeholder="تسجيل عدد الكيلومترات البداية" name="start_mileage_recording" id="start_mileage_recording" [(ngModel)]="formData.start_mileage_recording" ngModel required />
                 </div>
               </div>
 
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
-                    <label for="end_mileage_recording" style="float: right; margin-right: 5px">تسجيل عدد الكيلومترات للنهاية</label>
+                    <label for="end_mileage_recording" style="float: right; margin-right: 5px">تسجيل عدد الكيلومترات للنهاية <span class="spanReqired-w">*</span></label>
                     <input type="number" class="form-control" placeholder="تسجيل عدد الكيلومترات للنهاية" name="end_mileage_recording" id="end_mileage_recording" [(ngModel)]="formData.end_mileage_recording" ngModel required />
                 </div>
               </div>

+ 5 - 1
src/app/dashboard/vehicle-maintenance/vehicle-maintenance-add/vehicle-maintenance-add.component.ts

@@ -238,6 +238,7 @@ export class VehicleMaintenanceAddComponent implements OnInit {
 
     delete this.vehicleForm.value['vehicle_type_id'];
 
+    console.log(this.vehicleForm.value);
     console.log(this.formData);
 
     const startDateData = this.startDate.split('-');
@@ -254,7 +255,10 @@ export class VehicleMaintenanceAddComponent implements OnInit {
         this.toastr.warning(' يوم تاريخ الإنتهاء يجب أن يكون أكبر من يوم تاريخ الإبتداء!');
         this.checkSaveclick = false;
       } else {
-        this.dashBoardSer.editItem(this.maintenanceVehicleId,this.formData, 'vehicleMaintenance').subscribe(
+        this.vehicleForm.value['vehicle_id'] = this.formData.vehicle_id;
+        this.vehicleForm.value['vehicle_type_id'] = this.formData.vehicle_type_id;
+        console.log('===========================>', this.vehicleForm.value);
+        this.dashBoardSer.editItem(this.maintenanceVehicleId, this.vehicleForm.value, 'vehicleMaintenance').subscribe(
           (responce) => {
             console.log(responce);
             this.toastr.success('تم التعديل بنجاح');

+ 0 - 1
src/app/shared/auth-service.service.ts

@@ -239,5 +239,4 @@ export class AuthServiceService {
     }) );
   }
 
-
 }

+ 1 - 1
src/styles.css

@@ -964,7 +964,7 @@ height: 7px !important;
 	direction: ltr;
 }
 .btn-link{
-	    color: #8c6a40 !important;
+      color: #8c6a40 !important;
 }
 .ngb-dp-weekday{
 	    color: #af6204 !important;