@posiwise/smart-crm 0.0.20 → 0.0.21

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 (279) hide show
  1. package/.eslintrc.json +22 -0
  2. package/ng-package.json +15 -0
  3. package/package.json +10 -23
  4. package/project.json +72 -0
  5. package/{index.d.ts → src/index.ts} +3 -0
  6. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.html +200 -0
  7. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.spec.ts +185 -0
  8. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.ts +238 -0
  9. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.html +200 -0
  10. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.spec.ts +109 -0
  11. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.ts +249 -0
  12. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.html +785 -0
  13. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.scss +123 -0
  14. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.spec.ts +388 -0
  15. package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.ts +792 -0
  16. package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.html +292 -0
  17. package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.scss +63 -0
  18. package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.spec.ts +145 -0
  19. package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.ts +417 -0
  20. package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.html +1 -0
  21. package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.spec.ts +17 -0
  22. package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.ts +7 -0
  23. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.html +75 -0
  24. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.scss +3 -0
  25. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.spec.ts +123 -0
  26. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.ts +117 -0
  27. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.html +125 -0
  28. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.scss +5 -0
  29. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.spec.ts +136 -0
  30. package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.ts +143 -0
  31. package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.html +60 -0
  32. package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.scss +1 -0
  33. package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.spec.ts +55 -0
  34. package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.ts +29 -0
  35. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.html +95 -0
  36. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.spec.ts +105 -0
  37. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.ts +95 -0
  38. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.html +125 -0
  39. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.scss +3 -0
  40. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.spec.ts +132 -0
  41. package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.ts +145 -0
  42. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.html +61 -0
  43. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.spec.ts +81 -0
  44. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.ts +88 -0
  45. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.html +96 -0
  46. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.scss +3 -0
  47. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.spec.ts +109 -0
  48. package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.ts +129 -0
  49. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.html +108 -0
  50. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.scss +3 -0
  51. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.spec.ts +124 -0
  52. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.ts +111 -0
  53. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.html +134 -0
  54. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.scss +3 -0
  55. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.spec.ts +103 -0
  56. package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.ts +166 -0
  57. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.html +90 -0
  58. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.scss +6 -0
  59. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.spec.ts +105 -0
  60. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.ts +118 -0
  61. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.html +115 -0
  62. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.spec.ts +93 -0
  63. package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.ts +150 -0
  64. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.html +205 -0
  65. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.spec.ts +149 -0
  66. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.ts +184 -0
  67. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.html +530 -0
  68. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.scss +112 -0
  69. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.spec.ts +284 -0
  70. package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.ts +553 -0
  71. package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.html +281 -0
  72. package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.scss +19 -0
  73. package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.spec.ts +138 -0
  74. package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.ts +344 -0
  75. package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.html +1 -0
  76. package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.spec.ts +18 -0
  77. package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.ts +7 -0
  78. package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.html +27 -0
  79. package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.spec.ts +19 -0
  80. package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.ts +7 -0
  81. package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.html +46 -0
  82. package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.spec.ts +50 -0
  83. package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.ts +60 -0
  84. package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.html +142 -0
  85. package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.spec.ts +125 -0
  86. package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.ts +192 -0
  87. package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.html +176 -0
  88. package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.spec.ts +98 -0
  89. package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.ts +160 -0
  90. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.html +90 -0
  91. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.spec.ts +68 -0
  92. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.ts +98 -0
  93. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.html +322 -0
  94. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.spec.ts +156 -0
  95. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.ts +296 -0
  96. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.html +215 -0
  97. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.scss +3 -0
  98. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.spec.ts +117 -0
  99. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.ts +187 -0
  100. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.html +33 -0
  101. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.scss +82 -0
  102. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.spec.ts +63 -0
  103. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.ts +62 -0
  104. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.html +27 -0
  105. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.scss +3 -0
  106. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.spec.ts +28 -0
  107. package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.ts +13 -0
  108. package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.html +75 -0
  109. package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.scss +223 -0
  110. package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.spec.ts +184 -0
  111. package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.ts +268 -0
  112. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.html +273 -0
  113. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.scss +11 -0
  114. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.spec.ts +196 -0
  115. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.ts +391 -0
  116. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.html +489 -0
  117. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.scss +104 -0
  118. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.spec.ts +319 -0
  119. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.ts +568 -0
  120. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.html +204 -0
  121. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.scss +11 -0
  122. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.spec.ts +123 -0
  123. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.ts +260 -0
  124. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.html +25 -0
  125. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.scss +7 -0
  126. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.spec.ts +38 -0
  127. package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.ts +8 -0
  128. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.html +213 -0
  129. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.scss +73 -0
  130. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.spec.ts +147 -0
  131. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.ts +292 -0
  132. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.html +309 -0
  133. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.spec.ts +75 -0
  134. package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.ts +161 -0
  135. package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.html +25 -0
  136. package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.scss +68 -0
  137. package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.spec.ts +32 -0
  138. package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.ts +8 -0
  139. package/src/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.spec.ts +43 -0
  140. package/src/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.ts +97 -0
  141. package/src/lib/private/smart-crm-private.module.ts +188 -0
  142. package/src/lib/private/smart-crm-private.routing.module.ts +303 -0
  143. package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.html +27 -0
  144. package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.scss +4 -0
  145. package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.spec.ts +40 -0
  146. package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.ts +57 -0
  147. package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.html +36 -0
  148. package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.spec.ts +42 -0
  149. package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.ts +57 -0
  150. package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.html +133 -0
  151. package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.scss +1 -0
  152. package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.spec.ts +37 -0
  153. package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.ts +41 -0
  154. package/src/lib/public/smart-crm-public.module.ts +30 -0
  155. package/src/lib/public/smart-crm-public.routing.module.ts +36 -0
  156. package/{lib/shared/interface/crm-account.interface.d.ts → src/lib/shared/interface/crm-account.interface.ts} +10 -3
  157. package/{lib/shared/interface/crm-action.interface.d.ts → src/lib/shared/interface/crm-action.interface.ts} +1 -0
  158. package/{lib/shared/interface/crm-contact.interface.d.ts → src/lib/shared/interface/crm-contact.interface.ts} +2 -0
  159. package/{lib/shared/interface/crm-lead.interface.d.ts → src/lib/shared/interface/crm-lead.interface.ts} +1 -0
  160. package/{lib/shared/interface/crm-newsletter.interface.d.ts → src/lib/shared/interface/crm-newsletter.interface.ts} +3 -1
  161. package/{lib/shared/interface/crm-opportunity.interface.d.ts → src/lib/shared/interface/crm-opportunity.interface.ts} +5 -0
  162. package/{lib/shared/interface/crm-source.interface.d.ts → src/lib/shared/interface/crm-source.interface.ts} +1 -0
  163. package/{lib/shared/interface/crm-stages.interface.d.ts → src/lib/shared/interface/crm-stages.interface.ts} +1 -0
  164. package/{lib/shared/interface/crm-widget.interface.d.ts → src/lib/shared/interface/crm-widget.interface.ts} +1 -0
  165. package/{lib/shared/interface/smart-crm-module.interface.d.ts → src/lib/shared/interface/smart-crm-module.interface.ts} +42 -1
  166. package/src/lib/shared/models/smart-crm.model.ts +199 -0
  167. package/src/lib/shared/routers/routers.ts +23 -0
  168. package/tsconfig.json +29 -0
  169. package/tsconfig.lib.json +25 -0
  170. package/tsconfig.lib.prod.json +9 -0
  171. package/tsconfig.spec.json +11 -0
  172. package/esm2022/index.mjs +0 -48
  173. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.mjs +0 -194
  174. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.mjs +0 -192
  175. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.mjs +0 -599
  176. package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.mjs +0 -348
  177. package/esm2022/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.mjs +0 -12
  178. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.mjs +0 -97
  179. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.mjs +0 -118
  180. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.mjs +0 -35
  181. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.mjs +0 -87
  182. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.mjs +0 -119
  183. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.mjs +0 -79
  184. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.mjs +0 -107
  185. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.mjs +0 -96
  186. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.mjs +0 -139
  187. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.mjs +0 -98
  188. package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.mjs +0 -125
  189. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.mjs +0 -159
  190. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.mjs +0 -470
  191. package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.mjs +0 -281
  192. package/esm2022/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.mjs +0 -12
  193. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-insight.component.mjs +0 -14
  194. package/esm2022/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.mjs +0 -55
  195. package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.mjs +0 -173
  196. package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads.component.mjs +0 -136
  197. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.mjs +0 -79
  198. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.mjs +0 -266
  199. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.mjs +0 -151
  200. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.mjs +0 -51
  201. package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.mjs +0 -18
  202. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.mjs +0 -230
  203. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.mjs +0 -335
  204. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.mjs +0 -477
  205. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.mjs +0 -218
  206. package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.mjs +0 -14
  207. package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.mjs +0 -255
  208. package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.mjs +0 -148
  209. package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary.component.mjs +0 -16
  210. package/esm2022/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.mjs +0 -92
  211. package/esm2022/lib/private/smart-crm-private.module.mjs +0 -327
  212. package/esm2022/lib/private/smart-crm-private.routing.module.mjs +0 -310
  213. package/esm2022/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.mjs +0 -56
  214. package/esm2022/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.mjs +0 -57
  215. package/esm2022/lib/public/components/smart-crm-signup/smart-crm-signup.component.mjs +0 -35
  216. package/esm2022/lib/public/smart-crm-public.module.mjs +0 -46
  217. package/esm2022/lib/public/smart-crm-public.routing.module.mjs +0 -44
  218. package/esm2022/lib/shared/interface/crm-account.interface.mjs +0 -2
  219. package/esm2022/lib/shared/interface/crm-action.interface.mjs +0 -2
  220. package/esm2022/lib/shared/interface/crm-contact.interface.mjs +0 -2
  221. package/esm2022/lib/shared/interface/crm-lead.interface.mjs +0 -2
  222. package/esm2022/lib/shared/interface/crm-newsletter.interface.mjs +0 -2
  223. package/esm2022/lib/shared/interface/crm-opportunity.interface.mjs +0 -2
  224. package/esm2022/lib/shared/interface/crm-source.interface.mjs +0 -2
  225. package/esm2022/lib/shared/interface/crm-stages.interface.mjs +0 -2
  226. package/esm2022/lib/shared/interface/crm-widget.interface.mjs +0 -2
  227. package/esm2022/lib/shared/interface/smart-crm-module.interface.mjs +0 -2
  228. package/esm2022/lib/shared/models/smart-crm.model.mjs +0 -186
  229. package/esm2022/lib/shared/routers/routers.mjs +0 -23
  230. package/esm2022/posiwise-smart-crm.mjs +0 -5
  231. package/fesm2022/posiwise-smart-crm.mjs +0 -6482
  232. package/fesm2022/posiwise-smart-crm.mjs.map +0 -1
  233. package/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.d.ts +0 -61
  234. package/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.d.ts +0 -72
  235. package/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.d.ts +0 -173
  236. package/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.d.ts +0 -105
  237. package/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.d.ts +0 -5
  238. package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.d.ts +0 -37
  239. package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.d.ts +0 -55
  240. package/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.d.ts +0 -11
  241. package/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories-details/smart-crm-opportunity-categories-details.component.d.ts +0 -31
  242. package/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.d.ts +0 -56
  243. package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.d.ts +0 -28
  244. package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.d.ts +0 -52
  245. package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.d.ts +0 -34
  246. package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.d.ts +0 -58
  247. package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.d.ts +0 -36
  248. package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.d.ts +0 -58
  249. package/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.d.ts +0 -48
  250. package/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.d.ts +0 -122
  251. package/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.d.ts +0 -89
  252. package/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.d.ts +0 -5
  253. package/lib/private/components/smart-crm-insight/smart-crm-insight.component.d.ts +0 -5
  254. package/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.d.ts +0 -20
  255. package/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.d.ts +0 -45
  256. package/lib/private/components/smart-crm-leads/smart-crm-leads.component.d.ts +0 -58
  257. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.d.ts +0 -49
  258. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.d.ts +0 -63
  259. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.d.ts +0 -62
  260. package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-view-details/smart-crm-marketing-view-details.component.d.ts +0 -21
  261. package/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.d.ts +0 -8
  262. package/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.d.ts +0 -63
  263. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.d.ts +0 -67
  264. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.d.ts +0 -122
  265. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.d.ts +0 -77
  266. package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.d.ts +0 -5
  267. package/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.d.ts +0 -72
  268. package/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.d.ts +0 -40
  269. package/lib/private/components/smart-crm-summary/smart-crm-summary.component.d.ts +0 -5
  270. package/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.d.ts +0 -10
  271. package/lib/private/smart-crm-private.module.d.ts +0 -62
  272. package/lib/private/smart-crm-private.routing.module.d.ts +0 -7
  273. package/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.d.ts +0 -18
  274. package/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.d.ts +0 -17
  275. package/lib/public/components/smart-crm-signup/smart-crm-signup.component.d.ts +0 -15
  276. package/lib/public/smart-crm-public.module.d.ts +0 -14
  277. package/lib/public/smart-crm-public.routing.module.d.ts +0 -7
  278. package/lib/shared/models/smart-crm.model.d.ts +0 -16
  279. package/lib/shared/routers/routers.d.ts +0 -21
