amr 5 gadi atpakaļ
vecāks
revīzija
5cbdfd3a0a
51 mainītis faili ar 2003 papildinājumiem un 86 dzēšanām
  1. 2 2
      src/app/External-Page/external-page-header/external-page-header.component.ts
  2. 2 2
      src/app/Internal-Page/internal-page-header/internal-page-header.component.ts
  3. 1 1
      src/app/Internal-Page/internal-routing-module.ts
  4. 5 4
      src/app/app-routing.module.ts
  5. 6 4
      src/app/app.module.ts
  6. 24 0
      src/app/auth-services/auth-services-routing.module.ts
  7. 1 0
      src/app/auth-services/auth-services.component.html
  8. 8 0
      src/app/auth-services/auth-services.component.ts
  9. 56 0
      src/app/auth-services/auth-services.module.ts
  10. 2 1
      src/app/login/login.component.css
  11. 1 1
      src/app/login/login.component.html
  12. 12 6
      src/app/login/login.component.ts
  13. 0 0
      src/app/auth-services/regester/regester.component.css
  14. 0 0
      src/app/auth-services/regester/regester.component.html
  15. 4 4
      src/app/regester/regester.component.ts
  16. 1 2
      src/app/dashboard/adminstration-contact-officers/adminstration-contact-officers-list/adminstration-contact-officers-list.component.ts
  17. 41 39
      src/app/dashboard/create-report/add-new-report/add-new-report.component.html
  18. 19 1
      src/app/dashboard/dashboard-routing.ts
  19. 13 0
      src/app/dashboard/dashboard.module.ts
  20. 1 1
      src/app/dashboard/definition-of-classification/definition-add/definition-add.component.html
  21. 4 0
      src/app/dashboard/definition-of-classification/definition-add/definition-add.component.ts
  22. 1 1
      src/app/dashboard/definition-of-classification/definition-list/definition-list.component.html
  23. 3 2
      src/app/dashboard/definition-of-classification/definition-list/definition-list.component.ts
  24. 0 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.css
  25. 65 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.html
  26. 124 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.ts
  27. 30 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.css
  28. 83 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.html
  29. 281 0
      src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.ts
  30. 1 1
      src/app/dashboard/definition-of-location/location-add/location-add.component.html
  31. 7 3
      src/app/dashboard/definition-of-location/location-add/location-add.component.ts
  32. 1 1
      src/app/dashboard/definition-of-location/location-list/location-list.component.html
  33. 3 3
      src/app/dashboard/definition-of-location/location-list/location-list.component.ts
  34. 2 2
      src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.html
  35. 3 2
      src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.ts
  36. 1 1
      src/app/dashboard/header/header.component.ts
  37. 0 0
      src/app/dashboard/living-service/living-service-add/living-service-add.component.css
  38. 42 0
      src/app/dashboard/living-service/living-service-add/living-service-add.component.html
  39. 104 0
      src/app/dashboard/living-service/living-service-add/living-service-add.component.ts
  40. 30 0
      src/app/dashboard/living-service/living-service-list/living-service-list.component.css
  41. 79 0
      src/app/dashboard/living-service/living-service-list/living-service-list.component.html
  42. 279 0
      src/app/dashboard/living-service/living-service-list/living-service-list.component.ts
  43. 0 0
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.css
  44. 77 0
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.html
  45. 132 0
      src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.ts
  46. 30 0
      src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.css
  47. 89 0
      src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.html
  48. 278 0
      src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.ts
  49. 7 0
      src/app/dashboard/service-item/service-item.component.ts
  50. 21 0
      src/app/servicesItems/services.component.ts
  51. 27 2
      src/app/shared/dashboard.service.ts

+ 2 - 2
src/app/External-Page/external-page-header/external-page-header.component.ts

