@posiwise/smart-crm 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.mjs +10 -10
  2. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.mjs +8 -8
  3. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.mjs +23 -23
  4. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-invoices/smart-crm-account-invoices.component.mjs +10 -10
  5. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.mjs +9 -9
  6. package/esm2022/lib/private/components/smart-crm-actions/smart-crm-actions.component.mjs +20 -18
  7. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.mjs +5 -5
  8. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.mjs +5 -5
  9. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.mjs +4 -4
  10. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.mjs +3 -3
  11. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.mjs +6 -6
  12. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.mjs +3 -3
  13. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.mjs +9 -9
  14. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.mjs +4 -4
  15. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.mjs +9 -9
  16. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.mjs +3 -3
  17. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.mjs +8 -8
  18. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.mjs +8 -8
  19. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.mjs +17 -17
  20. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.mjs +13 -13
  21. package/esm2022/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.mjs +3 -3
  22. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-account-insight/smart-crm-account-insight.component.mjs +3 -3
  23. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-analysis-insight/smart-crm-analysis.component.mjs +3 -3
  24. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-contact-insight/smart-crm-contact-insight.component.mjs +7 -7
  25. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-insight.component.mjs +4 -4
  26. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-marketing-insight/smart-crm-marketing-insight.component.mjs +5 -5
  27. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-opportunities-insight/smart-crm-opportunities-insight.component.mjs +10 -10
  28. package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.mjs +6 -6
  29. package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads.component.mjs +7 -7
  30. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.mjs +7 -7
  31. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.mjs +6 -6
  32. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.mjs +10 -10
  33. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.mjs +3 -3
  34. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.mjs +9 -9
  35. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.mjs +17 -17
  36. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.mjs +13 -11
  37. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.mjs +10 -10
  38. package/esm2022/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.mjs +3 -3
  39. package/esm2022/lib/private/smart-crm-private.module.mjs +33 -33
  40. package/esm2022/lib/private/smart-crm-private.routing.module.mjs +8 -8
  41. package/esm2022/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.mjs +1 -1
  42. package/esm2022/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.mjs +3 -3
  43. package/esm2022/lib/public/components/smart-crm-signup/smart-crm-signup.component.mjs +2 -2
  44. package/esm2022/lib/public/smart-crm-public.module.mjs +4 -4
  45. package/esm2022/lib/public/smart-crm-public.routing.module.mjs +1 -1
  46. package/fesm2022/posiwise-smart-crm.mjs +162 -159
  47. package/fesm2022/posiwise-smart-crm.mjs.map +1 -1
  48. package/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.d.ts +16 -16
  49. package/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.d.ts +12 -12
  50. package/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.d.ts +46 -47
  51. package/lib/private/components/smart-crm-accounts/smart-crm-account-invoices/smart-crm-account-invoices.component.d.ts +10 -10
  52. package/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.d.ts +12 -12
  53. package/lib/private/components/smart-crm-actions/smart-crm-actions.component.d.ts +15 -15
  54. package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.d.ts +8 -8
  55. package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.d.ts +5 -5
  56. package/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.d.ts +4 -4
  57. package/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.d.ts +7 -7
  58. package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.d.ts +1 -1
  59. package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.d.ts +6 -6
  60. package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.d.ts +5 -5
  61. package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.d.ts +8 -8
  62. package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.d.ts +7 -7
  63. package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.d.ts +9 -9
  64. package/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.d.ts +11 -11
  65. package/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.d.ts +27 -27
  66. package/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.d.ts +19 -19
  67. package/lib/private/components/smart-crm-insight/smart-crm-account-insight/smart-crm-account-insight.component.d.ts +19 -19
  68. package/lib/private/components/smart-crm-insight/smart-crm-analysis-insight/smart-crm-analysis.component.d.ts +7 -7
  69. package/lib/private/components/smart-crm-insight/smart-crm-contact-insight/smart-crm-contact-insight.component.d.ts +13 -13
  70. package/lib/private/components/smart-crm-insight/smart-crm-marketing-insight/smart-crm-marketing-insight.component.d.ts +8 -8
  71. package/lib/private/components/smart-crm-insight/smart-crm-opportunities-insight/smart-crm-opportunities-insight.component.d.ts +18 -18
  72. package/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.d.ts +6 -6
  73. package/lib/private/components/smart-crm-leads/smart-crm-leads.component.d.ts +9 -9
  74. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.d.ts +7 -7
  75. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.d.ts +10 -10
  76. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.d.ts +8 -8
  77. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.d.ts +3 -3
  78. package/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.d.ts +10 -10
  79. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.d.ts +23 -23
  80. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.d.ts +27 -27
  81. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.d.ts +12 -12
  82. package/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.d.ts +1 -1
  83. package/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.d.ts +1 -1
  84. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, EventEmitter, Input, Inject, ChangeDetectionStrategy, NgModule } from '@angular/core';
