123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Crm;
- (function (Crm) {
- let Employees;
- (function (Employees) {
- let Components;
- (function (Components) {
- class EmployeeLocationTable extends Unibase.Platform.Core.BaseComponent {
- constructor() {
- super();
- this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
- }
- cssFiles() {
- return [];
- }
- jsFiles() {
- return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/events/components/shareimage.js"];
- }
- load(id, containerid, callback) {
- let Instance = this;
- $('.closeBtnEmp').click(function (e) {
- Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
- });
- let isTrackingTable = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable;
- let tableHTML = '';
- let headers = '';
- debugger;
- if (isTrackingTable) {
- tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().trackingTodayHTML;
- Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().isTrackingTable = false;
- headers = `<div class="col-sm-4">Accuracy</div>
- <div class="col-sm-4">Time</div>
- <div class="col-sm-4">Address</div>`;
- }
- else {
- tableHTML = Bizgaze.Apps.Crm.Employees.Components.EmployeeLocations.Instance().tableHtmlEmp;
- headers = `
- <div class="col-sm-2">Time</div>
- <div class="col-sm-5">Address</div>
- <div class="col-sm-2">Distance(K.M)</div>
- <div class="col-sm-2">Duration</div>
- <div class="col-sm-1 text-center"><i class="fa fa-battery-full"></i></div>`;
- }
- if (tableHTML == '') {
- $('.listEmpContainer').addClass('d-none');
- $('.nodataemp').removeClass('d-none');
- return;
- }
- $('.empContainerInner').find('.appendEmpList').parent().addClass('p-0');
- $('.empContainerInner').find('.appendEmpList').html(tableHTML);
- $('.empContainerInner').find('.headerempsloc').html(headers);
- }
- init(containerid) {
- }
- html(id, containerid) {
- let htmlw = ` <div class="empContainer p-3">
- <div class="empContainerInner">
- <table id='table-data' class='w-100 table'>
- <thead>
- <tr>
- <th class="mnw-225p d-none">Name</th>
- <th class="mnw-225p d-none">Time</th>
- <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Name</th>
- <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Time</th>
- <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Address</th>
- <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Distance(K.M)</th>
- <th style="line-height: 1; white-space: nowrap; background: rgb(25, 88, 159); color: rgb(255, 255, 255);">Duration</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- <div class="nodataemp d-none text-center"></div>
- </div>
- <footer class="p-2" style="position: fixed;bottom: 0;">
- <button class="closeBtnEmp btn bg-danger text-white">Close</button>
- </footer>
- </div>`;
- let html = `<div class="empContainer p-2">
- <div class="empContainerInner">
- <div class="listEmpContainer card border-0" >
- <div class="card-header d-md-block d-sm-none Templateheader">
- <div id="layout_list_header" class="biz-transparent-text-color no-background list-border-color">
- <div class="row biz-list-header d-flex align-items-center headerempsloc">
-
- </div>
- </div>
- </div>
- <div data-simplebar class="bg-white-s bg-white-removed simple-scroll-bar templateviewer-body pb-15 scrollable">
- <ul class="list-group layout_list_container appendEmpList font-14 ">
-
- </ul>
- </div>
- </div>
- <div class="nodataemp d-none text-center">
- <div class="alert alert-primary text-center mb-0 border-0 rounded-0 w-100 font-14">No data available</div>
- </div>
- </div>
- <footer class="p-2" style="position: fixed;bottom: 0;">
- <button class="closeBtnEmp btn bg-danger text-white">Close</button>
- </footer>
- </div>`;
- return html;
- }
- loadEmpTable() {
- console.log('.loadEmpTable');
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new EmployeeLocationTable();
- }
- return this.instance;
- }
- }
- Components.EmployeeLocationTable = EmployeeLocationTable;
- })(Components = Employees.Components || (Employees.Components = {}));
- })(Employees = Crm.Employees || (Crm.Employees = {}));
- })(Crm = Apps.Crm || (Apps.Crm = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|