{"ast":null,"code":"import { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { ErrorModalComponent } from 'src/app/shared/modals/error-modal/error-modal.component';\nimport { SuccessModalComponent } from 'src/app/shared/modals/success-modal/success-modal.component';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"src/app/shared/services/repository.service\";\nimport * as i2 from \"src/app/shared/services/repository-error-handler.service\";\nimport * as i3 from \"@angular/router\";\nimport * as i4 from \"src/app/shared/services/dialog.service\";\nimport * as i5 from \"ngx-bootstrap/modal\";\nimport * as i6 from \"src/app/shared/services/authentication.service\";\nconst _c0 = () => [\"/ui-components/add-employee\"];\nconst _c1 = () => [2, 4, 6, 10, 20];\nfunction EmployeeComponent_th_13_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 21);\n    i0.ɵɵtext(1, \" Ad \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_14_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"td\", 22);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n  if (rf & 2) {\n    const element_r1 = ctx.$implicit;\n    i0.ɵɵadvance();\n    i0.ɵɵtextInterpolate1(\" \", element_r1.firstName, \" \");\n  }\n}\nfunction EmployeeComponent_th_16_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 21);\n    i0.ɵɵtext(1, \" Soyad \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_17_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"td\", 22);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n  if (rf & 2) {\n    const element_r2 = ctx.$implicit;\n    i0.ɵɵadvance();\n    i0.ɵɵtextInterpolate1(\" \", element_r2.lastName, \" \");\n  }\n}\nfunction EmployeeComponent_th_19_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 21);\n    i0.ɵɵtext(1, \" \\u00C7al\\u0131\\u015Fan Say\\u0131s\\u0131 \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_20_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"td\", 22);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n  if (rf & 2) {\n    const element_r3 = ctx.$implicit;\n    i0.ɵɵadvance();\n    i0.ɵɵtextInterpolate1(\" \", element_r3.employeeNumber, \" \");\n  }\n}\nfunction EmployeeComponent_th_22_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 21);\n    i0.ɵɵtext(1, \" \\u00DCnvan \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_23_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"td\", 22);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n  if (rf & 2) {\n    const element_r4 = ctx.$implicit;\n    i0.ɵɵadvance();\n    i0.ɵɵtextInterpolate1(\" \", element_r4.position, \" \");\n  }\n}\nfunction EmployeeComponent_th_25_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 21);\n    i0.ɵɵtext(1, \" E-mail \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_26_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"td\", 22);\n    i0.ɵɵtext(1);\n    i0.ɵɵelementEnd();\n  }\n  if (rf & 2) {\n    const element_r5 = ctx.$implicit;\n    i0.ɵɵadvance();\n    i0.ɵɵtextInterpolate1(\" \", element_r5.email, \" \");\n  }\n}\nfunction EmployeeComponent_th_28_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 23);\n    i0.ɵɵtext(1, \" Cihazlar \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_29_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r6 = i0.ɵɵgetCurrentView();\n    i0.ɵɵelementStart(0, \"td\", 22)(1, \"button\", 24);\n    i0.ɵɵlistener(\"click\", function EmployeeComponent_td_29_Template_button_click_1_listener() {\n      const element_r7 = i0.ɵɵrestoreView(_r6).$implicit;\n      const ctx_r7 = i0.ɵɵnextContext();\n      return i0.ɵɵresetView(ctx_r7.redirectToDetails(element_r7.id));\n    });\n    i0.ɵɵelementStart(2, \"mat-icon\", 25);\n    i0.ɵɵtext(3, \"devices\");\n    i0.ɵɵelementEnd()()();\n  }\n}\nfunction EmployeeComponent_th_31_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 23);\n    i0.ɵɵtext(1, \" G\\u00FCncelle \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_32_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r9 = i0.ɵɵgetCurrentView();\n    i0.ɵɵelementStart(0, \"td\", 22)(1, \"button\", 24);\n    i0.ɵɵlistener(\"click\", function EmployeeComponent_td_32_Template_button_click_1_listener() {\n      const element_r10 = i0.ɵɵrestoreView(_r9).$implicit;\n      const ctx_r7 = i0.ɵɵnextContext();\n      return i0.ɵɵresetView(ctx_r7.redirectToUpdate(element_r10.id));\n    });\n    i0.ɵɵelementStart(2, \"mat-icon\", 25);\n    i0.ɵɵtext(3, \"system_update\");\n    i0.ɵɵelementEnd()()();\n  }\n}\nfunction EmployeeComponent_th_34_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelementStart(0, \"th\", 23);\n    i0.ɵɵtext(1, \" Sil \");\n    i0.ɵɵelementEnd();\n  }\n}\nfunction EmployeeComponent_td_35_Template(rf, ctx) {\n  if (rf & 1) {\n    const _r11 = i0.ɵɵgetCurrentView();\n    i0.ɵɵelementStart(0, \"td\", 22)(1, \"button\", 26);\n    i0.ɵɵlistener(\"click\", function EmployeeComponent_td_35_Template_button_click_1_listener() {\n      const element_r12 = i0.ɵɵrestoreView(_r11).$implicit;\n      const ctx_r7 = i0.ɵɵnextContext();\n      return i0.ɵɵresetView(ctx_r7.deleteEmployee(element_r12.id));\n    });\n    i0.ɵɵelementStart(2, \"mat-icon\", 25);\n    i0.ɵɵtext(3, \"delete\");\n    i0.ɵɵelementEnd()()();\n  }\n}\nfunction EmployeeComponent_tr_36_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelement(0, \"tr\", 27);\n  }\n}\nfunction EmployeeComponent_tr_37_Template(rf, ctx) {\n  if (rf & 1) {\n    i0.ɵɵelement(0, \"tr\", 28);\n  }\n}\nexport class EmployeeComponent {\n  constructor(repoService, errorService, router, dialogService, modalService, authService) {\n    this.repoService = repoService;\n    this.errorService = errorService;\n    this.router = router;\n    this.dialogService = dialogService;\n    this.modalService = modalService;\n    this.authService = authService;\n    this.errorMessage = '';\n    this.displayedColumns = ['firstName', 'lastName', 'employeeNumber', 'position', 'email', 'devices', 'update', 'delete'];\n    this.dataSource = new MatTableDataSource();\n    this.getAllEmployees = () => {\n      this.repoService.getData('api/employees').subscribe(res => {\n        this.dataSource.data = res;\n      }, error => {\n        this.errorService.handleError(error);\n      });\n    };\n    this.doFilter = value => {\n      this.dataSource.filter = value.trim().toLocaleLowerCase();\n    };\n    this.redirectToUpdate = id => {\n      this.router.navigate([`/ui-components/update-employee/${id}`]);\n    };\n    this.redirectToDetails = id => {\n      this.router.navigate([`/ui-components/employee-device/${id}`]);\n    };\n  }\n  ngOnInit() {\n    this.getAllEmployees();\n  }\n  ngAfterViewInit() {\n    this.dataSource.sort = this.sort;\n    this.dataSource.paginator = this.paginator;\n  }\n  deleteEmployee(id) {\n    if (this.authService.isUserAdmin()) {\n      this.dialogService.openConfirmDialog('Are you sure you want to delete this employee?').afterClosed().subscribe(res => {\n        if (res) {\n          const deleteUri = `api/employees/${id}`;\n          this.repoService.delete(deleteUri).subscribe(() => {\n            const config = {\n              initialState: {\n                modalHeaderText: 'Success Message',\n                modalBodyText: `Employee deleted successfully`,\n                okButtonText: 'OK'\n              }\n            };\n            this.bsModalRef = this.modalService.show(SuccessModalComponent, config);\n            this.bsModalRef.content.redirectOnOk.subscribe(() => this.getAllEmployees());\n          });\n        }\n      });\n    } else {\n      const config = {\n        initialState: {\n          modalHeaderText: 'Error Message',\n          modalBodyText: 'Only Admin allowed',\n          okButtonText: 'OK'\n        }\n      };\n      this.modalService.show(ErrorModalComponent, config);\n    }\n  }\n  static #_ = this.ɵfac = function EmployeeComponent_Factory(t) {\n    return new (t || EmployeeComponent)(i0.ɵɵdirectiveInject(i1.RepositoryService), i0.ɵɵdirectiveInject(i2.RepositoryErrorHandlerService), i0.ɵɵdirectiveInject(i3.Router), i0.ɵɵdirectiveInject(i4.DialogService), i0.ɵɵdirectiveInject(i5.BsModalService), i0.ɵɵdirectiveInject(i6.AuthenticationService));\n  };\n  static #_2 = this.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n    type: EmployeeComponent,\n    selectors: [[\"app-employee\"]],\n    viewQuery: function EmployeeComponent_Query(rf, ctx) {\n      if (rf & 1) {\n        i0.ɵɵviewQuery(MatSort, 5);\n        i0.ɵɵviewQuery(MatPaginator, 5);\n      }\n      if (rf & 2) {\n        let _t;\n        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.sort = _t.first);\n        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.paginator = _t.first);\n      }\n    },\n    decls: 39,\n    vars: 8,\n    consts: [[1, \"cardWithShadow\", \"theme-card\"], [1, \"m-b-0\"], [1, \"flex-1-auto\"], [\"mat-flat-button\", \"\", \"color\", \"primary\", \"matTooltipPosition\", \"left\", \"matTooltipHideDelay\", \"100000\", 1, \"m-l-8\", 3, \"routerLink\"], [1, \"b-t-1\"], [1, \"table-responsive\", \"m-t-16\"], [\"mat-table\", \"\", \"matSort\", \"\", \"matSortStart\", \"desc\", 3, \"dataSource\"], [\"matColumnDef\", \"firstName\"], [\"mat-header-cell\", \"\", \"mat-sort-header\", \"\", 4, \"matHeaderCellDef\"], [\"mat-cell\", \"\", 4, \"matCellDef\"], [\"matColumnDef\", \"lastName\"], [\"matColumnDef\", \"employeeNumber\"], [\"matColumnDef\", \"position\"], [\"matColumnDef\", \"email\"], [\"matColumnDef\", \"devices\"], [\"mat-header-cell\", \"\", 4, \"matHeaderCellDef\"], [\"matColumnDef\", \"update\"], [\"matColumnDef\", \"delete\"], [\"mat-header-row\", \"\", 4, \"matHeaderRowDef\"], [\"mat-row\", \"\", 4, \"matRowDef\", \"matRowDefColumns\"], [3, \"pageSize\", \"pageSizeOptions\"], [\"mat-header-cell\", \"\", \"mat-sort-header\", \"\"], [\"mat-cell\", \"\"], [\"mat-header-cell\", \"\"], [\"mat-icon-button\", \"\", \"color\", \"accent\", 3, \"click\"], [1, \"mat-18\"], [\"mat-icon-button\", \"\", \"color\", \"warn\", 3, \"click\"], [\"mat-header-row\", \"\"], [\"mat-row\", \"\"]],\n    template: function EmployeeComponent_Template(rf, ctx) {\n      if (rf & 1) {\n        i0.ɵɵelementStart(0, \"mat-card\", 0)(1, \"mat-card-header\")(2, \"mat-card-title\", 1);\n        i0.ɵɵtext(3, \"\\u00C7al\\u0131\\u015Fanlar\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(4, \"span\", 2);\n        i0.ɵɵelementStart(5, \"button\", 3)(6, \"mat-icon\");\n        i0.ɵɵtext(7, \"add\");\n        i0.ɵɵelementEnd();\n        i0.ɵɵtext(8, \"Yeni \\u00C7al\\u0131\\u015Fan Olu\\u015Ftur \");\n        i0.ɵɵelementEnd()();\n        i0.ɵɵelementStart(9, \"mat-card-content\", 4)(10, \"div\", 5)(11, \"table\", 6);\n        i0.ɵɵelementContainerStart(12, 7);\n        i0.ɵɵtemplate(13, EmployeeComponent_th_13_Template, 2, 0, \"th\", 8)(14, EmployeeComponent_td_14_Template, 2, 1, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(15, 10);\n        i0.ɵɵtemplate(16, EmployeeComponent_th_16_Template, 2, 0, \"th\", 8)(17, EmployeeComponent_td_17_Template, 2, 1, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(18, 11);\n        i0.ɵɵtemplate(19, EmployeeComponent_th_19_Template, 2, 0, \"th\", 8)(20, EmployeeComponent_td_20_Template, 2, 1, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(21, 12);\n        i0.ɵɵtemplate(22, EmployeeComponent_th_22_Template, 2, 0, \"th\", 8)(23, EmployeeComponent_td_23_Template, 2, 1, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(24, 13);\n        i0.ɵɵtemplate(25, EmployeeComponent_th_25_Template, 2, 0, \"th\", 8)(26, EmployeeComponent_td_26_Template, 2, 1, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(27, 14);\n        i0.ɵɵtemplate(28, EmployeeComponent_th_28_Template, 2, 0, \"th\", 15)(29, EmployeeComponent_td_29_Template, 4, 0, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(30, 16);\n        i0.ɵɵtemplate(31, EmployeeComponent_th_31_Template, 2, 0, \"th\", 15)(32, EmployeeComponent_td_32_Template, 4, 0, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵelementContainerStart(33, 17);\n        i0.ɵɵtemplate(34, EmployeeComponent_th_34_Template, 2, 0, \"th\", 15)(35, EmployeeComponent_td_35_Template, 4, 0, \"td\", 9);\n        i0.ɵɵelementContainerEnd();\n        i0.ɵɵtemplate(36, EmployeeComponent_tr_36_Template, 1, 0, \"tr\", 18)(37, EmployeeComponent_tr_37_Template, 1, 0, \"tr\", 19);\n        i0.ɵɵelementEnd();\n        i0.ɵɵelement(38, \"mat-paginator\", 20);\n        i0.ɵɵelementEnd()()();\n      }\n      if (rf & 2) {\n        i0.ɵɵadvance(5);\n        i0.ɵɵproperty(\"routerLink\", i0.ɵɵpureFunction0(6, _c0));\n        i0.ɵɵadvance(6);\n        i0.ɵɵproperty(\"dataSource\", ctx.dataSource);\n        i0.ɵɵadvance(25);\n        i0.ɵɵproperty(\"matHeaderRowDef\", ctx.displayedColumns);\n        i0.ɵɵadvance();\n        i0.ɵɵproperty(\"matRowDefColumns\", ctx.displayedColumns);\n        i0.ɵɵadvance();\n        i0.ɵɵproperty(\"pageSize\", 4)(\"pageSizeOptions\", i0.ɵɵpureFunction0(7, _c1));\n      }\n    },\n    styles: [\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZVJvb3QiOiIifQ== */\"]\n  });\n}","map":{"version":3,"names":["MatPaginator","MatSort","MatTableDataSource","ErrorModalComponent","SuccessModalComponent","i0","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate1","element_r1","firstName","element_r2","lastName","element_r3","employeeNumber","element_r4","position","element_r5","email","ɵɵlistener","EmployeeComponent_td_29_Template_button_click_1_listener","element_r7","ɵɵrestoreView","_r6","$implicit","ctx_r7","ɵɵnextContext","ɵɵresetView","redirectToDetails","id","EmployeeComponent_td_32_Template_button_click_1_listener","element_r10","_r9","redirectToUpdate","EmployeeComponent_td_35_Template_button_click_1_listener","element_r12","_r11","deleteEmployee","ɵɵelement","EmployeeComponent","constructor","repoService","errorService","router","dialogService","modalService","authService","errorMessage","displayedColumns","dataSource","getAllEmployees","getData","subscribe","res","data","error","handleError","doFilter","value","filter","trim","toLocaleLowerCase","navigate","ngOnInit","ngAfterViewInit","sort","paginator","isUserAdmin","openConfirmDialog","afterClosed","deleteUri","delete","config","initialState","modalHeaderText","modalBodyText","okButtonText","bsModalRef","show","content","redirectOnOk","_","ɵɵdirectiveInject","i1","RepositoryService","i2","RepositoryErrorHandlerService","i3","Router","i4","DialogService","i5","BsModalService","i6","AuthenticationService","_2","selectors","viewQuery","EmployeeComponent_Query","rf","ctx","ɵɵelementContainerStart","ɵɵtemplate","EmployeeComponent_th_13_Template","EmployeeComponent_td_14_Template","EmployeeComponent_th_16_Template","EmployeeComponent_td_17_Template","EmployeeComponent_th_19_Template","EmployeeComponent_td_20_Template","EmployeeComponent_th_22_Template","EmployeeComponent_td_23_Template","EmployeeComponent_th_25_Template","EmployeeComponent_td_26_Template","EmployeeComponent_th_28_Template","EmployeeComponent_td_29_Template","EmployeeComponent_th_31_Template","EmployeeComponent_td_32_Template","EmployeeComponent_th_34_Template","EmployeeComponent_td_35_Template","EmployeeComponent_tr_36_Template","EmployeeComponent_tr_37_Template","ɵɵproperty","ɵɵpureFunction0","_c0","_c1"],"sources":["C:\\Users\\Cem\\Desktop\\InventryUI-Client\\src\\app\\pages\\ui-components\\employee\\employee.component.ts","C:\\Users\\Cem\\Desktop\\InventryUI-Client\\src\\app\\pages\\ui-components\\employee\\employee.component.html"],"sourcesContent":["import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, OnInit, ViewChild } from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { Router } from '@angular/router';\nimport { BsModalRef, BsModalService, ModalOptions } from 'ngx-bootstrap/modal';\nimport { Employee } from 'src/app/_interface/inventory/employee';\nimport { ErrorModalComponent } from 'src/app/shared/modals/error-modal/error-modal.component';\nimport { SuccessModalComponent } from 'src/app/shared/modals/success-modal/success-modal.component';\nimport { AuthenticationService } from 'src/app/shared/services/authentication.service';\nimport { DialogService } from 'src/app/shared/services/dialog.service';\nimport { RepositoryErrorHandlerService } from 'src/app/shared/services/repository-error-handler.service';\nimport { RepositoryService } from 'src/app/shared/services/repository.service';\n\n@Component({\n  selector: 'app-employee',\n  templateUrl: './employee.component.html',\n  styleUrls: ['./employee.component.css']\n})\nexport class EmployeeComponent implements OnInit {\n\n  public errorMessage: string = '';\n  public bsModalRef?: BsModalRef;\n  public displayedColumns = ['firstName', 'lastName', 'employeeNumber', 'position', 'email','devices', 'update', 'delete'];\n  public dataSource = new MatTableDataSource<Employee>();\n\n  @ViewChild(MatSort) sort: MatSort;\n  @ViewChild(MatPaginator) paginator: MatPaginator;\n\n  constructor(\n    private repoService: RepositoryService,\n    private errorService: RepositoryErrorHandlerService,\n    private router: Router,\n    private dialogService: DialogService,\n    private modalService: BsModalService,\n    private authService: AuthenticationService\n  ) { }\n\n  ngOnInit() {\n    this.getAllEmployees();\n  }\n\n  public getAllEmployees = () => {\n    this.repoService.getData('api/employees')\n      .subscribe(\n        res => {\n          this.dataSource.data = res as Employee[];\n        },\n        (error: HttpErrorResponse) => {\n          this.errorService.handleError(error);\n        }\n      );\n  }\n\n  ngAfterViewInit(): void {\n    this.dataSource.sort = this.sort;\n    this.dataSource.paginator = this.paginator;\n  }\n\n  public doFilter = (value: string) => {\n    this.dataSource.filter = value.trim().toLocaleLowerCase();\n  }\n\n  public redirectToUpdate = (id: string) => {\n    this.router.navigate([`/ui-components/update-employee/${id}`]);\n  }\n\n  public deleteEmployee(id: string) {\n    if(this.authService.isUserAdmin()){\n      this.dialogService.openConfirmDialog('Are you sure you want to delete this employee?')\n      .afterClosed()\n      .subscribe(res => {\n        if (res) {\n          const deleteUri: string = `api/employees/${id}`;\n          this.repoService.delete(deleteUri).subscribe(() => {\n            const config: ModalOptions = {\n              initialState: {\n                modalHeaderText: 'Success Message',\n                modalBodyText: `Employee deleted successfully`,\n                okButtonText: 'OK'\n              }\n            };\n\n            this.bsModalRef = this.modalService.show(SuccessModalComponent, config);\n            this.bsModalRef.content.redirectOnOk.subscribe(() => this.getAllEmployees());\n          });\n        }\n      });\n    }else{\n      const config: ModalOptions = {\n        initialState: {\n          modalHeaderText: 'Error Message',\n          modalBodyText: 'Only Admin allowed',\n          okButtonText: 'OK'\n        }\n      };\n     this.modalService.show(ErrorModalComponent, config);\n    }\n    \n  }\n  public redirectToDetails = (id: string) => {\n    this.router.navigate([`/ui-components/employee-device/${id}`]);\n  }\n}\n","<mat-card class=\"cardWithShadow theme-card\">\n  <mat-card-header>\n    <mat-card-title class=\"m-b-0\">Çalışanlar</mat-card-title>\n    <span class=\"flex-1-auto\"></span>\n    <button mat-flat-button color=\"primary\" matTooltipPosition=\"left\" class=\"m-l-8\" matTooltipHideDelay=\"100000\"\n    [routerLink]=\"['/ui-components/add-employee']\">\n      <mat-icon>add</mat-icon>Yeni Çalışan Oluştur\n    </button>\n  </mat-card-header>\n\n  <mat-card-content class=\"b-t-1\">\n    <div class=\"table-responsive m-t-16\">\n      <table mat-table [dataSource]=\"dataSource\" matSort matSortStart=\"desc\">\n        <ng-container matColumnDef=\"firstName\">\n          <th mat-header-cell *matHeaderCellDef mat-sort-header> Ad </th>\n          <td mat-cell *matCellDef=\"let element\"> {{element.firstName}} </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"lastName\">\n          <th mat-header-cell *matHeaderCellDef mat-sort-header> Soyad </th>\n          <td mat-cell *matCellDef=\"let element\"> {{element.lastName}} </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"employeeNumber\">\n          <th mat-header-cell *matHeaderCellDef mat-sort-header> Çalışan Sayısı </th>\n          <td mat-cell *matCellDef=\"let element\"> {{element.employeeNumber}} </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"position\">\n          <th mat-header-cell *matHeaderCellDef mat-sort-header> Ünvan </th>\n          <td mat-cell *matCellDef=\"let element\"> {{element.position}} </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"email\">\n          <th mat-header-cell *matHeaderCellDef mat-sort-header> E-mail </th>\n          <td mat-cell *matCellDef=\"let element\"> {{element.email}} </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"devices\">\n          <th mat-header-cell *matHeaderCellDef> Cihazlar </th>\n          <td mat-cell *matCellDef=\"let element\">\n            <button mat-icon-button color=\"accent\" (click)=\"redirectToDetails(element.id)\">\n              <mat-icon class=\"mat-18\">devices</mat-icon>\n            </button>\n          </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"update\">\n          <th mat-header-cell *matHeaderCellDef> Güncelle </th>\n          <td mat-cell *matCellDef=\"let element\">\n            <button mat-icon-button color=\"accent\" (click)=\"redirectToUpdate(element.id)\">\n              <mat-icon class=\"mat-18\">system_update</mat-icon>\n            </button>\n          </td>\n        </ng-container>\n\n        <ng-container matColumnDef=\"delete\">\n          <th mat-header-cell *matHeaderCellDef> Sil </th>\n          <td mat-cell *matCellDef=\"let element\">\n            <button mat-icon-button color=\"warn\" (click)=\"deleteEmployee(element.id)\">\n              <mat-icon class=\"mat-18\">delete</mat-icon>\n            </button>\n          </td>\n        </ng-container>\n\n        <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n        <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n      </table>\n      <mat-paginator [pageSize]=\"4\" [pageSizeOptions]=\"[2, 4, 6, 10, 20]\"></mat-paginator>\n    </div>\n  </mat-card-content>\n</mat-card>\n"],"mappings":"AAEA,SAASA,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,OAAO,QAAQ,wBAAwB;AAChD,SAASC,kBAAkB,QAAQ,yBAAyB;AAI5D,SAASC,mBAAmB,QAAQ,yDAAyD;AAC7F,SAASC,qBAAqB,QAAQ,6DAA6D;;;;;;;;;;;;ICKzFC,EAAA,CAAAC,cAAA,aAAsD;IAACD,EAAA,CAAAE,MAAA,WAAG;IAAAF,EAAA,CAAAG,YAAA,EAAK;;;;;IAC/DH,EAAA,CAAAC,cAAA,aAAuC;IAACD,EAAA,CAAAE,MAAA,GAAsB;IAAAF,EAAA,CAAAG,YAAA,EAAK;;;;IAA3BH,EAAA,CAAAI,SAAA,EAAsB;IAAtBJ,EAAA,CAAAK,kBAAA,MAAAC,UAAA,CAA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