3
- import * as i3 from '@angular/forms';
4
- import { UntypedFormBuilder, Validators, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import * as i1 from '@posiwise/smart-crm-shared';
6
- import { CRM_ACCOUNT_FILES_PATH, CRM_PERMISSIONS, CRM_KEYS } from '@posiwise/smart-crm-shared';
7
- import { PAGE_SIZE, DOCUMENT_TYPE_EXT, TOKEN_HEADER_KEY, POLL_TIMEOUT } from '@posiwise/common-utilities';
8
3
  import { AppBaseComponent } from '@posiwise/app-base-component';
9
4
  import * as i2 from '@posiwise/common-services';
10
5
  import { PermissionService, FormHelperService } from '@posiwise/common-services';
6
+ import { PAGE_SIZE, DOCUMENT_TYPE_EXT, TOKEN_HEADER_KEY, POLL_TIMEOUT } from '@posiwise/common-utilities';
11
7
  import { HelperService } from '@posiwise/helper-service';
8
+ import * as i1 from '@posiwise/smart-crm-shared';
9
+ import { CRM_ACCOUNT_FILES_PATH, CRM_PERMISSIONS, CRM_KEYS } from '@posiwise/smart-crm-shared';
10
+ import * as i3 from '@angular/forms';
11
+ import { UntypedFormBuilder, Validators, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
12
12
  import * as i2$1 from '@angular/common';
13
13
  import { DOCUMENT, CommonModule } from '@angular/common';
14
14
  import * as i5 from '@posiwise/directives';
@@ -21,10 +21,10 @@ import * as i11 from '@posiwise/shared-components';
21
21
  import { SharedComponentsModule } from '@posiwise/shared-components';
22
22
  import * as i11$1 from '@jsverse/transloco';
23
23
  import { TRANSLOCO_SCOPE, TranslocoModule } from '@jsverse/transloco';
24
- import * as i2$2 from '@ng-bootstrap/ng-bootstrap';
25
- import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
26
24
  import * as i12 from 'ngx-uploader';
27
25
  import { UploadStatus, NgxUploaderModule } from 'ngx-uploader';
26
+ import * as i2$2 from '@ng-bootstrap/ng-bootstrap';
27
+ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
28
28
  import * as i4 from 'primeng/inputtext';
29
29
  import { InputTextModule } from 'primeng/inputtext';
30
30
  import * as i1$1 from '@angular/router';
@@ -33,8 +33,8 @@ import * as i8 from 'primeng/api';
33
33
  import * as i10 from 'primeng/table';
34
34
  import * as i14 from '@posiwise/pipes';
35
35
  import { PipesModule } from '@posiwise/pipes';
36
- import swal from 'sweetalert2';
37
36
  import moment from 'moment';
37
+ import swal from 'sweetalert2';
38
38
  import * as i4$1 from 'ngx-ui-switch';
39
39
  import { UiSwitchModule } from 'ngx-ui-switch';
40
40
  import * as i17 from 'ngx-infinite-scroll';
@@ -56,11 +56,12 @@ import { moveItemInArray, transferArrayItem, DragDropModule } from '@angular/cdk
56
56
  import uniqBy from 'lodash/uniqBy';
57
57
  import * as i4$3 from 'ngx-pagination';
58
58
  import { NgxPaginationModule } from 'ngx-pagination';
59
+ import * as i12$2 from 'primeng/dropdown';
60
+ import { DropdownModule } from 'primeng/dropdown';
59
61
  import { PageAccessGuard } from '@posiwise/core-guards';
62
+ import { AppConfigService } from '@posiwise/app-config-service';
60
63
  import { CoreTranslocoModule } from '@posiwise/core-transloco';
61
64
  import { Loader } from '@googlemaps/js-api-loader';
62
- import { AppConfigService } from '@posiwise/app-config-service';
63
- import { DropdownModule } from 'primeng/dropdown';
64
65
  import { StatusCodes } from 'http-status-codes';
65
66
  import * as i3$1 from '@posiwise/layouts';
66
67
  import { LayoutsModule } from '@posiwise/layouts';
@@ -284,15 +285,15 @@ class SmartCrmCompanyDetailsComponent extends AppBaseComponent {
284
285
  this.crmService = crmService;
285
286
  this.commonService = commonService;
286
287
  this.geoService = geoService;
287
- this.submitted = false;
288
- this.buttonBusy = false;
289
- this.isLoading = true;
290
- this.onEdit = false;
288
+ this.countryNames = [];
291
289
  this.subscriptionMembers = [];
292
290
  this.status = [];
293
291
  this.priority = [];
294
292
  this.source = [];
295
- this.countryNames = [];
293
+ this.isLoading = true;
294
+ this.onEdit = false;
295
+ this.submitted = false;
296
+ this.buttonBusy = false;
296
297
  this.form = AppSmartCrm.getAccountsForm();
297
298
  }
298
299
  onSearchOwner(event) {
@@ -474,11 +475,11 @@ class SmartCrmCompanyFilesComponent extends AppBaseComponent {
474
475
  this.modalService = modalService;
475
476
  this.authService = authService;
476
477
  this.cdr = cdr;
478
+ this.page = 1;
477
479
  this.isLoaded = false;
480
+ this.loading = true;
478
481
  this.searchText = '';
479
482
  this.totalRecordsUnFiltered = 0;
480
- this.loading = true;
481
- this.page = 1;
482
483
  this.routers = ROUTERS;
483
484
  this.options = { concurrency: 1, maxUploads: 3 };
484
485
  this.uploadInput = new EventEmitter();
@@ -638,15 +639,15 @@ class SmartCrmCompanyAccountInvoiceComponent extends AppBaseComponent {
638
639
  constructor(injector, crmService) {
639
640
  super(injector);
640
641
  this.crmService = crmService;
642
+ this.page = 0;
643
+ this.intervalTimer = interval(POLL_TIMEOUT * 60 * 1000);
641
644
  this.invoices = [];
642
- this.buttonBusy = false;
643
- this.totalRecordsUnFiltered = 0;
645
+ this.invoiceFrequency = ['week', 'month', 'year'];
644
646
  this.searchText = '';
645
- this.intervalTimer = interval(POLL_TIMEOUT * 60 * 1000);
646
- this.isLoaded = false;
647
- this.page = 0;
647
+ this.totalRecordsUnFiltered = 0;
648
648
  this.totalRecords = 0;
649
- this.invoiceFrequency = ['week', 'month', 'year'];
649
+ this.isLoaded = false;
650
+ this.buttonBusy = false;
650
651
  this.subscriptionId = PermissionService.selectedSubscription.id;
651
652
  }
652
653
  onLazyLoad(event) {
@@ -699,29 +700,29 @@ class SmartCrmCompanyInfoComponent extends AppBaseComponent {
699
700
  this.cdr = cdr;
700
701
  this.logoCacheService = logoCacheService;
701
702
  this.document = document;
702
- this.isFormEdit = true;
703
- this.isDataLoaded = false;
704
- this.submitted = false;
703
+ this.page = 1;
704
+ this.totalContacts = 0;
705
+ this.isContactValid = true;
705
706
  this.accountComments = [];
707
+ this.potential = ['low', 'medium', 'high'];
708
+ this.selector = '.timeline-container';
709
+ this.searchText = '';
710
+ this.totalRecordsUnFiltered = 0;
711
+ this.currentPage = 1;
706
712
  this.hasAccess = false;
707
- this.editComment = false;
708
- this.isContactValid = true;
713
+ this.isDataLoaded = false;
709
714
  this.isLoaded = false;
710
- this.totalRecordsUnFiltered = 0;
711
715
  this.loading = true;
712
- this.searchText = '';
713
- this.potential = ['low', 'medium', 'high'];
716
+ this.isFormEdit = true;
717
+ this.submitted = false;
718
+ this.editComment = false;
714
719
  this.showFullComment = false;
720
+ this.submitAction = false;
715
721
  this.isDisabled = false;
722
+ this.buttonBusy = false;
716
723
  this.updating = false;
717
724
  this.direction = '';
718
- this.page = 1;
719
- this.currentPage = 1;
720
- this.totalContacts = 0;
721
- this.selector = '.timeline-container';
722
- this.submitAction = false;
723
725
  this.routers = ROUTERS;
724
- this.buttonBusy = false;
725
726
  this.options = { concurrency: 1, maxUploads: 3 };
726
727
  this.uploadInput = new EventEmitter();
727
728
  this.token = btoa(this.authService.getToken());
@@ -1269,16 +1270,13 @@ class SmartCrmCompaniesComponent extends AppBaseComponent {
1269
1270
  this.commonService = commonService;
1270
1271
  this.logoCacheService = logoCacheService;
1271
1272
  this.cdr = cdr;
1273
+ this.page = 1;
1272
1274
  this.data = {
1273
1275
  accounts: [],
1274
1276
  object_count: 0,
1275
1277
  unfiltered_count: 0
1276
1278
  };
1277
- this.searchText = '';
1278
- this.loading = true;
1279
1279
  this.organizationSizes = [];
1280
- this.hasAccess = false;
1281
- this.isLoaded = false;
1282
1280
  this.searchOptions = [];
1283
1281
  this.filterByIndustries = [];
1284
1282
  this.status = [];
@@ -1288,8 +1286,11 @@ class SmartCrmCompaniesComponent extends AppBaseComponent {
1288
1286
  this.filterByStatus = [];
1289
1287
  this.filterByPriority = [];
1290
1288
  this.filterBySizeId = [];
1289
+ this.searchText = '';
1291
1290
  this.accountActivities = [];
1292
- this.page = 1;
1291
+ this.loading = true;
1292
+ this.hasAccess = false;
1293
+ this.isLoaded = false;
1293
1294
  this.routers = ROUTERS;
1294
1295
  this.actionNames = [];
1295
1296
  }
@@ -1580,11 +1581,11 @@ class SmartCrmSettingsDetailsComponent extends AppBaseComponent {
1580
1581
  constructor(crmService, injector) {
1581
1582
  super(injector);
1582
1583
  this.crmService = crmService;
1584
+ this.targetWeek = [];
1585
+ this.targetWeekMin = [];
1583
1586
  this.submitted = false;
1584
1587
  this.buttonBusy = false;
1585
1588
  this.isLoading = true;
1586
- this.targetWeek = [];
1587
- this.targetWeekMin = [];
1588
1589
  this.form = AppSmartCrm.getSettingsForm();
1589
1590
  }
1590
1591
  ngOnInit() {
@@ -1667,6 +1668,7 @@ class SmartCrmActionsComponent extends AppBaseComponent {
1667
1668
  super(injector);
1668
1669
  this.crmService = crmService;
1669
1670
  this.cdr = cdr;
1671
+ this.page = 1;
1670
1672
  this.data = {
1671
1673
  crm_actions: [],
1672
1674
  object_count: 0,
@@ -1676,7 +1678,6 @@ class SmartCrmActionsComponent extends AppBaseComponent {
1676
1678
  this.loading = true;
1677
1679
  this.hasAccess = false;
1678
1680
  this.isLoaded = false;
1679
- this.page = 1;
1680
1681
  this.routers = ROUTERS;
1681
1682
  }
1682
1683
  ngOnInit() {
@@ -1766,16 +1767,16 @@ class SmartCrmCompanySourceComponent extends AppBaseComponent {
1766
1767
  super(injector);
1767
1768
  this.crmService = crmService;
1768
1769
  this.cdr = cdr;
1769
- this.searchText = '';
1770
- this.loading = true;
1771
- this.hasAccess = false;
1772
- this.isLoaded = false;
1770
+ this.page = 1;
1773
1771
  this.data = {
1774
1772
  crm_sources: [],
1775
1773
  object_count: 0,
1776
1774
  unfiltered_count: 0
1777
1775
  };
1778
- this.page = 1;
1776
+ this.searchText = '';
1777
+ this.loading = true;
1778
+ this.hasAccess = false;
1779
+ this.isLoaded = false;
1779
1780
  this.routers = ROUTERS;
1780
1781
  }
1781
1782
  ngOnInit() {
@@ -1855,17 +1856,17 @@ class SmartCrmWidgetsComponent extends AppBaseComponent {
1855
1856
  super(injector);
1856
1857
  this.crmService = crmService;
1857
1858
  this.cdr = cdr;
1858
- this.searchText = '';
1859
- this.loading = true;
1859
+ this.page = 1;
1860
1860
  this.data = {
1861
1861
  crm_widget_relationships: [],
1862
1862
  object_count: 0,
1863
1863
  unfiltered_count: 0
1864
1864
  };
1865
+ this.positions = [];
1866
+ this.searchText = '';
1867
+ this.loading = true;
1865
1868
  this.hasAccess = false;
1866
1869
  this.isLoaded = false;
1867
- this.positions = [];
1868
- this.page = 1;
1869
1870
  this.routers = ROUTERS;
1870
1871
  }
1871
1872
  ngOnInit() {
@@ -1961,20 +1962,20 @@ class SmartCrmStagesComponent extends AppBaseComponent {
1961
1962
  super(injector);
1962
1963
  this.crmService = crmService;
1963
1964
  this.cdr = cdr;
1964
- this.searchText = '';
1965
- this.loading = true;
1965
+ this.page = 1;
1966
1966
  this.data = {
1967
1967
  crm_opportunity_stages: [],
1968
1968
  object_count: 0,
1969
1969
  unfiltered_count: 0
1970
1970
  };
1971
- this.hasAccess = false;
1972
- this.isLoaded = false;
1973
- this.page = 1;
1974
1971
  this.filterByCategory = [];
1975
1972
  this.stageNames = [];
1976
1973
  this.categories = [];
1977
1974
  this.availableCategories = [];
1975
+ this.searchText = '';
1976
+ this.loading = true;
1977
+ this.hasAccess = false;
1978
+ this.isLoaded = false;
1978
1979
  this.routers = ROUTERS;
1979
1980
  }
1980
1981
  ngOnInit() {
@@ -2097,17 +2098,17 @@ class SmartCrmOpportunityCategoriesComponent extends AppBaseComponent {
2097
2098
  super(injector);
2098
2099
  this.crmService = crmService;
2099
2100
  this.cdr = cdr;
2101
+ this.page = 1;
2100
2102
  this.data = {
2101
2103
  crm_opportunity_categories: [],
2102
2104
  object_count: 0,
2103
2105
  unfiltered_count: 0
2104
2106
  };
2107
+ this.categoryNames = [];
2105
2108
  this.searchText = '';
2106
2109
  this.loading = true;
2107
2110
  this.hasAccess = false;
2108
2111
  this.isLoaded = false;
2109
- this.page = 1;
2110
- this.categoryNames = [];
2111
2112
  this.routers = ROUTERS;
2112
2113
  }
2113
2114
  ngOnInit() {
@@ -2208,11 +2209,11 @@ class SmartCrmConfigurationComponent extends AppBaseComponent {
2208
2209
  });
2209
2210
  }
2210
2211
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmConfigurationComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
2211
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmConfigurationComponent, selector: "pw-configuration", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>CRM Configuration</h2>\n </div>\n</div>\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n (navChange)=\"onTabChange($event)\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'actions'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Actions</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-actions></pw-smart-crm-actions>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'categories'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Categories</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-opportunity-categories></pw-smart-crm-opportunity-categories>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'stage'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Stages</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-stages></pw-smart-crm-stages>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'source'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Sources</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-source></pw-smart-crm-source>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'widget'\"\n *rbacAllow=\"'SubscriptionAdmin' && 'SuperAdmin'\">\n <a ngbNavLink>Widgets</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-widgets></pw-smart-crm-widgets>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'admin'\"\n *rbacAllow=\"'SubscriptionAdmin' && 'SuperAdmin'\">\n <a ngbNavLink>Admin</a>\n <ng-template ngbNavContent>\n <pw-coming-soon message=\"Admin\"></pw-coming-soon>\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"], dependencies: [{ kind: "directive", type: i5.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i2$2.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i2$2.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i2$2.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i2$2.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i2$2.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i2$2.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i2$2.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: i11.ComingSoonComponent, selector: "pw-coming-soon", inputs: ["message"] }, { kind: "component", type: SmartCrmCompanySourceComponent, selector: "pw-smart-crm-source" }, { kind: "component", type: SmartCrmWidgetsComponent, selector: "pw-smart-crm-widgets" }, { kind: "component", type: SmartCrmActionsComponent, selector: "pw-smart-crm-actions" }, { kind: "component", type: SmartCrmStagesComponent, selector: "pw-smart-crm-stages" }, { kind: "component", type: SmartCrmOpportunityCategoriesComponent, selector: "pw-smart-crm-opportunity-categories" }] }); }
2212
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmConfigurationComponent, selector: "pw-configuration", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>CRM Configuration</h2>\n </div>\n</div>\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n (navChange)=\"onTabChange($event)\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'actions'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Actions</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-actions></pw-smart-crm-actions>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'categories'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Categories</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-opportunity-categories></pw-smart-crm-opportunity-categories>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'stage'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Stages</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-stages></pw-smart-crm-stages>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'source'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Sources</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-source></pw-smart-crm-source>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'widget'\"\n *rbacAllow=\"'SuperAdmin'\">\n <a ngbNavLink>Widgets</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-widgets></pw-smart-crm-widgets>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'admin'\"\n *rbacAllow=\"'SuperAdmin'\">\n <a ngbNavLink>Admin</a>\n <ng-template ngbNavContent>\n <pw-coming-soon message=\"Admin\"></pw-coming-soon>\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"], dependencies: [{ kind: "directive", type: i5.RbacAllowDirective, selector: "[rbacAllow]", inputs: ["rbacAllow"] }, { kind: "directive", type: i2$2.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i2$2.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i2$2.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i2$2.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i2$2.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i2$2.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i2$2.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: i11.ComingSoonComponent, selector: "pw-coming-soon", inputs: ["message"] }, { kind: "component", type: SmartCrmCompanySourceComponent, selector: "pw-smart-crm-source" }, { kind: "component", type: SmartCrmWidgetsComponent, selector: "pw-smart-crm-widgets" }, { kind: "component", type: SmartCrmActionsComponent, selector: "pw-smart-crm-actions" }, { kind: "component", type: SmartCrmStagesComponent, selector: "pw-smart-crm-stages" }, { kind: "component", type: SmartCrmOpportunityCategoriesComponent, selector: "pw-smart-crm-opportunity-categories" }] }); }
2212
2213
  }
2213
2214
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmConfigurationComponent, decorators: [{
2214
2215
  type: Component,
2215
- args: [{ selector: 'pw-configuration', template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>CRM Configuration</h2>\n </div>\n</div>\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n (navChange)=\"onTabChange($event)\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'actions'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Actions</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-actions></pw-smart-crm-actions>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'categories'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Categories</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-opportunity-categories></pw-smart-crm-opportunity-categories>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'stage'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Stages</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-stages></pw-smart-crm-stages>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'source'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Sources</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-source></pw-smart-crm-source>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'widget'\"\n *rbacAllow=\"'SubscriptionAdmin' && 'SuperAdmin'\">\n <a ngbNavLink>Widgets</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-widgets></pw-smart-crm-widgets>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'admin'\"\n *rbacAllow=\"'SubscriptionAdmin' && 'SuperAdmin'\">\n <a ngbNavLink>Admin</a>\n <ng-template ngbNavContent>\n <pw-coming-soon message=\"Admin\"></pw-coming-soon>\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"] }]
2216
+ args: [{ selector: 'pw-configuration', template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>CRM Configuration</h2>\n </div>\n</div>\n<ul ngbNav\n #nav=\"ngbNav\"\n [(activeId)]=\"activeTab\"\n (navChange)=\"onTabChange($event)\"\n class=\"nav-tabs\">\n <li [ngbNavItem]=\"'actions'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Actions</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-actions></pw-smart-crm-actions>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'categories'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Categories</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-opportunity-categories></pw-smart-crm-opportunity-categories>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'stage'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Stages</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-stages></pw-smart-crm-stages>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'source'\"\n *rbacAllow=\"'SubscriptionAdmin'\">\n <a ngbNavLink>Sources</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-source></pw-smart-crm-source>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'widget'\"\n *rbacAllow=\"'SuperAdmin'\">\n <a ngbNavLink>Widgets</a>\n <ng-template ngbNavContent>\n <pw-smart-crm-widgets></pw-smart-crm-widgets>\n </ng-template>\n </li>\n\n <li [ngbNavItem]=\"'admin'\"\n *rbacAllow=\"'SuperAdmin'\">\n <a ngbNavLink>Admin</a>\n <ng-template ngbNavContent>\n <pw-coming-soon message=\"Admin\"></pw-coming-soon>\n </ng-template>\n </li>\n</ul>\n\n<div [ngbNavOutlet]=\"nav\"></div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}\n"] }]
2216
2217
  }], ctorParameters: () => [{ type: i0.Injector }] });
2217
2218
 
2218
2219
  class SmartCrmOpportunityCategoriesDetailsComponent extends AppBaseComponent {
@@ -2357,9 +2358,9 @@ class SmartCrmStageDetailsComponent extends AppBaseComponent {
2357
2358
  constructor(injector, crmService) {
2358
2359
  super(injector);
2359
2360
  this.crmService = crmService;
2361
+ this.categories = [];
2360
2362
  this.buttonBusy = false;
2361
2363
  this.isLoading = true;
2362
- this.categories = [];
2363
2364
  this.form = AppSmartCrm.getStageForm();
2364
2365
  }
2365
2366
  ngOnInit() {
@@ -2530,12 +2531,12 @@ class SmartCrmContactDetailsComponent extends AppBaseComponent {
2530
2531
  this.commonService = commonService;
2531
2532
  this.crmService = crmService;
2532
2533
  this.cdr = cdr;
2533
- this.submitted = false;
2534
- this.buttonBusy = false;
2535
- this.isLoading = true;
2536
2534
  this.filteredAccounts = [];
2537
2535
  this.potentials = [];
2538
2536
  this.labels = [];
2537
+ this.submitted = false;
2538
+ this.buttonBusy = false;
2539
+ this.isLoading = true;
2539
2540
  this.form = AppSmartCrm.getContactsForm();
2540
2541
  }
2541
2542
  ngOnInit() {
@@ -2566,8 +2567,8 @@ class SmartCrmContactDetailsComponent extends AppBaseComponent {
2566
2567
  this.getContactDetails(this.id);
2567
2568
  }
2568
2569
  else if (this.accountId) {
2569
- const accountyData = this.accounts.find(x => x.id === this.accountId);
2570
- this.form.get('crm_account_id').patchValue(accountyData);
2570
+ const accountData = this.accounts.find(x => x.id === this.accountId);
2571
+ this.form.get('crm_account_id').patchValue(accountData);
2571
2572
  }
2572
2573
  });
2573
2574
  }
@@ -2666,22 +2667,22 @@ class SmartCrmContactInfoComponent extends AppBaseComponent {
2666
2667
  this.modalService = modalService;
2667
2668
  this.authService = authService;
2668
2669
  this.document = document;
2669
- this.isDisabled = false;
2670
2670
  this.actions = [];
2671
- this.isFormEdit = true;
2671
+ this.filteredAccounts = [];
2672
2672
  this.accounts = [];
2673
- this.submitted = false;
2674
- this.buttonBusy = false;
2675
2673
  this.contactComments = [];
2676
- this.hasAccess = false;
2677
2674
  this.contactVersioning = [];
2678
- this.isDataLoaded = false;
2679
- this.updating = false;
2680
2675
  this.potentials = ['low', 'medium', 'high'];
2681
2676
  this.labels = [];
2682
- this.filteredAccounts = [];
2683
- this.showFullComment = false;
2677
+ this.submitted = false;
2678
+ this.buttonBusy = false;
2679
+ this.isDisabled = false;
2680
+ this.isFormEdit = true;
2684
2681
  this.isLoaded = false;
2682
+ this.isDataLoaded = false;
2683
+ this.hasAccess = false;
2684
+ this.updating = false;
2685
+ this.showFullComment = false;
2685
2686
  this.submitAction = false;
2686
2687
  this.routers = ROUTERS;
2687
2688
  this.options = { concurrency: 1, maxUploads: 3 };
@@ -3102,22 +3103,22 @@ class SmartCrmContactComponent extends AppBaseComponent {
3102
3103
  super(injector);
3103
3104
  this.crmService = crmService;
3104
3105
  this.cdr = cdr;
3106
+ this.page = 1;
3105
3107
  this.data = {
3106
3108
  contacts: [],
3107
3109
  object_count: 0,
3108
3110
  unfiltered_count: 0
3109
3111
  };
3110
- this.searchText = '';
3111
- this.loading = true;
3112
- this.hasAccess = false;
3113
- this.isLoaded = false;
3114
3112
  this.potential = [];
3115
3113
  this.labels = [];
3116
- this.page = 1;
3117
- this.routers = ROUTERS;
3118
3114
  this.selectedLabels = [];
3119
3115
  this.selectedAccount = [];
3120
3116
  this.accountDropDown = [];
3117
+ this.searchText = '';
3118
+ this.loading = true;
3119
+ this.hasAccess = false;
3120
+ this.isLoaded = false;
3121
+ this.routers = ROUTERS;
3121
3122
  }
3122
3123
  ngOnInit() {
3123
3124
  this.route.params.subscribe(data => {
@@ -3358,20 +3359,20 @@ class SmartCrmContactComponent extends AppBaseComponent {
3358
3359
  super.ngOnDestroy();
3359
3360
  }
3360
3361
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmContactComponent, deps: [{ token: i1.CrmService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3361
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmContactComponent, selector: "pw-crm-contacts", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2 *ngIf=\"!accountData?.name\">Contacts</h2>\n <h3 *ngIf=\"accountData?.name\"\n class=\"mb-2\">\n {{ accountData.name }}\n <span *ngIf=\"hasAccess || accountData.owner_id === userId\" [routerLink]=\"['/' + subscription?.slug + routers.accounts, accountData.id]\"><i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i></span>\n </h3>\n <h4 *ngIf=\"accountData?.location\"\n class=\"mb-1\">Location: {{ accountData.location }}</h4>\n <h4 *ngIf=\"accountData?.tel\">Tel: {{ accountData.tel }}</h4>\n <h4 *ngIf=\"accountData?.company_url\">\n URL:\n <a href=\"{{ accountData.company_url }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n {{ accountData.company_url }}\n </a>\n </h4>\n <a class=\"btn btn-sm btn-outline-primary float-end mb-3 ms-2\"\n data-cy=\"add-opportunities\"\n (click)=\"navigateToOpportunities()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd, accountId]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n *ngIf=\"!accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary me-3 float-end\"\n data-cy=\"list-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contacts]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-list\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.ShowAllContacts' | transloco }}\n </a>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table class=\"table\"\n #dt\n [value]=\"data.contacts\"\n [paginator]=\"data.object_count !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n [filterDelay]=\"1000\"\n stateStorage=\"local\"\n stateKey=\"smart-crm-contacts\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"row\">\n <div class=\"col-sm-3 col-6 mb-2 mb-sm-0\">\n <select class=\"form-select\" (change)=\"filterByPotential($event)\">\n <option value=\"\">Select Priority</option>\n <option *ngFor=\"let option of potential\" [selected]=\"filterByPotentials === option\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedLabels\" placeholder=\"Select Label\" [options]=\"labels\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" (onChange)=\"onLabelChange($event)\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <!-- multiple select account drop down -->\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedAccount\" placeholder=\"Select Account\" [options]=\"accountDropDown\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" optionLabel=\"name\" (onChange)=\"onSelectAccount()\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-sm-3 col-md-4 col-lg-3\">\n <div class=\"d-flex\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\" [(ngModel)]=\"searchText\" pInputText placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" class=\"form-control\" />\n </div>\n </div>\n\n </div>\n\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"first_name\">\n {{ 'Crm.ContactMessage.Name' | transloco }}\n <p-sortIcon field=\"first_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"owner_id\">\n {{ 'Crm.ContactMessage.ContactOwner' | transloco }}\n <p-sortIcon field=\"owner_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"crm_account_id\">\n {{ 'Crm.ContactMessage.AccountOwner' | transloco }}\n <p-sortIcon field=\"crm_account_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"labels\">\n {{ 'Crm.ContactMessage.Labels' | transloco }}\n <p-sortIcon field=\"labels\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"potential\">\n {{ 'Crm.ContactMessage.Potential' | transloco }}\n <p-sortIcon field=\"potential\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-contact>\n <tr>\n <td data-head=\"Name\"\n class=\"contactname\">\n <a ngbTooltip=\"{{contact.headline ? contact.headline : 'No headline for this contact'}}\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, contact.id]\">{{ (contact?.first_name || '') + ' ' + (contact?.last_name || '') | textTruncate: 20 }}\n </a>\n </td>\n <td data-head=\"OwnerName\">{{ contact.owner | ifNameNullShowEmail }}</td>\n <td data-head=\"Account Name\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n contact.crm_account.id\n ]\" ngbTooltip=\"{{contact?.crm_account.name}}\">{{ contact?.crm_account.name | textTruncate: 20 }}</a>\n </td>\n <td data-head=\"Labels\">\n <span class=\"badge bg-info m-1\"\n *ngFor=\"let item of contact.labels\">{{\n item\n }}</span>\n </td>\n <td data-head=\"Potential\">\n <span [appDynamicBadge]=\"{ itemsArray: potential, item: contact.potential }\"\n color=\"warning\"\n class=\"badge\">{{ contact.potential }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Show\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/crm/contacts/info',\n contact.id\n ]\">\n <i class=\"fa fa-eye see-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Add opportunity\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\"\n [queryParams]=\"{ contact_id: contact.id }\">\n <i class=\"fa fa-plus-circle add-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactDetails,\n contact.id\n ]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(contact.id)\"\n (keydown.space)=\"onDelete(contact.id)\"\n (click)=\"onDelete(contact.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.ContactsAdminMessage' | transloco\"> </pw-no-data>\n</div>\n\n<ng-container>\n <div class=\"row mt-5\"\n *ngIf=\"isLoaded && !accountData?.name\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"contactInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"contactInsight\"\n [paginator]=\"contactInsight?.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.ContactMessage.Reason' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\" class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span\n [ngbTooltip]=\"insight?.headline\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n {{ insight?.headline | textTruncate: 20 }}\n </span>\n </td>\n <td data-head=\"Reason\">\n {{ insight.reason }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"contactInsight?.length === 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div>\n <ng-template [ngIf]=\"contactGeography\">\n <plotly-plot [data]=\"contactGeography?.data\"\n [config]=\"contactGeography?.config\"\n [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!contactGeography\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.table tr{vertical-align:baseline}@media (min-width: 640px){.list-inline{width:150px}}@media (min-width: 640px) and (max-width: 768px){.primeng-datatable-container tr td{width:350px}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i5.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i8$1.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i10.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i10.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i14.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
3362
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmContactComponent, selector: "pw-crm-contacts", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2 *ngIf=\"!accountData?.name\">Contacts</h2>\n <h3 *ngIf=\"accountData?.name\"\n class=\"mb-2\">\n {{ accountData.name }}\n <span *ngIf=\"hasAccess || accountData.owner_id === userId\" [routerLink]=\"['/' + subscription?.slug + routers.accounts, accountData.id]\"><i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i></span>\n </h3>\n <h4 *ngIf=\"accountData?.location\"\n class=\"mb-1\">Location: {{ accountData.location }}</h4>\n <h4 *ngIf=\"accountData?.tel\">Tel: {{ accountData.tel }}</h4>\n <h4 *ngIf=\"accountData?.company_url\">\n URL:\n <a href=\"{{ accountData.company_url }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n {{ accountData.company_url }}\n </a>\n </h4>\n <a class=\"btn btn-sm btn-outline-primary float-end mb-3 ms-2\"\n data-cy=\"add-opportunities\"\n (click)=\"navigateToOpportunities()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd, accountId]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n *ngIf=\"!accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary me-3 float-end\"\n data-cy=\"list-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contacts]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-list\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.ShowAllContacts' | transloco }}\n </a>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table class=\"table\"\n #dt\n [value]=\"data.contacts\"\n [paginator]=\"data.object_count !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n [filterDelay]=\"1000\"\n stateStorage=\"local\"\n stateKey=\"smart-crm-contacts\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"row\">\n <div class=\"col-sm-3 col-6 mb-2 mb-sm-0\">\n <select class=\"form-select\" (change)=\"filterByPotential($event)\">\n <option value=\"\">Select Priority</option>\n <option *ngFor=\"let option of potential\" [selected]=\"filterByPotentials === option\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedLabels\" placeholder=\"Select Label\" [options]=\"labels\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" (onChange)=\"onLabelChange($event)\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <!-- multiple select account drop down -->\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedAccount\" placeholder=\"Select Account\" [options]=\"accountDropDown\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" optionLabel=\"name\" (onChange)=\"onSelectAccount()\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-sm-3 col-md-4 col-lg-3\">\n <div class=\"d-flex\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\" [(ngModel)]=\"searchText\" pInputText placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" class=\"form-control\" />\n </div>\n </div>\n\n </div>\n\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"first_name\">\n {{ 'Crm.ContactMessage.Name' | transloco }}\n <p-sortIcon field=\"first_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"owner_id\">\n {{ 'Crm.ContactMessage.ContactOwner' | transloco }}\n <p-sortIcon field=\"owner_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"crm_account_id\">\n {{ 'Crm.ContactMessage.AccountOwner' | transloco }}\n <p-sortIcon field=\"crm_account_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"labels\">\n {{ 'Crm.ContactMessage.Labels' | transloco }}\n <p-sortIcon field=\"labels\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"potential\">\n {{ 'Crm.ContactMessage.Potential' | transloco }}\n <p-sortIcon field=\"potential\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-contact>\n <tr>\n <td data-head=\"Name\"\n class=\"contactname\">\n <a ngbTooltip=\"{{contact.headline ? contact.headline : 'No headline for this contact'}}\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, contact.id]\">{{ (contact?.first_name || '') + ' ' + (contact?.last_name || '') | textTruncate: 20 }}\n </a>\n </td>\n <td data-head=\"OwnerName\">{{ contact.owner | ifNameNullShowEmail }}</td>\n <td data-head=\"Account Name\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n contact.crm_account.id\n ]\" ngbTooltip=\"{{contact?.crm_account.name}}\">{{ contact?.crm_account.name | textTruncate: 20 }}</a>\n </td>\n <td data-head=\"Labels\">\n <span class=\"badge bg-info m-1\"\n *ngFor=\"let item of contact.labels\">{{\n item\n }}</span>\n </td>\n <td data-head=\"Potential\">\n <span [appDynamicBadge]=\"{ itemsArray: potential, item: contact.potential }\"\n color=\"warning\"\n class=\"badge\">{{ contact.potential }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Show\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/crm/contacts/info',\n contact.id\n ]\">\n <i class=\"fa fa-eye see-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Add opportunity\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\"\n [queryParams]=\"{ contact_id: contact.id }\">\n <i class=\"fa fa-plus-circle add-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactDetails,\n contact.id\n ]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(contact.id)\"\n (keydown.space)=\"onDelete(contact.id)\"\n (click)=\"onDelete(contact.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.ContactsAdminMessage' | transloco\"> </pw-no-data>\n</div>\n\n<ng-container>\n <div class=\"row mt-5\"\n *ngIf=\"isLoaded && !accountData?.name\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"contactInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"contactInsight\"\n [paginator]=\"contactInsight?.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.ContactMessage.Reason' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\" class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span\n [ngbTooltip]=\"insight?.headline\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n {{ insight?.headline | textTruncate: 20 }}\n </span>\n </td>\n <td data-head=\"Reason\">\n {{ insight.reason }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"!contactInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div>\n <ng-template [ngIf]=\"contactGeography\">\n <plotly-plot [data]=\"contactGeography?.data\"\n [config]=\"contactGeography?.config\"\n [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!contactGeography\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.table tr{vertical-align:baseline}@media (min-width: 640px){.list-inline{width:150px}}@media (min-width: 640px) and (max-width: 768px){.primeng-datatable-container tr td{width:350px}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i5.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i8$1.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i10.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i10.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i14.IfNameNullShowEmailPipe, name: "ifNameNullShowEmail" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
3362
3363
  }
3363
3364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmContactComponent, decorators: [{
3364
3365
  type: Component,
3365
- args: [{ selector: 'pw-crm-contacts', template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2 *ngIf=\"!accountData?.name\">Contacts</h2>\n <h3 *ngIf=\"accountData?.name\"\n class=\"mb-2\">\n {{ accountData.name }}\n <span *ngIf=\"hasAccess || accountData.owner_id === userId\" [routerLink]=\"['/' + subscription?.slug + routers.accounts, accountData.id]\"><i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i></span>\n </h3>\n <h4 *ngIf=\"accountData?.location\"\n class=\"mb-1\">Location: {{ accountData.location }}</h4>\n <h4 *ngIf=\"accountData?.tel\">Tel: {{ accountData.tel }}</h4>\n <h4 *ngIf=\"accountData?.company_url\">\n URL:\n <a href=\"{{ accountData.company_url }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n {{ accountData.company_url }}\n </a>\n </h4>\n <a class=\"btn btn-sm btn-outline-primary float-end mb-3 ms-2\"\n data-cy=\"add-opportunities\"\n (click)=\"navigateToOpportunities()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd, accountId]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n *ngIf=\"!accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary me-3 float-end\"\n data-cy=\"list-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contacts]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-list\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.ShowAllContacts' | transloco }}\n </a>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table class=\"table\"\n #dt\n [value]=\"data.contacts\"\n [paginator]=\"data.object_count !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n [filterDelay]=\"1000\"\n stateStorage=\"local\"\n stateKey=\"smart-crm-contacts\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"row\">\n <div class=\"col-sm-3 col-6 mb-2 mb-sm-0\">\n <select class=\"form-select\" (change)=\"filterByPotential($event)\">\n <option value=\"\">Select Priority</option>\n <option *ngFor=\"let option of potential\" [selected]=\"filterByPotentials === option\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedLabels\" placeholder=\"Select Label\" [options]=\"labels\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" (onChange)=\"onLabelChange($event)\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <!-- multiple select account drop down -->\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedAccount\" placeholder=\"Select Account\" [options]=\"accountDropDown\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" optionLabel=\"name\" (onChange)=\"onSelectAccount()\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-sm-3 col-md-4 col-lg-3\">\n <div class=\"d-flex\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\" [(ngModel)]=\"searchText\" pInputText placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" class=\"form-control\" />\n </div>\n </div>\n\n </div>\n\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"first_name\">\n {{ 'Crm.ContactMessage.Name' | transloco }}\n <p-sortIcon field=\"first_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"owner_id\">\n {{ 'Crm.ContactMessage.ContactOwner' | transloco }}\n <p-sortIcon field=\"owner_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"crm_account_id\">\n {{ 'Crm.ContactMessage.AccountOwner' | transloco }}\n <p-sortIcon field=\"crm_account_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"labels\">\n {{ 'Crm.ContactMessage.Labels' | transloco }}\n <p-sortIcon field=\"labels\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"potential\">\n {{ 'Crm.ContactMessage.Potential' | transloco }}\n <p-sortIcon field=\"potential\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-contact>\n <tr>\n <td data-head=\"Name\"\n class=\"contactname\">\n <a ngbTooltip=\"{{contact.headline ? contact.headline : 'No headline for this contact'}}\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, contact.id]\">{{ (contact?.first_name || '') + ' ' + (contact?.last_name || '') | textTruncate: 20 }}\n </a>\n </td>\n <td data-head=\"OwnerName\">{{ contact.owner | ifNameNullShowEmail }}</td>\n <td data-head=\"Account Name\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n contact.crm_account.id\n ]\" ngbTooltip=\"{{contact?.crm_account.name}}\">{{ contact?.crm_account.name | textTruncate: 20 }}</a>\n </td>\n <td data-head=\"Labels\">\n <span class=\"badge bg-info m-1\"\n *ngFor=\"let item of contact.labels\">{{\n item\n }}</span>\n </td>\n <td data-head=\"Potential\">\n <span [appDynamicBadge]=\"{ itemsArray: potential, item: contact.potential }\"\n color=\"warning\"\n class=\"badge\">{{ contact.potential }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Show\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/crm/contacts/info',\n contact.id\n ]\">\n <i class=\"fa fa-eye see-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Add opportunity\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\"\n [queryParams]=\"{ contact_id: contact.id }\">\n <i class=\"fa fa-plus-circle add-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactDetails,\n contact.id\n ]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(contact.id)\"\n (keydown.space)=\"onDelete(contact.id)\"\n (click)=\"onDelete(contact.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.ContactsAdminMessage' | transloco\"> </pw-no-data>\n</div>\n\n<ng-container>\n <div class=\"row mt-5\"\n *ngIf=\"isLoaded && !accountData?.name\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"contactInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"contactInsight\"\n [paginator]=\"contactInsight?.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.ContactMessage.Reason' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\" class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span\n [ngbTooltip]=\"insight?.headline\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n {{ insight?.headline | textTruncate: 20 }}\n </span>\n </td>\n <td data-head=\"Reason\">\n {{ insight.reason }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"contactInsight?.length === 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div>\n <ng-template [ngIf]=\"contactGeography\">\n <plotly-plot [data]=\"contactGeography?.data\"\n [config]=\"contactGeography?.config\"\n [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!contactGeography\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.table tr{vertical-align:baseline}@media (min-width: 640px){.list-inline{width:150px}}@media (min-width: 640px) and (max-width: 768px){.primeng-datatable-container tr td{width:350px}}\n"] }]
3366
+ args: [{ selector: 'pw-crm-contacts', template: "<div class=\"row\">\n <div class=\"col-12 mb-3\">\n <h2 *ngIf=\"!accountData?.name\">Contacts</h2>\n <h3 *ngIf=\"accountData?.name\"\n class=\"mb-2\">\n {{ accountData.name }}\n <span *ngIf=\"hasAccess || accountData.owner_id === userId\" [routerLink]=\"['/' + subscription?.slug + routers.accounts, accountData.id]\"><i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i></span>\n </h3>\n <h4 *ngIf=\"accountData?.location\"\n class=\"mb-1\">Location: {{ accountData.location }}</h4>\n <h4 *ngIf=\"accountData?.tel\">Tel: {{ accountData.tel }}</h4>\n <h4 *ngIf=\"accountData?.company_url\">\n URL:\n <a href=\"{{ accountData.company_url }}\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n {{ accountData.company_url }}\n </a>\n </h4>\n <a class=\"btn btn-sm btn-outline-primary float-end mb-3 ms-2\"\n data-cy=\"add-opportunities\"\n (click)=\"navigateToOpportunities()\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd, accountId]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n *ngIf=\"!accountData?.name\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary me-3 float-end\"\n data-cy=\"list-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.contacts]\"\n *ngIf=\"accountData?.name\">\n <i class=\"fa fa-plus-list\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.ShowAllContacts' | transloco }}\n </a>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table class=\"table\"\n #dt\n [value]=\"data.contacts\"\n [paginator]=\"data.object_count !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n [lazy]=\"true\"\n [filterDelay]=\"1000\"\n stateStorage=\"local\"\n stateKey=\"smart-crm-contacts\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"row\">\n <div class=\"col-sm-3 col-6 mb-2 mb-sm-0\">\n <select class=\"form-select\" (change)=\"filterByPotential($event)\">\n <option value=\"\">Select Priority</option>\n <option *ngFor=\"let option of potential\" [selected]=\"filterByPotentials === option\" [value]=\"option\">\n {{ option }}\n </option>\n </select>\n </div>\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedLabels\" placeholder=\"Select Label\" [options]=\"labels\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" (onChange)=\"onLabelChange($event)\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <!-- multiple select account drop down -->\n <div class=\"col-sm-3 col-6\">\n <p-multiSelect [(ngModel)]=\"selectedAccount\" placeholder=\"Select Account\" [options]=\"accountDropDown\" [filter]=\"true\"\n [showHeader]=\"true\" [showToggleAll]=\"true\" optionLabel=\"name\" (onChange)=\"onSelectAccount()\" appendTo=\"body\">\n </p-multiSelect>\n </div>\n <div class=\"col-sm-3 col-md-4 col-lg-3\">\n <div class=\"d-flex\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\" [(ngModel)]=\"searchText\" pInputText placeholder=\"Search contact...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\" class=\"form-control\" />\n </div>\n </div>\n\n </div>\n\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"first_name\">\n {{ 'Crm.ContactMessage.Name' | transloco }}\n <p-sortIcon field=\"first_name\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"owner_id\">\n {{ 'Crm.ContactMessage.ContactOwner' | transloco }}\n <p-sortIcon field=\"owner_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"crm_account_id\">\n {{ 'Crm.ContactMessage.AccountOwner' | transloco }}\n <p-sortIcon field=\"crm_account_id\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"labels\">\n {{ 'Crm.ContactMessage.Labels' | transloco }}\n <p-sortIcon field=\"labels\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"potential\">\n {{ 'Crm.ContactMessage.Potential' | transloco }}\n <p-sortIcon field=\"potential\"></p-sortIcon>\n </th>\n <th scope=\"true\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-contact>\n <tr>\n <td data-head=\"Name\"\n class=\"contactname\">\n <a ngbTooltip=\"{{contact.headline ? contact.headline : 'No headline for this contact'}}\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, contact.id]\">{{ (contact?.first_name || '') + ' ' + (contact?.last_name || '') | textTruncate: 20 }}\n </a>\n </td>\n <td data-head=\"OwnerName\">{{ contact.owner | ifNameNullShowEmail }}</td>\n <td data-head=\"Account Name\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n contact.crm_account.id\n ]\" ngbTooltip=\"{{contact?.crm_account.name}}\">{{ contact?.crm_account.name | textTruncate: 20 }}</a>\n </td>\n <td data-head=\"Labels\">\n <span class=\"badge bg-info m-1\"\n *ngFor=\"let item of contact.labels\">{{\n item\n }}</span>\n </td>\n <td data-head=\"Potential\">\n <span [appDynamicBadge]=\"{ itemsArray: potential, item: contact.potential }\"\n color=\"warning\"\n class=\"badge\">{{ contact.potential }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Show\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + '/crm/contacts/info',\n contact.id\n ]\">\n <i class=\"fa fa-eye see-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Add opportunity\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\"\n [queryParams]=\"{ contact_id: contact.id }\">\n <i class=\"fa fa-plus-circle add-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactDetails,\n contact.id\n ]\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </li>\n <li *ngIf=\"\n hasAccess ||\n contact.owner_id === userId ||\n contact.crm_account.owner_id === userId\n \"\n ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(contact.id)\"\n (keydown.space)=\"onDelete(contact.id)\"\n (click)=\"onDelete(contact.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n <div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.ContactsAdminMessage' | transloco\"> </pw-no-data>\n</div>\n\n<ng-container>\n <div class=\"row mt-5\"\n *ngIf=\"isLoaded && !accountData?.name\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"contactInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"contactInsight\"\n [paginator]=\"contactInsight?.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.ContactMessage.Reason' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\" class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span\n [ngbTooltip]=\"insight?.headline\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n {{ insight?.headline | textTruncate: 20 }}\n </span>\n </td>\n <td data-head=\"Reason\">\n {{ insight.reason }}\n </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"!contactInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div>\n <ng-template [ngIf]=\"contactGeography\">\n <plotly-plot [data]=\"contactGeography?.data\"\n [config]=\"contactGeography?.config\"\n [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!contactGeography\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.table tr{vertical-align:baseline}@media (min-width: 640px){.list-inline{width:150px}}@media (min-width: 640px) and (max-width: 768px){.primeng-datatable-container tr td{width:350px}}\n"] }]
3366
3367
  }], ctorParameters: () => [{ type: i1.CrmService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }] });
3367
3368
 
3368
3369
  class SmartCrmCustomerSuccessComponent {
3369
3370
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmCustomerSuccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3370
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmCustomerSuccessComponent, selector: "pw-smart-crm-customer-success", ngImport: i0, template: "<pw-coming-soon message=\"Customer Success\"></pw-coming-soon>\n", dependencies: [{ kind: "component", type: i11.ComingSoonComponent, selector: "pw-coming-soon", inputs: ["message"] }] }); }
3371
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmCustomerSuccessComponent, selector: "pw-smart-crm-customer-success", ngImport: i0, template: "<pw-coming-soon message=\"CX & Success\"></pw-coming-soon>\n", dependencies: [{ kind: "component", type: i11.ComingSoonComponent, selector: "pw-coming-soon", inputs: ["message"] }] }); }
3371
3372
  }
3372
3373
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmCustomerSuccessComponent, decorators: [{
3373
3374
  type: Component,
3374
- args: [{ selector: 'pw-smart-crm-customer-success', template: "<pw-coming-soon message=\"Customer Success\"></pw-coming-soon>\n" }]
3375
+ args: [{ selector: 'pw-smart-crm-customer-success', template: "<pw-coming-soon message=\"CX & Success\"></pw-coming-soon>\n" }]
3375
3376
  }] });
