5 Incheckningar 11a97ecdf0 ... caf48d0be6

Upphovsman SHA1 Meddelande Datum
  Hima caf48d0be6 ggg 5 år sedan
  Hima fd69a6ff00 ff 5 år sedan
  Amr 239d94267a ddd 5 år sedan
  Amr 305479394f dd 5 år sedan
  Hima eb4cb72a5a gg 5 år sedan
47 ändrade filer med 460 tillägg och 266 borttagningar
  1. 3 3
      src/app/Internal-Page/internal-page-content/internal-page-content.component.html
  2. 3 2
      src/app/Internal-Page/internal-page-content/internal-page-content.component.ts
  3. 1 1
      src/app/app-routing.module.ts
  4. 24 24
      src/app/auth-services/login/login.component.html
  5. 1 23
      src/app/auth-services/regester/regester.component.html
  6. 35 7
      src/app/auth-services/regester/regester.component.ts
  7. 5 5
      src/app/dashboard/application-for-housing/application-for-housing.component.html
  8. 11 5
      src/app/dashboard/application-for-housing/application-for-housing.component.ts
  9. 1 1
      src/app/dashboard/dashboard-routing.ts
  10. 3 2
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.html
  11. 3 3
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.html
  12. 3 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts
  13. 17 3
      src/app/dashboard/events/add-event/add-event.component.html
  14. 44 13
      src/app/dashboard/events/add-event/add-event.component.ts
  15. 4 3
      src/app/dashboard/females_request_types/females-request-types-add/females-request-types-add.component.html
  16. 1 1
      src/app/dashboard/females_request_types/females-request-types-add/females-request-types-add.component.ts
  17. 1 0
      src/app/dashboard/females_request_types/females-request-types-list/females-request-types-list.component.ts
  18. 3 3
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.html
  19. 20 6
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.ts
  20. 6 8
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-list/link-unit-to-covenants-list.component.html
  21. 3 2
      src/app/dashboard/living-service/living-service-add/living-service-add.component.html
  22. 3 2
      src/app/dashboard/living-service/living-service-add/living-service-add.component.ts
  23. 9 1
      src/app/dashboard/living-service/living-service-list/living-service-list.component.ts
  24. 2 2
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.css
  25. 34 28
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.html
  26. 6 14
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.ts
  27. 6 5
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.html
  28. 11 3
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.ts
  29. 4 1
      src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.ts
  30. 5 4
      src/app/dashboard/unit-building-information/unit-building-information-add/unit-building-information-add.component.html
  31. 9 2
      src/app/dashboard/unit-building-information/unit-building-information-add/unit-building-information-add.component.ts
  32. 6 6
      src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.html
  33. 3 0
      src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.ts
  34. 4 3
      src/app/dashboard/unit-information/unit-information-add/unit-information-add.component.html
  35. 4 0
      src/app/dashboard/unit-information/unit-information-list/unit-information-list.component.ts
  36. 9 8
      src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.html
  37. 75 19
      src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.ts
  38. 10 10
      src/app/dashboard/view_my_female_requests/view-my-female-requests-list/view-my-female-requests-list.component.html
  39. 3 3
      src/app/dashboard/view_my_female_requests/view-my-female-requests-list/view-my-female-requests-list.component.ts
  40. 7 6
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-details/view-requests-for-adminstration-details.component.html
  41. 18 10
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-details/view-requests-for-adminstration-details.component.ts
  42. 8 8
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-list/view-requests-for-adminstration-list.component.html
  43. 11 1
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-list/view-requests-for-adminstration-list.component.ts
  44. 7 4
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.html
  45. 5 1
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.ts
  46. 9 9
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant/view-requests-for-tenant.component.html
  47. 0 1
      src/app/shared/auth-service.service.ts

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

+ 1 - 23
src/app/auth-services/regester/regester.component.html

@@ -37,7 +37,6 @@
                 <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> -->
 			
@@ -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">
@@ -148,7 +135,7 @@
 					<fieldset class="formfieldset">
 
 					  <legend>
-						<span>المعلومات الوظيفية</span>
+						  <span>المعلومات الوظيفية</span>
 						</legend>
 					
 						  
@@ -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>
             

+ 35 - 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;
 
@@ -634,6 +629,9 @@ export class RegesterComponent implements OnInit {
                 } else if(error.error['error'].identity_number) {
                   this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
                   this.saveDisabled = false;
+                } else if(error.error['error'].phone) {
+                  this.toastr.warning(' رقم الهاتف يجب ان لايكون أقل من 6 ارقام ، ولا يكون مستخدم من قبل!');
+                  this.saveDisabled = false;
                 }
               }
             );