@@ -60,7 +60,7 @@ export class ExternalPageHeaderComponent implements OnInit {
 
 
   onLogin() {
-    this.router.navigate(['/login']);
+    this.router.navigate(['auth/login']);
   }
 
   onGetProfile() {
@@ -71,7 +71,7 @@ export class ExternalPageHeaderComponent implements OnInit {
   //log out function
   onLogout() { 
     localStorage.clear();
-    this.router.navigate(['login']);
+    this.router.navigate(['auth/login']);
   }
 
 }

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

@@ -68,7 +68,7 @@ export class InternalPageHeaderComponent implements OnInit {
   }
 
   onLogin() {
-    this.router.navigate(['/login']);
+    this.router.navigate(['auth/login']);
   }
 
   onGetProfile() {
@@ -79,7 +79,7 @@ export class InternalPageHeaderComponent implements OnInit {
   //log out function
   onLogout() { 
     localStorage.clear();
-    this.router.navigate(['login']);
+    this.router.navigate(['auth/login']);
   }
 
   onDashBoard() {

+ 1 - 1
src/app/Internal-Page/internal-routing-module.ts

@@ -9,7 +9,7 @@ import { RouterModule, Routes } from '@angular/router';
 import { InternalPageComponent } from './internal-page/internal-page.component';
 
 import { HospitalContentComponent } from './hospital-content/hospital-content.component';
-import { LoginComponent } from './../login/login.component';
+import { LoginComponent } from '../auth-services/login/login.component';
 import { ExternalServiceDetailsComponent } from './external-service-details/external-service-details.component';
 import { InternalContactUsComponent } from './internal-contact-us/internal-contact-us.component';
 import { InternalPolicyComponent } from './internal-policy/internal-policy.component';

+ 5 - 4
src/app/app-routing.module.ts

@@ -3,8 +3,8 @@ import { AddRequestComponent } from './trainning-service/add-request/add-request
 import { CanDeactivateGuard } from './shared/can-deactivate-guards.service';
 import { NgModule } from '@angular/core';
 import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
-import { LoginComponent } from './login/login.component';
-import { RegesterComponent } from './regester/regester.component';
+import { LoginComponent } from './auth-services/login/login.component';
+import { RegesterComponent } from './auth-services/regester/regester.component';
 import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
 import { AuthGuardService as AuthGuard } from './shared/auth-guard.service';
 import { ServicesComponent } from './servicesItems/services.component';
@@ -13,8 +13,9 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
 
 const routes: Routes = [
   {path: '', redirectTo: '/ExternalPage', pathMatch: 'full'},
-  {path: 'login', component: LoginComponent},
-  {path: 'signup', component: RegesterComponent},
+  {path: 'auth', loadChildren:'./auth-services/auth-services.module#AuthServicesModule'},
+  // {path: 'login', component: LoginComponent},
+  // {path: 'signup', component: RegesterComponent},
   {path: 'services/:id', component: ServicesComponent, canActivate: [AuthGuard]},
   {path: 'addRequest/:visitorId', component: AddRequestComponent, canActivate: [AuthGuard]},
   {path: 'editRequest/:visitorId/:requestId', component: AddRequestComponent, canActivate: [AuthGuard]},

+ 6 - 4
src/app/app.module.ts

@@ -28,8 +28,8 @@ import { AppComponent } from './app.component';
 import { HttpModule } from '@angular/http';
 import { HttpClientModule } from '@angular/common/http';
 import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
-import { LoginComponent } from './login/login.component';
-import { RegesterComponent } from './regester/regester.component';
+import { LoginComponent } from './auth-services/login/login.component';
+import { RegesterComponent } from './auth-services/regester/regester.component';
 import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
 import { AuthServiceService } from './shared/auth-service.service';
 import { HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -56,6 +56,7 @@ import {SharedModule} from './shared/shared.module';
 import { AddRequestComponent } from './trainning-service/add-request/add-request.component';
 import { AllRequestsComponent } from './trainning-service/all-requests/all-requests.component';
 import { TrainningServicesComponent } from './trainning-service/trainning-services/trainning-services.component';
+import { AuthServicesModule } from './auth-services/auth-services.module';
 
 
 @NgModule({
@@ -63,8 +64,8 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
     AppComponent,
     HeaderComponent,
     FooterComponent,
-    LoginComponent,
-    RegesterComponent,
+    // LoginComponent,
+    // RegesterComponent,
     ServicesComponent,
     PageNotFoundComponent,
     NumberDerictiveDirective,
@@ -79,6 +80,7 @@ import { TrainningServicesComponent } from './trainning-service/trainning-servic
     HttpModule,
     HttpClientModule,
     DashBoardModule,
+    AuthServicesModule,
     InternalPageModule,
     ExternalPageModule,
     SharedModule,

+ 24 - 0
src/app/auth-services/auth-services-routing.module.ts

@@ -0,0 +1,24 @@
+import { NgModule, Component } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { AuthServicesComponent } from './auth-services.component';
+import { LoginComponent } from './login/login.component';
+import { RegesterComponent } from './regester/regester.component';
+
+
+
+
+const routes: Routes = [
+    {path: 'auth',  component: AuthServicesComponent, children: [
+      {path: '', redirectTo: 'login', pathMatch: 'full'},
+      {path: 'login', component: LoginComponent},
+      {path: 'register', component: RegesterComponent},
+     
+      {path: '**', redirectTo: 'login', pathMatch: 'full'},
+    ]},
+  ];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class AuthServicesRoutingModule {}

+ 1 - 0
src/app/auth-services/auth-services.component.html

@@ -0,0 +1 @@
+<router-outlet></router-outlet>

+ 8 - 0
src/app/auth-services/auth-services.component.ts

@@ -0,0 +1,8 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-auth-services',
+  templateUrl: './auth-services.component.html',
+})
+export class AuthServicesComponent {
+}

+ 56 - 0
src/app/auth-services/auth-services.module.ts

@@ -0,0 +1,56 @@
+import { NgModule } from '@angular/core';
+import { AuthServicesRoutingModule } from './auth-services-routing.module';
+import { AuthServicesComponent } from './auth-services.component';
+import { LoginComponent } from './login/login.component';
+import { RegesterComponent } from './regester/regester.component';
+import { BrowserModule } from '@angular/platform-browser';
+import { FormsModule, ReactiveFormsModule, FormGroup } from '@angular/forms';
+import { AlifeFileToBase64Module } from 'alife-file-to-base64';
+import { FlatpickrModule } from 'angularx-flatpickr';
+import { CalendarModule, DateAdapter } from 'angular-calendar';
+// import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
+// import { MomentModule } from 'ngx-moment';
+import { NgxPaginationModule } from 'ngx-pagination';
+import { NgxSpinnerModule } from 'ngx-spinner';
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
+import { CollapsibleModule } from 'angular2-collapsible';
+import { BootstrapModalModule } from 'ngx-modialog/plugins/bootstrap/public_api';
+import { Ng2CarouselamosModule } from 'ng2-carouselamos';
+import { ToastrModule } from 'ngx-toastr';
+import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
+import { CommonModule } from '@angular/common';
+import { JwSocialButtonsModule } from 'jw-angular-social-buttons';
+import { CarouselModule } from 'ngx-owl-carousel-o';
+import { SharedModule } from '../shared/shared.module';
+import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
+
+
+
+@NgModule({
+  imports: [
+    CommonModule,
+    AuthServicesRoutingModule,
+    CollapsibleModule,
+    NgxPaginationModule,
+    JwSocialButtonsModule,
+    CarouselModule,
+    NgxSpinnerModule,
+    SharedModule,
+    NgbModule.forRoot(),
+    FlatpickrModule.forRoot(),
+    CalendarModule.forRoot({
+      provide: DateAdapter,
+      useFactory: adapterFactory
+    }),
+    FormsModule,
+    ReactiveFormsModule,
+    AlifeFileToBase64Module,
+  ],
+    declarations: [
+        AuthServicesComponent,
+        LoginComponent,
+        RegesterComponent,
+  ],
+  providers: [],
+})
+export class AuthServicesModule { }

+ 2 - 1
src/app/login/login.component.css

@@ -4,7 +4,8 @@
     margin-top: -6px;
     justify-content: center;
     /* background-color: #ebeff5; */
-    background: url('../../assets/image/background_login.jpg') no-repeat top center;
+    /* ./../assets/image/background_login.jpg */
+    background: url('../../../assets/image/background_login.jpg') no-repeat top center;
     background-size: cover;
     direction: rtl;
     font-family: 'Cairo', sans-serif;

+ 1 - 1
src/app/login/login.component.html

@@ -18,7 +18,7 @@
                         <span class="help-block" *ngIf="!password.valid && password.touched">من فضلك ، قم بادخال كود صحيح</span>
                     </div>
                     <div class="form-group">
-                      <a [routerLink]="['/signup']" class="signUp-w" style="float: left; margin-left:10px">إنشاء حساب جديد</a>
+                      <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">الدخول</button>

+ 12 - 6
src/app/login/login.component.ts

@@ -1,11 +1,13 @@
+import { Component, OnInit, ViewChild, HostListener } from "@angular/core";
+import { AuthServiceService } from "src/app/shared/auth-service.service";
+import { Router, ActivatedRoute } from "@angular/router";
+
 import { Location } from '@angular/common';
-import { Router, ActivatedRoute } from '@angular/router';
-import { AuthServiceService } from './../shared/auth-service.service';
-import { Component, OnInit, ViewChild, HostListener } from '@angular/core';
-import { NgForm } from '@angular/forms';
+import { NgxSpinnerService } from "ngx-spinner";
+import { ToastrService } from "ngx-toastr";
+import { NgForm } from "@angular/forms";
 import { Response } from '@angular/http';
-import { ToastrService } from 'ngx-toastr';
-import { NgxSpinnerService } from 'ngx-spinner';
+
 
 
 @Component({
@@ -48,6 +50,10 @@ export class LoginComponent implements OnInit {
     
   }
 
+  registerFun() {
+    this.router.navigate(['../register'], {relativeTo: this.route});
+  }
+
   //login function from services
   onSubmitedForm(){
     console.log(this.loginFormData.value);

src/app/regester/regester.component.css → src/app/auth-services/regester/regester.component.css


src/app/regester/regester.component.html → src/app/auth-services/regester/regester.component.html


+ 4 - 4
src/app/regester/regester.component.ts

@@ -1,7 +1,7 @@
 import { Modal } from 'ngx-modialog/plugins/bootstrap';
 import { Observable } from 'rxjs/Observable';
-import { AuthServiceService } from './../shared/auth-service.service';
-import { UserService } from './../shared/user.service';
+import { AuthServiceService } from '../../shared/auth-service.service';
+import { UserService } from '../../shared/user.service';
 import { Component, OnInit, Injectable } from '@angular/core';
 import { NgForm, FormGroup, FormControl, Validators, FormControlName } from '@angular/forms';
 import { Router, ActivatedRoute, Params } from '@angular/router';
@@ -580,7 +580,7 @@ export class RegesterComponent implements OnInit {
               (responce) => {
                 console.log(responce);
                 this.toastr.success('تم اضافتك بنجاح ، من فضلك سجل الدخول')
-                this.router.navigate(['login']);
+                this.router.navigate(['auth/login']);
               },
               (error) => {
                 console.log(error);
@@ -612,7 +612,7 @@ export class RegesterComponent implements OnInit {
               (responce) => {
                 console.log(responce);
                 this.toastr.success('تم اضافتك بنجاح ، من فضلك سجل الدخول')
-                this.router.navigate(['login']);
+                this.router.navigate(['auth/login']);
               },
               (error) => {
                 console.log(error);

+ 1 - 2
src/app/dashboard/adminstration-contact-officers/adminstration-contact-officers-list/adminstration-contact-officers-list.component.ts

@@ -174,7 +174,6 @@ selectAll() {
             };  
           }
           this.toastr.success('تم نعين ضباط الاتصال');
-          location.reload();
           console.log(response);
           for(let i = 0; i < this.emplyees.length; i++){
             this.emplyees[i].selected == false;
@@ -197,7 +196,7 @@ selectAll() {
           }
           this.toastr.success('تم نعين ضباط الاتصال');
           console.log(response);
-          location.reload();
+          
         },
         (error) => {
           this.toastr.error('حدث خطأ في التعين يرجا المحاوله لاحقاً')

+ 41 - 39
src/app/dashboard/create-report/add-new-report/add-new-report.component.html

@@ -23,45 +23,7 @@
             </div>
           </div>
 
-          <div class="col-12" *ngIf="reportVal">
-            <h2 class="title">بيانات صاحب البلاغ</h2>
-            <div class="row">
-              <div class="col-12">
-                <div class="wrapper">
-                  <div class="col-12">
-                    <input type="text" class="form-control searchEmp" placeholder="البحث ( برقم الهويه / الرقم الوظيفي )" style="width:85%; float:right" appOnlyNumber [(ngModel)]="search" [ngModelOptions]="{standalone: true}"/>
-                    <button class="btn btn-success" type="button" style="float:right; margin:0 2px;" (click)="getValue()">أبحث</button>
-                  </div>
-
-                  <div class="col-12 col-md-4" style="margin: 20px 0">
-                    <div class="form-group">
-                      <label for="name" style="float:right">الإسم<span class="spanReqired-w">*</span></label>
-                      <input type="text" class="form-control" id="name" [ngModel]="reportAuthor.name" [ngModelOptions]="{standalone: true}"/>
-                    </div>
-                  </div>
-                  <div class="col-12 col-md-4" style="margin: 20px 0">
-                    <div class="form-group">
-                      <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
-                      <input type="phone" class="form-control" id="identityNumber" [ngModel]="reportAuthor.identity_number" [ngModelOptions]="{standalone: true}"/>
-                    </div>
-                  </div>
-                  <div class="col-12 col-md-4" style="margin: 20px 0">
-                    <div class="form-group">
-                      <label for="functionalNumber" style="float:right">رقم الوظيفي <span class="spanReqired-w">*</span></label>
-                      <input type="phone" class="form-control" id="functionalNumber" [ngModel]="reportAuthor.functional_number" [ngModelOptions]="{standalone: true}"/>
-                    </div>
-                  </div>
-                  <div class="col-12 col-md-4">
-                    <div class="form-group">
-                      <label for="phone" style="float:right">الهاتف<span class="spanReqired-w">*</span></label>
-                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [ngModelOptions]="{standalone: true}"/>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-
+        
           <div class="col-12">
             <h2 class="title">بيانات مقدم البلاغ</h2>
             <div class="row">
@@ -104,6 +66,46 @@
             </div>
           </div>
 
+          <div class="col-12" *ngIf="reportVal">
+            <h2 class="title">بيانات صاحب البلاغ</h2>
+            <div class="row">
+              <div class="col-12">
+                <div class="wrapper">
+                  <div class="col-12">
+                    <input type="text" class="form-control searchEmp" placeholder="البحث ( برقم الهويه / الرقم الوظيفي )" style="width:85%; float:right" appOnlyNumber [(ngModel)]="search" [ngModelOptions]="{standalone: true}"/>
+                    <button class="btn btn-success" type="button" style="float:right; margin:0 2px;" (click)="getValue()">أبحث</button>
+                  </div>
+
+                  <div class="col-12 col-md-4" style="margin: 20px 0">
+                    <div class="form-group">
+                      <label for="name" style="float:right">الإسم<span class="spanReqired-w">*</span></label>
+                      <input type="text" class="form-control" id="name" [ngModel]="reportAuthor.name" [ngModelOptions]="{standalone: true}"/>
+                    </div>
+                  </div>
+                  <div class="col-12 col-md-4" style="margin: 20px 0">
+                    <div class="form-group">
+                      <label for="identityNumber" style="float:right">رقم الهويه <span class="spanReqired-w">*</span></label>
+                      <input type="phone" class="form-control" id="identityNumber" [ngModel]="reportAuthor.identity_number" [ngModelOptions]="{standalone: true}"/>
+                    </div>
+                  </div>
+                  <div class="col-12 col-md-4" style="margin: 20px 0">
+                    <div class="form-group">
+                      <label for="functionalNumber" style="float:right">رقم الوظيفي <span class="spanReqired-w">*</span></label>
+                      <input type="phone" class="form-control" id="functionalNumber" [ngModel]="reportAuthor.functional_number" [ngModelOptions]="{standalone: true}"/>
+                    </div>
+                  </div>
+                  <div class="col-12 col-md-4">
+                    <div class="form-group">
+                      <label for="phone" style="float:right">الهاتف<span class="spanReqired-w">*</span></label>
+                      <input type="phone" class="form-control" id="phone" [ngModel]="reportAuthor.phone" [ngModelOptions]="{standalone: true}"/>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+
+
           <div class="col-12">
               <h2 class="title">بيانات البلاغ</h2>
               <div class="row">

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

@@ -99,7 +99,13 @@ import { AdminstrationContactOfficersListComponent } from './adminstration-conta
 import { AddNewReportComponent } from './create-report/add-new-report/add-new-report.component';
 import { MaintenanceCommunicationsListComponent } from './maintenance-communications/maintenance-communications-list/maintenance-communications-list.component';
 import { ReportCurrentEmployeeOfficerComponent } from './report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component';
-
+import { LivingServiceListComponent } from './living-service/living-service-list/living-service-list.component';
+import { LivingServiceAddComponent } from './living-service/living-service-add/living-service-add.component';
+import { DefinitionOfCovenantsListComponent } from './definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component';
+import { DefinitionOfCovenantsAddComponent } from './definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component';
+import { RecordInfoBuildingListComponent } from './record-info-building/record-info-building-list/record-info-building-list.component';
+import { RecordInfoBuildingAddComponent } from './record-info-building/record-info-building-add/record-info-building-add.component';
+    
 const dashboardRouting: Routes = [
     {path: 'service/:userID/:serviceID', component: ServiceItemComponent, canActivate: [AuthGuard], children: [
     {path: 'users/:listPageId', component: UsersComponent, canActivate: [AuthGuard]},
@@ -237,6 +243,18 @@ const dashboardRouting: Routes = [
     {path: 'followCommunicationSecEdit/:followSectEditId', component: FollowCommunicationSectionsDetailsComponent, canActivate: [AuthGuard] },
     {path: 'reportCurrentEmployeeOfficer', component: ReportCurrentEmployeeOfficerComponent, canActivate: [AuthGuard] },
     {path: 'reportCommunication', component: ReportCommunicationsComponent, canActivate: [AuthGuard] },
+    {path: 'livingServiceList/:listPageId', component: LivingServiceListComponent, canActivate: [AuthGuard]},
+    {path: 'livingService/add', component: LivingServiceAddComponent, canActivate: [AuthGuard]},
+    {path: 'livingService/edit/:listPageEditId', component: LivingServiceAddComponent, canActivate: [AuthGuard]},
+    {path: 'definitionOfConvenats/:listPageId', component: DefinitionOfCovenantsListComponent, canActivate: [AuthGuard]},
+    {path: 'definitionOfConvenats', component: DefinitionOfCovenantsAddComponent, canActivate: [AuthGuard]},
+    {path: 'definitionOfConvenats/edit/:listPageEditId', component: DefinitionOfCovenantsAddComponent, canActivate: [AuthGuard]},
+    {path: 'recordInfoBuilding/:listPageId', component: RecordInfoBuildingListComponent, canActivate: [AuthGuard]},
+    {path: 'recordInfoBuilding', component: RecordInfoBuildingAddComponent, canActivate: [AuthGuard]},
+    {path: 'recordInfoBuilding/edit/:listPagEditId', component: RecordInfoBuildingAddComponent, canActivate: [AuthGuard]},
+    
+    
+    
     ]},
 ];
 

+ 13 - 0
src/app/dashboard/dashboard.module.ts

@@ -144,6 +144,12 @@ import { FollowCommunicationsAdminstrationEditComponent } from './follow-communi
 import { FollowCommunicationSectionsDetailsComponent } from './follow-communications-sections/follow-communication-sections-details/follow-communication-sections-details.component';
 import { ReportCurrentEmployeeOfficerComponent } from './report-current-employees-officer/report-current-employee-officer/report-current-employee-officer.component';
 import { ReportCommunicationsComponent } from './report-communication/report-communications/report-communications.component';
+import { LivingServiceListComponent } from './living-service/living-service-list/living-service-list.component';
+import { LivingServiceAddComponent } from './living-service/living-service-add/living-service-add.component';
+import { DefinitionOfCovenantsListComponent } from './definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component';
+import { DefinitionOfCovenantsAddComponent } from './definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component';
+import { RecordInfoBuildingListComponent } from './record-info-building/record-info-building-list/record-info-building-list.component';
+import { RecordInfoBuildingAddComponent } from './record-info-building/record-info-building-add/record-info-building-add.component';
 
 
 
@@ -252,6 +258,13 @@ import { ReportCommunicationsComponent } from './report-communication/report-com
         FollowCommunicationSectionsDetailsComponent,
         ReportCurrentEmployeeOfficerComponent,
         ReportCommunicationsComponent,
+        LivingServiceListComponent,
+        LivingServiceAddComponent,
+        DefinitionOfCovenantsListComponent,
+        DefinitionOfCovenantsAddComponent,
+        RecordInfoBuildingListComponent,
+        RecordInfoBuildingAddComponent,
+    
     ],
     imports: [
         CommonModule,

+ 1 - 1
src/app/dashboard/definition-of-classification/definition-add/definition-add.component.html

@@ -54,7 +54,7 @@
               
           </div>
           <div class=" row col-6">
-              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveDisabled">حفظ</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>

+ 4 - 0
src/app/dashboard/definition-of-classification/definition-add/definition-add.component.ts

@@ -31,6 +31,7 @@ export class DefinitionAddComponent implements OnInit {
   valueType: string = '';
   checkSaveclick:boolean = false;
   check : boolean = false;
+  disable: boolean = false;
   isEdit: boolean = false;
   types = [
     {
@@ -113,14 +114,17 @@ export class DefinitionAddComponent implements OnInit {
  
   onSubmitted() {
     console.log('HERE',this.definitionForm.value);
+    this.disable = true;
     if(this.editPageId) {
       this.dashBoardSer.editItem(this.editPageId, this.definitionForm.value, 'definitionOfClassification').subscribe(
         (responce) => {
+          this.disable = true;
           console.log(responce);
           this.toastr.success('تم التعديل بنجاح');
           this.location.back();
         },
         (error) => {
+          this.disable = false;
           console.log(error);
           this.toastr.error('خطأ في الخادم ، رجاء المحارله لاحقا');
         }

+ 1 - 1
src/app/dashboard/definition-of-classification/definition-list/definition-list.component.html

@@ -17,7 +17,7 @@
       </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>

+ 3 - 2
src/app/dashboard/definition-of-classification/definition-list/definition-list.component.ts

@@ -109,8 +109,9 @@ export class DefinitionListComponent implements OnInit {
   }
 //make all checkbox of user checked 
 selectAll() {
-  for (var i = 0; i < this.absorpationListIds.length; i++) {
-    this.absorpationListIds[i].selected = this.selectedAll;
+  console.log('selected alllllll');
+  for(let i = 0; i < this.dataList.length; i++){
+    this.dataList[i].selected = this.selectedAll;
   }
 }
 

+ 0 - 0
src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.css


+ 65 - 0
src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.html

@@ -0,0 +1,65 @@
+<div class="addDepartment-w">
+
+    
+  <div class="container">
+      <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>
+          </ul>
+        </div>
+      </div>
+
+    <div class="containerContent-w">
+        <form (ngSubmit)="onSubmitted()" #f="ngForm" style="margin-top: 40px;">
+            <div class="row">
+          <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/>
+            </div>
+          </div>
+                
+          <!-- <div class="col-12 col-sm-12 col-md-4">
+            <div class="form-group">
+              <label for="category_id" style="float: right; margin-right: 5px">اسم المادة او العهدة<span class="spanReqired-w">*</span></label>
+              <input type="number" class="form-control" id="category_id" name="category_id" placeholder="اسم المادة او العهدة	" ngModel [ngModel]="formData.category_id" required/>
+            </div>
+          </div> -->
+            
+          <div class="col-12 col-sm-12 col-md-4">
+            <div class="form-group">
+              <label style="float: right; margin-right: 5px">الحاله</label>
+              <select class="form-control" name="category_id" [ngModel]="formData.category_id" required>
+                <option *ngFor="let category of categories" [value]="category.id">{{category.name}}</option>
+              </select>
+            </div>
+          </div>
+
+          <div class="col-12 col-sm-12 col-md-4">
+            <div class="form-group">
+              <label for="amount" style="float: right; margin-right: 5px">العدد الموجود	<span class="spanReqired-w">*</span></label>
+              <input type="number" class="form-control" id="amount" name="amount" placeholder="العدد الموجود		" ngModel [ngModel]="formData.amount" required/>
+            </div>
+          </div>
+
+          <div class="col-12 col-sm-12 col-md-4">
+            <div class="form-group">
+              <label style="float: right; margin-right: 5px">الحاله</label>
+              <select class="form-control" name="status" [ngModel]="formData.status" required>
+                <option value="1">فعال</option>
+                <option value="0">غير فعال</option>
+              </select>
+            </div>
+          </div>
+              
+          </div>
+          <div class=" row col-6">
+              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+              <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
+          </div>
+        </form>
+    </div>
+  </div>
+</div>

+ 124 - 0
src/app/dashboard/definition-of-covenants/definition-of-covenants-add/definition-of-covenants-add.component.ts

@@ -0,0 +1,124 @@
+import { HttpClient } from '@angular/common/http';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Params } from '@angular/router';
+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 { NgForm } from '@angular/forms';
+
+@Component({
+  selector: 'app-definition-of-covenants-add',
+  templateUrl: './definition-of-covenants-add.component.html',
+  styleUrls: ['./definition-of-covenants-add.component.css']
+})
+export class DefinitionOfCovenantsAddComponent implements OnInit {
+
+  constructor(
+    private dashBoardSer: DashboardService,
+    private toastr: ToastrService,
+    private authSer: AuthServiceService,
+    private route: ActivatedRoute,
+    private spinner: NgxSpinnerService,
+    private location: Location,
+    private http: HttpClient
+  ) { }
+
+  @ViewChild('f') definitionForm : NgForm;
+
+  typePage: string = '';
+  locations =[];
+  categories = [];
+  valueType: string = '';
+  checkSaveclick:boolean = false;
+  check : boolean = false;
+  isEdit: boolean = false;
+  editPageId: number;
+
+  formData = {
+    name: '',
+    category_id:'',
+    amount:'',
+    status: '',
+  }
+
+  ngOnInit() {
+
+    this.route.params.subscribe(
+      (params: Params) => {
+        this.editPageId = +params['listPageEditId'];;
+        console.log(this.editPageId);
+      }
+    );
+
+    this.http.get(this.authSer.pathApi + '/get_covenant_categories_list')
+          .subscribe(
+            res => {
+              console.log('gg', res);
+              this.categories = res[('covenant_categories')];
+            },
+            err =>{
+              console.log(err);
+
+              
+            }
+          );
+
+    if (this.editPageId) {
+      this.spinner.show();
+      this.isEdit = true;
+      this.typePage = 'تعديل';
+      this.dashBoardSer.getItemData(this.editPageId, 'definitionOfCovenant' ).subscribe(
+        res => {
+          console.log('ssss', res);
+          this.formData.name = res['covenant'].name;
+          this.formData.category_id = res[('covenant')].category_id;
+          this.formData.amount = res[('covenant')].amount;
+          this.formData.status  = res['covenant'].status;
+          this.spinner.hide();
+        },
+        err => {
+          console.log(err);
+        }
+      );
+    }else {
+      this.typePage = 'اضافة';
+    }
+    
+
+  }
+
+
+  onSubmitted(){
+    console.log('HERE',this.definitionForm.value);
+    if(this.editPageId) {
+      this.dashBoardSer.editItem(this.editPageId, this.definitionForm.value, 'definitionOfCovenant').subscribe(
+        res => {
+          console.log(res);
+          this.toastr.success('تم التعديل بنجاح');
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.toastr.error('خطأ في الخادم ، رجاء المحارله لاحقا');
+        }
+      )
+    } else {
+      this.dashBoardSer.addItem( this.definitionForm.value , 'definitionOfCovenant').subscribe(
+        res => {
+          console.log('ADD',res);
+          this.toastr.success('تم الإضافه بنجاح');
+          this.checkSaveclick = false;
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.checkSaveclick = false;
+          this.toastr.error('خطأ في الخادم ، حاول لاحقا');
+        }
+      );
+      }
+  }
+
+}

+ 30 - 0
src/app/dashboard/definition-of-covenants/definition-of-covenants-list/definition-of-covenants-list.component.css

@@ -0,0 +1,30 @@
+.table {
+    margin: 30px 0;
+}
+
+.dashButton-w {
+    float: right;
+    margin: 10px;
+}
+
+.custom-control-label::after,
+.custom-control-label::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.fixedWidthLabel-w::after,
+.fixedWidthLabel-w::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.disblayBlock-w {
+    display: block;
+}
+
+/* .centerIneerItem {
+    display: flex;
+    justify-content: center;
+    text-align: center;
+} */

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

@@ -0,0 +1,83 @@
+<div class="container">
+
+  <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">تعريف تصنيفات العهد</li>
+      </ul>
+    </div>
+  </div>
+
+  <div class="containerContent-w">
+    <div class="row">
+      <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+        <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
+        <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()" *ngIf="authSer.showDeleteBtn"><i class="fas fa-times marginFontAowsome-w"></i>حذف</button>
+      </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)"/>
+          <hr>
+        </div>
+      </div>
+    </div>
+
+    <div class="row">
+        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+          <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>
+
+    <table class="table table-bordered" *ngIf="this.count != 0">
+      <thead class="headBackground-w">
+        <tr>
+          <th>
+            <div class="custom-control custom-checkbox">
+              <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
+            </div>
+          </th>
+         
+          <th>اسم التصنيف</th>
+          <th>اسم المادة او العهدة</th>
+          <th>العدد الموجود</th>
+          <th>فعال</th>
+
+          <th *ngIf="authSer.showEditBtn">تعديل</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
+          <td>
+            <div class="custom-control custom-checkbox centerIneerItem">
+              <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();">
+              <!-- <label class="custom-control-label disblayBlock-w" for="{{tab.id}}" style="color:#2a2a2a"></label> -->
+            </div>
+          </td>
+          <td>{{data.name}}</td>
+          <td>{{data.category_name}}</td>
+          <td>{{data.amount}}</td>
+          <td>{{data.status == '0' ? 'غير فعال' : data.status == '1' ? ' فعال' : 'not found'}}</td>
+        <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
+      </tr>
+    </tbody>
+  </table>
+  <div class="col-12" *ngIf="this.count == 0" >
+    <!-- taaaaaaaaaaable -->
+    <h2 class="title"> لا يوجد بيانات لعرضها </h2>
+
+  </div>
+  <pagination-controls nextLabel="التالي" previousLabel="السابق" (pageChange)="onPageChange($event)" *ngIf="this.count != 0"></pagination-controls>
+  </div>
+</div>

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

@@ -0,0 +1,281 @@
+import { AuthServiceService } from './../../../shared/auth-service.service';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Router, Params } from '@angular/router';
+import { DashboardService } from './../../../shared/dashboard.service';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { Modal } from 'ngx-modialog/plugins/bootstrap';
+import { UserService } from '../../../shared/user.service';
+import { ToastrService } from 'ngx-toastr';
+
+
+@Component({
+  selector: 'app-definition-of-covenants-list',
+  templateUrl: './definition-of-covenants-list.component.html',
+  styleUrls: ['./definition-of-covenants-list.component.css']
+})
+export class DefinitionOfCovenantsListComponent implements OnInit {
+
+  dataList = [];
+  pages= [];
+  pageId: number;
+  Ids = [];
+  count: number;
+  perPagePagenation: number;
+  currentPage:number = 1;
+  filtterStatus = 'all';
+  selectedAll: any;
+  userLoginId:number;
+  serviceId:number;
+  dataTableNumber: number = 5;
+  absorpationListIds = [];
+  dataListIds = [];
+
+  constructor(
+    private route: ActivatedRoute,
+    private router: Router,
+    private modal: Modal,
+    private userSer: UserService,
+    private spinner: NgxSpinnerService,
+    private authSer: AuthServiceService,
+    private toastr: ToastrService,
+    private dashboardSer: DashboardService,
+    private http: HttpClient
+  ) { }
+
+  ngOnInit() {
+
+           //init the values of permision boolean
+           this.authSer.showAddBtn = false;
+           this.authSer.showDeleteBtn = false;
+           this.authSer.showEditBtn = false;
+            //show / hide notification search in header
+            this.authSer.notificationLogin = true;
+            this.authSer.showSearchHeader = false;
+            this.authSer.showHeaderLogin = false;
+            this.authSer.showHeaderDashBoard = true;
+            this.authSer.showDashboardHeader = true;
+            this.authSer.internalHeader = false;
+            
+
+
+
+        this.route.params.subscribe(
+         (parmas: Params) => {
+           this.pageId =  +parmas['listPageId'];
+           localStorage.setItem('pageIdActive', parmas['listPageId']);
+           console.log(this.pageId);
+         }
+       );
+
+
+
+       this.route.parent.params.subscribe(
+        (params:Params) => {
+            this.userLoginId = params['userID'];
+            this.serviceId = params['serviceID'];
+           
+    
+            this.userSer.getPagesPermetiotns(this.userLoginId, this.serviceId).subscribe(
+              (responce) => {
+                console.log(responce);
+                this.pages = responce['pages'];
+                for(let i = 0; i< this.pages.length; i++) {
+                  if(this.pages[i].id == 64){
+                    if(this.pages[i]['permissions'][0].name == 'covenants') {
+                      this.authSer.showAddBtn = true;
+                      this.authSer.showEditBtn = true;
+                      this.authSer.showDeleteBtn = true;
+                    } else {
+                      console.log('no permissions');
+                    }
+                  } else {
+                    console.log('no events');
+                  }
+                }
+                this.spinner.hide();
+              },
+              (error) => {console.log(error)}
+            );
+          }
+        );
+
+        console.log('current page',this.pageId)
+        this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+          res => {
+            console.log(res);
+          this.dataList = res['covenants'];
+          this.count = res['count'];
+          this.perPagePagenation = res['per_page'];
+          },
+          err => {
+            console.log(err);
+            
+          }
+
+        );
+
+  }
+  selectAll() {
+    console.log('selected alllllll');
+    for(let i = 0; i < this.dataList.length; i++){
+      this.dataList[i].selected = this.selectedAll;
+    }
+  }
+  
+  checkIfAllSelected() {
+    this.selectedAll = this.absorpationListIds.every(function(item:any) {
+      return item.selected == true;
+    });
+  }
+  filtterFunc(data) {
+    this.dataList =[];
+    this.absorpationListIds = [];
+    console.log(data.target.value);
+    const dataSearch = data.target.value;     
+    this.currentPage = 1;
+    console.log('search curent page', this.currentPage);
+    console.log('search page id', this.pageId);
+    this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+      res => {
+        console.log(res);
+        this.dataList = res['covenants'];
+        console.log('hey',this.dataList)
+        this.count = res['count'];
+        this.perPagePagenation = res['per_page'];
+        console.log('filtter count', this.count);
+        console.log('filtter perPagePAgenation', this.perPagePagenation);
+      },
+      err => {
+        console.log(err);
+      }
+    );
+  };  
+
+  onPageChange(pagenationNumber) {
+    this.spinner.show();
+    this.currentPage = pagenationNumber;
+    this.absorpationListIds = [];
+    console.log(pagenationNumber);
+    console.log(this.pageId);
+    this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+      res => {
+        console.log(res);
+        this.dataList = res['covenants'];
+        this.count = res['count'];
+        this.perPagePagenation = res['per_page'];
+        console.log('FFFFFF', this.absorpationListIds);
+        this.spinner.hide();
+      },
+      err => {
+        console.log(err);
+        this.spinner.hide();
+      }
+    );
+  }
+
+  //determine the list count from select element 
+onGetValue(event) {
+  this.spinner.show();
+  this.absorpationListIds = [];
+  this.dataTableNumber = event.target.value;
+  this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    res => {
+      console.log(res);
+      this.absorpationListIds = res['covenants'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+    },
+    err => {
+      console.log(err);
+      this.spinner.hide();
+    }
+  );
+};
+onGetValueFiltter(event) {
+  console.log(event.target.value)
+  this.spinner.show();
+  this.dataList = [];
+  const typeId = event.target.value;
+  this.filtterStatus = event.target.value;
+  console.log(this.filtterStatus);
+  this.http.get(this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId).subscribe(
+    res => {
+      console.log(res);
+      this.dataList = res['covenants'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+      console.log('UrL>>', this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId)
+    },
+    err=> {
+      console.log(err);
+    }
+  );
+}
+
+
+onDelete() {
+
+  this.dataListIds = [];
+  for(let i = 0; i < this.dataList.length; i++) {
+    if(this.dataList[i].selected == true) {
+      this.dataListIds.push(this.dataList[i].id);
+    }
+  }
+  console.log(this.dataListIds);
+
+  if(this.dataListIds.length > 0) {
+    const dialogRef = this.modal.alert()
+    .size('sm')
+    .showClose(true)
+    .title('تأكيد الحذف')
+    .body(`
+        <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
+        `)
+    .open();
+
+      dialogRef.result
+      .then( result =>
+        this.dashboardSer.deleteItem(this.dataListIds , this.pageId).subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تم الحذف');
+            this.spinner.show();
+            this.dataList = [];
+             //get list data
+            this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+              (responce) => {
+                console.log(responce);
+                this.dataList = responce['covenants'];
+                this.count = responce['count'];
+                this.perPagePagenation = responce['per_page'];
+                this.spinner.hide();
+              },
+              (error) => {
+                console.log(error);
+                this.spinner.hide();
+              }
+            );
+          },
+          (error) => {
+            console.log(error);
+            this.spinner.hide();
+            },
+          )
+      );
+  } else {
+    this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
+  }
+};
+onAdd() {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'definitionOfConvenats']);
+  
+}
+
+onEdit(editId: number) {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'definitionOfConvenats/edit/' + editId]);
+}
+
+}

+ 1 - 1
src/app/dashboard/definition-of-location/location-add/location-add.component.html

@@ -48,7 +48,7 @@
               
           </div>
           <div class=" row col-6">
-              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid || checkSaveDisabled">حفظ</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>

+ 7 - 3
src/app/dashboard/definition-of-location/location-add/location-add.component.ts

@@ -31,7 +31,8 @@ export class LocationAddComponent implements OnInit {
   typePage: string = '';
   locations =[];
   valueType: string = '';
-  checkSaveclick:boolean = false;
+  checkSaveclick:boolean = true;
+  disable: boolean = false;
   check : boolean = false;
   isEdit: boolean = false;
   types = [
@@ -114,14 +115,17 @@ export class LocationAddComponent implements OnInit {
   }
   onSubmitted() {
     console.log('HERE',this.definitionForm.value);
+    this.disable = true;
     if(this.editPageId) {
       this.dashBoardSer.editItem(this.editPageId, this.definitionForm.value, 'definitionOfLocation').subscribe(
         (responce) => {
+          this.disable = true;
           console.log(responce);
           this.toastr.success('تم التعديل بنجاح');
           this.location.back();
         },
         (error) => {
+          this.disable = false;
           console.log(error);
           this.toastr.error('خطأ في الخادم ، رجاء المحارله لاحقا');
         }
@@ -131,12 +135,12 @@ export class LocationAddComponent implements OnInit {
       (responce) => {
         console.log('ADD',responce);
         this.toastr.success('تم الإضافه بنجاح');
-        this.checkSaveclick = false;
+        this.disable = true;
         this.location.back();
       },
       (error) => {
         console.log(error);
-        this.checkSaveclick = false;
+        this.disable = false;
         this.toastr.error('خطأ في الخادم ، حاول لاحقا');
       }
     );

+ 1 - 1
src/app/dashboard/definition-of-location/location-list/location-list.component.html

@@ -17,7 +17,7 @@
       </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>

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

@@ -110,11 +110,11 @@ export class LocationListComponent implements OnInit {
   }
 //make all checkbox of user checked 
 selectAll() {
-  for (var i = 0; i < this.absorpationListIds.length; i++) {
-    this.absorpationListIds[i].selected = this.selectedAll;
+  console.log('selected alllllll');
+  for(let i = 0; i < this.dataList.length; i++){
+    this.dataList[i].selected = this.selectedAll;
   }
 }
-
 checkIfAllSelected() {
   this.selectedAll = this.absorpationListIds.every(function(item:any) {
     return item.selected == true;

+ 2 - 2
src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.html

@@ -17,7 +17,7 @@
       </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>
@@ -64,7 +64,7 @@
             </div>
           </td>
           <td>{{data.name}}</td>
-          <td>{{data.period}}</td>
+          <td>{{data.period}} ساعة</td>
         <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
       </tr>
     </tbody>

+ 3 - 2
src/app/dashboard/definition-of-time/definition-time-list/definition-time-list.component.ts

@@ -113,8 +113,9 @@ export class DefinitionTimeListComponent implements OnInit {
   }
 //make all checkbox of user checked 
 selectAll() {
-  for (var i = 0; i < this.absorpationListIds.length; i++) {
-    this.absorpationListIds[i].selected = this.selectedAll;
+  console.log('selected alllllll');
+  for(let i = 0; i < this.dataList.length; i++){
+    this.dataList[i].selected = this.selectedAll;
   }
 }
 

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

@@ -65,7 +65,7 @@ export class HeaderComponent implements OnInit {
   onLogout() {
     localStorage.clear();
     //localStorage.setItem('token' , '');
-    this.router.navigate(['login']);
+    this.router.navigate(['auth/login']);
   }
 
   onInternalPage() {

+ 0 - 0
src/app/dashboard/living-service/living-service-add/living-service-add.component.css


+ 42 - 0
src/app/dashboard/living-service/living-service-add/living-service-add.component.html

@@ -0,0 +1,42 @@
+<div class="addDepartment-w">
+
+    
+  <div class="container">
+      <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>
+          </ul>
+        </div>
+      </div>
+
+    <div class="containerContent-w">
+        <form (ngSubmit)="onSubmitted()" #f="ngForm" style="margin-top: 40px;">
+            <div class="row">
+                <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/>
+                    </div>
+                  </div>
+              
+            <div class="col-12 col-sm-12 col-md-4">
+              <div class="form-group">
+                <label style="float: right; margin-right: 5px">الحاله</label>
+                <select class="form-control" name="status" [ngModel]="formData.status" required>
+                  <option value="1">فعال</option>
+                  <option value="0">غير فعال</option>
+                </select>
+              </div>
+            </div>
+              
+          </div>
+          <div class=" row col-6">
+              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+              <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
+          </div>
+        </form>
+    </div>
+  </div>
+</div>

+ 104 - 0
src/app/dashboard/living-service/living-service-add/living-service-add.component.ts

@@ -0,0 +1,104 @@
+import { HttpClient } from '@angular/common/http';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Params } from '@angular/router';
+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 { NgForm } from '@angular/forms';
+
+@Component({
+  selector: 'app-living-service-add',
+  templateUrl: './living-service-add.component.html',
+  styleUrls: ['./living-service-add.component.css']
+})
+export class LivingServiceAddComponent implements OnInit {
+
+  constructor(
+    private dashBoardSer: DashboardService,
+    private toastr: ToastrService,
+    private authSer: AuthServiceService,
+    private route: ActivatedRoute,
+    private spinner: NgxSpinnerService,
+    private location: Location,
+    private http: HttpClient
+  ) { }
+
+  @ViewChild('f') definitionForm : NgForm;
+
+  typePage: string = '';
+  locations =[];
+  valueType: string = '';
+  checkSaveclick:boolean = false;
+  check : boolean = false;
+  isEdit: boolean = false;
+  editPageId: number;
+
+  formData = {
+    name: '',
+    status: '1',
+  }
+
+
+  ngOnInit() {
+
+    this.route.params.subscribe(
+      (params: Params) => {
+        this.editPageId = +params['listPageEditId'];
+        console.log(this.editPageId);
+      }
+    );
+
+    if (this.editPageId) {
+      this.spinner.show();
+      this.isEdit = true;
+      this.typePage = 'تعديل';
+      this.dashBoardSer.getItemData(this.editPageId, 'livingService' ).subscribe(
+        res => {
+          console.log('ssss', res);
+          this.formData.name = res['covenant_category'].name;
+          this.formData.status  = res['covenant_category'].status;
+          this.spinner.hide();
+        },
+        err => {
+          console.log(err);
+        }
+      );
+    }else {
+      this.typePage = 'اضافة';
+    }
+
+  }
+  onSubmitted(){
+    console.log('HERE',this.definitionForm.value);
+    if(this.editPageId) {
+      this.dashBoardSer.editItem(this.editPageId, this.definitionForm.value, 'livingService').subscribe(
+        res => {
+          console.log(res);
+          this.toastr.success('تم التعديل بنجاح');
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.toastr.error('خطأ في الخادم ، رجاء المحارله لاحقا');
+        }
+      )
+    } else {
+      this.dashBoardSer.addItem( this.definitionForm.value , 'livingService').subscribe(
+        res => {
+          console.log('ADD',res);
+          this.toastr.success('تم الإضافه بنجاح');
+          this.checkSaveclick = false;
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.checkSaveclick = false;
+          this.toastr.error('خطأ في الخادم ، حاول لاحقا');
+        }
+      );
+      }
+  }
+
+}

+ 30 - 0
src/app/dashboard/living-service/living-service-list/living-service-list.component.css

@@ -0,0 +1,30 @@
+.table {
+    margin: 30px 0;
+}
+
+.dashButton-w {
+    float: right;
+    margin: 10px;
+}
+
+.custom-control-label::after,
+.custom-control-label::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.fixedWidthLabel-w::after,
+.fixedWidthLabel-w::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.disblayBlock-w {
+    display: block;
+}
+
+/* .centerIneerItem {
+    display: flex;
+    justify-content: center;
+    text-align: center;
+} */

+ 79 - 0
src/app/dashboard/living-service/living-service-list/living-service-list.component.html

@@ -0,0 +1,79 @@
+<div class="container">
+
+  <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">تعريف تصنيفات العهد</li>
+      </ul>
+    </div>
+  </div>
+
+  <div class="containerContent-w">
+    <div class="row">
+      <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+        <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
+        <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()" *ngIf="authSer.showDeleteBtn"><i class="fas fa-times marginFontAowsome-w"></i>حذف</button>
+      </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)"/>
+          <hr>
+        </div>
+      </div>
+    </div>
+
+    <div class="row">
+        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+          <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>
+
+    <table class="table table-bordered" *ngIf="this.count != 0">
+      <thead class="headBackground-w">
+        <tr>
+          <th>
+            <div class="custom-control custom-checkbox">
+              <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
+            </div>
+          </th>
+         
+          <th>اسم التصنيف</th>
+          <th>فعال</th>
+
+          <th *ngIf="authSer.showEditBtn">تعديل</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
+          <td>
+            <div class="custom-control custom-checkbox centerIneerItem">
+              <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();">
+              <!-- <label class="custom-control-label disblayBlock-w" for="{{tab.id}}" style="color:#2a2a2a"></label> -->
+            </div>
+          </td>
+          <td>{{data.name}}</td>
+          <td>{{data.status == '0' ? 'غير فعال' : data.status == '1' ? ' فعال' : 'not found'}}</td>
+        <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
+      </tr>
+    </tbody>
+  </table>
+  <div class="col-12" *ngIf="this.count == 0" >
+    <!-- taaaaaaaaaaable -->
+    <h2 class="title"> لا يوجد بيانات لعرضها </h2>
+
+  </div>
+  <pagination-controls nextLabel="التالي" previousLabel="السابق" (pageChange)="onPageChange($event)" *ngIf="this.count != 0"></pagination-controls>
+  </div>
+</div>

+ 279 - 0
src/app/dashboard/living-service/living-service-list/living-service-list.component.ts

@@ -0,0 +1,279 @@
+import { AuthServiceService } from './../../../shared/auth-service.service';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Router, Params } from '@angular/router';
+import { DashboardService } from './../../../shared/dashboard.service';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { Modal } from 'ngx-modialog/plugins/bootstrap';
+import { UserService } from '../../../shared/user.service';
+import { ToastrService } from 'ngx-toastr';
+
+@Component({
+  selector: 'app-living-service-list',
+  templateUrl: './living-service-list.component.html',
+  styleUrls: ['./living-service-list.component.css']
+})
+export class LivingServiceListComponent implements OnInit {
+
+  dataList = [];
+  pages= [];
+  pageId: number;
+  Ids = [];
+  count: number;
+  perPagePagenation: number;
+  currentPage:number = 1;
+  filtterStatus = 'all';
+  selectedAll: any;
+  userLoginId:number;
+  serviceId:number;
+  dataTableNumber: number = 5;
+  absorpationListIds = [];
+  dataListIds = [];
+
+  constructor(
+    private route: ActivatedRoute,
+    private router: Router,
+    private modal: Modal,
+    private userSer: UserService,
+    private spinner: NgxSpinnerService,
+    private authSer: AuthServiceService,
+    private toastr: ToastrService,
+    private dashboardSer: DashboardService,
+    private http: HttpClient
+  ) { }
+
+  ngOnInit() {
+           //init the values of permision boolean
+   this.authSer.showAddBtn = false;
+   this.authSer.showDeleteBtn = false;
+   this.authSer.showEditBtn = false;
+    //show / hide notification search in header
+    this.authSer.notificationLogin = true;
+    this.authSer.showSearchHeader = false;
+    this.authSer.showHeaderLogin = false;
+    this.authSer.showHeaderDashBoard = true;
+    this.authSer.showDashboardHeader = true;
+    this.authSer.internalHeader = false;
+    
+
+
+
+         this.route.params.subscribe(
+          (parmas: Params) => {
+            this.pageId =  +parmas['listPageId'];
+            localStorage.setItem('pageIdActive', parmas['listPageId']);
+            console.log(this.pageId);
+          }
+        );
+          
+
+        this.route.parent.params.subscribe(
+          (params:Params) => {
+              this.userLoginId = params['userID'];
+              this.serviceId = params['serviceID'];
+             
+      
+              this.userSer.getPagesPermetiotns(this.userLoginId, this.serviceId).subscribe(
+                (responce) => {
+                  console.log(responce);
+                  this.pages = responce['pages'];
+                  for(let i = 0; i< this.pages.length; i++) {
+                    if(this.pages[i].id == 63){
+                      if(this.pages[i]['permissions'][0].name == 'covenant_categories') {
+                        this.authSer.showAddBtn = true;
+                        this.authSer.showEditBtn = true;
+                        this.authSer.showDeleteBtn = true;
+                      } else {
+                        console.log('no permissions');
+                      }
+                    } else {
+                      console.log('no events');
+                    }
+                  }
+                  this.spinner.hide();
+                },
+                (error) => {console.log(error)}
+              );
+            }
+          );
+          console.log('current page',this.pageId)
+          this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+            res => {
+              console.log(res);
+              this.dataList = res['covenant_categories'];
+            this.count = res['count'];
+            this.perPagePagenation = res['per_page'];
+            },
+            err => {
+              console.log(err);
+              
+            }
+
+          );
+  
+  
+  }
+  //make all checkbox of user checked 
+selectAll() {
+  console.log('selected alllllll');
+  for(let i = 0; i < this.dataList.length; i++){
+    this.dataList[i].selected = this.selectedAll;
+  }
+}
+
+checkIfAllSelected() {
+  this.selectedAll = this.absorpationListIds.every(function(item:any) {
+    return item.selected == true;
+  });
+}
+
+filtterFunc(data) {
+  this.dataList =[];
+  this.absorpationListIds = [];
+  console.log(data.target.value);
+  const dataSearch = data.target.value;     
+  this.currentPage = 1;
+  console.log('search curent page', this.currentPage);
+  console.log('search page id', this.pageId);
+  this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    res => {
+      console.log(res);
+      this.dataList = res['covenant_categories'];
+      console.log('hey',this.dataList)
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      console.log('filtter count', this.count);
+      console.log('filtter perPagePAgenation', this.perPagePagenation);
+    },
+    err => {
+      console.log(err);
+    }
+  );
+};
+
+onPageChange(pagenationNumber) {
+  this.spinner.show();
+  this.currentPage = pagenationNumber;
+  this.absorpationListIds = [];
+  console.log(pagenationNumber);
+  console.log(this.pageId);
+  this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+    res => {
+      console.log(res);
+      this.dataList = res['covenant_categories'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      console.log('FFFFFF', this.absorpationListIds);
+      this.spinner.hide();
+    },
+    err => {
+      console.log(err);
+      this.spinner.hide();
+    }
+  );
+}
+
+//determine the list count from select element 
+onGetValue(event) {
+  this.spinner.show();
+  this.absorpationListIds = [];
+  this.dataTableNumber = event.target.value;
+  this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    res => {
+      console.log(res);
+      this.absorpationListIds = res['covenant_categories'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+    },
+    err => {
+      console.log(err);
+      this.spinner.hide();
+    }
+  );
+};
+
+onGetValueFiltter(event) {
+  console.log(event.target.value)
+  this.spinner.show();
+  this.dataList = [];
+  const typeId = event.target.value;
+  this.filtterStatus = event.target.value;
+  console.log(this.filtterStatus);
+  this.http.get(this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId).subscribe(
+    res => {
+      console.log(res);
+      this.dataList = res['covenant_categories'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+      console.log('UrL>>', this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId)
+    },
+    err=> {
+      console.log(err);
+    }
+  );
+}
+
+onDelete() {
+
+  this.dataListIds = [];
+  for(let i = 0; i < this.dataList.length; i++) {
+    if(this.dataList[i].selected == true) {
+      this.dataListIds.push(this.dataList[i].id);
+    }
+  }
+  console.log(this.dataListIds);
+
+  if(this.dataListIds.length > 0) {
+    const dialogRef = this.modal.alert()
+    .size('sm')
+    .showClose(true)
+    .title('تأكيد الحذف')
+    .body(`
+        <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
+        `)
+    .open();
+
+      dialogRef.result
+      .then( result =>
+        this.dashboardSer.deleteItem(this.dataListIds , this.pageId).subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تم الحذف');
+            this.spinner.show();
+            this.dataList = [];
+             //get list data
+            this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+              (responce) => {
+                console.log(responce);
+                this.dataList = responce['covenant_categories'];
+                this.count = responce['count'];
+                this.perPagePagenation = responce['per_page'];
+                this.spinner.hide();
+              },
+              (error) => {
+                console.log(error);
+                this.spinner.hide();
+              }
+            );
+          },
+          (error) => {
+            console.log(error);
+            this.spinner.hide();
+            },
+          )
+      );
+  } else {
+    this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
+  }
+};
+onAdd() {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'livingService/add']);
+}
+
+onEdit(editId: number) {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'livingService/edit/' + editId]);
+}
+
+}

+ 0 - 0
src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.css


+ 77 - 0
src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.html

@@ -0,0 +1,77 @@
+<div class="addDepartment-w">
+
+    
+  <div class="container">
+      <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>
+          </ul>
+        </div>
+      </div>
+
+    <div class="containerContent-w">
+        <form (ngSubmit)="onSubmitted()" #f="ngForm" style="margin-top: 40px;">
+            <div class="row">
+       
+          <div class="col-12 col-sm-12 col-md-4">
+            <div class="form-group">
+              <label for="complex_number" style="float: right; margin-right: 5px">رقم المجمع السكني<span class="spanReqired-w">*</span></label>
+              <input type="number" class="form-control" id="complex_number" name="complex_number" placeholder="رقم المجمع السكني" ngModel [(ngModel)]="formData.complex_number" required/>
+            </div>
+          </div>
+
+          <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/>
+            </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/>
+            </div>
+          </div>
+
+          <div class="col-12 col-sm-12 col-md-4" >
+            <div class="form-group">
+              <label style="float: right; margin-right: 5px">الحاله</label>
+              <select class="form-control" name="status" [(ngModel)]="formData.status" required>
+                <option value="1">فعال</option>
+                <option value="0">غير فعال</option>
+              </select>
+            </div>
+          </div>
+              
+          </div>
+          <div class="row">
+            <div class="ol-12">
+                <h3>انواع المباني</h3>
+            </div>
+          
+            <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_types" name="building.name" placeholder="نوع المنى" ngModel [(ngModel)]="building.name" required/>
+              </div>
+              <div class="col-4">
+                  <input type="number" class="form-control" id="building_types" name="building.value" placeholder="عدد المبنى" ngModel [(ngModel)]="building.value" required/>
+              </div>
+              <div class="col-3">
+                  <button type="button" class="btn btn-danger" (click)="onDeleteRow(i)" style="margin: 10px 15px;">حذف</button>
+              </div>
+              </div>
+            </div>
+            <button type="button" class="btn btn-success rightW"  (click)="plusBuilding()">اضافة نوع جديد</button>
+          </div>
+          <div class=" row col-6">
+              <button type="submit" class="btn btn-success rightW" [disabled]="!f.valid">حفظ</button>
+              <button type="button" class="btn btn-warning rightW" (click)="authSer.backFromEdit()">إلغاء</button>
+          </div>
+        </form>
+    </div>
+  </div>
+</div>

+ 132 - 0
src/app/dashboard/record-info-building/record-info-building-add/record-info-building-add.component.ts

@@ -0,0 +1,132 @@
+import { HttpClient } from '@angular/common/http';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Params } from '@angular/router';
+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 { NgForm } from '@angular/forms';
+
+
+@Component({
+  selector: 'app-record-info-building-add',
+  templateUrl: './record-info-building-add.component.html',
+  styleUrls: ['./record-info-building-add.component.css']
+})
+export class RecordInfoBuildingAddComponent implements OnInit {
+
+  constructor(
+    private dashBoardSer: DashboardService,
+    private toastr: ToastrService,
+    private authSer: AuthServiceService,
+    private route: ActivatedRoute,
+    private spinner: NgxSpinnerService,
+    private location: Location,
+    private http: HttpClient
+  ) { }
+
+  @ViewChild('f') definitionForm : NgForm;
+
+  typePage: string = '';
+  locations =[];
+  valueType: string = '';
+  checkSaveclick:boolean = false;
+  check : boolean = false;
+  isEdit: boolean = false;
+  editPageId: number;
+
+  formData = {
+    complex_number : '',
+    name : '',
+    land_area : '',
+    status: '',
+    building_types:[
+      {
+        name : '',
+        value : ''
+      }
+    ]
+  }
+  
+
+  ngOnInit() {
+
+    this.route.params.subscribe(
+      (params: Params) => {
+        this.editPageId = +params['listPagEditId'];
+        console.log(this.editPageId);
+      }
+    );
+
+    if (this.editPageId) {
+      this.spinner.show();
+      this.isEdit = true;
+      this.typePage = 'تعديل';
+      this.dashBoardSer.getItemData(this.editPageId, 'recordInfoBuilding' ).subscribe(
+        res => {
+          console.log('ssss', res);
+          const array =this.formData.building_types;
+          this.formData.name = res['housing_complex'].complex_number;
+          this.formData.name = res['housing_complex'].name;
+          this.formData.name = res['housing_complex'].land_area;
+          this.formData.status  = res['housing_complex'].status;
+          for (let i = 0,n = array.length; i < n ; i++) {
+           array[i] = res['housing_complex'].building_types[i];
+            
+          }
+          this.spinner.hide();
+        },
+        err => {
+          console.log(err);
+        }
+      );
+    }else {
+      this.typePage = 'اضافة';
+    }
+  }
+  plusBuilding(){
+    this.formData.building_types.push({
+      name:'',
+      value:''
+    });
+    console.log('forms after plus' , this.formData.building_types);
+     }
+     onDeleteRow(index:number) {
+      this.formData.building_types.splice(index , 1);
+      console.log('files after delete ',this.formData.building_types);
+    }
+    onSubmitted(){
+    console.log('HERE',this.definitionForm.value);
+    console.log(this.formData);
+    
+    if(this.editPageId) {
+      this.dashBoardSer.editItem(this.editPageId, this.definitionForm.value, 'recordInfoBuilding').subscribe(
+        res => {
+          console.log(res);
+          this.toastr.success('تم التعديل بنجاح');
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.toastr.error('خطأ في الخادم ، رجاء المحارله لاحقا');
+        }
+      )
+    } else {
+      this.dashBoardSer.addItem( this.definitionForm.value , 'recordInfoBuilding').subscribe(
+        res => {
+          console.log('ADD',res);
+          this.toastr.success('تم الإضافه بنجاح');
+          this.checkSaveclick = false;
+          this.location.back();
+        },
+        err => {
+          console.log(err);
+          this.checkSaveclick = false;
+          this.toastr.error('خطأ في الخادم ، حاول لاحقا');
+        }
+      );
+      }
+  }
+
+}

+ 30 - 0
src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.css

@@ -0,0 +1,30 @@
+.table {
+    margin: 30px 0;
+}
+
+.dashButton-w {
+    float: right;
+    margin: 10px;
+}
+
+.custom-control-label::after,
+.custom-control-label::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.fixedWidthLabel-w::after,
+.fixedWidthLabel-w::before {
+    width: 1.5rem;
+    height: 1.5rem;
+}
+
+.disblayBlock-w {
+    display: block;
+}
+
+/* .centerIneerItem {
+    display: flex;
+    justify-content: center;
+    text-align: center;
+} */

+ 89 - 0
src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.html

@@ -0,0 +1,89 @@
+<div class="container">
+
+  <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">تعريف تصنيفات العهد</li>
+      </ul>
+    </div>
+  </div>
+
+  <div class="containerContent-w">
+    <div class="row">
+      <div class="col-12 col-sm-12 col-md-6 col-lg-6">
+        <button type="button" class="btn btn-outline-success butttonCreate dashButton-w" (click)="onAdd()" *ngIf="authSer.showAddBtn"><i class="fas fa-plus marginFontAowsome-w"></i>إنشاء جديد</button>
+        <button type="button" class="btn btn-outline-danger butttonDelete dashButton-w" (click)="onDelete()" *ngIf="authSer.showDeleteBtn"><i class="fas fa-times marginFontAowsome-w"></i>حذف</button>
+      </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)"/>
+          <hr>
+        </div>
+      </div>
+    </div>
+
+    <div class="row">
+        <div class="col-12 col-sm-12 col-md-12 col-lg-6">
+          <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>
+
+    <table class="table table-bordered" *ngIf="this.count != 0">
+      <thead class="headBackground-w">
+        <tr>
+          <th>
+            <div class="custom-control custom-checkbox">
+              <input type="checkbox" class="custom-control-input" [(ngModel)]="selectedAll" (change)="selectAll();" id="customCheck" name="example1">
+            </div>
+          </th>
+         
+          <th>رقم المجمع السكني</th>
+          <th>اسم المجمع السكني</th>
+          <th>عدد المباني</th>
+          <th>عدد الفلل</th>
+          <th>عدد العمائر</th>
+          <th>مساحة الأرض الإجمالية</th>
+          <th>فعال</th>
+
+          <th *ngIf="authSer.showEditBtn">تعديل</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of dataList | paginate: { itemsPerPage: perPagePagenation, currentPage: currentPage, totalItems: count }; let i = index ">
+          <td>
+            <div class="custom-control custom-checkbox centerIneerItem">
+              <input type="checkbox" class="custom-control-input" id="{{data.id}}" [(ngModel)]="data.selected" [value]='data' (change)="checkIfAllSelected();">
+              <!-- <label class="custom-control-label disblayBlock-w" for="{{tab.id}}" style="color:#2a2a2a"></label> -->
+            </div>
+          </td>
+          <td>{{data.complex_number}}</td>
+          <td>{{data.name}}</td>
+          <td>{{data.buildings_number}}</td>
+          <td>{{data.villas_number}}</td>
+          <td>{{data.mini_buildings_number}}</td>
+          <td>{{data.land_area}}</td>
+          <td>{{data.status == '0' ? 'غير فعال' : data.status == '1' ? ' فعال' : 'not found'}}</td>
+        <td *ngIf="authSer.showEditBtn"><button type="button" class="btn btn-outline-secondary" (click)="onEdit(data.id)"><i class="fas fa-edit"></i></button></td>
+      </tr>
+    </tbody>
+  </table>
+  <div class="col-12" *ngIf="this.count == 0" >
+    <!-- taaaaaaaaaaable -->
+    <h2 class="title"> لا يوجد بيانات لعرضها </h2>
+
+  </div>
+  <pagination-controls nextLabel="التالي" previousLabel="السابق" (pageChange)="onPageChange($event)" *ngIf="this.count != 0"></pagination-controls>
+  </div>
+</div>

+ 278 - 0
src/app/dashboard/record-info-building/record-info-building-list/record-info-building-list.component.ts

@@ -0,0 +1,278 @@
+import { AuthServiceService } from './../../../shared/auth-service.service';
+import { NgxSpinnerService } from 'ngx-spinner';
+import { ActivatedRoute, Router, Params } from '@angular/router';
+import { DashboardService } from './../../../shared/dashboard.service';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { Modal } from 'ngx-modialog/plugins/bootstrap';
+import { UserService } from '../../../shared/user.service';
+import { ToastrService } from 'ngx-toastr';
+
+@Component({
+  selector: 'app-record-info-building-list',
+  templateUrl: './record-info-building-list.component.html',
+  styleUrls: ['./record-info-building-list.component.css']
+})
+export class RecordInfoBuildingListComponent implements OnInit {
+
+  dataList = [];
+  pages= [];
+  pageId: number;
+  Ids = [];
+  count: number;
+  perPagePagenation: number;
+  currentPage:number = 1;
+  filtterStatus = 'all';
+  selectedAll: any;
+  userLoginId:number;
+  serviceId:number;
+  dataTableNumber: number = 5;
+  absorpationListIds = [];
+  dataListIds = [];
+
+
+  constructor(
+    private route: ActivatedRoute,
+    private router: Router,
+    private modal: Modal,
+    private userSer: UserService,
+    private spinner: NgxSpinnerService,
+    private authSer: AuthServiceService,
+    private toastr: ToastrService,
+    private dashboardSer: DashboardService,
+    private http: HttpClient
+  ) { }
+
+  ngOnInit() {
+
+            //init the values of permision boolean
+   this.authSer.showAddBtn = true;
+   this.authSer.showDeleteBtn = true;
+   this.authSer.showEditBtn = true;
+    //show / hide notification search in header
+    this.authSer.notificationLogin = true;
+    this.authSer.showSearchHeader = false;
+    this.authSer.showHeaderLogin = false;
+    this.authSer.showHeaderDashBoard = true;
+    this.authSer.showDashboardHeader = true;
+    this.authSer.internalHeader = false;
+
+    this.route.params.subscribe(
+      (parmas: Params) => {
+        this.pageId =  +parmas['listPageId'];
+        localStorage.setItem('pageIdActive', parmas['listPageId']);
+        console.log(this.pageId);
+      }
+    );
+      
+    this.route.parent.params.subscribe(
+      (params:Params) => {
+          this.userLoginId = params['userID'];
+          this.serviceId = params['serviceID'];
+         
+  
+          this.userSer.getPagesPermetiotns(this.userLoginId, this.serviceId).subscribe(
+            (responce) => {
+              console.log(responce);
+              this.pages = responce['pages'];
+              for(let i = 0; i< this.pages.length; i++) {
+                if(this.pages[i].id == 63){
+                  if(this.pages[i]['permissions'][0].name == 'housing_complexes_information') {
+                    this.authSer.showAddBtn = true;
+                    this.authSer.showEditBtn = true;
+                    this.authSer.showDeleteBtn = true;
+                  } else {
+                    console.log('no permissions');
+                  }
+                } else {
+                  console.log('no events');
+                }
+              }
+              this.spinner.hide();
+            },
+            (error) => {console.log(error)}
+          );
+        }
+      );
+
+      console.log('current page',this.pageId)
+      this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+        res => {
+          console.log('',res);
+          this.dataList = res['housing_complexes'];
+          this.count = res['count'];
+          this.perPagePagenation = res['per_page'];
+        },
+        err => {
+          console.log(err);
+          
+        }
+
+      );
+
+  }
+
+  selectAll() {
+    console.log('selected alllllll');
+    for(let i = 0; i < this.dataList.length; i++){
+      this.dataList[i].selected = this.selectedAll;
+    }
+  }
+  
+  checkIfAllSelected() {
+    this.selectedAll = this.absorpationListIds.every(function(item:any) {
+      return item.selected == true;
+    });
+  }
+
+
+  filtterFunc(data) {
+    this.dataList =[];
+    this.absorpationListIds = [];
+    console.log(data.target.value);
+    const dataSearch = data.target.value;     
+    this.currentPage = 1;
+    console.log('search curent page', this.currentPage);
+    console.log('search page id', this.pageId);
+    this.dashboardSer.getDataUSerSearchBar(dataSearch, this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+      res => {
+        console.log(res);
+        this.dataList = res['housing_complexes'];
+        console.log('hey',this.dataList)
+        this.count = res['count'];
+        this.perPagePagenation = res['per_page'];
+        console.log('filtter count', this.count);
+        console.log('filtter perPagePAgenation', this.perPagePagenation);
+      },
+      err => {
+        console.log(err);
+      }
+    );
+  };
+
+  onPageChange(pagenationNumber) {
+    this.spinner.show();
+    this.currentPage = pagenationNumber;
+    this.absorpationListIds = [];
+    console.log(pagenationNumber);
+    console.log(this.pageId);
+    this.dashboardSer.getListData(this.pageId, pagenationNumber, this.dataTableNumber).subscribe(
+      res => {
+        console.log(res);
+        this.dataList = res['housing_complexes'];
+        this.count = res['count'];
+        this.perPagePagenation = res['per_page'];
+        console.log('FFFFFF', this.absorpationListIds);
+        this.spinner.hide();
+      },
+      err => {
+        console.log(err);
+        this.spinner.hide();
+      }
+    );
+  }
+
+  //determine the list count from select element 
+onGetValue(event) {
+  this.spinner.show();
+  this.absorpationListIds = [];
+  this.dataTableNumber = event.target.value;
+  this.dashboardSer.getListData(this.pageId, this.currentPage, this.dataTableNumber).subscribe(
+    res => {
+      console.log(res);
+      this.absorpationListIds = res['housing_complexes'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+    },
+    err => {
+      console.log(err);
+      this.spinner.hide();
+    }
+  );
+};
+
+onGetValueFiltter(event) {
+  console.log(event.target.value)
+  this.spinner.show();
+  this.dataList = [];
+  const typeId = event.target.value;
+  this.filtterStatus = event.target.value;
+  console.log(this.filtterStatus);
+  this.http.get(this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId).subscribe(
+    res => {
+      console.log(res);
+      this.dataList = res['housing_complexes'];
+      this.count = res['count'];
+      this.perPagePagenation = res['per_page'];
+      this.spinner.hide();
+      console.log('UrL>>', this.authSer.pathApi +'/page_list/' + this.pageId + '/' + this.currentPage + '/' + this.dataTableNumber + '/' + typeId)
+    },
+    err=> {
+      console.log(err);
+    }
+  );
+}
+onDelete() {
+
+  this.dataListIds = [];
+  for(let i = 0; i < this.dataList.length; i++) {
+    if(this.dataList[i].selected == true) {
+      this.dataListIds.push(this.dataList[i].id);
+    }
+  }
+  console.log(this.dataListIds);
+
+  if(this.dataListIds.length > 0) {
+    const dialogRef = this.modal.alert()
+    .size('sm')
+    .showClose(true)
+    .title('تأكيد الحذف')
+    .body(`
+        <h4>هل ترغب في حذف العناصر المحدده ؟ </h4>
+        `)
+    .open();
+
+      dialogRef.result
+      .then( result =>
+        this.dashboardSer.deleteItem(this.dataListIds , this.pageId).subscribe(
+          (responce) => {
+            console.log(responce);
+            this.toastr.success('تم الحذف');
+            this.spinner.show();
+            this.dataList = [];
+             //get list data
+            this.dashboardSer.getListData(this.pageId, this.currentPage ,this.dataTableNumber).subscribe(
+              (responce) => {
+                console.log(responce);
+                this.dataList = responce['housing_complexes'];
+                this.count = responce['count'];
+                this.perPagePagenation = responce['per_page'];
+                this.spinner.hide();
+              },
+              (error) => {
+                console.log(error);
+                this.spinner.hide();
+              }
+            );
+          },
+          (error) => {
+            console.log(error);
+            this.spinner.hide();
+            },
+          )
+      );
+  } else {
+    this.toastr.warning('لم يتم إختيار أي عنصر للمسح !');
+  }
+};
+onAdd() {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'recordInfoBuilding']);
+}
+
+onEdit(editId: number) {
+  this.router.navigate(['service/' + this.userLoginId + '/' + this.serviceId + '/' + 'recordInfoBuilding/edit/' + editId]);
+}
+
+
+}

+ 7 - 0
src/app/dashboard/service-item/service-item.component.ts

@@ -451,9 +451,16 @@ export class ServiceItemComponent implements OnInit {
       this.router.navigate(['reportCurrentEmployeeOfficer'], {relativeTo: this.route});
     } else if(dataPage.id == 62) {
       this.router.navigate(['reportCommunication'], {relativeTo: this.route});
+    }else if(dataPage.id == 63) {
+      this.router.navigate(['livingServiceList/' + dataPage.id], {relativeTo: this.route});
+    }else if(dataPage.id == 64) {
+      this.router.navigate(['definitionOfConvenats/' + dataPage.id], {relativeTo: this.route});
+    }else if(dataPage.id == 65) {
+      this.router.navigate(['recordInfoBuilding/' + dataPage.id], {relativeTo: this.route});
     }
     
   }
+  // livingService
 
   onAddUser() {
     this.router.navigate(['addUser'],  {relativeTo: this.route});

+ 21 - 0
src/app/servicesItems/services.component.ts

@@ -265,6 +265,27 @@ getDataService(dataService){
           console.log(error);
         }
       );
+      //خدمة السكن
+     }else if(dataService.id == 7){
+       this.userservice.getPagesPermetiotns(this.idUser, dataService.id).subscribe(
+         res => {
+           console.log(res);
+           this.pages = res['pages'];
+           console.log(this.pages);
+           if(this.pages[0].id == 63) {
+            this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/livingServiceList/' + this.pages[0].id]);
+           }else if (this.pages[0].id == 64){
+            this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/definitionOfConvenats/' + this.pages[0].id]);            
+           }else if (this.pages[0].id == 65){
+            this.router.navigate(['/service/' + this.idUser + '/' + dataService.id + '/recordInfoBuilding/' + this.pages[0].id]);            
+           }
+           
+         },
+         err => {
+           console.log(err);
+           
+         }
+       );
      }
   }
 

+ 27 - 2
src/app/shared/dashboard.service.ts

@@ -107,10 +107,16 @@ export class DashboardService {
         return this.http.post(this.authService.pathApi + '/add_location', data);
       }else if(addType == 'definitionOfTime') {
         return this.http.post(this.authService.pathApi + '/add_time_period', data);
+      }else if(addType == 'livingService') {
+        return this.http.post(this.authService.pathApi + '/add_covenant_category', data);
+      }else if(addType == 'definitionOfCovenant') {
+        return this.http.post(this.authService.pathApi + '/add_covenant', data);
+      }else if(addType == 'recordInfoBuilding') {
+        return this.http.post(this.authService.pathApi + '/add_housing_complex', data);
       }
     }
 
-    //edit event
+    //edit event 
     editItem(editId,dataEdit,editPageName){
       const editData = dataEdit;
       console.log(editId);
@@ -187,10 +193,16 @@ export class DashboardService {
         return this.http.post(this.authService.pathApi + '/edit_location', editData);
       }else if(editPageName == 'definitionOfTime') {
         return this.http.post(this.authService.pathApi + '/edit_time_period', editData);
+      }else if(editPageName == 'livingService') {
+        return this.http.post(this.authService.pathApi + '/edit_covenant_category', editData);
+      }else if(editPageName == 'definitionOfCovenant') {
+        return this.http.post(this.authService.pathApi + '/edit_covenant', editData);
+      }else if(editPageName == 'recordInfoBuilding') {
+        return this.http.post(this.authService.pathApi + '/edit_housing_complex', editData);
       }
     }
     
-    //get item data
+    //get item data 
     getItemData(pageId: number, typeGetData:string) {
       console.log('wwwwwwwwwwwwwwwwwwwwwwwwwwww', pageId);
       if(typeGetData == 'advertisiment') {
@@ -249,6 +261,12 @@ export class DashboardService {
         return this.http.get(this.authService.pathApi + '/get_time_period/' + pageId);
       } else if(typeGetData == 'maintenance') {
         return this.http.get(this.authService.pathApi + '/get_communication/' + pageId);
+      } else if(typeGetData == 'livingService') {
+        return this.http.get(this.authService.pathApi + '/get_covenant_category/' + pageId);
+      }else if(typeGetData == 'definitionOfCovenant') {
+        return this.http.get(this.authService.pathApi + '/get_covenant/' + pageId);
+      }else if(typeGetData == 'recordInfoBuilding') {
+        return this.http.get(this.authService.pathApi + '/get_housing_complex/' + pageId);
       }
   }
     //delete event
@@ -317,9 +335,16 @@ export class DashboardService {
         return this.http.post(this.authService.pathApi + '/delete_location', {'locations_id' : dataIds});
       }else if(pageId == 53) {
         return this.http.post(this.authService.pathApi + '/delete_time_period', {'time_periods_id' : dataIds});
+      }else if(pageId == 63) {
+        return this.http.post(this.authService.pathApi + '/delete_covenant_category', {'covenant_category_ids' : dataIds});
+      }else if(pageId == 64) {
+        return this.http.post(this.authService.pathApi + '/delete_covenant', {'covenant_ids' : dataIds});
+      }else if(pageId == 65) {
+        return this.http.post(this.authService.pathApi + '/delete_housing_complex', {'housing_complex_ids' : dataIds});
       }
 
 
+
     };