3376
3377
 
3377
3378
  class SmartCrmSocialMediaComponent {
@@ -3388,14 +3389,14 @@ class SmartCrmCommunicationsInsightComponent extends AppBaseComponent {
3388
3389
  super(injector);
3389
3390
  this.crmService = crmService;
3390
3391
  this.cdr = cdr;
3391
- this.searchText = '';
3392
3392
  this.data = {
3393
3393
  crm_newsletters: [],
3394
3394
  object_count: 0,
3395
3395
  unfiltered_count: 0
3396
3396
  };
3397
- this.isLoaded = false;
3397
+ this.searchText = '';
3398
3398
  this.loading = true;
3399
+ this.isLoaded = false;
3399
3400
  this.communicationsInsightLoaded = false;
3400
3401
  this.geographyLoaded = false;
3401
3402
  this.routers = ROUTERS;
@@ -3541,10 +3542,10 @@ class SmartCrmContactInsightComponent extends AppBaseComponent {
3541
3542
  this.cdr = cdr;
3542
3543
  this.adminService = adminService;
3543
3544
  this.loading = true;
3544
- this.routers = ROUTERS;
3545
3545
  this.contactInsightLoaded = false;
3546
3546
  this.geographyLoaded = false;
3547
3547
  this.userBaseLoaded = false;
3548
+ this.routers = ROUTERS;
3548
3549
  }
3549
3550
  ngOnInit() {
3550
3551
  this.getUserSubscription().subscribe(response => {
@@ -3607,11 +3608,11 @@ class SmartCrmContactInsightComponent extends AppBaseComponent {
3607
3608
  super.ngOnDestroy();
3608
3609
  }
3609
3610
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmContactInsightComponent, deps: [{ token: i1.CrmService }, { token: i0.Injector }, { token: i0.ChangeDetectorRef }, { token: i2$3.AdminService }], target: i0.ɵɵFactoryTarget.Component }); }
3610
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmContactInsightComponent, selector: "pw-smart-crm-contact-insight", usesInheritance: true, ngImport: i0, template: "\n\n<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n\n<div class=\"row mt-5\">\n\n <!-- User Base Graph -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contact Evolution Timeline</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!userBaseLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"userBaseLoaded && userBaseData?.data?.length\">\n <plotly-plot [data]=\"userBaseData?.data\"\n [config]=\"userBaseData?.config\"\n [layout]=\"userBaseData?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"userBaseLoaded && !userBaseData?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!geographyLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"geographyLoaded && contactGeography?.data?.length\">\n <plotly-plot [data]=\"contactGeography?.data\" [config]=\"contactGeography?.config\" [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"geographyLoaded && !contactGeography?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!contactInsightLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive\" *ngIf=\"contactInsightLoaded && contactInsight?.length\">\n <p-table class=\"table\" #dt [value]=\"contactInsight\" [paginator]=\"contactInsight?.length !== 0\" [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\" [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\"> {{ 'Crm.ContactMessage.Reason' | transloco }} </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\"\n class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span [ngbTooltip]=\"insight?.headline\" container=\"body\" tooltipClass=\"custom-tooltip\" placement=\"bottom\"> {{\n insight?.headline | textTruncate: 20 }} </span>\n </td>\n <td data-head=\"Reason\"> {{ insight.reason }} </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"contactInsight?.length === 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n </div>\n", dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i11.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges"], outputs: ["dateRangeChange"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
3611
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmContactInsightComponent, selector: "pw-smart-crm-contact-insight", usesInheritance: true, ngImport: i0, template: "\n\n<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n\n<div class=\"row mt-5\">\n\n <!-- User Base Graph -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contact Evolution Timeline</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!userBaseLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"userBaseLoaded && userBaseData?.data?.length\">\n <plotly-plot [data]=\"userBaseData?.data\"\n [config]=\"userBaseData?.config\"\n [layout]=\"userBaseData?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"userBaseLoaded && !userBaseData?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!geographyLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"geographyLoaded && contactGeography?.data?.length\">\n <plotly-plot [data]=\"contactGeography?.data\" [config]=\"contactGeography?.config\" [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"geographyLoaded && !contactGeography?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!contactInsightLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive\" *ngIf=\"contactInsightLoaded && contactInsight?.length\">\n <p-table class=\"table\" #dt [value]=\"contactInsight\" [paginator]=\"contactInsight?.length !== 0\" [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\" [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\"> {{ 'Crm.ContactMessage.Reason' | transloco }} </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\"\n class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span [ngbTooltip]=\"insight?.headline\" container=\"body\" tooltipClass=\"custom-tooltip\" placement=\"bottom\"> {{\n insight?.headline | textTruncate: 20 }} </span>\n </td>\n <td data-head=\"Reason\"> {{ insight.reason }} </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"!contactInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n </div>\n", dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i11.DateRangePickerComponent, selector: "app-date-picker", inputs: ["selectedDateRange", "dateRanges"], outputs: ["dateRangeChange"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
3611
3612
  }
3612
3613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmContactInsightComponent, decorators: [{
3613
3614
  type: Component,
3614
- args: [{ selector: 'pw-smart-crm-contact-insight', template: "\n\n<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n\n<div class=\"row mt-5\">\n\n <!-- User Base Graph -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contact Evolution Timeline</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!userBaseLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"userBaseLoaded && userBaseData?.data?.length\">\n <plotly-plot [data]=\"userBaseData?.data\"\n [config]=\"userBaseData?.config\"\n [layout]=\"userBaseData?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"userBaseLoaded && !userBaseData?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!geographyLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"geographyLoaded && contactGeography?.data?.length\">\n <plotly-plot [data]=\"contactGeography?.data\" [config]=\"contactGeography?.config\" [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"geographyLoaded && !contactGeography?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!contactInsightLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive\" *ngIf=\"contactInsightLoaded && contactInsight?.length\">\n <p-table class=\"table\" #dt [value]=\"contactInsight\" [paginator]=\"contactInsight?.length !== 0\" [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\" [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\"> {{ 'Crm.ContactMessage.Reason' | transloco }} </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\"\n class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span [ngbTooltip]=\"insight?.headline\" container=\"body\" tooltipClass=\"custom-tooltip\" placement=\"bottom\"> {{\n insight?.headline | textTruncate: 20 }} </span>\n </td>\n <td data-head=\"Reason\"> {{ insight.reason }} </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"contactInsight?.length === 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n </div>\n" }]
3615
+ args: [{ selector: 'pw-smart-crm-contact-insight', template: "\n\n<app-date-picker\n[selectedDateRange]=\"selectedDateRange\"\n[dateRanges]=\"dateRanges\"\n(dateRangeChange)=\"onDateRangeSelect($event)\">\n</app-date-picker>\n\n<div class=\"row mt-5\">\n\n <!-- User Base Graph -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contact Evolution Timeline</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!userBaseLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"userBaseLoaded && userBaseData?.data?.length\">\n <plotly-plot [data]=\"userBaseData?.data\"\n [config]=\"userBaseData?.config\"\n [layout]=\"userBaseData?.layout\" [useResizeHandler]=\"true\"></plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"userBaseLoaded && !userBaseData?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Contacts Location</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!geographyLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div>\n <ng-template [ngIf]=\"geographyLoaded && contactGeography?.data?.length\">\n <plotly-plot [data]=\"contactGeography?.data\" [config]=\"contactGeography?.config\" [layout]=\"contactGeography?.layout\" [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"geographyLoaded && !contactGeography?.data?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"w-100 text-center mt-3\">\n <ng-template [ngIf]=\"!contactInsightLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </ng-template>\n </div>\n <div class=\"primeng-datatable-container table-responsive\" *ngIf=\"contactInsightLoaded && contactInsight?.length\">\n <p-table class=\"table\" #dt [value]=\"contactInsight\" [paginator]=\"contactInsight?.length !== 0\" [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"contactInsight.length\" [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">{{ 'Crm.Summary.Contact' | transloco }}</th>\n <th scope=\"true\">{{ 'Crm.Summary.Title' | transloco }}</th>\n <th scope=\"true\"> {{ 'Crm.ContactMessage.Reason' | transloco }} </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-insight>\n <tr>\n <td data-head=\"Contact\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.contactInfo, insight.crm_contact_id]\"\n class=\"name-link\">\n <span [ngbTooltip]=\"insight?.name\">{{ insight?.name | textTruncate:20 }}</span>\n </a>\n </td>\n <td data-head=\"Headline\">\n <span [ngbTooltip]=\"insight?.headline\" container=\"body\" tooltipClass=\"custom-tooltip\" placement=\"bottom\"> {{\n insight?.headline | textTruncate: 20 }} </span>\n </td>\n <td data-head=\"Reason\"> {{ insight.reason }} </td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"contactInsight?.length !== 0\">Total: {{ contactInsight.length }}</span>\n </div>\n <div *ngIf=\"!contactInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.ContactMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n\n </div>\n" }]
3615
3616
  }], ctorParameters: () => [{ type: i1.CrmService }, { type: i0.Injector }, { type: i0.ChangeDetectorRef }, { type: i2$3.AdminService }] });
3616
3617
 
3617
3618
  class SmartCrmOpportunitiesInsightComponent extends AppBaseComponent {
@@ -3620,29 +3621,29 @@ class SmartCrmOpportunitiesInsightComponent extends AppBaseComponent {
3620
3621
  this.crmService = crmService;
3621
3622
  this.cdr = cdr;
3622
3623
  this.productService = productService;
3623
- this.hasAccess = false;
3624
- this.searchText = '';
3625
3624
  this.data = {
3626
3625
  crm_opportunities: [],
3627
3626
  object_count: 0,
3628
3627
  unfiltered_count: 0
3629
3628
  };
3630
- this.id = '';
3631
- this.isLoaded = false;
3632
- this.loading = true;
3629
+ this.searchText = '';
3633
3630
  this.searchStages = [];
3631
+ this.searchCategories = [];
3634
3632
  this.filterByStages = [];
3635
3633
  this.filterByCategories = [];
3636
- this.searchCategories = [];
3637
3634
  this.page = 1;
3638
3635
  this.stages = [];
3639
3636
  this.categories = [];
3640
- this.routers = ROUTERS;
3637
+ this.id = '';
3638
+ this.loading = true;
3639
+ this.isLoaded = false;
3640
+ this.hasAccess = false;
3641
3641
  this.opportunitiesInsightLoaded = false;
3642
3642
  this.opportunitiesGeographyLoaded = false;
3643
3643
  this.opportunitiesCategoryLoaded = false;
3644
3644
  this.opportunitiesStageLoaded = false;
3645
3645
  this.opportunitiesGraphLoaded = false;
3646
+ this.routers = ROUTERS;
3646
3647
  }
3647
3648
  ngOnInit() {
3648
3649
  this.getUserSubscription().subscribe(subscription => {
@@ -3756,7 +3757,6 @@ class SmartCrmAccountInsightComponent extends AppBaseComponent {
3756
3757
  constructor(crmService, injector) {
3757
3758
  super(injector);
3758
3759
  this.crmService = crmService;
3759
- this.routers = ROUTERS;
3760
3760
  this.signUpLastNinetyDaysLoaded = false;
3761
3761
  this.accountLastActivitiesLoaded = false;
3762
3762
  this.churnedAccountLoaded = false;
@@ -3767,6 +3767,7 @@ class SmartCrmAccountInsightComponent extends AppBaseComponent {
3767
3767
  this.accountGeographyLoaded = false;
3768
3768
  this.accountInsightLoaded = false;
3769
3769
  this.magicMomentLoaded = false;
3770
+ this.routers = ROUTERS;
3770
3771
  }
3771
3772
  ngOnInit() {
3772
3773
  this.getUserSubscription().subscribe(response => {
@@ -3967,28 +3968,28 @@ class SmartCrmInsightComponent {
3967
3968
  { id: 1, title: 'Accounts' },
3968
3969
  { id: 2, title: 'Contacts' },
3969
3970
  { id: 3, title: 'Opportunities' },
3970
- { id: 4, title: 'Email Marketing' },
3971
+ { id: 4, title: 'E-Marketing' },
3971
3972
  { id: 5, title: 'Analysis' }
3972
3973
  ];
3973
3974
  }
3974
3975
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmInsightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3975
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmInsightComponent, selector: "pw-smart-crm-insight", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>Insight</h2>\n <p>\n Below, you\u2019ll find key insights for your CRM. The data updates every few hours.\n </p>\n <ul ngbNav\n #nav=\"ngbNav\"\n class=\"nav-tabs\">\n <li *ngFor=\"let tab of tabs\" [ngbNavItem]=\"tab.id\">\n <a ngbNavLink>{{ tab.title }}</a>\n <ng-template ngbNavContent>\n <ng-container *ngIf=\"tab.title === 'Accounts'\">\n <pw-smart-crm-account-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Contacts'\">\n <pw-smart-crm-contact-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Opportunities'\">\n <pw-smart-crm-opportunities-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Email Marketing'\">\n <pw-smart-crm-communications-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Analysis'\">\n <pw-smart-crm-analysis/>\n </ng-container>\n </ng-template>\n </li>\n </ul>\n\n <div [ngbNavOutlet]=\"nav\"></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i2$2.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i2$2.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i2$2.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i2$2.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i2$2.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i2$2.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: SmartCrmCommunicationsInsightComponent, selector: "pw-smart-crm-communications-insight" }, { kind: "component", type: SmartCrmAnalysisComponent, selector: "pw-smart-crm-analysis" }, { kind: "component", type: SmartCrmContactInsightComponent, selector: "pw-smart-crm-contact-insight" }, { kind: "component", type: SmartCrmOpportunitiesInsightComponent, selector: "pw-smart-crm-opportunities-insight" }, { kind: "component", type: SmartCrmAccountInsightComponent, selector: "pw-smart-crm-account-insight" }] }); }
3976
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmInsightComponent, selector: "pw-smart-crm-insight", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>Insight</h2>\n <p>\n Below, you\u2019ll find key insights for your CRM. The data updates every few hours.\n </p>\n <ul ngbNav\n #nav=\"ngbNav\"\n class=\"nav-tabs\">\n <li *ngFor=\"let tab of tabs\" [ngbNavItem]=\"tab.id\">\n <a ngbNavLink>{{ tab.title }}</a>\n <ng-template ngbNavContent>\n <ng-container *ngIf=\"tab.title === 'Accounts'\">\n <pw-smart-crm-account-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Contacts'\">\n <pw-smart-crm-contact-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Opportunities'\">\n <pw-smart-crm-opportunities-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'E-Marketing'\">\n <pw-smart-crm-communications-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Analysis'\">\n <pw-smart-crm-analysis/>\n </ng-container>\n </ng-template>\n </li>\n </ul>\n\n <div [ngbNavOutlet]=\"nav\"></div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgbNavContent, selector: "ng-template[ngbNavContent]" }, { kind: "directive", type: i2$2.NgbNav, selector: "[ngbNav]", inputs: ["activeId", "animation", "destroyOnHide", "orientation", "roles", "keyboard"], outputs: ["activeIdChange", "shown", "hidden", "navChange"], exportAs: ["ngbNav"] }, { kind: "directive", type: i2$2.NgbNavItem, selector: "[ngbNavItem]", inputs: ["destroyOnHide", "disabled", "domId", "ngbNavItem"], outputs: ["shown", "hidden"], exportAs: ["ngbNavItem"] }, { kind: "directive", type: i2$2.NgbNavItemRole, selector: "[ngbNavItem]:not(ng-container)" }, { kind: "directive", type: i2$2.NgbNavLink, selector: "a[ngbNavLink]" }, { kind: "directive", type: i2$2.NgbNavLinkBase, selector: "[ngbNavLink]" }, { kind: "component", type: i2$2.NgbNavOutlet, selector: "[ngbNavOutlet]", inputs: ["paneRole", "ngbNavOutlet"] }, { kind: "component", type: SmartCrmCommunicationsInsightComponent, selector: "pw-smart-crm-communications-insight" }, { kind: "component", type: SmartCrmAnalysisComponent, selector: "pw-smart-crm-analysis" }, { kind: "component", type: SmartCrmContactInsightComponent, selector: "pw-smart-crm-contact-insight" }, { kind: "component", type: SmartCrmOpportunitiesInsightComponent, selector: "pw-smart-crm-opportunities-insight" }, { kind: "component", type: SmartCrmAccountInsightComponent, selector: "pw-smart-crm-account-insight" }] }); }
3976
3977
  }
3977
3978
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmInsightComponent, decorators: [{
3978
3979
  type: Component,
3979
- args: [{ selector: 'pw-smart-crm-insight', template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>Insight</h2>\n <p>\n Below, you\u2019ll find key insights for your CRM. The data updates every few hours.\n </p>\n <ul ngbNav\n #nav=\"ngbNav\"\n class=\"nav-tabs\">\n <li *ngFor=\"let tab of tabs\" [ngbNavItem]=\"tab.id\">\n <a ngbNavLink>{{ tab.title }}</a>\n <ng-template ngbNavContent>\n <ng-container *ngIf=\"tab.title === 'Accounts'\">\n <pw-smart-crm-account-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Contacts'\">\n <pw-smart-crm-contact-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Opportunities'\">\n <pw-smart-crm-opportunities-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Email Marketing'\">\n <pw-smart-crm-communications-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Analysis'\">\n <pw-smart-crm-analysis/>\n </ng-container>\n </ng-template>\n </li>\n </ul>\n\n <div [ngbNavOutlet]=\"nav\"></div>\n </div>\n</div>\n" }]
3980
+ args: [{ selector: 'pw-smart-crm-insight', template: "<div class=\"row\">\n <div class=\"col-12 mb-0\">\n <h2>Insight</h2>\n <p>\n Below, you\u2019ll find key insights for your CRM. The data updates every few hours.\n </p>\n <ul ngbNav\n #nav=\"ngbNav\"\n class=\"nav-tabs\">\n <li *ngFor=\"let tab of tabs\" [ngbNavItem]=\"tab.id\">\n <a ngbNavLink>{{ tab.title }}</a>\n <ng-template ngbNavContent>\n <ng-container *ngIf=\"tab.title === 'Accounts'\">\n <pw-smart-crm-account-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Contacts'\">\n <pw-smart-crm-contact-insight />\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Opportunities'\">\n <pw-smart-crm-opportunities-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'E-Marketing'\">\n <pw-smart-crm-communications-insight/>\n </ng-container>\n <ng-container *ngIf=\"tab.title === 'Analysis'\">\n <pw-smart-crm-analysis/>\n </ng-container>\n </ng-template>\n </li>\n </ul>\n\n <div [ngbNavOutlet]=\"nav\"></div>\n </div>\n</div>\n" }]
3980
3981
  }] });
3981
3982
 
3982
3983
  class SmartCrmLeadsDetailsComponent extends AppBaseComponent {
3983
3984
  constructor(injector, crmService) {
3984
3985
  super(injector);
3985
3986
  this.crmService = crmService;
3986
- this.submitted = false;
3987
- this.buttonBusy = false;
3988
- this.isLoading = true;
3989
3987
  this.filteredAccounts = [];
3990
3988
  this.potentials = [];
3991
3989
  this.labels = [];
3990
+ this.submitted = false;
3991
+ this.buttonBusy = false;
3992
+ this.isLoading = true;
3992
3993
  this.form = AppSmartCrm.getLeadsForm();
3993
3994
  }
3994
3995
  ngOnInit() {
@@ -4157,13 +4158,13 @@ class SmartCrmLeadsComponent extends AppBaseComponent {
4157
4158
  object_count: 0,
4158
4159
  unfiltered_count: 0
4159
4160
  };
4161
+ this.allSource = [];
4162
+ this.crmSources = [];
4160
4163
  this.searchText = '';
4161
- this.isLoaded = false;
4162
4164
  this.loading = true;
4165
+ this.isLoaded = false;
4163
4166
  this.page = 1;
4164
- this.allSource = [];
4165
4167
  this.routers = ROUTERS;
4166
- this.crmSources = [];
4167
4168
  }
4168
4169
  ngOnInit() {
4169
4170
  this.getUserSubscription().subscribe(response => {
@@ -4266,15 +4267,15 @@ class SmartCrmMarketingUsersListComponent extends AppBaseComponent {
4266
4267
  super(injector);
4267
4268
  this.crmService = crmService;
4268
4269
  this.cdr = cdr;
4269
- this.searchText = '';
4270
+ this.page = 1;
4270
4271
  this.data = {
4271
4272
  newsletter_contacts: [],
4272
4273
  object_count: 0,
4273
4274
  unfiltered_count: 0
4274
4275
  };
4275
- this.isLoaded = false;
4276
+ this.searchText = '';
4276
4277
  this.loading = true;
4277
- this.page = 1;
4278
+ this.isLoaded = false;
4278
4279
  this.routers = ROUTERS;
4279
4280
  }
4280
4281
  ngOnInit() {
@@ -4327,8 +4328,6 @@ class SmartCrmCommunicationsDetailsComponent extends AppBaseComponent {
4327
4328
  super(injector);
4328
4329
  this.crmService = crmService;
4329
4330
  this.commonService = commonService;
4330
- this.submitted = false;
4331
- this.buttonBusy = false;
4332
4331
  this.status = [];
4333
4332
  this.priority = [];
4334
4333
  this.source = [];
@@ -4342,8 +4341,10 @@ class SmartCrmCommunicationsDetailsComponent extends AppBaseComponent {
4342
4341
  { label: 'high', value: 'high' }
4343
4342
  ];
4344
4343
  this.allCommunications = [];
4345
- this.isLoading = true;
4346
4344
  this.userNameSyntax = '{{ @user.share_name }}';
4345
+ this.submitted = false;
4346
+ this.buttonBusy = false;
4347
+ this.isLoading = true;
4347
4348
  QuillHelper.init();
4348
4349
  this.editorConfig = QuillHelper.getEditorConfig();
4349
4350
  this.form = AppSmartCrm.getMarketingForm();
@@ -4573,15 +4574,15 @@ class SmartCrmCommunicationsComponent extends AppBaseComponent {
4573
4574
  super(injector);
4574
4575
  this.crmService = crmService;
4575
4576
  this.cdr = cdr;
4576
- this.searchText = '';
4577
+ this.page = 1;
4577
4578
  this.data = {
4578
4579
  crm_newsletters: [],
4579
4580
  object_count: 0,
4580
4581
  unfiltered_count: 0
4581
4582
  };
4582
- this.isLoaded = false;
4583
+ this.searchText = '';
4583
4584
  this.loading = true;
4584
- this.page = 1;
4585
+ this.isLoaded = false;
4585
4586
  this.routers = ROUTERS;
4586
4587
  }
4587
4588
  ngOnInit() {
@@ -4694,11 +4695,11 @@ class SmartCrmCommunicationsComponent extends AppBaseComponent {
4694
4695
  super.ngOnDestroy();
4695
4696
  }
4696
4697
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmCommunicationsComponent, deps: [{ token: i0.Injector }, { token: i1.CrmService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4697
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmCommunicationsComponent, selector: "pw-smart-crm-communications", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12\">\n <h2>Email Marketing</h2>\n <p>Plan, create, and optimize your email marketing strategy here.</p>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + routers.marketingDetails + 'add']\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add New Email Campaign' }}\n </button>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container mt-3 table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.crm_newsletters\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n filterDelay=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search communication emails...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"body\">\n {{ 'Crm.CommunicationsMessage.Body' | transloco }}\n <p-sortIcon field=\"body\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"location\">\n {{ 'Crm.CommunicationsMessage.Location' | transloco }}\n <p-sortIcon field=\"location'\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"send_until\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n <p-sortIcon field=\"send_until\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_pushed\">\n {{ 'Crm.CommunicationsMessage.Pushed' | transloco }}\n <p-sortIcon field=\"is_pushed\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_sent\">\n {{ 'Crm.CommunicationsMessage.Sent' | transloco }}\n <p-sortIcon field=\"is_sent\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n class=\"actions-column\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, item.id]\">{{\n item.title\n }}</a>\n </td>\n <td data-head=\"Body\"\n [innerHtml]=\"item.body | removeHtml: 'quill' | textTruncate: 200\"></td>\n <td data-head=\"Location\">{{ item.location }}</td>\n <td data-head=\"Send Until\">{{ item.send_until | dateFormat }}</td>\n <td data-head=\"Pushed?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_pushed }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_pushed }}</span>\n </td>\n <td data-head=\"Delivered?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_sent }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_sent }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Send test email\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-comment-alt cta1-icon\"\n (click)=\"sendTestEmail(item)\"\n (keydown.enter)=\"sendTestEmail(item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.marketingDetails,\n item.id\n ]\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Preview and Recipients\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-eye eye-icon\"\n (keydown.enter)=\"onNavigate(subscription, item)\"\n (click)=\"onNavigate(subscription, item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n<div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoCommunicationMessage' | transloco\">\n </pw-no-data>\n</div>\n<ng-container>\n <div class=\"row mt-5\" *ngIf=\"isLoaded\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"communicationsInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"communicationsInsight\"\n [paginator]=\"communicationsInsight.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n\n [totalRecords]=\"communicationsInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendAt' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Reason' | transloco }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Title\">\n <span\n [ngbTooltip]=\"insight?.title\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, insight.id]\">{{ insight?.title | textTruncate: 30 }}</a>\n </span>\n </td>\n <td data-head=\"Value\">{{ insight.send_at | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Value\">{{ insight.send_until | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Reason\">{{ insight.reason }}</td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"communicationsInsight.length !== 0\">{{ 'Label.Total' | transloco }}: {{ communicationsInsight.length }}</span>\n </div>\n <div *ngIf=\"!communicationsInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Campaigns Location</h5>\n <div>\n <ng-template [ngIf]=\"communicationEngagement\">\n <plotly-plot [data]=\"communicationEngagement?.data\"\n [layout]=\"communicationEngagement?.layout\"\n [config]=\"communicationEngagement?.config\"\n [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!communicationEngagement\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".actions-column{min-width:170px}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i5.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i10.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i10.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "pipe", type: i14.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i14.RemoveHtmlPipe, name: "removeHtml" }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
4698
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: SmartCrmCommunicationsComponent, selector: "pw-smart-crm-communications", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12\">\n <h2>E-Marketing</h2>\n <p>The <strong>E-Marketing</strong> module allows you to quickly launch and customize professional email marketing\n campaigns. <br /> You can <strong>precisely target recipients</strong> to boost deliverability and engagement.</p>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + routers.marketingDetails + 'add']\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add New Email Campaign' }}\n </button>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container mt-3 table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.crm_newsletters\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n filterDelay=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search communication emails...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"body\">\n {{ 'Crm.CommunicationsMessage.Body' | transloco }}\n <p-sortIcon field=\"body\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"location\">\n {{ 'Crm.CommunicationsMessage.Location' | transloco }}\n <p-sortIcon field=\"location'\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"send_until\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n <p-sortIcon field=\"send_until\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_pushed\">\n {{ 'Crm.CommunicationsMessage.Pushed' | transloco }}\n <p-sortIcon field=\"is_pushed\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_sent\">\n {{ 'Crm.CommunicationsMessage.Sent' | transloco }}\n <p-sortIcon field=\"is_sent\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n class=\"actions-column\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, item.id]\">{{\n item.title\n }}</a>\n </td>\n <td data-head=\"Body\"\n [innerHtml]=\"item.body | removeHtml: 'quill' | textTruncate: 200\"></td>\n <td data-head=\"Location\">{{ item.location }}</td>\n <td data-head=\"Send Until\">{{ item.send_until | dateFormat }}</td>\n <td data-head=\"Pushed?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_pushed }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_pushed }}</span>\n </td>\n <td data-head=\"Delivered?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_sent }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_sent }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Send test email\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-comment-alt cta1-icon\"\n (click)=\"sendTestEmail(item)\"\n (keydown.enter)=\"sendTestEmail(item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.marketingDetails,\n item.id\n ]\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Preview and Recipients\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-eye eye-icon\"\n (keydown.enter)=\"onNavigate(subscription, item)\"\n (click)=\"onNavigate(subscription, item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n<div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoCommunicationMessage' | transloco\">\n </pw-no-data>\n</div>\n<ng-container>\n <div class=\"row mt-5\" *ngIf=\"isLoaded\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"communicationsInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"communicationsInsight\"\n [paginator]=\"communicationsInsight.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n\n [totalRecords]=\"communicationsInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendAt' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Reason' | transloco }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Title\">\n <span\n [ngbTooltip]=\"insight?.title\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, insight.id]\">{{ insight?.title | textTruncate: 30 }}</a>\n </span>\n </td>\n <td data-head=\"Value\">{{ insight.send_at | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Value\">{{ insight.send_until | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Reason\">{{ insight.reason }}</td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"communicationsInsight.length !== 0\">{{ 'Label.Total' | transloco }}: {{ communicationsInsight.length }}</span>\n </div>\n <div *ngIf=\"!communicationsInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Campaigns Location</h5>\n <div>\n <ng-template [ngIf]=\"communicationEngagement\">\n <plotly-plot [data]=\"communicationEngagement?.data\"\n [layout]=\"communicationEngagement?.layout\"\n [config]=\"communicationEngagement?.config\"\n [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!communicationEngagement\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".actions-column{min-width:170px}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["variant"] }, { kind: "directive", type: i5.DynamicBadgeDirective, selector: "[appDynamicBadge]", inputs: ["appDynamicBadge", "color"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "component", type: i4$2.PlotlyComponent, selector: "plotly-plot", inputs: ["data", "layout", "config", "frames", "style", "theme", "divId", "revision", "className", "debug", "useResizeHandler", "updateOnLayoutChange", "updateOnDataChange", "updateOnlyWithRevision"], outputs: ["initialized", "update", "purge", "error", "afterExport", "afterPlot", "animated", "animatingFrame", "animationInterrupted", "autoSize", "beforeExport", "beforeHover", "buttonClicked", "click", "plotlyClick", "clickAnnotation", "deselect", "doubleClick", "framework", "hover", "legendClick", "legendDoubleClick", "react", "relayout", "relayouting", "restyle", "redraw", "selected", "selecting", "sliderChange", "sliderEnd", "sliderStart", "sunburstclick", "transitioning", "transitionInterrupted", "unhover", "treemapclick", "webglcontextlost"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i10.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i10.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "component", type: i10.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }, { kind: "pipe", type: i14.DateFormatPipe, name: "dateFormat" }, { kind: "pipe", type: i14.RemoveHtmlPipe, name: "removeHtml" }, { kind: "pipe", type: i14.TextTruncatePipe, name: "textTruncate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
4698
4699
  }
4699
4700
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: SmartCrmCommunicationsComponent, decorators: [{
4700
4701
  type: Component,
4701
- args: [{ selector: 'pw-smart-crm-communications', template: "<div class=\"row\">\n <div class=\"col-12\">\n <h2>Email Marketing</h2>\n <p>Plan, create, and optimize your email marketing strategy here.</p>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + routers.marketingDetails + 'add']\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add New Email Campaign' }}\n </button>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container mt-3 table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.crm_newsletters\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n filterDelay=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search communication emails...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"body\">\n {{ 'Crm.CommunicationsMessage.Body' | transloco }}\n <p-sortIcon field=\"body\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"location\">\n {{ 'Crm.CommunicationsMessage.Location' | transloco }}\n <p-sortIcon field=\"location'\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"send_until\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n <p-sortIcon field=\"send_until\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_pushed\">\n {{ 'Crm.CommunicationsMessage.Pushed' | transloco }}\n <p-sortIcon field=\"is_pushed\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_sent\">\n {{ 'Crm.CommunicationsMessage.Sent' | transloco }}\n <p-sortIcon field=\"is_sent\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n class=\"actions-column\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, item.id]\">{{\n item.title\n }}</a>\n </td>\n <td data-head=\"Body\"\n [innerHtml]=\"item.body | removeHtml: 'quill' | textTruncate: 200\"></td>\n <td data-head=\"Location\">{{ item.location }}</td>\n <td data-head=\"Send Until\">{{ item.send_until | dateFormat }}</td>\n <td data-head=\"Pushed?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_pushed }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_pushed }}</span>\n </td>\n <td data-head=\"Delivered?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_sent }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_sent }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Send test email\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-comment-alt cta1-icon\"\n (click)=\"sendTestEmail(item)\"\n (keydown.enter)=\"sendTestEmail(item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.marketingDetails,\n item.id\n ]\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Preview and Recipients\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-eye eye-icon\"\n (keydown.enter)=\"onNavigate(subscription, item)\"\n (click)=\"onNavigate(subscription, item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n<div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoCommunicationMessage' | transloco\">\n </pw-no-data>\n</div>\n<ng-container>\n <div class=\"row mt-5\" *ngIf=\"isLoaded\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"communicationsInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"communicationsInsight\"\n [paginator]=\"communicationsInsight.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n\n [totalRecords]=\"communicationsInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendAt' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Reason' | transloco }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Title\">\n <span\n [ngbTooltip]=\"insight?.title\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, insight.id]\">{{ insight?.title | textTruncate: 30 }}</a>\n </span>\n </td>\n <td data-head=\"Value\">{{ insight.send_at | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Value\">{{ insight.send_until | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Reason\">{{ insight.reason }}</td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"communicationsInsight.length !== 0\">{{ 'Label.Total' | transloco }}: {{ communicationsInsight.length }}</span>\n </div>\n <div *ngIf=\"!communicationsInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Campaigns Location</h5>\n <div>\n <ng-template [ngIf]=\"communicationEngagement\">\n <plotly-plot [data]=\"communicationEngagement?.data\"\n [layout]=\"communicationEngagement?.layout\"\n [config]=\"communicationEngagement?.config\"\n [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!communicationEngagement\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".actions-column{min-width:170px}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}\n"] }]
4702
+ args: [{ selector: 'pw-smart-crm-communications', template: "<div class=\"row\">\n <div class=\"col-12\">\n <h2>E-Marketing</h2>\n <p>The <strong>E-Marketing</strong> module allows you to quickly launch and customize professional email marketing\n campaigns. <br /> You can <strong>precisely target recipients</strong> to boost deliverability and engagement.</p>\n </div>\n <div class=\"col-12 col-md-12 text-end\">\n <button class=\"btn btn-sm btn-outline-primary\"\n [routerLink]=\"['/' + subscription?.slug + routers.marketingDetails + 'add']\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i> {{ 'Add New Email Campaign' }}\n </button>\n </div>\n</div>\n<div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n</div>\n<div class=\"primeng-datatable-container mt-3 table-responsive\"\n [class.hideTable]=\"data.unfiltered_count === 0\">\n <p-table #dt\n [value]=\"data.crm_newsletters\"\n [paginator]=\"data.object_count !== 0\"\n [lazy]=\"true\"\n [rows]=\"PAGE_SIZE\"\n [totalRecords]=\"data.object_count\"\n [loading]=\"loading\"\n filterDelay=\"1000\"\n (onLazyLoad)=\"onLazyLoad($event)\"\n [customSort]=\"true\">\n <ng-template pTemplate=\"caption\">\n <div class=\"text-end\">\n <i class=\"fa fa-search mt-2 me-2\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n [(ngModel)]=\"searchText\"\n pInputText\n size=\"50\"\n placeholder=\"Search communication emails...\"\n (input)=\"dt.filterGlobal($event.target.value, 'contains')\"\n class=\"mw-90\" />\n </div>\n </ng-template>\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\"\n pSortableColumn=\"title\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n <p-sortIcon field=\"title\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"body\">\n {{ 'Crm.CommunicationsMessage.Body' | transloco }}\n <p-sortIcon field=\"body\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"location\">\n {{ 'Crm.CommunicationsMessage.Location' | transloco }}\n <p-sortIcon field=\"location'\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"send_until\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n <p-sortIcon field=\"send_until\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_pushed\">\n {{ 'Crm.CommunicationsMessage.Pushed' | transloco }}\n <p-sortIcon field=\"is_pushed\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n pSortableColumn=\"is_sent\">\n {{ 'Crm.CommunicationsMessage.Sent' | transloco }}\n <p-sortIcon field=\"is_sent\"></p-sortIcon>\n </th>\n <th scope=\"true\"\n class=\"actions-column\">{{ 'Label.Actions' | transloco }}</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-item>\n <tr class=\"table-row\">\n <td data-head=\"Title\">\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, item.id]\">{{\n item.title\n }}</a>\n </td>\n <td data-head=\"Body\"\n [innerHtml]=\"item.body | removeHtml: 'quill' | textTruncate: 200\"></td>\n <td data-head=\"Location\">{{ item.location }}</td>\n <td data-head=\"Send Until\">{{ item.send_until | dateFormat }}</td>\n <td data-head=\"Pushed?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_pushed }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_pushed }}</span>\n </td>\n <td data-head=\"Delivered?\">\n <span [appDynamicBadge]=\"{ itemsArray: [true, false], item: item?.is_sent }\"\n color=\"success-danger\"\n class=\"badge\">{{ !!item?.is_sent }}</span>\n </td>\n <td data-head=\"Action\">\n <ul class=\"list-unstyled list-inline list-action\">\n <li ngbTooltip=\"Send test email\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-comment-alt cta1-icon\"\n (click)=\"sendTestEmail(item)\"\n (keydown.enter)=\"sendTestEmail(item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Edit\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-edit edit-icon\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.marketingDetails,\n item.id\n ]\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Delete\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-trash delete-icon\"\n (keydown.enter)=\"onDelete(item.id)\"\n (keydown.space)=\"onDelete(item.id)\"\n (click)=\"onDelete(item.id)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n <li ngbTooltip=\"Preview and Recipients\"\n class=\"me-2 me-sm-3\">\n <i\n class=\"fa fa-eye eye-icon\"\n (keydown.enter)=\"onNavigate(subscription, item)\"\n (click)=\"onNavigate(subscription, item)\"\n aria-hidden=\"true\"\n ></i>\n </li>\n </ul>\n </td>\n </tr>\n </ng-template>\n </p-table>\n<div *ngIf=\"data.object_count === 0 && data.unfiltered_count !== 0\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Search.NoDataMessage'| transloco\" [description]=\"'Search.NoDataDescription' | transloco\" >\n </pw-no-data>\n</div>\n <span class=\"total-records-count\" *ngIf=\"data.object_count !== 0\">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>\n</div>\n<div *ngIf=\"data.unfiltered_count === 0 && isLoaded\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoCommunicationMessage' | transloco\">\n </pw-no-data>\n</div>\n<ng-container>\n <div class=\"row mt-5\" *ngIf=\"isLoaded\">\n <!-- Drill Down -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Watch Closely</h5>\n <div class=\"primeng-datatable-container table-responsive\"\n *ngIf=\"communicationsInsight?.length\">\n <p-table class=\"table\"\n #dt\n [value]=\"communicationsInsight\"\n [paginator]=\"communicationsInsight.length !== 0\"\n [rows]=\"PAGE_SIZE\"\n\n [totalRecords]=\"communicationsInsight.length\"\n [lazy]=\"true\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Title' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendAt' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.SendUntil' | transloco }}\n </th>\n <th scope=\"true\">\n {{ 'Crm.CommunicationsMessage.Reason' | transloco }}\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\"\n let-insight>\n <tr>\n <td data-head=\"Title\">\n <span\n [ngbTooltip]=\"insight?.title\"\n container=\"body\"\n tooltipClass=\"custom-tooltip\"\n placement=\"bottom\"\n >\n <a [routerLink]=\"['/' + subscription?.slug + routers.marketing, insight.id]\">{{ insight?.title | textTruncate: 30 }}</a>\n </span>\n </td>\n <td data-head=\"Value\">{{ insight.send_at | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Value\">{{ insight.send_until | date: 'dd-MMM-YYYY' }}</td>\n <td data-head=\"Reason\">{{ insight.reason }}</td>\n </tr>\n </ng-template>\n </p-table>\n <span class=\"total-records-count\" *ngIf=\"communicationsInsight.length !== 0\">{{ 'Label.Total' | transloco }}: {{ communicationsInsight.length }}</span>\n </div>\n <div *ngIf=\"!communicationsInsight?.length\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n <!-- Geography -->\n <div class=\"col-12 col-md-6 mb-3 analytics\">\n <h5 class=\"accordion-heading\">Campaigns Location</h5>\n <div>\n <ng-template [ngIf]=\"communicationEngagement\">\n <plotly-plot [data]=\"communicationEngagement?.data\"\n [layout]=\"communicationEngagement?.layout\"\n [config]=\"communicationEngagement?.config\"\n [useResizeHandler]=\"true\">\n </plotly-plot>\n </ng-template>\n </div>\n <div *ngIf=\"!communicationEngagement\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.CommunicationsMessage.NoInsightMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n </div>\n</ng-container>\n", styles: [".actions-column{min-width:170px}.eye-icon{color:var(--first);font-size:18px;padding-left:3px;padding-right:3px}\n"] }]
4702
4703
  }], ctorParameters: () => [{ type: i0.Injector }, { type: i1.CrmService }, { type: i0.ChangeDetectorRef }] });
4703
4704
 
4704
4705
  class SmartCrmCommunicationViewDetailsComponent extends AppBaseComponent {
@@ -4767,14 +4768,14 @@ class SmartCrmBoardComponent extends AppBaseComponent {
4767
4768
  constructor(crmService, injector) {
4768
4769
  super(injector);
4769
4770
  this.crmService = crmService;
4770
- this.opportunitiesGroup = [];
4771
- this.isLoaded = false;
4772
- this.categories = [];
4773
4771
  this.availableOpportunities = [];
4774
- this.routers = ROUTERS;
4772
+ this.pageSize = 5; // Show 5 cards initially
4775
4773
  this.masterStages = [];
4774
+ this.opportunitiesGroup = [];
4775
+ this.categories = [];
4776
4776
  this.selectedCategoryId = 0;
4777
- this.pageSize = 5; // Show 5 cards initially
4777
+ this.isLoaded = false;
4778
+ this.routers = ROUTERS;
4778
4779
  }
4779
4780
  ngOnInit() {
4780
4781
  this.getUserSubscription().subscribe(response => {
@@ -4990,27 +4991,27 @@ class SmartCrmOpportunitiesDetailsComponent extends AppBaseComponent {
4990
4991
  super(injector);
4991
4992
  this.crmService = crmService;
4992
4993
  this.productService = productService;
4993
- this.onEdit = false;
4994
- this.submitted = false;
4995
- this.buttonBusy = false;
4996
- this.isLoading = true;
4997
- this.searchText = '';
4994
+ this.isUserSubscriptionSuperAdmin = this.permissionService.isUserMasterSubscriptionSuperAdmin();
4998
4995
  this.allContacts = [];
4999
4996
  this.filteredUsers = [];
5000
- this.winChance = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
5001
4997
  this.opportunities = [];
5002
- this.WonField = false;
5003
- this.LostField = false;
5004
- this.isContactChange = false;
5005
- this.TrialStartField = false;
5006
4998
  this.accounts = [];
5007
- this.masterStages = [];
5008
- this.isUserSubscriptionSuperAdmin = this.permissionService.isUserMasterSubscriptionSuperAdmin();
5009
4999
  this.stages = [];
5000
+ this.masterStages = [];
5010
5001
  this.categories = [];
5011
- this.accountValueCount = 0;
5012
5002
  this.featureKeys = [];
5013
5003
  this.currencies = [];
5004
+ this.winChance = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
5005
+ this.accountValueCount = 0;
5006
+ this.searchText = '';
5007
+ this.onEdit = false;
5008
+ this.isContactChange = false;
5009
+ this.TrialStartField = false;
5010
+ this.WonField = false;
5011
+ this.LostField = false;
5012
+ this.submitted = false;
5013
+ this.buttonBusy = false;
5014
+ this.isLoading = true;
5014
5015
  this.form = AppSmartCrm.getOpportunitiesInfoForm();
5015
5016
  }
5016
5017
  ngOnInit() {
@@ -5338,15 +5339,17 @@ class SmartCrmOpportunitiesInfoComponent extends AppBaseComponent {
5338
5339
  this.modalService = modalService;
5339
5340
  this.authService = authService;
5340
5341
  this.document = document;
5342
+ this.filteredAccounts = [];
5341
5343
  this.isLoaded = false;
5342
5344
  this.isFormEdit = true;
5343
- this.submitted = false;
5344
- this.buttonBusy = false;
5345
- this.filteredAccounts = [];
5346
5345
  this.isDisabled = false;
5347
5346
  this.updating = false;
5348
5347
  this.showFullComment = false;
5349
5348
  this.submitAction = false;
5349
+ this.buttonBusy = false;
5350
+ this.submitted = false;
5351
+ this.dangerColor = false;
5352
+ this.dragOver = false;
5350
5353
  this.routers = ROUTERS;
5351
5354
  this.options = { concurrency: 1, maxUploads: 3 };
5352
5355
  this.uploadInput = new EventEmitter();
@@ -5786,23 +5789,23 @@ class SmartCrmOpportunitiesListComponent extends AppBaseComponent {
5786
5789
  this.crmService = crmService;
5787
5790
  this.cdr = cdr;
5788
5791
  this.productService = productService;
5789
- this.hasAccess = false;
5790
- this.searchText = '';
5791
5792
  this.data = {
5792
5793
  crm_opportunities: [],
5793
5794
  object_count: 0,
5794
5795
  unfiltered_count: 0
5795
5796
  };
5796
5797
  this.id = '';
5797
- this.isLoaded = false;
5798
- this.loading = true;
5798
+ this.searchText = '';
5799
5799
  this.searchStages = [];
5800
+ this.searchCategories = [];
5800
5801
  this.filterByStages = [];
5801
5802
  this.filterByCategories = [];
5802
- this.searchCategories = [];
5803
5803
  this.page = 1;
5804
5804
  this.stages = [];
5805
5805
  this.categories = [];
5806
+ this.loading = true;
5807
+ this.isLoaded = false;
5808
+ this.hasAccess = false;
5806
5809
  this.routers = ROUTERS;
5807
5810
  }
5808
5811
  ngOnInit() {
@@ -5989,18 +5992,18 @@ class CrmActionsComponent extends AppBaseComponent {
5989
5992
  super(injector);
5990
5993
  this.crmService = crmService;
5991
5994
  this.document = document;
5995
+ this.totalPendingActions = 0;
5996
+ this.currentPage = 1;
5992
5997
  this.contactActions = [];
5993
- this.isLoaded = false;
5998
+ this.contactActionsAll = [];
5994
5999
  this.accountActionSuggested = [];
5995
- this.updating = false;
6000
+ this.selector = '.pending-actions-wrapper';
6001
+ this.suggestedActionsSelector = '.suggested-actions-wrapper';
6002
+ this.isLoaded = false;
5996
6003
  this.isLoadedSuggested = false;
5997
6004
  this.showFullComment = false;
5998
- this.contactActionsAll = [];
5999
6005
  this.showFilter = false;
6000
- this.selector = '.pending-actions-wrapper';
6001
- this.suggestedActionsSelector = '.suggested-actions-wrapper';
6002
- this.totalPendingActions = 0;
6003
- this.currentPage = 1;
6006
+ this.updating = false;
6004
6007
  this.routers = ROUTERS;
6005
6008
  }
6006
6009
  ngOnInit() {
@@ -6213,11 +6216,11 @@ class CrmActionsComponent extends AppBaseComponent {
6213
6216
  super.ngOnDestroy();
6214
6217
  }
6215
6218
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: CrmActionsComponent, deps: [{ token: i1.CrmService }, { token: i0.Injector }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component }); }
6216
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: CrmActionsComponent, selector: "pw-crm-actions", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-4\">\n <div class=\"col-12 mb-0\">\n <h2>{{ 'Crm.Actions.Title' | transloco }}</h2>\n </div>\n <div class=\"col-12 col-sm-3 float-start mb-2\"\n *ngIf=\"showFilter\">\n <select class=\"form-select\"\n (change)=\"filterByUser($event)\">\n <option value=\"0\">Filter by user</option>\n <option *ngFor=\"let member of allSubscriptionMembers\"\n [value]=\"member.id\">\n {{ member.first_name }} {{ member.last_name }}\n </option>\n </select>\n </div>\n <div>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-opportunities\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.addAccount]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.AccountMessage.AddAccount' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n data-cy=\"add-action\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n </div>\n </div>\n <!-- Pending Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">Pending Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n <div *ngIf=\"contactActions?.length === 0 && isLoaded\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionMessage' | transloco\"> </pw-no-data>\n </div>\n <!-- wrapper for infinite scroll -->\n <div #selector class=\"pending-actions-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"selector\"\n [fromRoot]=\"true\"\n (scrolled)=\"onScrollPendingActions()\">\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"let action of contactActions; let i = index\">\n <div class=\"p-2\">\n <ul class=\"list-inline\">\n <li class=\"list-inline-item me-2\">\n <h6 *ngIf=\"!updating || actionId !== action.id\">\n {{ action.when_short_date }}\n </h6>\n <input *ngIf=\"updating && actionId === action.id\"\n placeholder=\"dd-mmm-yyyy\"\n [value]=\"action.when_short_date\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n (focus)=\"d.toggle()\"\n (dateSelect)=\"onDateSelect($event, action)\" />\n </li>\n <li>\n <button type=\"button\"\n class=\"btn btn-sm when-btn\"\n (click)=\"showDatePicker(action?.id)\">\n <i\n class=\"fa fa-edit edit-icon\"\n ngbTooltip=\"Click to Edit\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </li>\n <li class=\"list-inline-item\">\n <span class=\"badge bg-primary\">{{ action.crm_action?.name }}</span>\n </li>\n <li>\n <ng-container *ngIf=\"action.owner?.user_avatar?.length > 0; else noProfileImg\">\n <ng-container *ngFor=\"let owner_image of action.owner?.user_avatar\">\n <div class=\"text-center my-2\" *ngIf=\"owner_image.width === 50\" [ngbTooltip]=\"action.owner.first_name + ' ' +action.owner.last_name\">\n <div class=\"avatar avatar-image\">\n <img\n class=\"img-fluid\"\n [src]=\"owner_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #noProfileImg>\n <div class=\"text-center my-2\">\n <div class=\"avatar avatar-image\">\n <img\n src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\"\n />\n </div>\n </div>\n </ng-template>\n </li>\n\n <li class=\"list-inline-item float-end\">\n <a *ngIf=\"action?.crm_contact\"\n ngbTooltip=\"See this contact\"\n aria-label=\"See this contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n <i class=\"fa fa-eye me-3 see-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as completed\"\n aria-label=\"Set as completed\"\n class=\"me-3\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCompleted(action.id, action, i)\">\n <i class=\"fa fa-tasks cta1-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as cancelled\"\n aria-label=\"Set as cancelled\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCancelled(action.id, action, i)\">\n <i\n class=\"fa fa-times text-danger delete-icon\"\n aria-hidden=\"true\"\n ></i>\n </a>\n </li>\n </ul>\n <p [class.text-danger]=\"!action.color\"\n class=\"mb-0\"\n *ngIf=\"action.due\">\n {{ action.due }}\n </p>\n <p *ngIf=\"action.owner?.id !== userId\"\n class=\"m-0 mt-1\">\n <a class=\"font-italic grey\"\n [routerLink]=\"['/members', action?.owner?.slug]\">Added by\n {{ action.owner?.first_name + ' ' + action.owner?.last_name }}</a>\n </p>\n <p class=\"mt-1 mb-1 fw-bold\">\n <a class=\"text-secondary\"\n *ngIf=\"action?.crm_contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n {{\n action?.crm_contact?.first_name +\n ' ' +\n action?.crm_contact?.last_name\n }}\n </a>\n <a *ngIf=\"!action.crm_contact_id\">N/A</a> at\n <a *ngIf=\"action.crm_account_id\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n action?.crm_account?.id\n ]\">\n {{ action?.crm_account?.name }}\n </a>\n </p>\n <div class=\"comment-section\">\n <textarea class=\"mt-1 textarea form-control mb-2\"\n [(ngModel)]=\"action.comment\">{{ action.comment }}</textarea>\n <div class=\"d-flex\">\n <p class=\"my-1 comment\"\n *ngIf=\"!showFullComment || action.id !== commentId\">\n {{ action.comment | slice: 0:230\n }}<a *ngIf=\"action.comment.length > 230\"\n class=\"text-secondary\"\n (click)=\"showFullComment = true; commentId = action.id\">...show more\n </a>\n </p>\n <p class=\"my-1 comment\"\n *ngIf=\"showFullComment && action.id === commentId\">\n {{ action.comment }}\n <a *ngIf=\"action.comment.length > 230 && showFullComment\"\n (click)=\"showFullComment = false\"\n class=\"text-secondary\">...show less</a>\n </p>\n <button class=\"btn btn-md edit-btn\"\n (click)=\"editComment($event)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <div class=\"control-btns edit-control-btns\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"editComment(undefined)\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button class=\"btn btn-sm btn-primary\"\n (click)=\"updateComment(action)\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- Suggested Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">AI Suggested Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n\n <div #suggestedActionsSelector *ngIf=\"accountActionSuggested?.length > 0\" class=\"suggested-actions-wrapper\"\n infiniteScroll\n [infiniteScrollContainer]=\"suggestedActionsSelector\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\">\n\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"\n let suggestedAction of accountActionSuggested\n | paginate: { id: 'suggestedAction', itemsPerPage: 10, currentPage: p1 };\n let i = index\n \">\n <div class=\"p-2\">\n <p class=\"mt-1 mb-1 fw-bold\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n suggestedAction?.crm_account?.id\n ]\">{{ suggestedAction?.crm_account?.name }}</a>\n </p>\n <p class=\"fw-bold mb-1\">{{ suggestedAction.crm_action }}</p>\n <p class=\"mb-0\">{{ suggestedAction.reason }}</p>\n </div>\n </div>\n </div>\n <div class=\"text-center pagination-controls w-100 mt-3\"\n *ngIf=\"accountActionSuggested?.length > 10\">\n <pagination-controls id=\"suggestedAction\"\n (pageChange)=\"p1 = $event\">\n </pagination-controls>\n </div>\n <div *ngIf=\"accountActionSuggested.length === 0 && isLoadedSuggested\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionSuggestionsMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.textarea,.control-btns{display:none}.comment,.edit-btn{display:block}.comment{border:0;border-bottom:1px solid rgb(242,242,242);color:#000;font-size:1rem;resize:none}.textarea{border:0;border-bottom:1px solid rgb(242,242,242);color:#1769e1;display:none;font-size:17px}.comment-section{min-width:350px;padding-right:45px;position:relative}.comment-section p{word-break:break-all}.comment-section.show-controls .textarea,.comment-section.show-controls .control-btns{display:block}.comment-section.show-controls .comment,.comment-section.show-controls .edit-btn{display:none}.comment-section.show-controls .control-btns.edit-control-btns{display:flex;justify-content:flex-end}.edit-btn{margin-top:-15px}.avatar-image{height:25px;width:25px}.when-btn:focus{border:0;box-shadow:none}.pending-actions-wrapper,.suggested-actions-wrapper{overflow-y:auto;height:calc(100vh - 150px)}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "directive", type: i2$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i17.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "pipe", type: i2$1.SlicePipe, name: "slice" }, { kind: "pipe", type: i4$3.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
6219
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: CrmActionsComponent, selector: "pw-crm-actions", usesInheritance: true, ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-12 mb-4\">\n <div class=\"col-12 mb-0\">\n <h2>{{ 'Crm.Actions.Title' | transloco }}</h2>\n </div>\n <div class=\"col-12 col-sm-3 float-start mb-2\"\n *ngIf=\"showFilter\">\n <p-dropdown\n [options]=\"allSubscriptionMembers\"\n optionLabel=\"first_name\"\n optionValue=\"id\"\n [ngModel]=\"0\"\n (onChange)=\"filterByUser($event.value)\">\n\n <ng-template pTemplate=\"selectedItem\" let-selected>\n <span *ngIf=\"selected\">\n {{ selected.first_name }} {{ selected.last_name }}\n </span>\n </ng-template>\n\n <ng-template pTemplate=\"item\" let-option>\n {{ option.first_name }} {{ option.last_name }}\n </ng-template>\n</p-dropdown>\n </div>\n <div>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-opportunities\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.addAccount]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.AccountMessage.AddAccount' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n data-cy=\"add-action\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n </div>\n </div>\n <!-- Pending Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">Pending Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n <div *ngIf=\"contactActions?.length === 0 && isLoaded\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionMessage' | transloco\"> </pw-no-data>\n </div>\n <!-- wrapper for infinite scroll -->\n <div #selector class=\"pending-actions-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"selector\"\n [fromRoot]=\"true\"\n (scrolled)=\"onScrollPendingActions()\">\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"let action of contactActions; let i = index\">\n <div class=\"p-2\">\n <ul class=\"list-inline\">\n <li class=\"list-inline-item me-2\">\n <h6 *ngIf=\"!updating || actionId !== action.id\">\n {{ action.when_short_date }}\n </h6>\n <input *ngIf=\"updating && actionId === action.id\"\n placeholder=\"dd-mmm-yyyy\"\n [value]=\"action.when_short_date\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n (focus)=\"d.toggle()\"\n (dateSelect)=\"onDateSelect($event, action)\" />\n </li>\n <li>\n <button type=\"button\"\n class=\"btn btn-sm when-btn\"\n (click)=\"showDatePicker(action?.id)\">\n <i\n class=\"fa fa-edit edit-icon\"\n ngbTooltip=\"Click to Edit\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </li>\n <li class=\"list-inline-item\">\n <span class=\"badge bg-primary\">{{ action.crm_action?.name }}</span>\n </li>\n <li>\n <ng-container *ngIf=\"action.owner?.user_avatar?.length > 0; else noProfileImg\">\n <ng-container *ngFor=\"let owner_image of action.owner?.user_avatar\">\n <div class=\"text-center my-2\" *ngIf=\"owner_image.width === 50\" [ngbTooltip]=\"action.owner.first_name + ' ' +action.owner.last_name\">\n <div class=\"avatar avatar-image\">\n <img\n class=\"img-fluid\"\n [src]=\"owner_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #noProfileImg>\n <div class=\"text-center my-2\">\n <div class=\"avatar avatar-image\">\n <img\n src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\"\n />\n </div>\n </div>\n </ng-template>\n </li>\n\n <li class=\"list-inline-item float-end\">\n <a *ngIf=\"action?.crm_contact\"\n ngbTooltip=\"See this contact\"\n aria-label=\"See this contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n <i class=\"fa fa-eye me-3 see-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as completed\"\n aria-label=\"Set as completed\"\n class=\"me-3\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCompleted(action.id, action, i)\">\n <i class=\"fa fa-tasks cta1-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as cancelled\"\n aria-label=\"Set as cancelled\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCancelled(action.id, action, i)\">\n <i\n class=\"fa fa-times text-danger delete-icon\"\n aria-hidden=\"true\"\n ></i>\n </a>\n </li>\n </ul>\n <p [class.text-danger]=\"!action.color\"\n class=\"mb-0\"\n *ngIf=\"action.due\">\n {{ action.due }}\n </p>\n <p *ngIf=\"action.owner?.id !== userId\"\n class=\"m-0 mt-1\">\n <a class=\"font-italic grey\"\n [routerLink]=\"['/members', action?.owner?.slug]\">Added by\n {{ action.owner?.first_name + ' ' + action.owner?.last_name }}</a>\n </p>\n <p class=\"mt-1 mb-1 fw-bold\">\n <a class=\"text-secondary\"\n *ngIf=\"action?.crm_contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n {{\n action?.crm_contact?.first_name +\n ' ' +\n action?.crm_contact?.last_name\n }}\n </a>\n <a *ngIf=\"!action.crm_contact_id\">N/A</a> at\n <a *ngIf=\"action.crm_account_id\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n action?.crm_account?.id\n ]\">\n {{ action?.crm_account?.name }}\n </a>\n </p>\n <div class=\"comment-section\">\n <textarea class=\"mt-1 textarea form-control mb-2\"\n [(ngModel)]=\"action.comment\">{{ action.comment }}</textarea>\n <div class=\"d-flex\">\n <p class=\"my-1 comment\"\n *ngIf=\"!showFullComment || action.id !== commentId\">\n {{ action.comment | slice: 0:230\n }}<a *ngIf=\"action.comment.length > 230\"\n class=\"text-secondary\"\n (click)=\"showFullComment = true; commentId = action.id\">...show more\n </a>\n </p>\n <p class=\"my-1 comment\"\n *ngIf=\"showFullComment && action.id === commentId\">\n {{ action.comment }}\n <a *ngIf=\"action.comment.length > 230 && showFullComment\"\n (click)=\"showFullComment = false\"\n class=\"text-secondary\">...show less</a>\n </p>\n <button class=\"btn btn-md edit-btn\"\n (click)=\"editComment($event)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <div class=\"control-btns edit-control-btns\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"editComment(undefined)\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button class=\"btn btn-sm btn-primary\"\n (click)=\"updateComment(action)\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- Suggested Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">AI Suggested Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n\n <div #suggestedActionsSelector *ngIf=\"accountActionSuggested?.length > 0\" class=\"suggested-actions-wrapper\"\n infiniteScroll\n [infiniteScrollContainer]=\"suggestedActionsSelector\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\">\n\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"\n let suggestedAction of accountActionSuggested\n | paginate: { id: 'suggestedAction', itemsPerPage: 10, currentPage: p1 };\n let i = index\n \">\n <div class=\"p-2\">\n <p class=\"mt-1 mb-1 fw-bold\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n suggestedAction?.crm_account?.id\n ]\">{{ suggestedAction?.crm_account?.name }}</a>\n </p>\n <p class=\"fw-bold mb-1\">{{ suggestedAction.crm_action }}</p>\n <p class=\"mb-0\">{{ suggestedAction.reason }}</p>\n </div>\n </div>\n </div>\n <div class=\"text-center pagination-controls w-100 mt-3\"\n *ngIf=\"accountActionSuggested?.length > 10\">\n <pagination-controls id=\"suggestedAction\"\n (pageChange)=\"p1 = $event\">\n </pagination-controls>\n </div>\n <div *ngIf=\"accountActionSuggested.length === 0 && isLoadedSuggested\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionSuggestionsMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.textarea,.control-btns{display:none}.comment,.edit-btn{display:block}.comment{border:0;border-bottom:1px solid rgb(242,242,242);color:#000;font-size:1rem;resize:none}.textarea{border:0;border-bottom:1px solid rgb(242,242,242);color:#1769e1;display:none;font-size:17px}.comment-section{min-width:350px;padding-right:45px;position:relative}.comment-section p{word-break:break-all}.comment-section.show-controls .textarea,.comment-section.show-controls .control-btns{display:block}.comment-section.show-controls .comment,.comment-section.show-controls .edit-btn{display:none}.comment-section.show-controls .control-btns.edit-control-btns{display:flex;justify-content:flex-end}.edit-btn{margin-top:-15px}.avatar-image{height:25px;width:25px}.when-btn:focus{border:0;box-shadow:none}.pending-actions-wrapper,.suggested-actions-wrapper{overflow-y:auto;height:calc(100vh - 150px)}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$3.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }, { kind: "directive", type: i5.LazyImgDirective, selector: "img" }, { kind: "directive", type: i2$2.NgbInputDatepicker, selector: "input[ngbDatepicker]", inputs: ["autoClose", "contentTemplate", "datepickerClass", "dayTemplate", "dayTemplateData", "displayMonths", "firstDayOfWeek", "footerTemplate", "markDisabled", "minDate", "maxDate", "navigation", "outsideDays", "placement", "popperOptions", "restoreFocus", "showWeekNumbers", "startDate", "container", "positionTarget", "weekdays", "disabled"], outputs: ["dateSelect", "navigate", "closed"], exportAs: ["ngbDatepicker"] }, { kind: "directive", type: i2$2.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.ProgressSpinner, selector: "p-progressSpinner", inputs: ["styleClass", "style", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }, { kind: "component", type: i11.NoDataComponent, selector: "pw-no-data", inputs: ["message", "description", "withImage"] }, { kind: "directive", type: i17.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "component", type: i12$2.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "pipe", type: i2$1.SlicePipe, name: "slice" }, { kind: "pipe", type: i4$3.PaginatePipe, name: "paginate" }, { kind: "pipe", type: i11$1.TranslocoPipe, name: "transloco" }] }); }
6217
6220
  }
6218
6221
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: CrmActionsComponent, decorators: [{
6219
6222
  type: Component,
6220
- args: [{ selector: 'pw-crm-actions', template: "<div class=\"row\">\n <div class=\"col-12 mb-4\">\n <div class=\"col-12 mb-0\">\n <h2>{{ 'Crm.Actions.Title' | transloco }}</h2>\n </div>\n <div class=\"col-12 col-sm-3 float-start mb-2\"\n *ngIf=\"showFilter\">\n <select class=\"form-select\"\n (change)=\"filterByUser($event)\">\n <option value=\"0\">Filter by user</option>\n <option *ngFor=\"let member of allSubscriptionMembers\"\n [value]=\"member.id\">\n {{ member.first_name }} {{ member.last_name }}\n </option>\n </select>\n </div>\n <div>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-opportunities\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.addAccount]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.AccountMessage.AddAccount' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n data-cy=\"add-action\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n </div>\n </div>\n <!-- Pending Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">Pending Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n <div *ngIf=\"contactActions?.length === 0 && isLoaded\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionMessage' | transloco\"> </pw-no-data>\n </div>\n <!-- wrapper for infinite scroll -->\n <div #selector class=\"pending-actions-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"selector\"\n [fromRoot]=\"true\"\n (scrolled)=\"onScrollPendingActions()\">\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"let action of contactActions; let i = index\">\n <div class=\"p-2\">\n <ul class=\"list-inline\">\n <li class=\"list-inline-item me-2\">\n <h6 *ngIf=\"!updating || actionId !== action.id\">\n {{ action.when_short_date }}\n </h6>\n <input *ngIf=\"updating && actionId === action.id\"\n placeholder=\"dd-mmm-yyyy\"\n [value]=\"action.when_short_date\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n (focus)=\"d.toggle()\"\n (dateSelect)=\"onDateSelect($event, action)\" />\n </li>\n <li>\n <button type=\"button\"\n class=\"btn btn-sm when-btn\"\n (click)=\"showDatePicker(action?.id)\">\n <i\n class=\"fa fa-edit edit-icon\"\n ngbTooltip=\"Click to Edit\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </li>\n <li class=\"list-inline-item\">\n <span class=\"badge bg-primary\">{{ action.crm_action?.name }}</span>\n </li>\n <li>\n <ng-container *ngIf=\"action.owner?.user_avatar?.length > 0; else noProfileImg\">\n <ng-container *ngFor=\"let owner_image of action.owner?.user_avatar\">\n <div class=\"text-center my-2\" *ngIf=\"owner_image.width === 50\" [ngbTooltip]=\"action.owner.first_name + ' ' +action.owner.last_name\">\n <div class=\"avatar avatar-image\">\n <img\n class=\"img-fluid\"\n [src]=\"owner_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #noProfileImg>\n <div class=\"text-center my-2\">\n <div class=\"avatar avatar-image\">\n <img\n src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\"\n />\n </div>\n </div>\n </ng-template>\n </li>\n\n <li class=\"list-inline-item float-end\">\n <a *ngIf=\"action?.crm_contact\"\n ngbTooltip=\"See this contact\"\n aria-label=\"See this contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n <i class=\"fa fa-eye me-3 see-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as completed\"\n aria-label=\"Set as completed\"\n class=\"me-3\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCompleted(action.id, action, i)\">\n <i class=\"fa fa-tasks cta1-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as cancelled\"\n aria-label=\"Set as cancelled\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCancelled(action.id, action, i)\">\n <i\n class=\"fa fa-times text-danger delete-icon\"\n aria-hidden=\"true\"\n ></i>\n </a>\n </li>\n </ul>\n <p [class.text-danger]=\"!action.color\"\n class=\"mb-0\"\n *ngIf=\"action.due\">\n {{ action.due }}\n </p>\n <p *ngIf=\"action.owner?.id !== userId\"\n class=\"m-0 mt-1\">\n <a class=\"font-italic grey\"\n [routerLink]=\"['/members', action?.owner?.slug]\">Added by\n {{ action.owner?.first_name + ' ' + action.owner?.last_name }}</a>\n </p>\n <p class=\"mt-1 mb-1 fw-bold\">\n <a class=\"text-secondary\"\n *ngIf=\"action?.crm_contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n {{\n action?.crm_contact?.first_name +\n ' ' +\n action?.crm_contact?.last_name\n }}\n </a>\n <a *ngIf=\"!action.crm_contact_id\">N/A</a> at\n <a *ngIf=\"action.crm_account_id\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n action?.crm_account?.id\n ]\">\n {{ action?.crm_account?.name }}\n </a>\n </p>\n <div class=\"comment-section\">\n <textarea class=\"mt-1 textarea form-control mb-2\"\n [(ngModel)]=\"action.comment\">{{ action.comment }}</textarea>\n <div class=\"d-flex\">\n <p class=\"my-1 comment\"\n *ngIf=\"!showFullComment || action.id !== commentId\">\n {{ action.comment | slice: 0:230\n }}<a *ngIf=\"action.comment.length > 230\"\n class=\"text-secondary\"\n (click)=\"showFullComment = true; commentId = action.id\">...show more\n </a>\n </p>\n <p class=\"my-1 comment\"\n *ngIf=\"showFullComment && action.id === commentId\">\n {{ action.comment }}\n <a *ngIf=\"action.comment.length > 230 && showFullComment\"\n (click)=\"showFullComment = false\"\n class=\"text-secondary\">...show less</a>\n </p>\n <button class=\"btn btn-md edit-btn\"\n (click)=\"editComment($event)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <div class=\"control-btns edit-control-btns\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"editComment(undefined)\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button class=\"btn btn-sm btn-primary\"\n (click)=\"updateComment(action)\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- Suggested Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">AI Suggested Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n\n <div #suggestedActionsSelector *ngIf=\"accountActionSuggested?.length > 0\" class=\"suggested-actions-wrapper\"\n infiniteScroll\n [infiniteScrollContainer]=\"suggestedActionsSelector\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\">\n\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"\n let suggestedAction of accountActionSuggested\n | paginate: { id: 'suggestedAction', itemsPerPage: 10, currentPage: p1 };\n let i = index\n \">\n <div class=\"p-2\">\n <p class=\"mt-1 mb-1 fw-bold\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n suggestedAction?.crm_account?.id\n ]\">{{ suggestedAction?.crm_account?.name }}</a>\n </p>\n <p class=\"fw-bold mb-1\">{{ suggestedAction.crm_action }}</p>\n <p class=\"mb-0\">{{ suggestedAction.reason }}</p>\n </div>\n </div>\n </div>\n <div class=\"text-center pagination-controls w-100 mt-3\"\n *ngIf=\"accountActionSuggested?.length > 10\">\n <pagination-controls id=\"suggestedAction\"\n (pageChange)=\"p1 = $event\">\n </pagination-controls>\n </div>\n <div *ngIf=\"accountActionSuggested.length === 0 && isLoadedSuggested\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionSuggestionsMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.textarea,.control-btns{display:none}.comment,.edit-btn{display:block}.comment{border:0;border-bottom:1px solid rgb(242,242,242);color:#000;font-size:1rem;resize:none}.textarea{border:0;border-bottom:1px solid rgb(242,242,242);color:#1769e1;display:none;font-size:17px}.comment-section{min-width:350px;padding-right:45px;position:relative}.comment-section p{word-break:break-all}.comment-section.show-controls .textarea,.comment-section.show-controls .control-btns{display:block}.comment-section.show-controls .comment,.comment-section.show-controls .edit-btn{display:none}.comment-section.show-controls .control-btns.edit-control-btns{display:flex;justify-content:flex-end}.edit-btn{margin-top:-15px}.avatar-image{height:25px;width:25px}.when-btn:focus{border:0;box-shadow:none}.pending-actions-wrapper,.suggested-actions-wrapper{overflow-y:auto;height:calc(100vh - 150px)}\n"] }]
6223
+ args: [{ selector: 'pw-crm-actions', template: "<div class=\"row\">\n <div class=\"col-12 mb-4\">\n <div class=\"col-12 mb-0\">\n <h2>{{ 'Crm.Actions.Title' | transloco }}</h2>\n </div>\n <div class=\"col-12 col-sm-3 float-start mb-2\"\n *ngIf=\"showFilter\">\n <p-dropdown\n [options]=\"allSubscriptionMembers\"\n optionLabel=\"first_name\"\n optionValue=\"id\"\n [ngModel]=\"0\"\n (onChange)=\"filterByUser($event.value)\">\n\n <ng-template pTemplate=\"selectedItem\" let-selected>\n <span *ngIf=\"selected\">\n {{ selected.first_name }} {{ selected.last_name }}\n </span>\n </ng-template>\n\n <ng-template pTemplate=\"item\" let-option>\n {{ option.first_name }} {{ option.last_name }}\n </ng-template>\n</p-dropdown>\n </div>\n <div>\n <a class=\"btn btn-sm btn-outline-primary float-end\"\n data-cy=\"add-opportunities\"\n [routerLink]=\"['/' + subscription?.slug + routers.opportunityAdd]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n data-cy=\"add-contact\"\n [routerLink]=\"['/' + subscription?.slug + routers.addAccount]\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.AccountMessage.AddAccount' | transloco }}\n </a>\n <a class=\"btn btn-sm btn-outline-primary float-end me-3\"\n [routerLink]=\"['/' + subscription?.slug + routers.contactAdd]\"\n data-cy=\"add-action\">\n <i class=\"fa fa-plus-circle\" aria-hidden=\"true\"></i>\n {{ 'Crm.ContactMessage.AddContact' | transloco }}\n </a>\n </div>\n </div>\n <!-- Pending Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">Pending Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n <div *ngIf=\"contactActions?.length === 0 && isLoaded\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionMessage' | transloco\"> </pw-no-data>\n </div>\n <!-- wrapper for infinite scroll -->\n <div #selector class=\"pending-actions-wrapper\"\n infiniteScroll\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\"\n [infiniteScrollContainer]=\"selector\"\n [fromRoot]=\"true\"\n (scrolled)=\"onScrollPendingActions()\">\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"let action of contactActions; let i = index\">\n <div class=\"p-2\">\n <ul class=\"list-inline\">\n <li class=\"list-inline-item me-2\">\n <h6 *ngIf=\"!updating || actionId !== action.id\">\n {{ action.when_short_date }}\n </h6>\n <input *ngIf=\"updating && actionId === action.id\"\n placeholder=\"dd-mmm-yyyy\"\n [value]=\"action.when_short_date\"\n ngbDatepicker\n #d=\"ngbDatepicker\"\n (focus)=\"d.toggle()\"\n (dateSelect)=\"onDateSelect($event, action)\" />\n </li>\n <li>\n <button type=\"button\"\n class=\"btn btn-sm when-btn\"\n (click)=\"showDatePicker(action?.id)\">\n <i\n class=\"fa fa-edit edit-icon\"\n ngbTooltip=\"Click to Edit\"\n aria-hidden=\"true\"\n ></i>\n </button>\n </li>\n <li class=\"list-inline-item\">\n <span class=\"badge bg-primary\">{{ action.crm_action?.name }}</span>\n </li>\n <li>\n <ng-container *ngIf=\"action.owner?.user_avatar?.length > 0; else noProfileImg\">\n <ng-container *ngFor=\"let owner_image of action.owner?.user_avatar\">\n <div class=\"text-center my-2\" *ngIf=\"owner_image.width === 50\" [ngbTooltip]=\"action.owner.first_name + ' ' +action.owner.last_name\">\n <div class=\"avatar avatar-image\">\n <img\n class=\"img-fluid\"\n [src]=\"owner_image.url\"\n alt=\"Male Icon\"\n (error)=\"handleImageError($event, 'assets/img/icons/male.png')\"\n />\n </div>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #noProfileImg>\n <div class=\"text-center my-2\">\n <div class=\"avatar avatar-image\">\n <img\n src=\"/assets/img/icons/male.png\"\n alt=\"\"\n class=\"img-fluid\"\n />\n </div>\n </div>\n </ng-template>\n </li>\n\n <li class=\"list-inline-item float-end\">\n <a *ngIf=\"action?.crm_contact\"\n ngbTooltip=\"See this contact\"\n aria-label=\"See this contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n <i class=\"fa fa-eye me-3 see-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as completed\"\n aria-label=\"Set as completed\"\n class=\"me-3\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCompleted(action.id, action, i)\">\n <i class=\"fa fa-tasks cta1-icon\" aria-hidden=\"true\"></i>\n </a>\n <a ngbTooltip=\"Set as cancelled\"\n aria-label=\"Set as cancelled\"\n href=\"javascript:void(0);\"\n (click)=\"setAsCancelled(action.id, action, i)\">\n <i\n class=\"fa fa-times text-danger delete-icon\"\n aria-hidden=\"true\"\n ></i>\n </a>\n </li>\n </ul>\n <p [class.text-danger]=\"!action.color\"\n class=\"mb-0\"\n *ngIf=\"action.due\">\n {{ action.due }}\n </p>\n <p *ngIf=\"action.owner?.id !== userId\"\n class=\"m-0 mt-1\">\n <a class=\"font-italic grey\"\n [routerLink]=\"['/members', action?.owner?.slug]\">Added by\n {{ action.owner?.first_name + ' ' + action.owner?.last_name }}</a>\n </p>\n <p class=\"mt-1 mb-1 fw-bold\">\n <a class=\"text-secondary\"\n *ngIf=\"action?.crm_contact\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.contactInfo,\n action?.crm_contact?.id\n ]\">\n {{\n action?.crm_contact?.first_name +\n ' ' +\n action?.crm_contact?.last_name\n }}\n </a>\n <a *ngIf=\"!action.crm_contact_id\">N/A</a> at\n <a *ngIf=\"action.crm_account_id\"\n [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n action?.crm_account?.id\n ]\">\n {{ action?.crm_account?.name }}\n </a>\n </p>\n <div class=\"comment-section\">\n <textarea class=\"mt-1 textarea form-control mb-2\"\n [(ngModel)]=\"action.comment\">{{ action.comment }}</textarea>\n <div class=\"d-flex\">\n <p class=\"my-1 comment\"\n *ngIf=\"!showFullComment || action.id !== commentId\">\n {{ action.comment | slice: 0:230\n }}<a *ngIf=\"action.comment.length > 230\"\n class=\"text-secondary\"\n (click)=\"showFullComment = true; commentId = action.id\">...show more\n </a>\n </p>\n <p class=\"my-1 comment\"\n *ngIf=\"showFullComment && action.id === commentId\">\n {{ action.comment }}\n <a *ngIf=\"action.comment.length > 230 && showFullComment\"\n (click)=\"showFullComment = false\"\n class=\"text-secondary\">...show less</a>\n </p>\n <button class=\"btn btn-md edit-btn\"\n (click)=\"editComment($event)\">\n <i class=\"fa fa-edit edit-icon\" aria-hidden=\"true\"></i>\n </button>\n </div>\n <div class=\"control-btns edit-control-btns\">\n <button type=\"button\"\n class=\"btn btn-sm btn-outline-default me-2\"\n (click)=\"editComment(undefined)\">\n {{ 'Button.Cancel' | transloco }}\n </button>\n <button class=\"btn btn-sm btn-primary\"\n (click)=\"updateComment(action)\">\n {{ 'Button.Submit' | transloco }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <!-- Suggested Actions -->\n <div class=\"col-12 col-md-6 mb-3\">\n <h5 class=\"accordion-heading\">AI Suggested Actions</h5>\n <div class=\"w-100 text-center mt-3\"\n *ngIf=\"!isLoaded\">\n <p-progressSpinner strokeWidth=\"2\"> </p-progressSpinner>\n </div>\n\n\n <div #suggestedActionsSelector *ngIf=\"accountActionSuggested?.length > 0\" class=\"suggested-actions-wrapper\"\n infiniteScroll\n [infiniteScrollContainer]=\"suggestedActionsSelector\"\n [infiniteScrollDistance]=\"2\"\n [infiniteScrollThrottle]=\"50\">\n\n <div class=\"mb-4 action-card bg-white\"\n *ngFor=\"\n let suggestedAction of accountActionSuggested\n | paginate: { id: 'suggestedAction', itemsPerPage: 10, currentPage: p1 };\n let i = index\n \">\n <div class=\"p-2\">\n <p class=\"mt-1 mb-1 fw-bold\">\n <a [routerLink]=\"[\n '/' + subscription?.slug + routers.accountInfo,\n suggestedAction?.crm_account?.id\n ]\">{{ suggestedAction?.crm_account?.name }}</a>\n </p>\n <p class=\"fw-bold mb-1\">{{ suggestedAction.crm_action }}</p>\n <p class=\"mb-0\">{{ suggestedAction.reason }}</p>\n </div>\n </div>\n </div>\n <div class=\"text-center pagination-controls w-100 mt-3\"\n *ngIf=\"accountActionSuggested?.length > 10\">\n <pagination-controls id=\"suggestedAction\"\n (pageChange)=\"p1 = $event\">\n </pagination-controls>\n </div>\n <div *ngIf=\"accountActionSuggested.length === 0 && isLoadedSuggested\"\n class=\"px-2\">\n <pw-no-data [withImage]=\"true\" [message]=\"'Crm.Actions.ActionSuggestionsMessage' | transloco\">\n </pw-no-data>\n </div>\n </div>\n</div>\n", styles: [":root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: rgb(70, 136, 236);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255)}.textarea,.control-btns{display:none}.comment,.edit-btn{display:block}.comment{border:0;border-bottom:1px solid rgb(242,242,242);color:#000;font-size:1rem;resize:none}.textarea{border:0;border-bottom:1px solid rgb(242,242,242);color:#1769e1;display:none;font-size:17px}.comment-section{min-width:350px;padding-right:45px;position:relative}.comment-section p{word-break:break-all}.comment-section.show-controls .textarea,.comment-section.show-controls .control-btns{display:block}.comment-section.show-controls .comment,.comment-section.show-controls .edit-btn{display:none}.comment-section.show-controls .control-btns.edit-control-btns{display:flex;justify-content:flex-end}.edit-btn{margin-top:-15px}.avatar-image{height:25px;width:25px}.when-btn:focus{border:0;box-shadow:none}.pending-actions-wrapper,.suggested-actions-wrapper{overflow-y:auto;height:calc(100vh - 150px)}\n"] }]
6221
6224
  }], ctorParameters: () => [{ type: i1.CrmService }, { type: i0.Injector }, { type: Document, decorators: [{
6222
6225
  type: Inject,
6223
6226
  args: [DOCUMENT]
@@ -6264,14 +6267,14 @@ class SmartCrmTabsComponent extends AppBaseComponent {
6264
6267
  },
6265
6268
  {
6266
6269
  id: 'marketing_tab',
6267
- label: 'Email Marketing',
6270
+ label: 'E-Marketing',
6268
6271
  icon: 'fas fa-bullhorn',
6269
6272
  routerLink: ['/crm/marketing/emails'],
6270
6273
  visible: this.permissionService.evaluatePermissions(`${CRM_PERMISSIONS.Marketing}`)
6271
6274
  },
6272
6275
  {
6273
6276
  id: 'customer-success',
6274
- label: 'Customer Success',
6277
+ label: 'CX & Success',
6275
6278
  icon: 'fa fa-check-circle',
6276
6279
  routerLink: ['/crm/customer-success'],
6277
6280
  visible: this.permissionService.evaluatePermissions(`${CRM_PERMISSIONS.CustomerSuccess}`)
@@ -6937,9 +6940,9 @@ class CrmNewsletterUnsubscribeComponent {
6937
6940
  this.token = '';
6938
6941
  this.message = '';
6939
6942
  this.errorMsg = '';
6940
- this.error = false;
6941
6943
  this.success = "You've successfully been removed from our newsletter.";
6942
6944
  this.failure = 'Something went wrong and we were not able to unsubscribe you. If the problem persists, please contact us.';
6945
+ this.error = false;
6943
6946
  this.route.queryParams.subscribe(params => {
6944
6947
  this.token = params['crm_newsletter_token'] || '';
6945
6948
  if (this.token) {