@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.
- package/.eslintrc.json +22 -0
- package/ng-package.json +15 -0
- package/package.json +10 -23
- package/project.json +72 -0
- package/{index.d.ts → src/index.ts} +3 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.html +200 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.spec.ts +185 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.ts +238 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.html +200 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.spec.ts +109 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.ts +249 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.html +785 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.scss +123 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.spec.ts +388 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.ts +792 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.html +292 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.scss +63 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.spec.ts +145 -0
- package/src/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.ts +417 -0
- package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.html +1 -0
- package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.spec.ts +17 -0
- package/src/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.ts +7 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.html +75 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.scss +3 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.spec.ts +123 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.ts +117 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.html +125 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.scss +5 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.spec.ts +136 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.ts +143 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.html +60 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.scss +1 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.spec.ts +55 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.ts +29 -0
- 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
- 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
- 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
- package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.html +125 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.scss +3 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.spec.ts +132 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.ts +145 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.html +61 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.spec.ts +81 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.ts +88 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.html +96 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.scss +3 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.spec.ts +109 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.ts +129 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.html +108 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.scss +3 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.spec.ts +124 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.ts +111 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.html +134 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.scss +3 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.spec.ts +103 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.ts +166 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.html +90 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.scss +6 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.spec.ts +105 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.ts +118 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.html +115 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.spec.ts +93 -0
- package/src/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.ts +150 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.html +205 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.spec.ts +149 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.ts +184 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.html +530 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.scss +112 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.spec.ts +284 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.ts +553 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.html +281 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.scss +19 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.spec.ts +138 -0
- package/src/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.ts +344 -0
- package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.html +1 -0
- package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.spec.ts +18 -0
- package/src/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.ts +7 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.html +27 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.spec.ts +19 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-insight.component.ts +7 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.html +46 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.spec.ts +50 -0
- package/src/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.ts +60 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.html +142 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.spec.ts +125 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.ts +192 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.html +176 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.spec.ts +98 -0
- package/src/lib/private/components/smart-crm-leads/smart-crm-leads.component.ts +160 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.html +90 -0
- 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
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.ts +98 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.html +322 -0
- 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
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.ts +296 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.html +215 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.scss +3 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.spec.ts +117 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.ts +187 -0
- 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
- 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
- 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
- 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
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.html +27 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.scss +3 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.spec.ts +28 -0
- package/src/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.ts +13 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.html +75 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.scss +223 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.spec.ts +184 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.ts +268 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.html +273 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.scss +11 -0
- 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
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.ts +391 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.html +489 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.scss +104 -0
- 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
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.ts +568 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.html +204 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.scss +11 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.spec.ts +123 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.ts +260 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.html +25 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.scss +7 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.spec.ts +38 -0
- package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.ts +8 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.html +213 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.scss +73 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.spec.ts +147 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.ts +292 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.html +309 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.spec.ts +75 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.ts +161 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.html +25 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.scss +68 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.spec.ts +32 -0
- package/src/lib/private/components/smart-crm-summary/smart-crm-summary.component.ts +8 -0
- package/src/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.spec.ts +43 -0
- package/src/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.ts +97 -0
- package/src/lib/private/smart-crm-private.module.ts +188 -0
- package/src/lib/private/smart-crm-private.routing.module.ts +303 -0
- package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.html +27 -0
- package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.scss +4 -0
- package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.spec.ts +40 -0
- package/src/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.ts +57 -0
- package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.html +36 -0
- package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.spec.ts +42 -0
- package/src/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.ts +57 -0
- package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.html +133 -0
- package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.scss +1 -0
- package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.spec.ts +37 -0
- package/src/lib/public/components/smart-crm-signup/smart-crm-signup.component.ts +41 -0
- package/src/lib/public/smart-crm-public.module.ts +30 -0
- package/src/lib/public/smart-crm-public.routing.module.ts +36 -0
- package/{lib/shared/interface/crm-account.interface.d.ts → src/lib/shared/interface/crm-account.interface.ts} +10 -3
- package/{lib/shared/interface/crm-action.interface.d.ts → src/lib/shared/interface/crm-action.interface.ts} +1 -0
- package/{lib/shared/interface/crm-contact.interface.d.ts → src/lib/shared/interface/crm-contact.interface.ts} +2 -0
- package/{lib/shared/interface/crm-lead.interface.d.ts → src/lib/shared/interface/crm-lead.interface.ts} +1 -0
- package/{lib/shared/interface/crm-newsletter.interface.d.ts → src/lib/shared/interface/crm-newsletter.interface.ts} +3 -1
- package/{lib/shared/interface/crm-opportunity.interface.d.ts → src/lib/shared/interface/crm-opportunity.interface.ts} +5 -0
- package/{lib/shared/interface/crm-source.interface.d.ts → src/lib/shared/interface/crm-source.interface.ts} +1 -0
- package/{lib/shared/interface/crm-stages.interface.d.ts → src/lib/shared/interface/crm-stages.interface.ts} +1 -0
- package/{lib/shared/interface/crm-widget.interface.d.ts → src/lib/shared/interface/crm-widget.interface.ts} +1 -0
- package/{lib/shared/interface/smart-crm-module.interface.d.ts → src/lib/shared/interface/smart-crm-module.interface.ts} +42 -1
- package/src/lib/shared/models/smart-crm.model.ts +199 -0
- package/src/lib/shared/routers/routers.ts +23 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +11 -0
- package/esm2022/index.mjs +0 -48
- package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.mjs +0 -194
- package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.mjs +0 -192
- package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.mjs +0 -599
- package/esm2022/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.mjs +0 -348
- package/esm2022/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.mjs +0 -12
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.mjs +0 -97
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.mjs +0 -118
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.mjs +0 -35
- 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
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.mjs +0 -119
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.mjs +0 -79
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.mjs +0 -107
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.mjs +0 -96
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.mjs +0 -139
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.mjs +0 -98
- package/esm2022/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.mjs +0 -125
- package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.mjs +0 -159
- package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.mjs +0 -470
- package/esm2022/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.mjs +0 -281
- package/esm2022/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.mjs +0 -12
- package/esm2022/lib/private/components/smart-crm-insight/smart-crm-insight.component.mjs +0 -14
- package/esm2022/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.mjs +0 -55
- package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.mjs +0 -173
- package/esm2022/lib/private/components/smart-crm-leads/smart-crm-leads.component.mjs +0 -136
- package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.mjs +0 -79
- package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.mjs +0 -266
- package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.mjs +0 -151
- 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
- package/esm2022/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.mjs +0 -18
- package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.mjs +0 -230
- package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.mjs +0 -335
- package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.mjs +0 -477
- package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.mjs +0 -218
- package/esm2022/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.mjs +0 -14
- package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.mjs +0 -255
- package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.mjs +0 -148
- package/esm2022/lib/private/components/smart-crm-summary/smart-crm-summary.component.mjs +0 -16
- package/esm2022/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.mjs +0 -92
- package/esm2022/lib/private/smart-crm-private.module.mjs +0 -327
- package/esm2022/lib/private/smart-crm-private.routing.module.mjs +0 -310
- package/esm2022/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.mjs +0 -56
- package/esm2022/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.mjs +0 -57
- package/esm2022/lib/public/components/smart-crm-signup/smart-crm-signup.component.mjs +0 -35
- package/esm2022/lib/public/smart-crm-public.module.mjs +0 -46
- package/esm2022/lib/public/smart-crm-public.routing.module.mjs +0 -44
- package/esm2022/lib/shared/interface/crm-account.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-action.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-contact.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-lead.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-newsletter.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-opportunity.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-source.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-stages.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/crm-widget.interface.mjs +0 -2
- package/esm2022/lib/shared/interface/smart-crm-module.interface.mjs +0 -2
- package/esm2022/lib/shared/models/smart-crm.model.mjs +0 -186
- package/esm2022/lib/shared/routers/routers.mjs +0 -23
- package/esm2022/posiwise-smart-crm.mjs +0 -5
- package/fesm2022/posiwise-smart-crm.mjs +0 -6482
- package/fesm2022/posiwise-smart-crm.mjs.map +0 -1
- package/lib/private/components/smart-crm-accounts/smart-crm-account-details/smart-crm-account-details.component.d.ts +0 -61
- package/lib/private/components/smart-crm-accounts/smart-crm-account-files/smart-crm-account-files.component.d.ts +0 -72
- package/lib/private/components/smart-crm-accounts/smart-crm-account-info/smart-crm-account-info.component.d.ts +0 -173
- package/lib/private/components/smart-crm-accounts/smart-crm-accounts.component.d.ts +0 -105
- package/lib/private/components/smart-crm-competition/smart-crm-competition/smart-crm-competition.component.d.ts +0 -5
- package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions-details/smart-crm-actions-details.component.d.ts +0 -37
- package/lib/private/components/smart-crm-configuration/smart-crm-actions/smart-crm-actions.component.d.ts +0 -55
- package/lib/private/components/smart-crm-configuration/smart-crm-configuration.component.d.ts +0 -11
- 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
- package/lib/private/components/smart-crm-configuration/smart-crm-opportunity-categories/smart-crm-opportunity-categories.component.d.ts +0 -56
- package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source-details/smart-crm-source-details.component.d.ts +0 -28
- package/lib/private/components/smart-crm-configuration/smart-crm-source/smart-crm-source.component.d.ts +0 -52
- package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stage-details/smart-crm-stage-details.component.d.ts +0 -34
- package/lib/private/components/smart-crm-configuration/smart-crm-stages/smart-crm-stages.component.d.ts +0 -58
- package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets-details/smart-crm-widgets-details.component.d.ts +0 -36
- package/lib/private/components/smart-crm-configuration/smart-crm-widgets/smart-crm-widgets.component.d.ts +0 -58
- package/lib/private/components/smart-crm-contacts/smart-crm-contact-details/smart-crm-contact-details.component.d.ts +0 -48
- package/lib/private/components/smart-crm-contacts/smart-crm-contact-info/smart-crm-contact-info.component.d.ts +0 -122
- package/lib/private/components/smart-crm-contacts/smart-crm-contacts.component.d.ts +0 -89
- package/lib/private/components/smart-crm-customer/smart-crm-customer-success/smart-crm-customer-success.component.d.ts +0 -5
- package/lib/private/components/smart-crm-insight/smart-crm-insight.component.d.ts +0 -5
- package/lib/private/components/smart-crm-insight/smart-crm-overview/smart-crm-overview.component.d.ts +0 -20
- package/lib/private/components/smart-crm-leads/smart-crm-leads-details/smart-crm-leads-details.component.d.ts +0 -45
- package/lib/private/components/smart-crm-leads/smart-crm-leads.component.d.ts +0 -58
- package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-contacts/smart-crm-marketing-contacts.component.d.ts +0 -49
- package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-details/smart-crm-marketing-details.component.d.ts +0 -63
- package/lib/private/components/smart-crm-marketing/smart-crm-marketing-list/smart-crm-marketing-list.component.d.ts +0 -62
- 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
- package/lib/private/components/smart-crm-marketing/smart-crm-marketing.component.d.ts +0 -8
- package/lib/private/components/smart-crm-opportunities/smart-crm-board/smart-crm-board.component.d.ts +0 -63
- package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-details/smart-crm-opportunities-details.component.d.ts +0 -67
- package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-info/smart-crm-opportunities-info.component.d.ts +0 -122
- package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities-list/smart-crm-opportunities-list.component.d.ts +0 -77
- package/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.d.ts +0 -5
- package/lib/private/components/smart-crm-summary/smart-crm-summary-actions/smart-crm-summary-actions.component.d.ts +0 -72
- package/lib/private/components/smart-crm-summary/smart-crm-summary-others/smart-crm-summary-others.component.d.ts +0 -40
- package/lib/private/components/smart-crm-summary/smart-crm-summary.component.d.ts +0 -5
- package/lib/private/components/smart-crm-tabs/smart-crm-tabs.component.d.ts +0 -10
- package/lib/private/smart-crm-private.module.d.ts +0 -62
- package/lib/private/smart-crm-private.routing.module.d.ts +0 -7
- package/lib/public/components/smart-crm-newsletter-confirmation/smart-crm-newsletter-confirmation.component.d.ts +0 -18
- package/lib/public/components/smart-crm-newsletter-unsubscribe/smart-crm-newsletter-unsubscribe.component.d.ts +0 -17
- package/lib/public/components/smart-crm-signup/smart-crm-signup.component.d.ts +0 -15
- package/lib/public/smart-crm-public.module.d.ts +0 -14
- package/lib/public/smart-crm-public.routing.module.d.ts +0 -7
- package/lib/shared/models/smart-crm.model.d.ts +0 -16
- package/lib/shared/routers/routers.d.ts +0 -21
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-12 mb-3">
|
|
3
|
+
<a class="btn btn-sm btn-outline-primary float-end" data-cy="add-opportunities"
|
|
4
|
+
[routerLink]="['/' + subscription?.slug + routers.opportunityAdd]">
|
|
5
|
+
<i class="fa fa-plus-circle" aria-hidden="true"></i> {{ 'Crm.OpportunitiesMessage.AddOpportunity' | transloco }}
|
|
6
|
+
</a>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="w-100 text-center mt-3" *ngIf="!isLoaded">
|
|
9
|
+
<p-progressSpinner strokeWidth="2"> </p-progressSpinner>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col-12">
|
|
12
|
+
<div class="primeng-datatable-container table-responsive" [class.hideTable]="data.unfiltered_count === 0">
|
|
13
|
+
<p-table #dt [value]="data.crm_opportunities" [paginator]="data.object_count !== 0" [lazy]="true" [rows]="PAGE_SIZE"
|
|
14
|
+
class="contact-table" [totalRecords]="data.object_count" [loading]="loading" filterDelay="1000"
|
|
15
|
+
(onLazyLoad)="onLazyLoad($event)" [customSort]="true">
|
|
16
|
+
<ng-template pTemplate="caption">
|
|
17
|
+
<div class="row">
|
|
18
|
+
<div class="col-sm-3 col-6 mb-2 mb-sm-0">
|
|
19
|
+
<p-multiSelect placeholder="Select Stage" [options]="searchStages" [(ngModel)]="filterByStages"
|
|
20
|
+
(onChange)="onSearchOptionChange($event, 'stage')" [filter]="false" [showHeader]="true"
|
|
21
|
+
[showToggleAll]="true" appendTo="body">
|
|
22
|
+
</p-multiSelect>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-sm-3 col-6">
|
|
25
|
+
<p-multiSelect placeholder="Select Category" [options]="categories" [(ngModel)]="filterByCategories"
|
|
26
|
+
(onChange)="onSearchOptionChange($event, 'category')" [filter]="false" [showHeader]="true"
|
|
27
|
+
[showToggleAll]="true" appendTo="body">
|
|
28
|
+
</p-multiSelect>
|
|
29
|
+
</div>
|
|
30
|
+
<!-- Empty column occupying the same space -->
|
|
31
|
+
<div class="col-sm-3 col-6"></div>
|
|
32
|
+
<div class="col-sm-3 col-md-4 col-lg-3 d-flex justify-content-end">
|
|
33
|
+
<div class="d-flex w-100">
|
|
34
|
+
<i class="fa fa-search mt-2 me-2" aria-hidden="true"></i>
|
|
35
|
+
<input type="text" [(ngModel)]="searchText" pInputText placeholder="Search opportunities.."
|
|
36
|
+
(input)="dt.filterGlobal($event.target.value, 'contains')" class="form-control search-opportunities-search-input" />
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="search-filter">
|
|
41
|
+
<a class="mt-3 ms-3 text-start text-primary" (click)="clearFilters()">Clear all filters</a>
|
|
42
|
+
</div>
|
|
43
|
+
</ng-template>
|
|
44
|
+
<ng-template pTemplate="header">
|
|
45
|
+
<tr>
|
|
46
|
+
<th scope="true" pSortableColumn="title"> {{ 'Crm.OpportunitiesMessage.Title' | transloco }} <p-sortIcon
|
|
47
|
+
field="title"></p-sortIcon>
|
|
48
|
+
</th>
|
|
49
|
+
<th scope="true" pSortableColumn="crm_contact_id"> {{ 'Crm.OpportunitiesMessage.Contact' | transloco }}
|
|
50
|
+
<p-sortIcon field="crm_contact_id"></p-sortIcon>
|
|
51
|
+
</th>
|
|
52
|
+
<th scope="true" pSortableColumn="crm_account_id"> {{ 'Crm.OpportunitiesMessage.Account' | transloco }}
|
|
53
|
+
<p-sortIcon field="crm_account_id"></p-sortIcon>
|
|
54
|
+
</th>
|
|
55
|
+
<th scope="true" pSortableColumn="one_time_amount"> {{ 'Crm.OpportunitiesMessage.OneTimeAmount' | transloco
|
|
56
|
+
}} <p-sortIcon field="one_time_amount"></p-sortIcon>
|
|
57
|
+
</th>
|
|
58
|
+
<th scope="true" pSortableColumn="win_chances"> {{ 'Crm.OpportunitiesMessage.WinChance' | transloco }}
|
|
59
|
+
<p-sortIcon field="win_chances"></p-sortIcon>
|
|
60
|
+
</th>
|
|
61
|
+
<th scope="true" pSortableColumn="monthly_amount"> {{ 'Crm.OpportunitiesMessage.MonthlyAmount' | transloco
|
|
62
|
+
}} <p-sortIcon field="monthly_amount"></p-sortIcon>
|
|
63
|
+
</th>
|
|
64
|
+
<th scope="true" pSortableColumn="crm_opportunity_stage_id"> {{ 'Crm.OpportunitiesMessage.Stage' | transloco
|
|
65
|
+
}} <p-sortIcon field="crm_opportunity_stage_id"></p-sortIcon>
|
|
66
|
+
</th>
|
|
67
|
+
<th scope="true" pSortableColumn="crm_opportunity_category_ids"> {{ 'Crm.OpportunitiesMessage.Categories' |
|
|
68
|
+
transloco }} <p-sortIcon field="crm_opportunity_category_ids"></p-sortIcon>
|
|
69
|
+
</th>
|
|
70
|
+
<th scope="true" pSortableColumn="starting_at"> {{ 'Crm.OpportunitiesMessage.StartingAt' | transloco }}
|
|
71
|
+
<p-sortIcon field="starting_at"></p-sortIcon>
|
|
72
|
+
</th>
|
|
73
|
+
<th class="actions-list-two" scope="true"> {{ 'Label.Actions' | transloco }} </th>
|
|
74
|
+
</tr>
|
|
75
|
+
</ng-template>
|
|
76
|
+
<ng-template pTemplate="body" let-opportunities>
|
|
77
|
+
<tr>
|
|
78
|
+
<td data-head="Title">
|
|
79
|
+
<a *ngIf="
|
|
80
|
+
hasAccess ||
|
|
81
|
+
opportunities?.owner_id === userId ||
|
|
82
|
+
checkPermission('Pages.Product.CRM.Role.Admin')
|
|
83
|
+
" [routerLink]="[
|
|
84
|
+
'/' + subscription?.slug + routers.opportunityInfo,
|
|
85
|
+
opportunities.id
|
|
86
|
+
]">
|
|
87
|
+
<span>{{ opportunities?.title | textTruncate: 15 }} </span>
|
|
88
|
+
</a>
|
|
89
|
+
<a *ngIf="
|
|
90
|
+
!hasAccess &&
|
|
91
|
+
opportunities?.owner_id !== userId &&
|
|
92
|
+
checkPermission('Pages.Product.CRM.Role.Admin')
|
|
93
|
+
"> {{ opportunities?.title | textTruncate: 15 }} </a>
|
|
94
|
+
</td>
|
|
95
|
+
<td class="contactname" data-head="Crm Contact">
|
|
96
|
+
<a *ngIf="opportunities?.crm_contact_id" [routerLink]="[
|
|
97
|
+
'/' + subscription?.slug + routers.contactInfo,
|
|
98
|
+
opportunities.crm_contact_id.id
|
|
99
|
+
]">{{ opportunities.crm_contact?.first_name + ' ' +
|
|
100
|
+
opportunities.crm_contact?.last_name }}</a>
|
|
101
|
+
</td>
|
|
102
|
+
<td data-head="Account">
|
|
103
|
+
<a [routerLink]="[
|
|
104
|
+
'/' + subscription?.slug + routers.accountInfo,
|
|
105
|
+
opportunities.crm_account.id
|
|
106
|
+
]">{{ opportunities.crm_account.name }}</a>
|
|
107
|
+
</td>
|
|
108
|
+
<td data-head="Amount"> {{ opportunities.one_time_amount / 100 | currency }} </td>
|
|
109
|
+
<td data-head="WinChance"> {{ opportunities.win_chances / 100 | percent }} <span class="text-danger"
|
|
110
|
+
*ngIf="opportunities.cancelled">!Cancelled!</span>
|
|
111
|
+
</td>
|
|
112
|
+
<td data-head="Monthly Amount"> {{ opportunities.monthly_amount / 100 | currency }} </td>
|
|
113
|
+
<td data-head="Stage">
|
|
114
|
+
<span class="badge" [appDynamicBadge]="{
|
|
115
|
+
itemsArray: stages,
|
|
116
|
+
item: opportunities?.crm_opportunity_stage?.name
|
|
117
|
+
}" color="cyan">{{ opportunities?.crm_opportunity_stage?.name }}</span>
|
|
118
|
+
</td>
|
|
119
|
+
<td data-head="Categories">
|
|
120
|
+
<span *ngFor="let category of opportunities?.crm_opportunity_categories" class="badge ms-1"
|
|
121
|
+
[appDynamicBadge]="{ itemsArray: categories, item: category?.name }" color="blue-grey">{{ category?.name
|
|
122
|
+
}}</span>
|
|
123
|
+
</td>
|
|
124
|
+
<td data-head="Starting At"> {{ opportunities.starting_at | dateFormat }} </td>
|
|
125
|
+
<td data-head="Action">
|
|
126
|
+
<ul class="list-unstyled list-inline">
|
|
127
|
+
<ng-container *ngIf="hasAccess || opportunities?.owner_id === userId">
|
|
128
|
+
<ng-container *rbacAllow="'SubscriptionAdmin'">
|
|
129
|
+
<li ngbTooltip="Edit" class="me-2 me-sm-3" [routerLink]="[
|
|
130
|
+
'/' + subscription?.slug + routers.opportunities,
|
|
131
|
+
opportunities.id
|
|
132
|
+
]">
|
|
133
|
+
<i class="fa fa-edit edit-icon" aria-hidden="true"></i>
|
|
134
|
+
</li>
|
|
135
|
+
</ng-container>
|
|
136
|
+
<ng-container *rbacAllow="'SubscriptionAdmin'">
|
|
137
|
+
<li ngbTooltip="Delete" class="me-2 me-sm-3">
|
|
138
|
+
<i class="fa fa-trash delete-icon" (click)="onDelete(opportunities.id)" aria-hidden="true"></i>
|
|
139
|
+
</li>
|
|
140
|
+
</ng-container>
|
|
141
|
+
</ng-container>
|
|
142
|
+
</ul>
|
|
143
|
+
</td>
|
|
144
|
+
</tr>
|
|
145
|
+
</ng-template>
|
|
146
|
+
</p-table>
|
|
147
|
+
<div *ngIf="data.object_count === 0 && data.unfiltered_count !== 0">
|
|
148
|
+
<pw-no-data [withImage]="true" [message]="'Search.NoDataMessage'| transloco" [description]="'Search.NoDataDescription' | transloco" >
|
|
149
|
+
</pw-no-data>
|
|
150
|
+
</div>
|
|
151
|
+
<span class="total-records-count" *ngIf="data.object_count !== 0">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
<div *ngIf="data.unfiltered_count === 0 && isLoaded">
|
|
156
|
+
<pw-no-data [withImage]="true" [message]="'Crm.OpportunitiesMessage.NoOpportunitiesMessage' | transloco">
|
|
157
|
+
</pw-no-data>
|
|
158
|
+
</div>
|
|
159
|
+
<ng-container *rbacAllow="'Pages.Beta'">
|
|
160
|
+
<div class="row mt-5" *ngIf="data.unfiltered_count !== 0 && isLoaded">
|
|
161
|
+
<!-- Drill Down -->
|
|
162
|
+
<div class="col-12 col-md-6 mb-3 analytics">
|
|
163
|
+
<h5 class="accordion-heading">Drill Down</h5>
|
|
164
|
+
<div class="primeng-datatable-container table-responsive" *ngIf="opportunitiesInsight?.length">
|
|
165
|
+
<p-table class="table" #dt [value]="opportunitiesInsight" [paginator]="opportunitiesInsight?.length !== 0" [rows]="PAGE_SIZE"
|
|
166
|
+
[totalRecords]="opportunitiesInsight.length" [lazy]="true">
|
|
167
|
+
<ng-template pTemplate="header">
|
|
168
|
+
<tr>
|
|
169
|
+
<th scope="true">{{ 'Crm.OpportunitiesMessage.Title' | transloco }}</th>
|
|
170
|
+
<th scope="true">{{ 'Crm.OpportunitiesMessage.Value' | transloco }}</th>
|
|
171
|
+
<th scope="true"> {{ 'Crm.OpportunitiesMessage.Reason' | transloco }} </th>
|
|
172
|
+
</tr>
|
|
173
|
+
</ng-template>
|
|
174
|
+
<ng-template pTemplate="body" let-insight>
|
|
175
|
+
<tr>
|
|
176
|
+
<td data-head="Title"> {{ insight.title }} </td>
|
|
177
|
+
<td data-head="Value"> {{ insight.value }} </td>
|
|
178
|
+
<td data-head="Reason"> {{ insight.reason }} </td>
|
|
179
|
+
</tr>
|
|
180
|
+
</ng-template>
|
|
181
|
+
</p-table>
|
|
182
|
+
<span class="total-records-count" *ngIf="opportunitiesInsight?.length !== 0">{{ 'Label.Total' | transloco }}: {{ opportunitiesInsight.length }}</span>
|
|
183
|
+
</div>
|
|
184
|
+
<div *ngIf="opportunitiesInsight?.length === 0">
|
|
185
|
+
<pw-no-data [withImage]="true" [message]="'Crm.OpportunitiesMessage.NoInsightMessage' | transloco">
|
|
186
|
+
</pw-no-data>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<!-- Geography -->
|
|
190
|
+
<div class="col-12 col-md-6 mb-3 analytics">
|
|
191
|
+
<h5 class="accordion-heading">Geography</h5>
|
|
192
|
+
<div>
|
|
193
|
+
<ng-template [ngIf]="opportunitiesGeography">
|
|
194
|
+
<plotly-plot [data]="opportunitiesGeography?.data" [layout]="opportunitiesGeography?.layout">
|
|
195
|
+
</plotly-plot>
|
|
196
|
+
</ng-template>
|
|
197
|
+
</div>
|
|
198
|
+
<div *ngIf="!opportunitiesGeography">
|
|
199
|
+
<pw-no-data [withImage]="true" [message]="'Crm.OpportunitiesMessage.NoInsightMessage' | transloco">
|
|
200
|
+
</pw-no-data>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</ng-container>
|
|
@@ -0,0 +1,123 @@
|
|
|
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 { MockDirective, MockProvider } from 'ng-mocks';
|
|
7
|
+
import { GooglePlaceDirective } from 'ngx-google-places-autocomplete';
|
|
8
|
+
import { of } from 'rxjs';
|
|
9
|
+
import Swal from 'sweetalert2';
|
|
10
|
+
import { SmartCrmPrivateModule } from '../../../smart-crm-private.module';
|
|
11
|
+
import { SmartCrmOpportunitiesListComponent } from './smart-crm-opportunities-list.component';
|
|
12
|
+
|
|
13
|
+
class UserServiceMock {
|
|
14
|
+
getUserState() {
|
|
15
|
+
return of({ currentUser: DEFAULT_USER });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
describe('SmartCrmOpportunitiesListComponent', () => {
|
|
19
|
+
const createComponent = TestHelper.createComponentFactory({
|
|
20
|
+
component: SmartCrmOpportunitiesListComponent,
|
|
21
|
+
imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
|
|
22
|
+
declarations: [MockDirective(GooglePlaceDirective)],
|
|
23
|
+
providers: [
|
|
24
|
+
...TestHelper.TEST_PROVIDERS,
|
|
25
|
+
MockProvider(PermissionService, {
|
|
26
|
+
evaluatePermissions: () => {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
MockProvider(CrmService, {
|
|
31
|
+
getAllOpportunities: () =>
|
|
32
|
+
of({
|
|
33
|
+
crm_opportunities: [
|
|
34
|
+
{
|
|
35
|
+
id: 7,
|
|
36
|
+
title: 'test',
|
|
37
|
+
crm_contact_id: 37,
|
|
38
|
+
description: 'test',
|
|
39
|
+
one_time_amount: 100,
|
|
40
|
+
win_chances: 10,
|
|
41
|
+
starting_at: '2021-10-06T00:00:00.000+00:00',
|
|
42
|
+
monthly_amount: 100,
|
|
43
|
+
crm_account_id: 7,
|
|
44
|
+
owner_id: 1,
|
|
45
|
+
crm_opportunity_stage_id: 14,
|
|
46
|
+
crm_contact: {
|
|
47
|
+
id: 37,
|
|
48
|
+
first_name: 'test1',
|
|
49
|
+
last_name: 'test'
|
|
50
|
+
},
|
|
51
|
+
crm_account: {
|
|
52
|
+
id: 7,
|
|
53
|
+
name: 'test'
|
|
54
|
+
},
|
|
55
|
+
crm_opportunity_stage: {
|
|
56
|
+
id: 14,
|
|
57
|
+
name: 'test'
|
|
58
|
+
},
|
|
59
|
+
crm_opportunity_categories: []
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
object_count: 1,
|
|
63
|
+
unfiltered_count: 1
|
|
64
|
+
}),
|
|
65
|
+
deleteOpportunities: () => of({}),
|
|
66
|
+
getAvailableOpportunityStages: () =>
|
|
67
|
+
of({
|
|
68
|
+
available_crm_opportunity_stages: [
|
|
69
|
+
{
|
|
70
|
+
id: 14,
|
|
71
|
+
name: 'test'
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}),
|
|
75
|
+
getAllOpportunityCategories: () =>
|
|
76
|
+
of({
|
|
77
|
+
crm_opportunity_categories: [
|
|
78
|
+
{
|
|
79
|
+
id: 7,
|
|
80
|
+
name: 'test'
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
object_count: 1,
|
|
84
|
+
unfiltered_count: 1
|
|
85
|
+
}),
|
|
86
|
+
getCrmAnalytics: () => of({}),
|
|
87
|
+
getAllStages: () => of({})
|
|
88
|
+
}),
|
|
89
|
+
{
|
|
90
|
+
provide: UserService,
|
|
91
|
+
useClass: UserServiceMock
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
beforeEach(() => {
|
|
97
|
+
TestHelper.setUpPermissionsAndUser();
|
|
98
|
+
[PermissionService.selectedSubscription] = DEFAULT_USER.subscriptions;
|
|
99
|
+
[PermissionService.selectedProduct] = DEFAULT_USER.subscriptions[0].products;
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('should create', async () => {
|
|
103
|
+
TestHelper.setActivatedRoute({
|
|
104
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
105
|
+
});
|
|
106
|
+
const spectator = await createComponent();
|
|
107
|
+
expect(spectator.component).toBeTruthy();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('should delete account ', async () => {
|
|
111
|
+
TestHelper.setActivatedRoute({
|
|
112
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
113
|
+
});
|
|
114
|
+
const spectator = await createComponent();
|
|
115
|
+
const service = TestBed.inject(CrmService);
|
|
116
|
+
const spy = spyOn(service, 'deleteOpportunities').and.callThrough();
|
|
117
|
+
spectator.click('tbody tr:first-child .fa-trash');
|
|
118
|
+
expect(Swal.isVisible()).toBeTruthy();
|
|
119
|
+
Swal.clickConfirm();
|
|
120
|
+
await TestHelper.stabilize(spectator);
|
|
121
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AfterViewChecked,
|
|
3
|
+
ChangeDetectorRef,
|
|
4
|
+
Component,
|
|
5
|
+
Injector,
|
|
6
|
+
OnDestroy,
|
|
7
|
+
OnInit
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { ROUTERS } from '../../../../shared/routers/routers';
|
|
10
|
+
import { CrmService } from '@posiwise/smart-crm-shared';
|
|
11
|
+
import { LazyLoadEvent } from 'primeng/api';
|
|
12
|
+
|
|
13
|
+
import { PAGE_SIZE } from '@posiwise/common-utilities';
|
|
14
|
+
import { CrmOpportunityResponse } from '../../../../shared/interface/crm-opportunity.interface';
|
|
15
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
16
|
+
import { Paging, Plotly, Subscription, User } from '@posiwise/common-utilities';
|
|
17
|
+
import { HelperService } from '@posiwise/helper-service';
|
|
18
|
+
import { ProductService } from '@posiwise/common-services';
|
|
19
|
+
import { OpportunityInsight } from 'libs/smart-crm/src/lib/shared/interface/smart-crm-module.interface';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'pw-smart-crm-opportunities-list',
|
|
23
|
+
templateUrl: './smart-crm-opportunities-list.component.html',
|
|
24
|
+
styleUrls: ['./smart-crm-opportunities-list.component.scss']
|
|
25
|
+
})
|
|
26
|
+
export class SmartCrmOpportunitiesListComponent
|
|
27
|
+
extends AppBaseComponent
|
|
28
|
+
implements OnInit, OnDestroy, AfterViewChecked
|
|
29
|
+
{
|
|
30
|
+
subscription: Subscription;
|
|
31
|
+
|
|
32
|
+
subscriptionId: number;
|
|
33
|
+
|
|
34
|
+
hasAccess = false;
|
|
35
|
+
|
|
36
|
+
searchText = '';
|
|
37
|
+
|
|
38
|
+
data: CrmOpportunityResponse = {
|
|
39
|
+
crm_opportunities: [],
|
|
40
|
+
object_count: 0,
|
|
41
|
+
unfiltered_count: 0
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
id = '';
|
|
45
|
+
|
|
46
|
+
isLoaded = false;
|
|
47
|
+
|
|
48
|
+
loading = true;
|
|
49
|
+
|
|
50
|
+
opportunitiesInsight: OpportunityInsight[];
|
|
51
|
+
|
|
52
|
+
opportunitiesGeography: Plotly.Figure;
|
|
53
|
+
|
|
54
|
+
user: User;
|
|
55
|
+
|
|
56
|
+
userId: number;
|
|
57
|
+
|
|
58
|
+
searchStages: object[] = [];
|
|
59
|
+
filterByStages: string[] = [];
|
|
60
|
+
filterByCategories = [];
|
|
61
|
+
searchCategories: object[] = [];
|
|
62
|
+
|
|
63
|
+
page = 1;
|
|
64
|
+
|
|
65
|
+
stages = [];
|
|
66
|
+
|
|
67
|
+
categories = [];
|
|
68
|
+
|
|
69
|
+
routers = ROUTERS;
|
|
70
|
+
|
|
71
|
+
constructor(
|
|
72
|
+
private crmService: CrmService,
|
|
73
|
+
injector: Injector,
|
|
74
|
+
private cdr: ChangeDetectorRef,
|
|
75
|
+
private productService: ProductService
|
|
76
|
+
) {
|
|
77
|
+
super(injector);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
ngOnInit(): void {
|
|
81
|
+
this.getAllStages();
|
|
82
|
+
this.getUserSubscription().subscribe(subscription => {
|
|
83
|
+
this.subscription = subscription;
|
|
84
|
+
if (this.subscription?.id) {
|
|
85
|
+
this.hasAccess = this.hasAdminAccess(this.subscription.id);
|
|
86
|
+
this.getUserInfo();
|
|
87
|
+
this.getAvailableOpportunityStages();
|
|
88
|
+
this.getAllOpportunityCategories();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
ngAfterViewChecked() {
|
|
94
|
+
this.cdr.detectChanges();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
onLazyLoad(event: LazyLoadEvent) {
|
|
98
|
+
const pageDetails = HelperService.onTableLazyLoad(event);
|
|
99
|
+
this.page = pageDetails.page;
|
|
100
|
+
this.getAllOpportunities({
|
|
101
|
+
page: this.page,
|
|
102
|
+
page_size: PAGE_SIZE,
|
|
103
|
+
order_by: pageDetails.sortField,
|
|
104
|
+
order_direction: pageDetails.sortOrder,
|
|
105
|
+
search: this.searchText
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** Function to get user details */
|
|
110
|
+
private getUserInfo() {
|
|
111
|
+
this.userStore().subscribe(user => {
|
|
112
|
+
if (user) {
|
|
113
|
+
this.user = user;
|
|
114
|
+
this.userId = user.id;
|
|
115
|
+
if (this.permissionService.isGranted('Pages.Beta')) {
|
|
116
|
+
this.getOpportunitiesInsight();
|
|
117
|
+
this.getContactGeography();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
private getAllStages(paging: Paging = {}) {
|
|
124
|
+
this.getUserSubscriptionId().subscribe(res => {
|
|
125
|
+
if (res) {
|
|
126
|
+
this.subscriptionId = res;
|
|
127
|
+
this.crmService
|
|
128
|
+
.getAllStages(this.subscriptionId, paging)
|
|
129
|
+
.subscribe(response => {
|
|
130
|
+
console.log(response?.crm_opportunity_stages);
|
|
131
|
+
this.searchStages = response?.crm_opportunity_stages?.map(element => {
|
|
132
|
+
return {
|
|
133
|
+
value: element.id,
|
|
134
|
+
label: element.name || ''
|
|
135
|
+
};
|
|
136
|
+
});
|
|
137
|
+
})
|
|
138
|
+
.add(() => {
|
|
139
|
+
this.isLoaded = true;
|
|
140
|
+
this.loading = false;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
onSearchOptionChange(event, filterBy: string) {
|
|
147
|
+
if (filterBy === 'stage') {
|
|
148
|
+
this.filterByStages = event.value;
|
|
149
|
+
this.getAllOpportunities({
|
|
150
|
+
page: this.page,
|
|
151
|
+
page_size: PAGE_SIZE
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
if (filterBy === 'category') {
|
|
155
|
+
this.filterByCategories = event.value;
|
|
156
|
+
this.getAllOpportunities({
|
|
157
|
+
page: this.page,
|
|
158
|
+
page_size: PAGE_SIZE
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
clearFilters() {
|
|
164
|
+
this.filterByCategories = [];
|
|
165
|
+
this.filterByStages = [];
|
|
166
|
+
this.searchText = '';
|
|
167
|
+
this.getAllOpportunities({
|
|
168
|
+
page: this.page,
|
|
169
|
+
page_size: PAGE_SIZE
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
private getAllOpportunities(paging?: Paging) {
|
|
174
|
+
this.getUserSubscriptionId().subscribe(subscriptionId => {
|
|
175
|
+
this.subscriptionId = subscriptionId;
|
|
176
|
+
if (this.subscriptionId) {
|
|
177
|
+
this.crmService
|
|
178
|
+
.getAllOpportunities(
|
|
179
|
+
this.subscriptionId,
|
|
180
|
+
paging,
|
|
181
|
+
this.filterByCategories.join() || '',
|
|
182
|
+
this.filterByStages.join() || ''
|
|
183
|
+
)
|
|
184
|
+
.subscribe(response => {
|
|
185
|
+
this.data = response;
|
|
186
|
+
})
|
|
187
|
+
.add(() => {
|
|
188
|
+
this.isLoaded = true;
|
|
189
|
+
this.loading = false;
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
onDelete(id: number) {
|
|
196
|
+
HelperService.raiseDeletePopup().then(resp => {
|
|
197
|
+
if (resp.value) {
|
|
198
|
+
this.crmService.deleteOpportunities(this.subscription?.id, id).subscribe(() => {
|
|
199
|
+
this.getAllOpportunities({
|
|
200
|
+
page: this.page,
|
|
201
|
+
page_size: PAGE_SIZE,
|
|
202
|
+
search: this.searchText
|
|
203
|
+
});
|
|
204
|
+
this.toast.success(
|
|
205
|
+
this.translation.translate('Crm.OpportunitiesMessage.DeletedMessage')
|
|
206
|
+
);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Function to get available opportunities */
|
|
213
|
+
private getAvailableOpportunityStages() {
|
|
214
|
+
this.crmService.getAvailableOpportunityStages(this.subscription?.id).subscribe(response => {
|
|
215
|
+
this.stages = response?.available_crm_opportunity_stages?.map(stage => {
|
|
216
|
+
return stage?.name;
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** Function to get all categories */
|
|
222
|
+
private getAllOpportunityCategories() {
|
|
223
|
+
this.crmService.getAllOpportunityCategories(this.subscription?.id).subscribe(response => {
|
|
224
|
+
this.categories = response?.crm_opportunity_categories?.map(category => {
|
|
225
|
+
return {
|
|
226
|
+
value: category.id,
|
|
227
|
+
label: category.name
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/** Function to call opportunities insight */
|
|
234
|
+
private getOpportunitiesInsight() {
|
|
235
|
+
this.crmService
|
|
236
|
+
.getCrmAnalytics(this.subscription?.id, 'opportunities_insights')
|
|
237
|
+
.subscribe(response => {
|
|
238
|
+
if (typeof response === 'object' && Object.keys(response).length === 0) {
|
|
239
|
+
this.opportunitiesInsight = [];
|
|
240
|
+
} else this.opportunitiesInsight = response;
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/** Function to call contact geography */
|
|
245
|
+
private getContactGeography() {
|
|
246
|
+
this.crmService
|
|
247
|
+
.getCrmAnalytics(this.subscription?.id, 'opportunities_geography')
|
|
248
|
+
.subscribe(response => {
|
|
249
|
+
this.opportunitiesGeography = response;
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
checkPermission(permission: string) {
|
|
254
|
+
return this.permissionService.evaluatePermissions(permission);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
override ngOnDestroy() {
|
|
258
|
+
super.ngOnDestroy();
|
|
259
|
+
}
|
|
260
|
+
}
|
package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.html
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-12 mb-0">
|
|
3
|
+
<h2>Opportunities</h2>
|
|
4
|
+
<p>In this section you can track your business opportunities.</p>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<ul ngbNav
|
|
9
|
+
#nav="ngbNav"
|
|
10
|
+
class="nav-tabs">
|
|
11
|
+
<li [ngbNavItem]="1">
|
|
12
|
+
<a ngbNavLink>List</a>
|
|
13
|
+
<ng-template ngbNavContent>
|
|
14
|
+
<pw-smart-crm-opportunities-list></pw-smart-crm-opportunities-list>
|
|
15
|
+
</ng-template>
|
|
16
|
+
</li>
|
|
17
|
+
<li [ngbNavItem]="2">
|
|
18
|
+
<a ngbNavLink>Board view</a>
|
|
19
|
+
<ng-template ngbNavContent>
|
|
20
|
+
<pw-smart-crm-board></pw-smart-crm-board>
|
|
21
|
+
</ng-template>
|
|
22
|
+
</li>
|
|
23
|
+
</ul>
|
|
24
|
+
|
|
25
|
+
<div [ngbNavOutlet]="nav"></div>
|
package/src/lib/private/components/smart-crm-opportunities/smart-crm-opportunities.component.spec.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CommonServicesModule, PermissionService } from '@posiwise/common-services';
|
|
2
|
+
import { SharedModule } from '@posiwise/shared-module';
|
|
3
|
+
import { SmartCrmPrivateModule } from '../../smart-crm-private.module';
|
|
4
|
+
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
5
|
+
import { DEFAULT_USER, TestHelper } from '@posiwise/test-helpers';
|
|
6
|
+
import { MockProvider } from 'ng-mocks';
|
|
7
|
+
import { SmartCrmOpportunitiesComponent } from './smart-crm-opportunities.component';
|
|
8
|
+
import { of } from 'rxjs';
|
|
9
|
+
|
|
10
|
+
describe('SmartCrmOpportunitiesComponent', () => {
|
|
11
|
+
const createComponent = TestHelper.createComponentFactory({
|
|
12
|
+
component: SmartCrmOpportunitiesComponent,
|
|
13
|
+
imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
|
|
14
|
+
providers: [
|
|
15
|
+
...TestHelper.TEST_PROVIDERS,
|
|
16
|
+
MockProvider(PermissionService, {
|
|
17
|
+
evaluatePermissions: () => {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
],
|
|
22
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
TestHelper.setUpPermissionsAndUser();
|
|
27
|
+
[PermissionService.selectedSubscription] = DEFAULT_USER.subscriptions;
|
|
28
|
+
[PermissionService.selectedProduct] = DEFAULT_USER.subscriptions[0].products;
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should create', async () => {
|
|
32
|
+
TestHelper.setActivatedRoute({
|
|
33
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
34
|
+
});
|
|
35
|
+
const spectator = await createComponent();
|
|
36
|
+
expect(spectator.component).toBeTruthy();
|
|
37
|
+
});
|
|
38
|
+
});
|