var Bizgaze; (function (Bizgaze) { let Apps; (function (Apps) { let Crm; (function (Crm) { let Contacts; (function (Contacts) { let Components; (function (Components) { class LeadChecklist extends Unibase.Platform.Core.BaseComponent { cssFiles() { return []; } jsFiles() { return ['']; } html(id, containerid) { return ""; } init(containerid) { var instance = this; } load(id, containerid, callback) { } strikeThrough(workflowchecklistid) { var LeadId = Unibase.Themes.Providers.DetailHelper.recordId; var cheked = $("#checkBox-no-" + workflowchecklistid).prop('checked'); if (cheked == true) { $(".Dependentcheckbox").css('background-color', '#2196F3'); $('#note-text-' + workflowchecklistid).css('text-decoration', 'line-through'); $('#note-text-' + workflowchecklistid).css('color', 'red'); } else { $(".Dependentcheckbox").css('background-color', ''); $('#note-text-' + workflowchecklistid).css('text-decoration', ''); $('#note-text-' + workflowchecklistid).css('color', ''); } Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () { Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().updateCheckList(workflowchecklistid, LeadId, cheked).then(function (response) { MessageHelper.Instance().showSuccess(response.message, 'bizgaze_ErrorMessages'); }); }); } Completed() { var Leadid = Unibase.Themes.Providers.DetailHelper.recordId; Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () { Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getChecklist(Leadid).then(function (response) { if (response.result.length > 0) { for (var i = 0; i < response.result.length; i++) { var data = (response.result)[i]; if (data.ischecked == true) { $('#note-text-' + data.workflowchecklistid).css('text-decoration', 'line-through'); $('#note-text-' + data.workflowchecklistid).css('color', 'red'); $('#checkBox-no-' + data.workflowchecklistid).prop('checked', true); } } } }); }); } static Instance() { if (this._instance === undefined) this._instance = new LeadChecklist(); return this._instance; } } Components.LeadChecklist = LeadChecklist; })(Components = Contacts.Components || (Contacts.Components = {})); })(Contacts = Crm.Contacts || (Crm.Contacts = {})); })(Crm = Apps.Crm || (Apps.Crm = {})); })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {})); })(Bizgaze || (Bizgaze = {}));