Amr 5 年之前
父節點
當前提交
66fa737f80
共有 32 個文件被更改,包括 163 次插入133 次删除
  1. 3 0
      src/app/auth-services/regester/regester.component.css
  2. 2 12
      src/app/auth-services/regester/regester.component.html
  3. 1 13
      src/app/auth-services/regester/regester.component.ts
  4. 2 1
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.html
  5. 3 3
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.html
  6. 3 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts
  7. 2 1
      src/app/dashboard/females_request_types/females-request-types-add/females-request-types-add.component.html
  8. 1 0
      src/app/dashboard/females_request_types/females-request-types-list/females-request-types-list.component.ts
  9. 3 3
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.html
  10. 12 2
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-add/link-unit-to-covenants-add.component.ts
  11. 6 8
      src/app/dashboard/link_unit_to_covenants/link-unit-to-covenants-list/link-unit-to-covenants-list.component.html
  12. 2 1
      src/app/dashboard/living-service/living-service-add/living-service-add.component.html
  13. 5 1
      src/app/dashboard/living-service/living-service-list/living-service-list.component.ts
  14. 2 2
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.css
  15. 34 28
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.html
  16. 6 14
      src/app/dashboard/living_system_reports/living-system-reports/living-system-reports.component.ts
  17. 2 1
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.html
  18. 4 1
      src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.ts
  19. 1 0
      src/app/dashboard/unit-building-information/unit-building-information-add/unit-building-information-add.component.html
  20. 6 6
      src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.html
  21. 3 0
      src/app/dashboard/unit-building-information/unit-building-information-list/unit-building-information-list.component.ts
  22. 2 1
      src/app/dashboard/unit-information/unit-information-add/unit-information-add.component.html
  23. 4 0
      src/app/dashboard/unit-information/unit-information-list/unit-information-list.component.ts
  24. 4 3
      src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.html
  25. 16 4
      src/app/dashboard/view_my_female_requests/view-my-female-requests-add/view-my-female-requests-add.component.ts
  26. 10 10
      src/app/dashboard/view_my_female_requests/view-my-female-requests-list/view-my-female-requests-list.component.html
  27. 2 1
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-details/view-requests-for-adminstration-details.component.html
  28. 8 8
      src/app/dashboard/view_requests_for_adminstration/view-requests-for-adminstration-list/view-requests-for-adminstration-list.component.html
  29. 1 0
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant-details/view-requests-for-tenant-details.component.html
  30. 8 8
      src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant/view-requests-for-tenant.component.html
  31. 1 0
      src/app/shared/dashboard.service.ts
  32. 4 1
      src/app/shared/shared.module.ts

+ 3 - 0
src/app/auth-services/regester/regester.component.css

