Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

leadchecklist.js 4.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Crm;
  6. (function (Crm) {
  7. let Contacts;
  8. (function (Contacts) {
  9. let Components;
  10. (function (Components) {
  11. class LeadChecklist extends Unibase.Platform.Core.BaseComponent {
  12. cssFiles() {
  13. return [];
  14. }
  15. jsFiles() {
  16. return [''];
  17. }
  18. html(id, containerid) {
  19. return "";
  20. }
  21. init(containerid) {
  22. var instance = this;
  23. }
  24. load(id, containerid, callback) {
  25. }
  26. strikeThrough(workflowchecklistid) {
  27. var LeadId = Unibase.Themes.Providers.DetailHelper.recordId;
  28. var cheked = $("#checkBox-no-" + workflowchecklistid).prop('checked');
  29. if (cheked == true) {
  30. $(".Dependentcheckbox").css('background-color', '#2196F3');
  31. $('#note-text-' + workflowchecklistid).css('text-decoration', 'line-through');
  32. $('#note-text-' + workflowchecklistid).css('color', 'red');
  33. }
  34. else {
  35. $(".Dependentcheckbox").css('background-color', '');
  36. $('#note-text-' + workflowchecklistid).css('text-decoration', '');
  37. $('#note-text-' + workflowchecklistid).css('color', '');
  38. }
  39. Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
  40. Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().updateCheckList(workflowchecklistid, LeadId, cheked).then(function (response) {
  41. MessageHelper.Instance().showSuccess(response.message, 'bizgaze_ErrorMessages');
  42. });
  43. });
  44. }
  45. Completed() {
  46. var Leadid = Unibase.Themes.Providers.DetailHelper.recordId;
  47. Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('apps/crm/contacts/managers/contactmanager.js', function () {
  48. Bizgaze.Apps.Crm.Contacts.Managers.ContactManager.Instance().getChecklist(Leadid).then(function (response) {
  49. if (response.result.length > 0) {
  50. for (var i = 0; i < response.result.length; i++) {
  51. var data = (response.result)[i];
  52. if (data.ischecked == true) {
  53. $('#note-text-' + data.workflowchecklistid).css('text-decoration', 'line-through');
  54. $('#note-text-' + data.workflowchecklistid).css('color', 'red');
  55. $('#checkBox-no-' + data.workflowchecklistid).prop('checked', true);
  56. }
  57. }
  58. }
  59. });
  60. });
  61. }
  62. static Instance() {
  63. if (this._instance === undefined)
  64. this._instance = new LeadChecklist();
  65. return this._instance;
  66. }
  67. }
  68. Components.LeadChecklist = LeadChecklist;
  69. })(Components = Contacts.Components || (Contacts.Components = {}));
  70. })(Contacts = Crm.Contacts || (Crm.Contacts = {}));
  71. })(Crm = Apps.Crm || (Apps.Crm = {}));
  72. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  73. })(Bizgaze || (Bizgaze = {}));