var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var Unibase; (function (Unibase) { let Platform; (function (Platform) { let Integrations; (function (Integrations) { let Components; (function (Components) { class SyncLog extends Platform.Core.BaseComponent { constructor() { super(); } jsFiles() { return ["platform/integrations/managers/integrationmanager.js"]; } cssFiles() { return []; } html(id, containerid) { return '
Sync Log
'; } init(serviceIntegratorId) { return __awaiter(this, void 0, void 0, function* () { Unibase.Platform.Integrations.Components.SyncLog.serviceIntegratorId = serviceIntegratorId; this.navigationHelper.popup(0, '', Unibase.Platform.Integrations.Components.SyncLog.Instance(), null, Platform.Helpers.Size.Large); Unibase.Platform.Integrations.Components.SyncLog.Instance().SyncLogView(serviceIntegratorId); }); } load(id, containerid, callback) { } loadForm(FormId, Pk_Value, AppConfigurationId, Callback, ElementId) { } SyncLogView(serviceIntegratorId) { Unibase.Platform.Integrations.Managers.IntegrationManager.Instance().getsyncsbyserviceintegrator(serviceIntegratorId).then(function (response) { if (response.result.length == 0) { $("#nodata").show(); $(".divsync").hide(); $("#integratelogPager").hide(); $("#lblrecords").hide(); } else { $("#nodata").hide(); $(".divsync").show(); $("#integratelogPager").show(); $("#lblrecords").show(); $(".integrator-list").html(''); var html = ""; for (var i = 0; i < response.result.length; i++) { var data = response.result[i]; var date = Unibase.Platform.Helpers.DateTimeHelper.Instance().FormatDateTime(data.SyncDate); html += '
' + '
' + '
' + '' + '
' + '
' + '
    ' + '
  • ' + '
' + '
' + '
' + '
' + ''; } } $("#lblintegratelogRecords").text(response.result.length); $(".divsync").html(html); }); } syncDetails(syncId) { if ($('.sync-item_' + syncId).length > 1) return; Unibase.Platform.Integrations.Managers.IntegrationManager.Instance().getsynclogsbysyncid(syncId).then(function (response) { var html = ""; if (response.result.length > 0) { for (var i = 0; i < response.result.length; i++) { var data = response.result[i]; var innerhtml = '
  • ' + '' + data.Notes + '' + '' + '
  • '; html = html + innerhtml; } $("#sync-list_" + syncId).html(html); } else { var innerhtml = '
  • ' + 'No Issues Found' + '' + '
  • '; html = html + innerhtml; $("#sync-list_" + syncId).html(html); } }); } static Instance() { return new SyncLog(); } } SyncLog.serviceIntegratorId = 0; Components.SyncLog = SyncLog; })(Components = Integrations.Components || (Integrations.Components = {})); })(Integrations = Platform.Integrations || (Platform.Integrations = {})); })(Platform = Unibase.Platform || (Unibase.Platform = {})); })(Unibase || (Unibase = {}));