@@ -0,0 +1,281 @@
1
+ <div class="row">
2
+ <div class="col-12 mb-3">
3
+ <h2 *ngIf="!accountData?.name">Contacts</h2>
4
+ <h3 *ngIf="accountData?.name"
5
+ class="mb-2">
6
+ {{ accountData.name }}
7
+ <span [routerLink]="[routers.accounts, accountData.id]"><i class="fa fa-edit edit-icon" aria-hidden="true"></i></span>
8
+ </h3>
9
+ <h4 *ngIf="accountData?.location"
10
+ class="mb-1">Location: {{ accountData.location }}</h4>
11
+ <h4 *ngIf="accountData?.tel">Tel: {{ accountData.tel }}</h4>
12
+ <h4 *ngIf="accountData?.company_url">
13
+ URL:
14
+ <a href="{{ accountData.company_url }}"
15
+ target="_blank"
16
+ rel="noopener noreferrer">
17
+ {{ accountData.company_url }}
18
+ </a>
19
+ </h4>
20
+ <a class="btn btn-sm btn-outline-primary float-end mb-3 ms-2"
21
+ data-cy="add-opportunities"
22
+ (click)="navigateToOpportunities()">
23
+ <i class="fa fa-plus-circle" aria-hidden="true"></i>
24
+ {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}
25
+ </a>
26
+ <a class="btn btn-sm btn-outline-primary float-end"
27
+ data-cy="add-contact"
28
+ [routerLink]="['/' + subscription?.slug + routers.contactAdd, accountId]"
29
+ *ngIf="accountData?.name">
30
+ <i class="fa fa-plus-circle" aria-hidden="true"></i>
31
+ {{ 'Crm.ContactMessage.AddContact' | transloco }}
32
+ </a>
33
+ <a class="btn btn-sm btn-outline-primary float-end"
34
+ data-cy="add-contact"
35
+ [routerLink]="['/' + subscription?.slug + routers.contactAdd, accountId]"
36
+ *ngIf="!accountData?.name">
37
+ <i class="fa fa-plus-circle" aria-hidden="true"></i>
38
+ {{ 'Crm.ContactMessage.AddContact' | transloco }}
39
+ </a>
40
+ <a class="btn btn-sm btn-outline-primary me-3 float-end"
41
+ data-cy="list-contact"
42
+ [routerLink]="['/' + subscription?.slug + routers.contacts]"
43
+ *ngIf="accountData?.name">
44
+ <i class="fa fa-plus-list" aria-hidden="true"></i>
45
+ {{ 'Crm.ContactMessage.ShowAllContacts' | transloco }}
46
+ </a>
47
+ </div>
48
+ </div>
49
+ <div class="w-100 text-center mt-3"
50
+ *ngIf="!isLoaded">
51
+ <p-progressSpinner strokeWidth="2"> </p-progressSpinner>
52
+ </div>
53
+ <div class="primeng-datatable-container table-responsive"
54
+ [class.hideTable]="data.unfiltered_count === 0">
55
+ <p-table class="table"
56
+ #dt
57
+ [value]="data.contacts"
58
+ [paginator]="data.object_count !== 0"
59
+ [rows]="PAGE_SIZE"
60
+ [totalRecords]="data.object_count"
61
+ [loading]="loading"
62
+ [lazy]="true"
63
+ [filterDelay]="1000"
64
+ stateStorage="local"
65
+ stateKey="smart-crm-contacts"
66
+ (onLazyLoad)="onLazyLoad($event)"
67
+ [customSort]="true">
68
+ <ng-template pTemplate="caption">
69
+ <div class="row">
70
+ <div class="col-sm-3 col-6 mb-2 mb-sm-0">
71
+ <select class="form-select" (change)="filterByPotential($event)">
72
+ <option value="">Select Priority</option>
73
+ <option *ngFor="let option of potential" [selected]="filterByPotentials === option" [value]="option">
74
+ {{ option }}
75
+ </option>
76
+ </select>
77
+ </div>
78
+ <div class="col-sm-3 col-6">
79
+ <p-multiSelect [(ngModel)]="selectedLabels" placeholder="Select Label" [options]="labels" [filter]="false"
80
+ [showHeader]="true" [showToggleAll]="true" (onChange)="onLabelChange($event)" appendTo="body">
81
+ </p-multiSelect>
82
+ </div>
83
+ <!-- multiple select account drop down -->
84
+ <div class="col-sm-3 col-6">
85
+ <p-multiSelect [(ngModel)]="selectedAccount" placeholder="Select Account" [options]="accountDropDown" [filter]="false"
86
+ [showHeader]="true" [showToggleAll]="true" optionLabel="name" (onChange)="onSelectAccount()" appendTo="body">
87
+ </p-multiSelect>
88
+ </div>
89
+ <div class="col-sm-3 col-md-4 col-lg-3">
90
+ <div class="d-flex">
91
+ <i class="fa fa-search mt-2 me-2" aria-hidden="true"></i>
92
+ <input type="text" [(ngModel)]="searchText" pInputText placeholder="Search contact..."
93
+ (input)="dt.filterGlobal($event.target.value, 'contains')" class="form-control" />
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+ </ng-template>
100
+ <ng-template pTemplate="header">
101
+ <tr>
102
+ <th scope="true"
103
+ pSortableColumn="first_name">
104
+ {{ 'Crm.ContactMessage.Name' | transloco }}
105
+ <p-sortIcon field="first_name"></p-sortIcon>
106
+ </th>
107
+ <th scope="true"
108
+ pSortableColumn="owner_id">
109
+ {{ 'Crm.ContactMessage.ContactOwner' | transloco }}
110
+ <p-sortIcon field="owner_id"></p-sortIcon>
111
+ </th>
112
+ <th scope="true"
113
+ pSortableColumn="crm_account_id">
114
+ {{ 'Crm.ContactMessage.AccountOwner' | transloco }}
115
+ <p-sortIcon field="crm_account_id"></p-sortIcon>
116
+ </th>
117
+ <th scope="true"
118
+ pSortableColumn="labels">
119
+ {{ 'Crm.ContactMessage.Labels' | transloco }}
120
+ <p-sortIcon field="labels"></p-sortIcon>
121
+ </th>
122
+ <th scope="true"
123
+ pSortableColumn="potential">
124
+ {{ 'Crm.ContactMessage.Potential' | transloco }}
125
+ <p-sortIcon field="potential"></p-sortIcon>
126
+ </th>
127
+ <th scope="true">{{ 'Label.Actions' | transloco }}</th>
128
+ </tr>
129
+ </ng-template>
130
+ <ng-template pTemplate="body"
131
+ let-contact>
132
+ <tr>
133
+ <td data-head="Name"
134
+ class="contactname">
135
+ <a ngbTooltip="{{contact.headline ? contact.headline : 'No headline for this contact'}}"
136
+ [routerLink]="['/' + subscription?.slug + routers.contactInfo, contact.id]">{{ (contact?.first_name || '') + ' ' + (contact?.last_name || '') | textTruncate: 20 }}
137
+ </a>
138
+ </td>
139
+ <td data-head="OwnerName">{{ contact.owner | ifNameNullShowEmail }}</td>
140
+ <td data-head="Account Name">
141
+ <a [routerLink]="[
142
+ '/' + subscription?.slug + routers.accountInfo,
143
+ contact.crm_account.id
144
+ ]" ngbTooltip="{{contact?.crm_account.name}}">{{ contact?.crm_account.name | textTruncate: 20 }}</a>
145
+ </td>
146
+ <td data-head="Labels">
147
+ <span class="badge bg-info m-1"
148
+ *ngFor="let item of contact.labels">{{
149
+ item
150
+ }}</span>
151
+ </td>
152
+ <td data-head="Potential">
153
+ <span [appDynamicBadge]="{ itemsArray: potential, item: contact.potential }"
154
+ color="warning"
155
+ class="badge">{{ contact.potential }}</span>
156
+ </td>
157
+ <td data-head="Action">
158
+ <ul class="list-unstyled list-inline">
159
+ <li ngbTooltip="Show"
160
+ class="me-2 me-sm-3"
161
+ [routerLink]="[
162
+ '/' + subscription?.slug + '/crm/contacts/info',
163
+ contact.id
164
+ ]">
165
+ <i class="fa fa-eye see-icon" aria-hidden="true"></i>
166
+ </li>
167
+ <li *ngIf="
168
+ hasAccess ||
169
+ contact.owner_id === userId ||
170
+ contact.crm_account.owner_id === userId
171
+ "
172
+ ngbTooltip="Add opportunity"
173
+ class="me-2 me-sm-3"
174
+ [routerLink]="['/' + subscription?.slug + routers.opportunityAdd]"
175
+ [queryParams]="{ contact_id: contact.id }">
176
+ <i class="fa fa-plus-circle add-icon" aria-hidden="true"></i>
177
+ </li>
178
+ <!-- <ng-container *ngIf="contact"> -->
179
+ <li *ngIf="
180
+ hasAccess ||
181
+ contact.owner_id === userId ||
182
+ contact.crm_account.owner_id === userId
183
+ "
184
+ ngbTooltip="Edit"
185
+ class="me-2 me-sm-3"
186
+ [routerLink]="[
187
+ '/' + subscription?.slug + routers.contactDetails,
188
+ contact.id
189
+ ]">
190
+ <i class="fa fa-edit edit-icon" aria-hidden="true"></i>
191
+ </li>
192
+ <li *ngIf="
193
+ hasAccess ||
194
+ contact.owner_id === userId ||
195
+ contact.crm_account.owner_id === userId
196
+ "
197
+ ngbTooltip="Delete"
198
+ class="me-2 me-sm-3">
199
+ <i
200
+ class="fa fa-trash delete-icon"
201
+ (click)="onDelete(contact.id)"
202
+ aria-hidden="true"
203
+ ></i>
204
+ </li>
205
+ </ul>
206
+ </td>
207
+ </tr>
208
+ </ng-template>
209
+ </p-table>
210
+ <div *ngIf="data.object_count === 0 && data.unfiltered_count !== 0">
211
+ <pw-no-data [withImage]="true" [message]="'Search.NoDataMessage'| transloco" [description]="'Search.NoDataDescription' | transloco" >
212
+ </pw-no-data>
213
+ </div>
214
+ <span class="total-records-count" *ngIf="data.object_count !== 0">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>
215
+ </div>
216
+ <div *ngIf="data.unfiltered_count === 0 && isLoaded">
217
+ <pw-no-data [withImage]="true" [message]="'Crm.ContactMessage.ContactsAdminMessage' | transloco"> </pw-no-data>
218
+ </div>
219
+
220
+ <ng-container *rbacAllow="'Pages.Beta'">
221
+ <div class="row mt-5"
222
+ *ngIf="data.unfiltered_count !== 0 && isLoaded">
223
+ <!-- Drill Down -->
224
+ <div class="col-12 col-md-6 mb-3 analytics">
225
+ <h5 class="accordion-heading">Drill Down</h5>
226
+ <div class="primeng-datatable-container table-responsive"
227
+ *ngIf="contactInsight?.length">
228
+ <p-table class="table"
229
+ #dt
230
+ [value]="contactInsight"
231
+ [paginator]="contactInsight?.length !== 0"
232
+ [rows]="PAGE_SIZE"
233
+
234
+ [totalRecords]="contactInsight.length"
235
+ [lazy]="true">
236
+ <ng-template pTemplate="header">
237
+ <tr>
238
+ <th scope="true">{{ 'Crm.ContactMessage.Title' | transloco }}</th>
239
+ <th scope="true">{{ 'Crm.ContactMessage.Value' | transloco }}</th>
240
+ <th scope="true">{{ 'Crm.ContactMessage.Reason' | transloco }}</th>
241
+ </tr>
242
+ </ng-template>
243
+ <ng-template pTemplate="body"
244
+ let-insight>
245
+ <tr>
246
+ <td data-head="Title">
247
+ {{ insight.title }}
248
+ </td>
249
+ <td data-head="Value">
250
+ {{ insight.value }}
251
+ </td>
252
+ <td data-head="Reason">
253
+ {{ insight.reason }}
254
+ </td>
255
+ </tr>
256
+ </ng-template>
257
+ </p-table>
258
+ <span class="total-records-count" *ngIf="contactInsight?.length !== 0">Total: {{ contactInsight.length }}</span>
259
+ </div>
260
+ <div *ngIf="contactInsight?.length === 0">
261
+ <pw-no-data [withImage]="true" [message]="'Crm.ContactMessage.NoInsightMessage' | transloco">
262
+ </pw-no-data>
263
+ </div>
264
+ </div>
265
+ <!-- Geography -->
266
+ <div class="col-12 col-md-6 mb-3 analytics">
267
+ <h5 class="accordion-heading">Geography</h5>
268
+ <div>
269
+ <ng-template [ngIf]="contactGeography">
270
+ <plotly-plot [data]="contactGeography?.data"
271
+ [layout]="contactGeography?.layout">
272
+ </plotly-plot>
273
+ </ng-template>
274
+ </div>
275
+ <div *ngIf="!contactGeography">
276
+ <pw-no-data [withImage]="true" [message]="'Crm.ContactMessage.NoInsightMessage' | transloco">
277
+ </pw-no-data>
278
+ </div>
279
+ </div>
280
+ </div>
281
+ </ng-container>
@@ -0,0 +1,19 @@
1
+ @import 'variables';
2
+
3
+ .table {
4
+ tr {
5
+ vertical-align: baseline;
6
+ }
7
+ }
8
+
9
+ @media (min-width: 640px) {
10
+ .list-inline {
11
+ width: 150px;
12
+ }
13
+ }
14
+
15
+ @media (min-width: 640px) and (max-width: 768px) {
16
+ .primeng-datatable-container tr td {
17
+ width: 350px;
18
+ }
19
+ }
@@ -0,0 +1,138 @@
1
+ import { TestBed } from '@angular/core/testing';
2
+ import { CommonServicesModule, PermissionService, UserService } from '@posiwise/common-services';
3
+ import { SharedModule } from '@posiwise/shared-module';
4
+ import { CrmService } from '@posiwise/smart-crm-shared';
5
+ import { DEFAULT_USER, TestHelper } from '@posiwise/test-helpers';
6
+ import { MockProvider } from 'ng-mocks';
7
+ import { of } from 'rxjs';
8
+ import Swal from 'sweetalert2';
9
+ import { SmartCrmPrivateModule } from '../../smart-crm-private.module';
10
+ import { SmartCrmContactComponent } from './smart-crm-contacts.component';
11
+
12
+ class UserServiceMock {
13
+ getUserState() {
14
+ return of({ currentUser: DEFAULT_USER });
15
+ }
16
+ }
17
+ xdescribe('SmartCrmContactComponent', () => {
18
+ const data = {
19
+ contacts: [
20
+ {
21
+ id: 35,
22
+ first_name: 'test',
23
+ last_name: 'test',
24
+ email: 'test@gmail.com',
25
+ crm_account_id: 7,
26
+ created_at: '2021-10-04T10:23:01.501+00:00',
27
+ headline: 'test',
28
+ potential: 'medium',
29
+ crm_source_id: 6,
30
+ subscription_id: 31,
31
+ labels: ['vip'],
32
+ email_verified: false,
33
+ newsletter_subscribed: true,
34
+ owner: {
35
+ first_name: 'not',
36
+ last_name: 'available'
37
+ },
38
+ crm_account: {
39
+ id: 7,
40
+ name: 'test',
41
+ owner_id: 25
42
+ }
43
+ }
44
+ ],
45
+ object_count: 1,
46
+ unfiltered_count: 1
47
+ };
48
+ const createComponent = TestHelper.createComponentFactory({
49
+ component: SmartCrmContactComponent,
50
+ imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
51
+ providers: [
52
+ ...TestHelper.TEST_PROVIDERS,
53
+ MockProvider(PermissionService, {
54
+ evaluatePermissions: () => {
55
+ return true;
56
+ },
57
+ isGranted: () => {
58
+ return true;
59
+ }
60
+ }),
61
+ MockProvider(CrmService, {
62
+ getAccountContacts: () => of(data),
63
+ getAccountDetail: () => of({ id: 1 }),
64
+ getAllContacts: () => of(data),
65
+ deleteContact: () => of({}),
66
+ getCrmAnalytics: (_id, type) =>
67
+ type === 'contacts_insights'
68
+ ? of([{ title: 'Title', value: 'Value', reason: 'This is the reason' }])
69
+ : of({ data: [], layout: {} }),
70
+ getCrmContactDefaultValues: () =>
71
+ of({
72
+ potential: ['low', 'medium', 'high'],
73
+ labels: ['vip']
74
+ })
75
+ }),
76
+ {
77
+ provide: UserService,
78
+ useClass: UserServiceMock
79
+ }
80
+ ]
81
+ });
82
+
83
+ beforeEach(() => {
84
+ TestHelper.setUpPermissionsAndUser();
85
+ });
86
+
87
+ afterEach(() => {
88
+ localStorage.clear();
89
+ });
90
+
91
+ it('should create', async () => {
92
+ TestHelper.setActivatedRoute({
93
+ parent: { params: of({ slug: 'posiwise-263' }) }
94
+ });
95
+ const spectator = await createComponent();
96
+ expect(spectator.component).toBeTruthy();
97
+ expect(spectator.query('h2')).toContainText('Contacts');
98
+ });
99
+
100
+ it('should delete account ', async () => {
101
+ TestHelper.setActivatedRoute({
102
+ parent: { params: of({ slug: 'posiwise-263' }) }
103
+ });
104
+ const spectator = await createComponent();
105
+ const service = TestBed.inject(CrmService);
106
+ const spy = spyOn(service, 'deleteContact').and.callThrough();
107
+ spectator.click('tbody tr:first-child .fa-trash');
108
+ expect(Swal.isVisible()).toBeTruthy();
109
+ Swal.clickConfirm();
110
+ await TestHelper.stabilize(spectator);
111
+ expect(spy).toHaveBeenCalledTimes(1);
112
+ });
113
+
114
+ it('should filter by potential', async () => {
115
+ TestHelper.setActivatedRoute({
116
+ params: { accountId: 1 },
117
+ parent: { params: of({ slug: 'posiwise-263' }) }
118
+ });
119
+ const spectator = await createComponent();
120
+ spectator.selectOption(spectator.query('select'), 'medium', { emitEvents: true });
121
+ expect(spectator.component.filterByPotentials).toEqual('medium');
122
+ });
123
+
124
+ it('should filter by label', async () => {
125
+ TestHelper.setActivatedRoute({
126
+ params: { accountId: 1 },
127
+ parent: { params: of({ slug: 'posiwise-263' }) }
128
+ });
129
+ const spectator = await createComponent();
130
+ spectator.click('p-multiSelect .p-multiselect-trigger');
131
+ spectator.click(
132
+ spectator.query('.p-multiselect-items-wrapper >:first-child >:nth-child(1) > li', {
133
+ root: true
134
+ })
135
+ );
136
+ expect(spectator.component.filterByStatus).toContain('vip');
137
+ });
138
+ });