Built files from Bizgaze WebServer
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

employee_locations_table.js 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Crm;
  6. (function (Crm) {
  7. let Employees;
  8. (function (Employees) {
  9. let Components;
  10. (function (Components) {
  11. class EmployeeLocationTable extends Unibase.Platform.Core.BaseComponent {
  12. constructor() {
  13. super();
  14. this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
  15. }
  16. cssFiles() {
  17. return [];
  18. }
  19. jsFiles() {
  20. return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/events/components/shareimage.js"];
  21. }
  22. load(id, containerid, callback) {
  23. let Instance = this;
  24. $('.closeBtnEmp').click(function (e) {
  25. Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
  26. });
  27. let isTrackingTable = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable;
  28. let tableHTML = '';
  29. let headers = '';
  30. debugger;
  31. if (isTrackingTable) {
  32. tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().trackingTodayHTML;
  33. Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable = false;
  34. headers = `<div class="col-sm-4">Accuracy</div>
  35. <div class="col-sm-4">Time</div>
  36. <div class="col-sm-4">Address</div>`;
  37. }
  38. else {
  39. tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().tableHtmlEmp;
  40. headers = `
  41. <div class="col-sm-2">Time</div>
  42. <div class="col-sm-5">Address</div>
  43. <div class="col-sm-2">Distance(K.M)</div>
  44. <div class="col-sm-2">Duration</div>
  45. <div class="col-sm-1 text-center"><i class="fa fa-battery-full"></i></div>`;
  46. }
  47. if (tableHTML == '') {
  48. $('.listEmpContainer').addClass('d-none');
  49. $('.nodataemp').removeClass('d-none');
  50. return;
  51. }
  52. $('.empContainerInner').find('.appendEmpList').parent().addClass('p-0');
  53. $('.empContainerInner').find('.appendEmpList').html(tableHTML);
  54. $('.empContainerInner').find('.headerempsloc').html(headers);
  55. }
  56. init(containerid) {
  57. }
  58. html(id, containerid) {
  59. let htmlw = ` <div class="empContainer p-3">
  60. <div class="empContainerInner">
  61. <table id='table-data' class='w-100 table'>
  62. <thead>
  63. <tr>
  64. <th class="mnw-225p d-none">Name</th>
  65. <th class="mnw-225p d-none">Time</th>
  66. <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Name</th>
  67. <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Time</th>
  68. <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Address</th>
  69. <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Distance(K.M)</th>
  70. <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Duration</th>
  71. </tr>
  72. </thead>
  73. <tbody></tbody>
  74. </table>
  75. <div class="nodataemp d-none text-center"></div>
  76. </div>
  77. <footer class="p-2" style="position: fixed;bottom: 0;">
  78. <button class="closeBtnEmp btn bg-danger text-white">Close</button>
  79. </footer>
  80. </div>`;
  81. let html = `<div class="empContainer p-2">
  82. <div class="empContainerInner">
  83. <div class="listEmpContainer card border-0" >
  84. <div class="card-header d-md-block d-sm-none Templateheader">
  85. <div id="layout_list_header" class="biz-transparent-text-color no-background list-border-color">
  86. <div class="row biz-list-header d-flex align-items-center headerempsloc">
  87. </div>
  88. </div>
  89. </div>
  90. <div data-simplebar class="bg-white-s bg-white-removed simple-scroll-bar templateviewer-body pb-15 scrollable">
  91. <ul class="list-group layout_list_container appendEmpList font-14 ">
  92. </ul>
  93. </div>
  94. </div>
  95. <div class="nodataemp d-none text-center">
  96. <div class="alert alert-primary text-center mb-0 border-0 rounded-0 w-100 font-14">No data available</div>
  97. </div>
  98. </div>
  99. <footer class="p-2" style="position: fixed;bottom: 0;">
  100. <button class="closeBtnEmp btn bg-danger text-white">Close</button>
  101. </footer>
  102. </div>`;
  103. return html;
  104. }
  105. loadEmpTable() {
  106. console.log('.loadEmpTable');
  107. }
  108. static Instance() {
  109. if (this.instance === undefined) {
  110. this.instance = new EmployeeLocationTable();
  111. }
  112. return this.instance;
  113. }
  114. }
  115. Components.EmployeeLocationTable = EmployeeLocationTable;
  116. })(Components = Employees.Components || (Employees.Components = {}));
  117. })(Employees = Crm.Employees || (Crm.Employees = {}));
  118. })(Crm = Apps.Crm || (Apps.Crm = {}));
  119. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  120. })(Bizgaze || (Bizgaze = {}));