@@ -144,6 +144,9 @@ select.ng-invalid{
 
 
 
+.titileLi-w {
+    margin: 0 65px;
+}
 .titileLi-w li {
     margin: 0 5px;
 }

+ 2 - 12
src/app/auth-services/regester/regester.component.html

@@ -95,17 +95,7 @@
 							 <div class="col-12 col-sm-12 col-md-6 col-lg-4">
               <div class="form-group">
                 <label for="birthday" style="float:right">تاريخ الميلاد <span class="spanReqired-w">*</span></label>
-                <!-- <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" 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>
+                <input type="date" max="{{min}}" id="birthdate" placeholder="تاريخ الميلاد" class="form-control" formControlName="birthday" /> 
               </div>
             </div>
 						 <div class="col-12 col-sm-12 col-md-6 col-lg-4">
@@ -294,7 +284,7 @@
       </div>
       
       <div class="col-12">
-          <button type="submit" [disabled]="!regesterForm.valid || saveDisabled" class="btn btn-success regesterBtn-w">{{userProfileId ? 'حفظ' : 'سجل'}}</button>
+          <button type="submit" [disabled]="!regesterForm.valid" class="btn btn-success regesterBtn-w">{{userProfileId ? 'حفظ' : 'سجل'}}</button>
           <button type="button" class="btn btn-warning regesterBtn-w" (click)="authSer.backFromEdit()">إلغاء</button>
       </div>
 

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

@@ -83,7 +83,6 @@ export class RegesterComponent implements OnInit {
   month:any;
   day:any;
   checkShowSpanRequired: boolean = true;
-  saveDisabled:boolean = false;
   changesSave:boolean = false;
   typeMode:boolean = false;
   checkUserType:number;
@@ -358,9 +357,6 @@ export class RegesterComponent implements OnInit {
       (responce) => {
         console.log(responce);
         this.departments = responce['departments'];
-        if(this.departments.length == 0) {
-          this.toastr.warning('لا يوجد اقسام بهذه الاداره !');
-        }
         this.showDepart = true;
       }
     );
@@ -484,13 +480,12 @@ export class RegesterComponent implements OnInit {
       if(userDataRegester['type'] == '0') {
         userDataRegester['date_of_employment_hij'] = userDataRegester['date_of_employment_hij'].year  + '-' + userDataRegester['date_of_employment_hij'].month + '-' + userDataRegester['date_of_employment_hij'].day;
         joinJobDate = userDataRegester['date_of_employment_gre'].split('-')[0];
-        userDataRegester['birthday'] = userDataRegester['birthday'].year  + '-' + userDataRegester['birthday'].month + '-' + userDataRegester['birthday'].day;
       }
 
       userDataRegester['identity_number'] = userDataRegester['identity_number'].toString();
       console.log('valueee' , userDataRegester);
 
-      const birthDate = userDataRegester['birthday'].split('-')[0];///to check if birthday > employment date
+      const birthDate = userDataRegester['birthday'].split('-')[0];
     
 
 
@@ -509,16 +504,12 @@ export class RegesterComponent implements OnInit {
           //edit profile visitor 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.regesterForm.get('phone').value.substring(0,2) != '05') {
             this.toastr.warning('رقم الجوال يجب أن يبدأ ب 05');
-            this.saveDisabled = false;
           } else {
             this.userService.onEditProfile(userDataRegester).subscribe(
               (responce) => {
@@ -528,13 +519,10 @@ export class RegesterComponent implements OnInit {
               (error) => {
                 console.log(error);
                 this.toastr.error('فشل التعديل');
-                this.saveDisabled = false;
                 if(error.error['error'].email) {
                   this.toastr.warning('الايميل تم التسجيل به من قبل !');
-                  this.saveDisabled = false;
                 } else if(error.error['error'].identity_number) {
                   this.toastr.warning('رقم الهويه تم التسجيل به من قبل !');
-                  this.saveDisabled = false;
                 }
               }
             );

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

+ 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('لا يمكنك حذف العهده لانها جزء من النظام')
+            }
             },
           )
       );

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

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

+ 12 - 2
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:'',
@@ -167,6 +168,8 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
            this.isComplex = false;
            this.isBuildingType = false;
            this.isBuilding = false;
+           this.toastr.warning('لا يوجد انواع مباني لهذا المجمع')
+
         }
       },
       err => {
@@ -190,6 +193,7 @@ export class LinkUnitToCovenantsAddComponent implements OnInit {
         }else{
              this.isBuildingType = false;
              this.isBuilding = false;
+           this.toastr.warning('لا يوجد بيانات لهذا النوع من المباني')
             
           }
           
@@ -215,6 +219,7 @@ getUnit(event){
 
       }else{
            this.isBuilding = false;
+           this.toastr.warning('لا يوجد وحدات لهذا المبنى ')
         }
 
     },
@@ -240,7 +245,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;
     }

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

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

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

@@ -261,8 +261,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 ='تقرير العهد'

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

+ 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('لا يمكنك حذف المجمع السكني لانه جزء من النظام')
+            }
             },
           )
       );

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

+ 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('لا يمكنك حذف الوحدة السكني لانه جزء من النظام')
+              }
               },
             )
         );

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

+ 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('لا يمكنك حذف المبنى السكني لانه جزء من النظام')
+            }
             },
           )
       );

+ 4 - 3
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()">عرض طلبات المستأجر للأدارة</li>
+              <li class="headingText-w activeLi-w" style="margin-right:5px">تفاصيل الطلب</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" >

+ 16 - 4
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;
@@ -117,9 +118,7 @@ export class ViewMyFemaleRequestsAddComponent implements OnInit {
       
     }
   );
-    if(this.whoIsComing == 'AD74'){
-      this.isAdmin = true;
-    }
+  
 
   console.log('current page',this.pageId)
   this.dashBoardSer.getRequestTypesList( 1 ,10000 , 'all', 'all', 'all').subscribe(
@@ -146,16 +145,29 @@ 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.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;

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

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

+ 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;">
                 الحالة

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

+ 8 - 8
src/app/dashboard/view_requests_for_tenant/view-requests-for-tenant/view-requests-for-tenant.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;">
                 الحالة

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

@@ -34,6 +34,7 @@ export class DashboardService {
       return this.http.get(this.authService.pathApi + '/housing_requests_list/'+ currentPage +'/' + dataTableNumber  +'/' +to_whom + '/' + status);
     }
     getRequestTypesList(currentPage: number, dataTableNumber: number, require_attachments: any , require_approval: any, require_date:any){
+      this.spinner.show();
       return this.http.get(this.authService.pathApi + '/request_types_list/'+ currentPage +'/' + dataTableNumber  +'/' +require_attachments + '/' + require_approval + '/' + require_date);
 
     }

+ 4 - 1
src/app/shared/shared.module.ts

@@ -6,13 +6,16 @@ import { OnlyNumberDirective } from './only-number.directive';
 import { NumberDirective } from './number.directive';
 
 
+
 @NgModule({
   declarations: [
     OnlyNumberDirective,
     EnglishCharactersDirective,
     //CeiboShare,
     NumberDirective,
-  ],
+    
+    ]
+    ,
   exports: [
     CommonModule,
     OnlyNumberDirective,