@@ -642,14 +640,19 @@ export class RegesterComponent implements OnInit {
           //edit profile employee submited 
           if(this.regesterForm.get('password').value != this.regesterForm.get('password_confirmation').value){
             this.toastr.warning(' من فضلك , تأكد أن كلمه المورو نفس تأكيد كلمه المرور!');
+            this.saveDisabled = false;
           }else if(this.regesterForm.get('identity_number').value.substring(0,1) != 1 && this.regesterForm.get('identity_type_id').value == 1){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 1');
+            this.saveDisabled = false;
           } else if(this.regesterForm.get('identity_number').value.substring(0,1) != 2 && this.regesterForm.get('identity_type_id').value == 3){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 2');
+            this.saveDisabled = false;
           } else if(this.birthDate.year > this.griDate.year) {
             this.toastr.warning('تارخ الميلاد أكبر من تاريخ التوظيف الميلادي !');
+            this.saveDisabled = false;
           } else if(this.regesterForm.get('phone').value.substring(0,2) != '05') {
             this.toastr.warning('رقم الجوال يجب أن يبدأ ب 05');
+            this.saveDisabled = false;
           } else {
             this.userService.onEditProfile(userDataRegester).subscribe(
               (responce) => {
@@ -661,8 +664,13 @@ export class RegesterComponent implements OnInit {
                 this.toastr.error('فشل التعديل');
                 if(error.error['error'].email) {
                   this.toastr.warning('الايميل تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
                 } else if(error.error['error'].identity_number) {
                   this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
+                } else if(error.error['error'].phone) {
+                  this.toastr.warning('  رقم الهاتف يجب ان لايكون أقل من 6 ارقام ، ولا يكون مستخدم من قبل !');
+                  this.saveDisabled = false;
                 }
               }
             );
@@ -679,12 +687,16 @@ export class RegesterComponent implements OnInit {
           //visitor added submited
           if(this.regesterForm.get('password').value != this.regesterForm.get('password_confirmation').value){
             this.toastr.warning('  من فضلك تأكد أن كلمه المرور نفس تأكيد كلمه المرور !');
+            this.saveDisabled = false;
           } else if(this.regesterForm.get('phone').value.substring(0,2) != '05') {
             this.toastr.warning('رقم الجوال يجب أن يبدأ ب 05');
+            this.saveDisabled = false;
           } else if(userDataRegester['identity_number'].substring(0,1) != 1 && this.regesterForm.get('identity_type_id').value == 1){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 1');
+            this.saveDisabled = false;
           } else if(userDataRegester['identity_number'].substring(0,1) != 2 && this.regesterForm.get('identity_type_id').value == 3){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 2');
+            this.saveDisabled = false;
           } else {
             this.authSer.signUp(userDataRegester).subscribe(
               (responce) => {
@@ -696,8 +708,13 @@ export class RegesterComponent implements OnInit {
                 console.log(error);
                 if(error.error['error'].email) {
                   this.toastr.warning('الايميل تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
                 } else if(error.error['error'].identity_number) {
                   this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
+                } else if(error.error['error'].phone) {
+                  this.toastr.warning('  رقم الهاتف يجب ان لايكون أقل من 6 ارقام ، ولا يكون مستخدم من قبل!');
+                  this.saveDisabled = false;
                 }
               }
             );
@@ -706,14 +723,19 @@ export class RegesterComponent implements OnInit {
           //employee added submited
           if(this.regesterForm.get('password').value != this.regesterForm.get('password_confirmation').value){
             this.toastr.warning('  من فضلك تأكد أن كلمه المرور نفس تأكيد كلمه المرور !');
+            this.saveDisabled = false;
           } else if(userDataRegester['identity_number'].substring(0,1) != 1 && this.regesterForm.get('identity_type_id').value == 1){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 1');
+            this.saveDisabled = false;
           } else if(userDataRegester['identity_number'].substring(0,1) != 2 && this.regesterForm.get('identity_type_id').value == 3){
             this.toastr.warning('رقم الهويه يجب ان يبدأ ب رقم 2');
+            this.saveDisabled = false;
           } else if(this.birthDate.year > this.griDate.year) {
             this.toastr.warning('تارخ الميلاد أكبر من تاريخ التوظيف الميلادي !');
+            this.saveDisabled = false;
           } else if(this.regesterForm.get('phone').value.substring(0,2) != '05') {
             this.toastr.warning('رقم الجوال يجب أن يبدأ ب 05');
+            this.saveDisabled = false;
           } 
           else {
             this.authSer.signUp(userDataRegester).subscribe(
@@ -726,8 +748,14 @@ export class RegesterComponent implements OnInit {
                 console.log(error);
                 if(error.error['error'].email) {
                   this.toastr.warning('الايميل تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
                 } else if(error.error['error'].identity_number) {
                   this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
+                  this.saveDisabled = false;
+                }
+                else if(error.error['error'].phone) {
+                  this.toastr.warning('  رقم الهاتف يجب ان لايكون أقل من 6 ارقام ، ولا يكون مستخدم من قبل!');
+                  this.saveDisabled = false;
                 }
               }
             );

+ 5 - 5
src/app/dashboard/application-for-housing/application-for-housing.component.html

@@ -16,8 +16,8 @@
         <div class="row" *ngIf="showSearch">
           <div class="col-12 col-md-4">
             <div class="form-group">
-              <input type="number" placeholder="" class="form-control numberReport-s" [(ngModel)]="searchValue" [ngModelOptions]="{standalone: true} "/>
-              <button type="button" class="btn btn-success buttonS" (click)="SearchOnUser()">أبحث</button>
+              <input type="number" placeholder="ابحث برقم الهوية" class="form-control numberReport-s" [(ngModel)]="searchValue" [ngModelOptions]="{standalone: true} "/>
+              <button type="button" class="btn btn-success buttonS"   (click)="SearchOnUser()">أبحث</button>
             </div>
           </div> 
         </div>
@@ -87,9 +87,9 @@
                             <td style="position: relative;">
                                 <input type="file" name="file{{i}}" id="file{{i}}" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event,i)"/>
                                 <label for="file{{i}}" class="iconUpload-w"><i class="fas fa-upload"></i></label>
-                                <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
+                                <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; position: relative; top: -23px;"></i>
                                 </span>
-                              </td>
+                              </td> 
                               <!-- <td><a href="{{authSer.pathImg + file.nameFile}}" target="_blank"><i class="fas fa-download"></i></a></td> -->
                               <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                             </tr>
@@ -110,7 +110,7 @@
              
             <div class="row">
               <div class="col-12">
-                  <button type="submit" class="btn btn-success rightW"  [disabled]="send || saveTherequist" >حفظ</button>
+                  <button type="submit" class="btn btn-success rightW"  [disabled]=" saveTherequist" >حفظ</button>
                 <button type="button" class="btn btn-warning rightW" (click)="authService.backFromEdit()" style="margin:20px 10px;">إلغاء</button>
               </div>
             </div>

+ 11 - 5
src/app/dashboard/application-for-housing/application-for-housing.component.ts

@@ -206,15 +206,21 @@ export class ApplicationForHousingComponent implements OnInit {
           res => {
             console.log('ser' , res);
             const status = res['status']
-            if(status == 'employee free to make new request'){
-              this.toastr.warning('لديه طلب بالفعل');
-              this.applyForOther = false;
-              this.showdetails = false;
+            if(status == 'employee already has an un finished request'){
+              this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewRequestsForAdminstration/70'])
+              this.toastr.warning('لديك  طلب بالفعل ');
+                    
+            }else if(status !=  "employee free to make new request"){
+              this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewRequestsForAdminstration/70'])
+              this.toastr.warning('لديك  طلب بالفعل ');
             }
           },
           err => {
               console.log(err);
-              
+              if(err.error.error !=  "employee free to make new request"){
+                this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewRequestsForAdminstration/70' ])
+                this.toastr.warning('لديك  طلب بالفعل ');
+              }
           }
         );
 

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

@@ -287,7 +287,7 @@ const dashboardRouting: Routes = [
     {path: 'femalesRequestTypesAdd', component: FemalesRequestTypesAddComponent, canActivate: [AuthGuard]},
     {path: 'femalesRequestTypes/edit/:editPageId', component: FemalesRequestTypesAddComponent, canActivate: [AuthGuard]},
     {path: 'viewMyFemaleRequestsList/:listPageId', component: ViewMyFemaleRequestsListComponent, canActivate: [AuthGuard]},
-    {path: 'viewMyFemaleRequestsAdd', component: ViewMyFemaleRequestsAddComponent, canActivate: [AuthGuard]},
+    {path: 'viewMyFemaleRequestsAdd/:type', component: ViewMyFemaleRequestsAddComponent, canActivate: [AuthGuard]},
     {path: 'viewMyFemaleRequests/edit/:editPageId/:type', component: ViewMyFemaleRequestsAddComponent, canActivate: [AuthGuard]},
     {path: 'livingSystemReports/:listPageId', component: LivingSystemReportsComponent, canActivate: [AuthGuard]},
     

+ 3 - 2
src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.html

@@ -5,7 +5,8 @@
       <div class="row">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
-            <li class="headingText-w"> خدمه البلاغات </li>
+            <li class="headingText-w"> خدمه السكن </li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer;" (click)="authSer.backFromEdit()">تعريف  العهد</li>
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -25,7 +26,7 @@
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
                   <label style="float: right; margin-right: 5px">اسم المادة او العهدة<span class="spanReqired-w">*</span></label>
-                  <input type="text" class="form-control" id="name" name="name" placeholder=" اسم المادة او العهدة" ngModel [ngModel]="formData.name" required/>
+                  <input type="text" class="form-control" id="name" name="name" maxlength="255" placeholder=" اسم المادة او العهدة" ngModel [ngModel]="formData.name" required/>
                </div>
               </div>
           

+ 3 - 3
src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.html

@@ -24,20 +24,20 @@
     </div>
 
     <div class="row">
-        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-12 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
-                من العناصر يتم عرضها
               <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="col-12 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
                 تصنيف العهدة

+ 3 - 0
src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts

@@ -297,6 +297,9 @@ onDelete() {
           (error) => {
             console.log(error);
             this.spinner.hide();
+            if(error.error.status == 'covenant is already taken in units'){
+              this.toastr.warning('لا يمكنك حذف العهده لانها جزء من النظام')
+            }
             },
           )
       );

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

+ 4 - 3
src/app/dashboard/females_request_types/females-request-types-add/females-request-types-add.component.html

@@ -5,7 +5,8 @@
       <div class="row">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
-            <li class="headingText-w"> خدمه البلاغات </li>
+            <li class="headingText-w"> خدمه السكن </li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer;" (click)="authSer.backFromEdit()" >تحديد انواع الطلبات</li>  
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -23,7 +24,7 @@
               <div class="col-12 col-sm-12 col-md-4">
                 <div class="form-group">
                   <label style="float: right; margin-right: 5px"> وصف الطلب</label>
-                  <input type="text" class="form-control" id="description" name="description" placeholder="اسم الطلب " ngModel [(ngModel)]="formData.description" />
+                  <input type="text" class="form-control" id="description" name="description" placeholder="وصف الطلب " ngModel [(ngModel)]="formData.description" />
 
                    <!-- <textarea name="description" id="description"  [(ngModel)]="formData.description" maxlength="250"  cols="20" rows="5" ></textarea>  -->
                </div>
@@ -112,7 +113,7 @@
             </div>
           
           <div class=" row col-6">
-              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid ">حفظ</button>
+              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || disable ">حفظ</button>
               <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
           </div>
         </form>

+ 1 - 1
src/app/dashboard/females_request_types/females-request-types-add/females-request-types-add.component.ts

@@ -104,7 +104,7 @@ export class FemalesRequestTypesAddComponent implements OnInit {
   onSubmitted() {
     console.log('HERE',this.formData);
  
-    this.disable = true;
+    this.disable = false;
     if(this.editPageId) {
       this.dashBoardSer.editItem(this.editPageId, this.formData, 'femalesRequestTypes').subscribe(
         (responce) => {

+ 1 - 0
src/app/dashboard/females_request_types/females-request-types-list/females-request-types-list.component.ts

@@ -110,6 +110,7 @@ export class FemalesRequestTypesListComponent implements OnInit {
           this.dataList = res['types'];
           this.count = res['count'];
           this.perPagePagenation = res['per_page'];
+          this.spinner.hide();
         },
         err => {
           console.log(err);

+ 3 - 3
src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.html

@@ -6,6 +6,7 @@
         <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;cursor: pointer;" (click)="authSer.backFromEdit()">ربط السكن بالعهد</li>
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -68,15 +69,14 @@
                           <div class="col-6"  *ngIf="categoryId == category_conv.category_id">
                               <div class=form-group>
                                 <div class="custom-control custom-checkbox centerIneerItem">
-                                  <input type="checkbox" class="custom-control-input checkboxx" id="{{category_conv.id}}" [(ngModel)]="category_conv.selected" [value]='category_conv.id' name="{{category_conv.id}}" style="cursor: pointer;" (input)="checked($event.target.value)">
+                                  <input type="checkbox" class="custom-control-input checkboxx" id="{{category_conv.id}}" [(ngModel)]="category_conv.selected" [value]='category_conv.id' name="{{category_conv.id}}" style="cursor: pointer;" (change)="checked($event.target.value)">
                                   <label class="custom-control-label disblayBlock-w" for="{{category_conv.id}}" style="color:#2a2a2a; cursor:pointer; padding: 0 20px; margin: -3px 5px">{{category_conv.name}}</label>
                                 </div>
                               </div>
                             </div> 
                             <div class="col-6"  *ngIf="categoryId == category_conv.category_id ">
                               <div class="form-group">
-                                <input type="number" class="form-control" placeholer="amount" min="1" max="{{category_conv.available_amount}}"  [(ngModel)]="category_conv.covenant_amount" [ngModelOptions]="{standalone: true}"/>
-                                <!-- <p style="color: red" *ngIf="over">تخطيت الحد المسموح</p> -->
+                                <input type="number" class="form-control" placeholer="amount" min="1" max="{{category_conv.available_amount}}"  [(ngModel)]="category_conv.covenant_amount"  [ngModelOptions]="{standalone: true}"  (input)="check_max(category_conv.covenant_amount, category_conv.available_amount, category_conv.name)" />
                               </div>
                             </div>
                       </div>

+ 20 - 6
src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.ts

@@ -5,7 +5,7 @@ import { Location } from '@angular/common';
 import { AuthServiceService } from './../../../shared/auth-service.service';
 import { ToastrService } from 'ngx-toastr';
 import { DashboardService } from './../../../shared/dashboard.service';
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
 import { NgForm } from '@angular/forms';
 
 @Component({
@@ -48,6 +48,7 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
   ) { }
 
   @ViewChild('f') linkForm : NgForm;
+  @ViewChild('amountVal') amountVal: ElementRef;
 
   formData = {
     housing_complex_id:'',
@@ -148,6 +149,7 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
   }
 
   getBuildingType(event){
+    this.building_types = []
     console.log('sdsdsd',event);
     const id = event;
     this.isComplex = false;
@@ -167,6 +169,8 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
            this.isComplex = false;
            this.isBuildingType = false;
            this.isBuilding = false;
+           this.toastr.warning('لا يوجد انواع مباني لهذا المجمع')
+
         }
       },
       err => {
@@ -177,6 +181,7 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
   }
 
   getBuilding(event){
+    this.buildings = []
     this.http.get(this.authSer.pathApi + '/buildings_list_by_type_id/' + event ).subscribe(
       res => {
         console.log('res',res);
@@ -190,6 +195,8 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
         }else{
              this.isBuildingType = false;
              this.isBuilding = false;
+             this.isConvenat = false;
+           this.toastr.warning('لا يوجد بيانات لهذا النوع من المباني')
             
           }
           
@@ -203,7 +210,7 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
 
 getUnit(event){
   console.log('unit id >>' , this.unitId);
-  
+  this.units = []
   this.http.get(this.authSer.pathApi + '/units_list_by_building_id/' + event ).subscribe(
     res => {
       console.log(res);
@@ -215,6 +222,8 @@ getUnit(event){
 
       }else{
            this.isBuilding = false;
+           this.isConvenat = false;
+           this.toastr.warning('لا يوجد وحدات لهذا المبنى ')
         }
 
     },
@@ -240,7 +249,12 @@ getUnit(event){
       console.log(this.formData.covenants);
     } 
 
-
+    check_max(value, max, name){
+      console.log( 'ss',value, max, name);
+      if(value > max){
+        this.toastr.warning('عفوا لقد تجاوزت العدد المحدد لـ'+name)
+      }
+    } 
     showcovenant_categories(){
       this.isConvenat = true;
     }
@@ -254,11 +268,11 @@ getUnit(event){
           
               if(event == this.formData.covenants[i].covenants_data[j].id ){
 
-                this.formData.covenants[i].covenants_data[j].covenant_amount = 1
+                // this.formData.covenants[i].covenants_data[j].covenant_amount = 1
                   if(this.formData.covenants[i].covenants_data[j].selected == false){
-                    this.formData.covenants[i].covenants_data[j].covenant_amount = 1
+                    this.formData.covenants[i].covenants_data[j].covenant_amount = 0
                     }else{
-                      this.formData.covenants[i].covenants_data[j].covenant_amount = 0
+                      this.formData.covenants[i].covenants_data[j].covenant_amount = 1
                     }
                 
                               

+ 6 - 8
src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-list/link-unit-to-covenants-list.component.html

@@ -36,15 +36,13 @@
                 </span>
               </div>
             </div>
-      </div>
-  
-      <div class="row">
+
        
           <div class="col-12 col-sm-12 col-md-12 col-lg-3">
               <div class="form-group">
                 <span class="spanSelect-w" style="margin-right:10px;">
                     المجمع السكني
-                  <select [ngModel]="housing_complex_id" class="form-control selectButton-w" (input)="getBuildingsType($event.target.value)">
+                  <select [ngModel]="housing_complex_id" class="form-control selectButton-w" (input)="getBuildingsType($event.target.value)" >
                     <option *ngFor="let complex of complex_list" [value]="complex.id">{{complex.name}}</option>
                   </select>
                 </span>
@@ -52,9 +50,9 @@
             </div>
             <div class="col-12 col-sm-12 col-md-12 col-lg-3" *ngIf="isComplex">
                 <div class="form-group">
-                  نوع المبنى
                   <span class="spanSelect-w" style="margin-right:10px;">
-                    <select [ngModel]="building_type_id" class="form-control selectButton-w" (input)="getBuilding($event.target.value)">
+                      نوع المبنى
+                    <select [ngModel]="building_type_id" class="form-control selectButton-w" (input)="getBuilding($event.target.value)" >
                     <option *ngFor="let type of building_types" [value]="type.id">{{type.name}}</option>
                     </select>
                   </span>
@@ -65,7 +63,7 @@
                   <div class="form-group">
                     <span class="spanSelect-w" style="margin-right:10px;">
                         اسم المبنى
-                      <select [ngModel]="building_id" class="form-control selectButton-w" (input)="getBuildingID($event.target.value)">
+                      <select [ngModel]="building_id" class="form-control selectButton-w" (input)="getBuildingID($event.target.value)" >
                        <option *ngFor="let building of building" [value]="building.id">{{building.building_name}}</option>
                       </select>
                     </span>
@@ -76,7 +74,7 @@
                     <div class="form-group">
                       <span class="spanSelect-w" style="margin-right:10px;">
                           رقم الوحدة
-                        <select [ngModel]="unitId" class="form-control selectButton-w" (input)="unitNum($event.target.value)" >
+                        <select [ngModel]="unitId" class="form-control selectButton-w" (input)="unitNum($event.target.value)" style="margin-right: 44px;padding-top: 10px;">
                          <option *ngFor="let unit of units" [value]="unit.id">{{unit.unit_number}}</option>
                         </select>
                       </span>

+ 3 - 2
src/app/dashboard/living-service/living-service-add/living-service-add.component.html

@@ -5,7 +5,8 @@
       <div class="row">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
-            <li class="headingText-w"> خدمه البلاغات </li>
+            <li class="headingText-w"> خدمه السكن </li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer;" (click)="authSer.backFromEdit()">تعريف تصنيفات العهد</li>
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -17,7 +18,7 @@
                 <div class="col-12 col-sm-12 col-md-4">
                     <div class="form-group">
                       <label for="name" style="float: right; margin-right: 5px">اسم التصنيف<span class="spanReqired-w">*</span></label>
-                      <input type="text" class="form-control" id="name" name="name" placeholder="اسم التصنيف" ngModel [ngModel]="formData.name" required/>
+                      <input type="text" class="form-control" id="name" name="name" placeholder="اسم التصنيف"   ngModel [ngModel]="formData.name"  maxlength="255" required/>
                     </div>
                   </div>
               

+ 3 - 2
src/app/dashboard/living-service/living-service-add/living-service-add.component.ts

@@ -5,7 +5,7 @@ import { Location } from '@angular/common';
 import { AuthServiceService } from './../../../shared/auth-service.service';
 import { ToastrService } from 'ngx-toastr';
 import { DashboardService } from './../../../shared/dashboard.service';
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
 import { NgForm } from '@angular/forms';
 
 @Component({
@@ -26,7 +26,6 @@ export class LivingServiceAddComponent implements OnInit {
   ) { }
 
   @ViewChild('f') definitionForm : NgForm;
-
   typePage: string = '';
   valueType: string = '';
   editPageId: number;
@@ -37,6 +36,7 @@ export class LivingServiceAddComponent implements OnInit {
   check : boolean = false;
   isEdit: boolean = false;
   disable: boolean = false;
+  max_size: boolean;
 
   formData = {
     name: '',
@@ -73,6 +73,7 @@ export class LivingServiceAddComponent implements OnInit {
     }
 
   }
+
   onSubmitted(){
     console.log('HERE',this.definitionForm.value);
     this.disable = true;

+ 9 - 1
src/app/dashboard/living-service/living-service-list/living-service-list.component.ts

@@ -146,6 +146,7 @@ filtterFunc(data) {
       this.perPagePagenation = res['per_page'];
       console.log('filtter count', this.count);
       console.log('filtter perPagePAgenation', this.perPagePagenation);
+      // alert(this.dataList.length);      
     },
     err => {
       console.log(err);
@@ -155,6 +156,7 @@ filtterFunc(data) {
 
 onPageChange(pagenationNumber) {
   this.spinner.show();
+  this.dataList = []
   this.currentPage = pagenationNumber;
   this.absorpationListIds = [];
   console.log(pagenationNumber);
@@ -167,6 +169,8 @@ onPageChange(pagenationNumber) {
       this.perPagePagenation = res['per_page'];
       console.log('FFFFFF', this.absorpationListIds);
       this.spinner.hide();
+      console.log(this.dataList.length);
+
     },
     err => {
       console.log(err);
@@ -261,8 +265,12 @@ onDelete() {
             );
           },
           (error) => {
-            console.log(error);
+            console.log(error.error.status);
+            if(error.error.status == 'covenant category id is already taken'){
+              this.toastr.warning('لا يمكنك حذف الصنف لانه جزء من النظام')
+            }
             this.spinner.hide();
+            
             },
           )
       );

+ 2 - 2
src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.css

@@ -179,7 +179,7 @@ select.ng-invalid{
     padding: 9px;
     border-radius: 5px 5px 0 0;
     margin-bottom: 0;
-    margin-right: -12px;
+    /* margin-right: -12px; */
     color: #fff;
 }
 .statusBtn-w {
@@ -346,7 +346,7 @@ select.ng-invalid{
  }
  .fit-filter-style{
     display: flex;
-    justify-content: center;
+    /* justify-content: center; */
     margin-top: 20px;
     text-align: center;
     margin-right: 2%;

+ 34 - 28
src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.html

@@ -9,44 +9,47 @@
           </div>
       </div>
       <div class="containerContent-w" id="print-section">
-          <div class="row printClass">
+          <!-- <div class="row printClass">
             <div class="col-12 col-md-4">
 
-                <div class="form-group">
-                    <span class="spanSelect-w" style="margin-right:10px;">
-                      <select [ngModel]="reportValue" class="form-control selectButton-w full"  (input)="getReport($event.target.value)">
-                        <option value="0"> رجاء الاختيار التقرير</option>
-                        <option value="1">تقارير عن الوحدات السكنية</option>
-                        <option value="2">تقارير عن السكان في مجمعات و المباني</option>
-                        <option value="3">تقارير عن ساكن</option>
-                        <option value="4">تقارير عن العهد الموجوده</option>
-                      </select>
-                    </span>
-                  </div>
+               
             </div>   
-           </div>
-           <div class="row fit-filter-style printClass" *ngIf="showFilters">
-              <div class="col-12 col-sm-3 col-md-3 col-lg-3">
-                <div class="form-group">
-                  <span class="spanSelect-w" style="margin-right:10px;">
+           </div> -->
+           <div class="row fit-filter-style printClass" >
+              <div class="col-12 col-sm-3 col-md-3 col-lg-2">
+                  <div class="form-group">
+                      <span class="spanSelect-w" style="margin-right:10px;">
+                        <select [ngModel]="reportValue" class="form-control selectButton-w full"  (input)="getReport($event.target.value)">
+                          <option value="0"> رجاء الاختيار التقرير</option>
+                          <option value="1">تقارير عن الوحدات السكنية</option>
+                          <option value="2">تقارير عن السكان في مجمعات و المباني</option>
+                          <option value="3">تقارير عن ساكن</option>
+                          <option value="4">تقارير عن العهد الموجوده</option>
+                        </select>
+                      </span>
+                    </div>
+              </div>
+              <div class="col-12 col-sm-3 col-md-3 col-lg-2">
+                <div class="form-group" *ngIf="showFilters">
+                  <span class="spanSelect-w" style="width: 100%;">
                     <select [ngModel]="housing_complex_id" class="form-control selectButton-w full" (input)="getBuildingsType($event.target.value)">
                       <option *ngFor="let complex of complex_list" [value]="complex.id">{{complex.name}}</option>
                     </select>
                   </span>
                 </div>
               </div>
-              <div class="col-12 col-sm-3 col-md-3 col-lg-3" *ngIf="isComplex">
+              <div class="col-12 col-sm-3 col-md-3 col-lg-2" *ngIf="isComplex">
                 <div class="form-group">
-                  <span class="spanSelect-w" style="margin-right:10px;">
+                  <span class="spanSelect-w" style="width: 100%;">
                     <select [ngModel]="building_type_id" class="form-control selectButton-w full" (input)="getBuilding($event.target.value)">
                     <option *ngFor="let type of building_types" [value]="type.id">{{type.name}}</option>
                     </select>
                   </span>
                 </div>
               </div>
-              <div class="col-12 col-sm-3 col-md-3 col-lg-3" *ngIf="isBuildingType">
+              <div class="col-12 col-sm-3 col-md-3 col-lg-2" *ngIf="isBuildingType">
                 <div class="form-group">
-                  <span class="spanSelect-w" style="margin-right:10px;">
+                  <span class="spanSelect-w"style="width: 100%;">
                     <select [ngModel]="building_id" class="form-control selectButton-w full " (input)="getBuildingID($event.target.value)">
                       <option *ngFor="let building of buildings" [value]="building.id">{{building.building_name}}</option>
                     </select>
@@ -54,21 +57,24 @@
                 </div>
               </div>  
 
-              <div class="col-12 col-sm-12 col-md-12 col-lg-3" *ngIf="isUnit">
+              <div class="col-12 col-sm-12 col-md-12 col-lg-2" *ngIf="isUnit">
                 <div class="form-group">
-                  <span class="spanSelect-w" style="margin-right:10px;">
+                  <span class="spanSelect-w" style="width: 100%;">
                     <select [ngModel]="unitId" class="form-control selectButton-w full" (input)="unitNum($event.target.value)">
                      <option *ngFor="let unit of units" [value]="unit.id">{{unit.unit_number}}</option>
                     </select>
                   </span>
                 </div>
               </div>   
+              <div class="col-12 col-sm-12 col-md-12 col-lg-2">
+                <div class="row printClass" *ngIf="reportValue == 3 && showSearchBtn " style="justify-content: center;">
+                  <input type="text" placeholder="{{placeholder}}" class="form-control numberReport-s" [(ngModel)]="searchValue" style="width: 100%"/>
+                 </div>
+                </div>  
            </div>
-           <div class="row printClass" *ngIf="reportValue == 3 && showSearchBtn " style="justify-content: center; margin-top: 50px">
-            <input type="text" placeholder="{{placeholder}}" class="form-control numberReport-s" [(ngModel)]="searchValue" style="width: 25%"/>
-           </div>
-           <div class="row fit-filter-style printClass" *ngIf="showSearchBtn ">
-              <button class="btn btn-success buttonS" (click)="onSearch()" style="margin-left: 2%;">أبحث</button>            
+          
+           <div class="row fit-filter-style printClass" *ngIf="showSearchBtn " style="    padding: 25px;">
+              <button class="btn btn-success buttonS" (click)="onSearch()">أبحث</button>            
           </div>
 
           <div class="col-12" *ngIf="fristReport">

+ 6 - 14
src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.ts

@@ -154,9 +154,7 @@ getBuilding(event){
           this.isBuildingType= true;
 
           console.log(this.building_id , this.building_type_id , this.housing_complex_id);
-          if(this.fristReport || this.secondReport || this.thirdReport){
-            this.showSearchBtn = true;
-          }
+       
           
       },
       err =>{
@@ -180,13 +178,10 @@ getBuildingID(event){
         unit_number:'أختار رقم الوحدة',
       });
 
-             if(this.reportValue == 1){
-            this.showSearchBtn = true;
-
-          }else{
+   
             if(x > 1)
             this.isUnit = true;
-          }
+          
 
     },
 
@@ -199,19 +194,18 @@ getBuildingID(event){
 }
 unitNum(event){
  this.unitId = event;
- this.showSearchBtn = true;
+
 
   }
 
   getReport(event){
     this.reportValue = event
+    this.showSearchBtn= true;
     this.showFilters = true;
     this.housing_complex_id = 'all';
-
     this.isComplex = false;
     this.isBuildingType = false;
     this.isUnit = false;
-    this.showSearchBtn = false;
     this.building_types = [];
     this.buildings = [];
     this.assigned_units = [];
@@ -231,7 +225,7 @@ unitNum(event){
       this.fristReport = false;
       this.thirdReport = false;
       this.fourthReport = false;
-      this.showSearchBtn = true;
+
       
       this.reportName ='تقرير السكان في المحمع و المباني'
 
@@ -240,7 +234,6 @@ unitNum(event){
       this.fristReport = false;
       this.secondReport = false;
       this.fourthReport = false;
-      this.showSearchBtn = true;
       this.placeholder = 'ادخل رقم هوية الموظف'
       this.searchValue = '';
       this.reportName ='تقرير ساكن'
@@ -250,7 +243,6 @@ unitNum(event){
       this.fristReport = false;
       this.secondReport = false;
       this.thirdReport = false;
-      this.showSearchBtn = true;
       this.placeholder = 'ادخل رقم او كود الوحدة'
       this.searchValue = '';
       this.reportName ='تقرير العهد'

+ 6 - 5
src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.html

@@ -5,7 +5,8 @@
       <div class="row">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
-            <li class="headingText-w"> خدمه البلاغات </li>
+            <li class="headingText-w"> خدمه السكن </li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer" (click)="authSer.backFromEdit()">تسجيل معلومات المجمعات السكنية</li>
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -25,14 +26,14 @@
           <div class="col-12 col-sm-12 col-md-4">
             <div class="form-group">
               <label for="name" style="float: right; margin-right: 5px">اسم المجمع السكني<span class="spanReqired-w">*</span></label>
-              <input type="text" class="form-control" id="name" name="name" placeholder="اسم المجمع السكني" ngModel [(ngModel)]="formData.name" required/>
+              <input type="text" class="form-control" id="name" name="name" placeholder="اسم المجمع السكني" ngModel [(ngModel)]="formData.name" maxlength="255" required/>
             </div>
           </div>
 
           <div class="col-12 col-sm-12 col-md-4">
             <div class="form-group">
               <label for="land_area" style="float: right; margin-right: 5px">مساحة الأرض الإجمالية<span class="spanReqired-w">*</span></label>
-              <input type="text" class="form-control" id="land_area" name="land_area" placeholder="مساحة الأرض الإجمالية" ngModel [(ngModel)]="formData.land_area" required/>
+              <input type="text" class="form-control" id="land_area" name="land_area" placeholder="مساحة الأرض الإجمالية" ngModel [(ngModel)]="formData.land_area" maxlength="255" required/>
             </div>
           </div>
 
@@ -55,10 +56,10 @@
             <div class="col-12 col-sm-12 col-md-12" *ngFor="let building of formData.building_types; let i = index" style="padding: 20px;">
               <div class="form-group">
                 <div class="col-4">
-                <input type="text" class="form-control" id="building.name{{i}}" name="building.name{{i}}" placeholder="نوع " ngModel [(ngModel)]="building.name"  required/>
+                <input type="text" class="form-control" id="building.name{{i}}" name="building.name{{i}}" placeholder="نوع " maxlength="255"  ngModel [(ngModel)]="building.name"  />
               </div>
               <div class="col-4">
-                  <input type="number" class="form-control" id="building.value{{i}}" name="building.value{{i}}" min="1" placeholder="عدد {{building.name}}" ngModel [(ngModel)]="building.value" required/>
+                  <input type="number" class="form-control" id="building.value{{i}}" name="building.value{{i}}" min="1" placeholder="عدد {{building.name}}" ngModel [(ngModel)]="building.value" />
               </div>
               <div class="col-3">
                   <button type="button" class="btn btn-danger" (click)="onDeleteRow(i)" style="margin: 10px 15px;">حذف</button>

+ 11 - 3
src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.ts

@@ -115,9 +115,17 @@ export class RecordInfoBuildingAddComponent implements OnInit {
     onSubmitted(){
     console.log('HERE',this.definitionForm.value);
     console.log(this.formData);
+    for (let i = 0 , n = this.formData.building_types.length; i < n; i++) {
+      const value =this.formData.building_types[i].value;
+      const name = this.formData.building_types[i].name;
+      console.log(name , value)
+      if (value == '' || name == ''){
+         this.formData.building_types.splice(i , 1); 
+      }
+      }
     
+    this.disable = true;
     if(this.editPageId) {
-      this.disable = true;
       this.dashBoardSer.editItem(this.editPageId, this.formData, 'recordInfoBuilding').subscribe(
         res => {
           console.log(res);
@@ -130,7 +138,7 @@ export class RecordInfoBuildingAddComponent implements OnInit {
           console.log(err);
           if(err.error.error.complex_number[0] == 'The complex number has already been taken.'){
             this.toastr.warning('رقم المجمع موجود بالفعل')
-            this.disable = true;
+            this.disable = false;
             
           }else{
           this.disable = false;
@@ -154,7 +162,7 @@ export class RecordInfoBuildingAddComponent implements OnInit {
 
           if(err.error.error.complex_number[0] == 'The complex number has already been taken.'){
             this.toastr.warning('رقم المجمع موجود بالفعل')
-            this.disable = true;
+            this.disable = false;
             
           }else{
           this.disable = false;

+ 4 - 1
src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.ts

@@ -235,7 +235,7 @@ onDelete() {
       dialogRef.result
       .then( result =>
         this.dashboardSer.deleteItem(this.dataListIds , this.pageId).subscribe(
-          (responce) => {
+          (responce) => { 
             console.log(responce);
             this.toastr.success('تم الحذف');
             this.spinner.show();
@@ -258,6 +258,9 @@ onDelete() {
           (error) => {
             console.log(error);
             this.spinner.hide();
+            if(error.error.status == 'housing_complex already used'){
+              this.toastr.warning('لا يمكنك حذف المجمع السكني لانه جزء من النظام')
+            }
             },
           )
       );

+ 5 - 4
src/app/dashboard/unit-building-information/unit-building-information-add/unit-building-information-add.component.html

@@ -6,6 +6,7 @@
           <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;cursor: pointer;" (click)="authSer.backFromEdit()">تسجيل معلومات المباني</li>
               <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
             </ul>
           </div>
@@ -50,13 +51,13 @@
                     <div class="col-12 col-sm-12 col-md-4">
                       <div class="form-group">
                         <label for="unit_code" style="float: right; margin-right: 5px">رمز الوحدة<span class="spanReqired-w">*</span></label>
-                        <input type="text" class="form-control" min="0" id="unit_code" name="unit_code" placeholder="" ngModel [ngModel]="formData.unit_code" required/>
+                        <input type="text" class="form-control" min="0" id="unit_code" maxlength="255" name="unit_code" placeholder="" ngModel [ngModel]="formData.unit_code" required/>
                       </div>
                     </div>
                     <div class="col-12 col-sm-12 col-md-4">
                       <div class="form-group">
                         <label for="unit_name" style="float: right; margin-right: 5px" >اسم الوحدة السكنية<span class="spanReqired-w">*</span></label>
-                        <input type="text" class="form-control" min="0" id="unit_name" name="unit_name" placeholder="" ngModel [ngModel]="formData.unit_name" required/>
+                        <input type="text" class="form-control" min="0" id="unit_name" maxlength="255" name="unit_name" placeholder="" maxlength="255" ngModel [ngModel]="formData.unit_name" />
                       </div>
                     </div>
                     <div class="col-12 col-sm-12 col-md-4">
@@ -99,7 +100,7 @@
                           <div class="col-12 col-sm-12 col-md-4">
                             <div class="form-group">
                               <label for="description" style="float: right; margin-right: 5px" > وصف للوحدة <span class="spanReqired-w">*</span></label>
-                              <input type="text" class="form-control" min="0" id="description" name="description" placeholder="" ngModel [ngModel]="formData.description" required/>
+                              <input type="text" class="form-control" min="0" id="description" name="description" placeholder="" maxlength="255" ngModel [ngModel]="formData.description" />
                             </div>
                           </div>      
                           <div class="col-12 col-sm-12 col-md-4">
@@ -113,7 +114,7 @@
                             </div>
                          </div>
                          <div class=" row col-6">
-                            <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+                            <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || disable">حفظ</button>
                             <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
                         </div>
                     </form>

+ 9 - 2
src/app/dashboard/unit-building-information/unit-building-information-add/unit-building-information-add.component.ts

@@ -118,7 +118,7 @@ export class UnitBuildingInformationAddComponent implements OnInit {
     this.show_amount = false;
  
   console.log(id);
-
+    this.building_types = []
     this.http.get(this.authSer.pathApi+ '/building_types_list/' + id ).subscribe(
       res => {
         console.log(res);
@@ -141,6 +141,7 @@ export class UnitBuildingInformationAddComponent implements OnInit {
   } 
   
   getBuilding(event){
+    this.buildings = []
       this.http.get(this.authSer.pathApi + '/buildings_list_by_type_id/' + event ).subscribe(
         res => {
           console.log(res);
@@ -152,6 +153,7 @@ export class UnitBuildingInformationAddComponent implements OnInit {
           }else{
                this.isBuildingType = false;
                this.show_amount = false;
+               this.toastr.warning('لا يوجد بيانات لهذا النوع من المباني')
             }
 
             if(this.editPageId) {
@@ -164,14 +166,19 @@ export class UnitBuildingInformationAddComponent implements OnInit {
       );
   }
   typeNumber(event){
-
+    this.amount =[]
     this.show_amount = true;
   const id = event;;
   for (let i = 0; i < this.buildings.length; i++) {
     if(id == this.buildings[i].id) {
         this.amount = this.buildings[i].empty_ids; 
         console.log('ammmmounnnt', this.amount);
+        if(this.amount.length == 0){
+          this.toastr.warning('لا يوجد وحدات فارغة')
+          this.show_amount = false;
+        }
         this.amount.push(this.formData.unit_number);
+
     }
   } 
 

+ 6 - 6
src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.html

@@ -27,13 +27,13 @@
           <div class="col-12 col-sm-12 col-md-12 col-lg-3">
             <div class="form-group">
               <span class="spanSelect-w" style="margin-right:10px;">
+                  <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>
                   من العناصر يتم عرضها
-                <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>

+ 3 - 0
src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.ts

@@ -411,6 +411,9 @@ export class UnitBuildingInformationListComponent implements OnInit {
             (error) => {
               console.log(error);
               this.spinner.hide();
+              if(error.error.status == 'unit is already assigned'){
+                this.toastr.warning('لا يمكنك حذف الوحدة السكني لانه جزء من النظام')
+              }
               },
             )
         );

+ 4 - 3
src/app/dashboard/unit-information/unit-information-add/unit-information-add.component.html

@@ -5,7 +5,8 @@
       <div class="row">
         <div class="col-12">
           <ul class="list-unstyled titileLi-w">
-            <li class="headingText-w"> خدمه البلاغات </li>
+            <li class="headingText-w"> خدمه السكن </li>
+            <li class="headingText-w activeLi-w" style="margin-right:5px ; cursor: pointer;" (click)="authSer.backFromEdit()">تسجيل معلومات المباني</li>
             <li class="headingText-w activeLi-w" style="margin-right:5px"> {{typePage}} </li>
           </ul>
         </div>
@@ -44,7 +45,7 @@
                       <div class="col-12 col-sm-12 col-md-4">
                         <div class="form-group">
                           <label for="building_code" style="float: right; margin-right: 5px">رمز المبنى<span class="spanReqired-w">*</span></label>
-                          <input type="text" class="form-control" id="building_code" name="building_code"  ngModel [(ngModel)]="formData.building_code" required/>
+                          <input type="text" class="form-control" id="building_code" name="building_code" maxlength="255"  ngModel [(ngModel)]="formData.building_code" required/>
                         </div>
                       </div>
 
@@ -58,7 +59,7 @@
                 <div class="col-12 col-sm-12 col-md-4">
                     <div class="form-group">
                       <label for="building_name" style="float: right; margin-right: 5px">اسم المبنى<span class="spanReqired-w">*</span></label>
-                      <input type="text" class="form-control" id="building_name" name="building_name" ngModel [(ngModel)]="formData.building_name" required/>
+                      <input type="text" class="form-control" id="building_name" name="building_name" maxlength="255" ngModel [(ngModel)]="formData.building_name" required/>
                     </div>
                   </div>
               

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

@@ -255,12 +255,16 @@ onDelete() {
               (error) => {
                 console.log(error);
                 this.spinner.hide();
+               
               }
             );
           },
           (error) => {
             console.log(error);
             this.spinner.hide();
+            if(error.error.status == 'building is already used'){
+              this.toastr.warning('لا يمكنك حذف المبنى السكني لانه جزء من النظام')
+            }
             },
           )
       );

+ 9 - 8
src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.html

@@ -5,14 +5,15 @@
         <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"> {{typePage}} </li>
+              <li class="headingText-w"> خدمه السكن </li>
+              <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer;" (click)="authSer.backFromEdit()">{{page__title}}</li>
+              <li class="headingText-w activeLi-w" style="margin-right:5px">{{typePage}}</li>
             </ul>
           </div>
         </div>
   
       <div class="containerContent-w">
-        <h2 class="title"  style="margin: auto ;text-align:  center" [ngClass]="{'green': statusAccept, 'red' : statusrefu}">{{ statusAccept ? 'مقبول' : statusrefu  ? 'مرفوض' : ' جديد'}}</h2>
+        <h2 class="title"  style="margin: auto ;text-align:  center" [ngClass]="{'green': statusAccept, 'red' : statusrefu}">{{ comfoe }}</h2>
           <form (ngSubmit)="onSubmitted()" #f="ngForm" style="margin-top: 40px;">
               <div class="row">
                   <div class="col-12" >
@@ -101,7 +102,7 @@
                     </div> 
                   </div>
                 </div>   
-                <div class="col-12">
+                <div class="col-12" *ngIf="!addNew">
                     <h2 class="title">تفاصيل السكن</h2>
                     <div class="row">
                       <div class="col-12">
@@ -154,21 +155,21 @@
                               <thead class="headBackground-w">
                                 <tr>
                                   <th> إسم المرفق</th>
-                                  <th *ngIf="!isAdmin || !tookDes">رفع الملف ( بصيغه pdf )</th>
+                                  <th *ngIf="!isAdmin || tookDes">رفع الملف ( بصيغه pdf )</th>
                                   <th *ngIf="isAdmin || tookDes">عرض الملف</th>
                                   <th *ngIf="!isAdmin || !tookDes">حذف</th>
                                 </tr>
                               </thead>
                               <tbody>
                                 <tr style="text-align:center;" *ngFor="let file of files; let i = index">
-                                    <td><input type="text" class="form-control" placeholder="إسم الملف" [(ngModel)]="file.title"[ngModelOptions]="{standalone: true}" [disabled]="!isAdmin || !tookDes" required/></td>
-                                    <td style="position: relative;" *ngIf="!isAdmin || !tookDes">
+                                    <td><input type="text" class="form-control" placeholder="إسم الملف" [(ngModel)]="file.title"[ngModelOptions]="{standalone: true}" [disabled]="" required/></td>
+                                    <td style="position: relative;" *ngIf="!isAdmin || tookDes">
                                         <input type="file" name="file{{i}}" id="file{{i}}" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event,i)" required/>
                                         <label for="file{{i}}" class="iconUpload-w"><i class="fas fa-upload"></i></label>
                                         <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
                                         </span>
                                       </td>
-                                      <td *ngIf="isAdmin || tookDes"><a href="{{authSer.pathImg + file.nameFile}}" target="_blank"><i class="fas fa-download"></i></a></td>
+                                      <td *ngIf="isAdmin || tookDes"><a href="{{authSer.pathImg + file.file}}" target="_blank"><i class="fas fa-download"></i></a></td>
                                       <td *ngIf="!isAdmin || !tookDes"><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                                     </tr>
                                   </tbody>

+ 75 - 19
src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.ts

@@ -36,6 +36,7 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
   refusedCheak = false;
   statusAccept : boolean;
   statusrefu: boolean;
+  comfoe: string = 'جديد';
   toster: string;
   tookDes = false;
   employeeId: string;
@@ -46,6 +47,9 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
   isBuilding: boolean = false;
   isComplex: boolean = false;
   isBuildingType: boolean = false;
+  userInfo: any;
+  addNew: boolean = false;
+  page__title: string;
   constructor(
     private dashBoardSer: DashboardService,
     private toastr: ToastrService,
@@ -91,6 +95,7 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
   }
 
   ngOnInit() {
+    this.spinner.show()
      //init the values of permision boolean
   this.authSer.showAddBtn = false;
   this.authSer.showDeleteBtn = false;
@@ -113,13 +118,13 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
     (params: Params) => {
       this.editPageId = +params['editPageId'];
       this.whoIsComing = params['type'];
+      
       console.log(this.editPageId);
       
     }
   );
-    if(this.whoIsComing == 'AD74'){
-      this.isAdmin = true;
-    }
+
+
 
   console.log('current page',this.pageId)
   this.dashBoardSer.getRequestTypesList( 1 ,10000 , 'all', 'all', 'all').subscribe(
@@ -131,9 +136,13 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
   if (this.editPageId) {
     this.spinner.show();
     this.isEdit = true;
+    this.page__title = 'عرض طلباتي'
+
   this.typePage = 'تعديل';
   if(this.isAdmin){
     this.typePage = 'عرض تفاصيل الطلب'
+    this.page__title = 'عرض طلبات المستأجر للأدارة'
+
 
   }
     this.dashBoardSer.getItemData(this.editPageId, 'femalesRequest' ).subscribe(
@@ -146,16 +155,30 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
         if(this.isAdmin){
           this.adminForm.request_id = data.id;
         }
+        
         this.adminForm.status = data.status;
         if(this.adminForm.status != 'new'){
+          this.addNew = false;
           this.tookDes = true;
-          if(this.adminForm.status == 'accepted'){
+          if(this.adminForm.status == 'accepted' || this.adminForm.status == 'confirmed'){
             this.statusAccept = true;
+            if(this.adminForm.status == 'accepted'){
+              this.comfoe = 'مقبول'
+            }else{
+              this.comfoe = 'مؤكد'
+            }
           }else if(this.adminForm.status == 'refused'){
             this.adminForm.status_description = data.status_description;
             this.statusAccept = false;
             this.statusrefu = true;
             this.refusedCheak = true;
+            this.comfoe = 'مرفوض'
+          }
+        }else{
+          this.comfoe = 'جديد'
+          if(this.whoIsComing == 'AD74'){
+            this.isAdmin = true;
+            
           }
         }
         this.employeeId = data.employee_id;
@@ -167,7 +190,7 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
             this.userData.functional_number = res['user'].functional_number;
             this.userData.phone = res['user'].phone;
             this.userData.email = res['user'].email;
-
+            
           },
           err =>{
             console.log(err);
@@ -194,8 +217,8 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
           console.log(this.unitInformation.housing_complex_id );
           this.getBuildingType(this.unitInformation.housing_complex_id);
           this.unitInformation.building_type_id = unitInfo.building_type_id;
-          this.getBuilding(this.unitInformation.building_type_id);
           this.unitInformation.building_id = unitInfo.building_id;
+          this.getBuilding(this.unitInformation.building_type_id);
           this.unitInformation.unit_id = unitInfo.unit_id;
 
       },
@@ -205,6 +228,18 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
     );
   }else {
     this.typePage = 'اضافة';
+    this.page__title = 'عرض طلباتي'
+    this.addNew = true;
+    this.tookDes = false;    
+    this.userInfo= localStorage.getItem('userData')
+    this.userInfo = JSON.parse(this.userInfo);  
+    console.log('user  ',this.userInfo);
+    this.userData.name = this.userInfo.name;
+    this.userData.identity_number = this.userInfo.identity_number;
+    this.userData.functional_number = this.userInfo.functional_number;
+    this.userData.phone = this.userInfo.phone;
+    this.userData.email = this.userInfo.email;
+
   }
 
   this.spinner.hide();
@@ -369,7 +404,23 @@ getUnit(event){
   
     
     this.disable = true;
-    
+    if(this.addNew){
+      for (let i = 0; i < this.files.length; i++) {
+        if(this.files[i].file_type){
+          this.files[i].file_type = this.files[i].file_type.toLowerCase();
+        }
+        if(!this.files[i].file){
+          this.files.splice(i , 1);
+        }
+       else  if(!this.files[i].title){
+        this.toastr.warning('ادخل عنوان الملف رقم ' + (i+1) );
+        return 0;
+       } else {
+         delete this.files[i].nameFile;
+          this.formData.files.push(this.files[i]);
+        }
+      }
+    }
   if(this.isAdmin){
   
     console.log(this.adminForm);
@@ -390,17 +441,7 @@ getUnit(event){
     );
     
   }else{
-    if(this.files.length > 0){
-      this.formData.files = this.files
-    }
-    if(this.require_attachments == '1'){
-      if(this.formData.files.length <= 0){
-        this.toastr.warning('يجب اضافة مرفق')
-        this.disable = false;
-
-        return 0;
-      }
-    }
+   
     if(this.require_date == '1'){
       if(this.formData.return_date == null || this.formData.return_time == null){
        this.toastr.warning('يجب اضافة وقت و تاريخ العوده')
@@ -415,6 +456,17 @@ getUnit(event){
       }
     }
     if(this.editPageId) {
+      if(this.files.length > 0){
+        this.formData.files = this.files
+      }
+      if(this.require_attachments == '1'){
+        if(this.formData.files.length <= 0){
+          this.toastr.warning('يجب اضافة مرفق')
+          this.disable = false;
+  
+          return 0;
+        }
+      }
       this.dashBoardSer.editItem(this.editPageId, this.formData, 'editFemaleRequest').subscribe(
         (responce) => {
           this.disable = true;
@@ -429,6 +481,7 @@ getUnit(event){
         }
       )
     } else {
+
     this.dashBoardSer.addItem( this.formData , 'addFemaleRequest').subscribe(
       (responce) => {
         console.log('ADD',responce);
@@ -437,9 +490,12 @@ getUnit(event){
         this.location.back();
       },
       (error) => {
-        console.log(error);
+        
         this.checkSaveclick = false;
         this.disable = false;
+        if (true) {
+          
+        }
 
         this.toastr.error('خطأ في الخادم ، حاول لاحقا');
       }

+ 10 - 10
src/app/dashboard/view_my_female_requests/view-my-female-requests-list/view-my-female-requests-list.component.html

@@ -4,7 +4,7 @@
       <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>
+          <li class="headingText-w activeLi-w" style="margin-right:5px">عرض طلباتي </li>
         </ul>
       </div>
     </div>
@@ -24,20 +24,20 @@
       </div>
   
       <div class="row">
-          <div class="col-6 col-sm-12 col-md-12 col-lg-6">
+          <div class="col-6 col-sm-12 col-md-12 col-lg-3">
             <div class="form-group">
               <span class="spanSelect-w" style="margin-right:10px;">
+                  <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>
                   من العناصر يتم عرضها
-                <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-6 col-sm-12 col-md-12 col-lg-6">
+          <div class="col-6 col-sm-12 col-md-12 col-lg-3">
               <div class="form-group">
                 <span class="spanSelect-w" style="margin-right:10px;">
                     الحالة
@@ -67,7 +67,7 @@
             <th *ngIf="accept">نوع الطلب</th>
             <th>الحاله</th>
             
-            <th *ngIf="authSer.showEditBtn">تعديل</th>
+            <th *ngIf="authSer.showEditBtn">التفاصيل</th>
           </tr>
         </thead>
         <tbody>

+ 3 - 3
src/app/dashboard/view_my_female_requests/view-my-female-requests-list/view-my-female-requests-list.component.ts

@@ -312,7 +312,7 @@ export class ViewMyFemaleRequestsListComponent implements OnInit {
               (error) => {
                 console.log(error.error.error);
                 this.spinner.hide();
-                if (error.error.error == 'Requests already uses this type can not delete it') {
+                if (error.error.error == 'Requests already uses this type can not delete it' ) {
                   this.toastr.warning('ليس هناك صلاحية لمسح هذا الطلب')
                 }
                 },
@@ -348,7 +348,7 @@ export class ViewMyFemaleRequestsListComponent implements OnInit {
     }
     
     onAdd() {
-      this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewMyFemaleRequestsAdd']);
+      this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewMyFemaleRequestsAdd' + '/' + this.codeForEdit]);
     }
     
     onEdit(editId: number) {
@@ -366,7 +366,7 @@ export class ViewMyFemaleRequestsListComponent implements OnInit {
           this.codeForEdit = 'EP73';
       }
       this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'viewMyFemaleRequests/edit/' + editId + '/' + this.codeForEdit]);
-      console.log('service/' + this.userLoginId + '/' + this.serviceId + '/' + 'femalesRequestTypes/edit/' + editId);
+      console.log('service/' + this.userLoginId + '/' + this.serviceId + '/' + 'femalesRequestTypes/edit/' + editId + '/' + this.codeForEdit);
       
     }
 

+ 7 - 6
src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-details/view-requests-for-adminstration-details.component.html

@@ -5,7 +5,8 @@
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
           <li class="headingText-w" style="cursor: pointer;" (click)="authSer.perviousLocation()">خدمه السكن</li>
-          <li class="headingText-w activeLi-w" style="margin-right:5px">  طلب سكن</li>
+          <li class="headingText-w activeLi-w" style="margin-right:5px;cursor: pointer;" (click)="authSer.backFromEdit()">عرض الطلبات للإدارة</li>
+          <li class="headingText-w activeLi-w" style="margin-right:5px"> تفاصيل الطلب</li>
         </ul>
       </div>
     </div>
@@ -67,21 +68,21 @@
                       <thead class="headBackground-w">
                         <tr>
                           <th> إسم المرفق</th>
-                          <th>رفع الملف ( بصيغه pdf )</th>
-                          <!-- <th>عرض الملف</th> -->
+                          <!-- <th>رفع الملف</th> -->
+                          <th>عرض الملف</th>
                           <th>حذف</th>
                         </tr>
                       </thead>
                       <tbody>
                         <tr style="text-align:center;" *ngFor="let file of files; let i = index">
                             <td><input type="text" class="form-control" placeholder="إسم الملف" [(ngModel)]="file.title"[ngModelOptions]="{standalone: true}"/></td>
-                            <td style="position: relative;">
+                            <!-- <td style="position: relative;">
                                 <input type="file" name="file{{i}}" id="file{{i}}" class="inputfile" alife-file-to-base64 (onFileChanged)="onFileChanges($event,i)"/>
                                 <label for="file{{i}}" class="iconUpload-w"><i class="fas fa-upload"></i></label>
                                 <span class="fileName-w" *ngIf="file.nameFile" style="color:green"> <i class='fas fa-check'style=" float: left; padding-top: 4px; "></i>
                                 </span>
-                              </td>
-                              <!-- <td><a href="{{authSer.pathImg + file.nameFile}}" target="_blank"><i class="fas fa-download"></i></a></td> -->
+                              </td> -->
+                              <td><a href="{{authSer.pathImg + file.file}}" target="_blank"><i class="fas fa-download"></i></a></td>
                               <td><button type="button" class="btn btn-danger form-control deleteRow-w" (click)="onDeleteRow(i)">حذف</button></td>
                             </tr>
                           </tbody>

+ 18 - 10
src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-details/view-requests-for-adminstration-details.component.ts

@@ -88,14 +88,14 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
     this.dashBoardSer.getItemData(this.detailsId, 'viewRequestsForAdminstrationDetails' ).subscribe(
       res => {
         console.log('ssss', res);
-       
+        
         this.employeeId = res['request'].employee_id;
-        this.files = res['request'].files;
+        this.files = res['request'].files;        
         this.formData.request_id = res['request'].id;
         this.formData.refused_reason = res['request'].refused_reason;
         this.formData.waiting_reason = res['request'].waiting_reason;
         this.formData.status = res['request'].status
-        if(this.formData.status == 'accepted' ||  this.formData.status == 'ended' ){
+        if(this.formData.status == 'accepted' ||  this.formData.status == 'ended' || this.formData.status == 'confirmed' ){
           this.unitInformation.housing_complex_id = res['request'].unit_information.housing_complex_id;
           console.log(this.unitInformation.housing_complex_id );
           this.getBuildingType(this.unitInformation.housing_complex_id);
@@ -103,15 +103,19 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
           this.getBuilding(this.unitInformation.building_type_id);
           this.unitInformation.building_id = res['request'].unit_information.building_id;
           this.unitInformation.unit_id = res['request'].unit_id;
+          if(this.formData.status == 'accepted'){
            this.accept();
-        }else if(this.formData.status == 'confirmed'){
-          this.confirmed = false
-
+          }
+          if(this.formData.status == 'confirmed'){
+            this.confirmed = false
+           this.acceptCheak = true;
+          }
         }else if(this.formData.status == 'waiting'){
           this.waiting()
          }else if(this.formData.status == 'refused') {
           this.refuse()
          }
+
         this.http.get(this.authSer.pathApi + '/get_user/' + this.employeeId).subscribe(
           res =>{
             console.log('=>',res);
@@ -120,10 +124,11 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
             this.userData.functional_number = res['user'].functional_number;
             this.userData.phone = res['user'].phone;
             this.userData.email = res['user'].email;
-
+            this.spinner.hide()
           },
           err =>{
             console.log(err);
+            this.spinner.hide()
             
           }
         )
@@ -133,6 +138,8 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
     
       err => {
         console.log(err);
+        this.spinner.hide()
+
       }
     );
     this.spinner.hide();
@@ -249,7 +256,7 @@ export class ViewRequestsForAdminstrationDetailsComponent implements OnInit {
         }else{
              this.isBuildingType = false;
              this.isBuilding = false;
-            
+            this.toastr.warning('لا يوجد بيانات لهذا النوع من المباني')
           }
           
       },
@@ -271,6 +278,7 @@ getUnit(event , s){
 
       }else{
            this.isBuilding = false;
+           this.toastr.warning('لا يوجد وحدات لهذا المبنى')
         }
 
     },
@@ -296,12 +304,12 @@ onSubmitted(){
         console.log(res);
         this.toastr.success(this.status)
         this.location.back();
-        
+        this.confirmed = false
       },
       err => {
         console.log(err);
         this.toastr.error('هناك خطأ يرجى المحاولة لاحقا')
-        
+        this.confirmed = false        
         
       }
 

+ 8 - 8
src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-list/view-requests-for-adminstration-list.component.html

@@ -24,20 +24,20 @@
     </div>
 
     <div class="row">
-        <div class="col-6 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-6 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
+                <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>
                 من العناصر يتم عرضها
-              <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-6 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-6 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
                 الحالة

+ 11 - 1
src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-list/view-requests-for-adminstration-list.component.ts

@@ -149,6 +149,7 @@ export class ViewRequestsForAdminstrationListComponent implements OnInit {
         console.log(err);
       }
     );
+    this.spinner.hide();
   }
   onGetStatus(event){
     this.spinner.show();
@@ -183,9 +184,12 @@ export class ViewRequestsForAdminstrationListComponent implements OnInit {
         this.dataList = res['requests'];
         this.count = res['count'];
         this.perPagePagenation = res['per_page'];
+        this.spinner.hide();
+
       },
       err => {
         console.log(err);
+        this.spinner.hide();
         
       }
 
@@ -201,10 +205,13 @@ export class ViewRequestsForAdminstrationListComponent implements OnInit {
         this.dataList = res['requests'];
         this.count = res['count'];
         this.perPagePagenation = res['per_page'];
+        this.spinner.hide();
+
       },
       err => {
         console.log(err);
-        
+        this.spinner.hide();
+
       }
 
     );
@@ -223,9 +230,12 @@ export class ViewRequestsForAdminstrationListComponent implements OnInit {
         this.dataList = res['requests'];
         this.count = res['count'];
         this.perPagePagenation = res['per_page'];
+        this.spinner.hide();
+
       },
       err => {
         console.log(err);
+        this.spinner.hide();
         
       }
 

+ 7 - 4
src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.html

@@ -5,6 +5,7 @@
       <div class="col-12">
         <ul class="list-unstyled titileLi-w">
           <li class="headingText-w" style="cursor: pointer;" (click)="authSer.perviousLocation()">خدمه السكن</li>
+          <li class="headingText-w activeLi-w" style="margin-right:5px; cursor: pointer;" (click)="authSer.backFromEdit()">عرض الطلبات </li>
           <li class="headingText-w activeLi-w" style="margin-right:5px">  طلب سكن</li>
         </ul>
       </div>
@@ -167,10 +168,12 @@
                           <div class="row">
                             <div class="col-12">
                               <div class="wrapper">
-                                  <div class="form-group" *ngFor="let item of covenants">
-                                      <label style="float: right; margin-right: 5px"> {{item.covenant_name}} </label>
-                                      <h3>{{item.covenant_amount}}</h3>
-                                    </div>
+                                  <div class="col-12 col-sm-12 col-md-4"  *ngFor="let item of covenants">
+                                     <div class="form-group">
+                                        <label style="float: right; margin-right: 5px"> {{item.covenant_name}} </label>
+                                        <h3>{{item.covenant_amount}}</h3>
+                                      </div>
+                                    </div>  
                               </div>
                           </div>
                         </div>

+ 5 - 1
src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.ts

@@ -275,7 +275,11 @@ onSubmitted(status) {
   this.http.post(this.authSer.pathApi + '/employee_handle_housing_request' , this.onSending).subscribe(
     res => {
       console.log(res);
-      this.toastr.success();
+      if(status == 'confirmed'){
+        this.toastr.success('تم تأكيد الطلب')
+      }else if (status == 'refused'){
+        this.toastr.error('تم رفض الطلب')
+      }
       this.location.back()
       
     },

+ 9 - 9
src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant/view-requests-for-tenant.component.html

@@ -17,27 +17,27 @@
       </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)"/>
+          <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-6 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-6 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
+                <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>
                 من العناصر يتم عرضها
-              <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-6 col-sm-12 col-md-12 col-lg-6">
+        <div class="col-6 col-sm-12 col-md-12 col-lg-3">
           <div class="form-group">
             <span class="spanSelect-w" style="margin-right:10px;">
                 الحالة

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

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