@posiwise/smart-crm 0.0.19 → 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 -589
- 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 -465
- 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 -317
- 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 -6449
- 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 -172
- 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 -121
- 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 -66
- 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,115 @@
|
|
|
1
|
+
<div class="row">
|
|
2
|
+
<div class="col-12 mb-3">
|
|
3
|
+
<p>Please define the widgets you want to use.</p>
|
|
4
|
+
<a class="btn btn-sm btn-outline-primary float-end"
|
|
5
|
+
data-cy="add-contact"
|
|
6
|
+
[routerLink]="['/' + subscription?.slug + routers.widgetsDetails + 'add']">
|
|
7
|
+
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
|
8
|
+
{{ 'Crm.Widgets.AddWidgets' | transloco }}
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="w-100 text-center mt-3"
|
|
12
|
+
*ngIf="!isLoaded">
|
|
13
|
+
<p-progressSpinner strokeWidth="2"> </p-progressSpinner>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="col-12">
|
|
16
|
+
<div class="primeng-datatable-container table-responsive"
|
|
17
|
+
[class.hideTable]="data.unfiltered_count === 0">
|
|
18
|
+
<p-table #dt
|
|
19
|
+
[value]="data.crm_widget_relationships"
|
|
20
|
+
[paginator]="data.object_count !== 0"
|
|
21
|
+
[lazy]="true"
|
|
22
|
+
[rows]="PAGE_SIZE"
|
|
23
|
+
[totalRecords]="data.object_count"
|
|
24
|
+
[loading]="loading"
|
|
25
|
+
[filterDelay]="1000"
|
|
26
|
+
(onLazyLoad)="onLazyLoad($event)"
|
|
27
|
+
[customSort]="true">
|
|
28
|
+
<ng-template pTemplate="caption">
|
|
29
|
+
<div class="text-end">
|
|
30
|
+
<i class="fa fa-search mt-2 me-2" aria-hidden="true"></i>
|
|
31
|
+
<input type="text"
|
|
32
|
+
[(ngModel)]="searchText"
|
|
33
|
+
pInputText
|
|
34
|
+
size="50"
|
|
35
|
+
placeholder="Search source..."
|
|
36
|
+
(input)="dt.filterGlobal($event.target.value, 'contains')"
|
|
37
|
+
class="mw-90" />
|
|
38
|
+
</div>
|
|
39
|
+
</ng-template>
|
|
40
|
+
<ng-template pTemplate="header">
|
|
41
|
+
<tr>
|
|
42
|
+
<th scope="true"
|
|
43
|
+
pSortableColumn="crm_widget_id">
|
|
44
|
+
{{ 'Crm.Widgets.CrmWidget' | transloco }}
|
|
45
|
+
<p-sortIcon field="crm_widget_id"></p-sortIcon>
|
|
46
|
+
</th>
|
|
47
|
+
<th scope="true"
|
|
48
|
+
pSortableColumn="position">
|
|
49
|
+
{{ 'Crm.Widgets.Position' | transloco }}
|
|
50
|
+
<p-sortIcon field="position"></p-sortIcon>
|
|
51
|
+
</th>
|
|
52
|
+
<th scope="true"
|
|
53
|
+
pSortableColumn="visible">
|
|
54
|
+
{{ 'Crm.Widgets.Visible' | transloco }}
|
|
55
|
+
<p-sortIcon field="visible"></p-sortIcon>
|
|
56
|
+
</th>
|
|
57
|
+
<th scope="true">{{ 'Label.Actions' | transloco }}</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</ng-template>
|
|
60
|
+
<ng-template pTemplate="body"
|
|
61
|
+
let-widget>
|
|
62
|
+
<tr>
|
|
63
|
+
<td data-head="Crm Widget">{{ widget.crm_widget }}</td>
|
|
64
|
+
<td data-head="Position">
|
|
65
|
+
<span class="badge"
|
|
66
|
+
[appDynamicBadge]="{
|
|
67
|
+
itemsArray: positions,
|
|
68
|
+
item: widget?.position
|
|
69
|
+
}"
|
|
70
|
+
color="default">{{ widget.position }}</span>
|
|
71
|
+
</td>
|
|
72
|
+
<td data-head="Visible">
|
|
73
|
+
<span [appDynamicBadge]="{
|
|
74
|
+
itemsArray: [true, false],
|
|
75
|
+
item: widget?.visible
|
|
76
|
+
}"
|
|
77
|
+
color="success-danger"
|
|
78
|
+
class="badge">{{ !!widget?.visible }}</span>
|
|
79
|
+
</td>
|
|
80
|
+
<td data-head="Action">
|
|
81
|
+
<ul class="list-unstyled list-inline">
|
|
82
|
+
<ng-container *ngIf="hasAccess">
|
|
83
|
+
<li ngbTooltip="Edit"
|
|
84
|
+
class="me-2 me-sm-3"
|
|
85
|
+
[routerLink]="[
|
|
86
|
+
'/' + subscription?.slug + routers.widgetsDetails,
|
|
87
|
+
widget.id
|
|
88
|
+
]">
|
|
89
|
+
<i class="fa fa-edit edit-icon" aria-hidden="true"></i>
|
|
90
|
+
</li>
|
|
91
|
+
<li ngbTooltip="Delete"
|
|
92
|
+
class="me-2 me-sm-3">
|
|
93
|
+
<i
|
|
94
|
+
class="fa fa-trash delete-icon"
|
|
95
|
+
(click)="onDelete(widget.id)"
|
|
96
|
+
aria-hidden="true"
|
|
97
|
+
></i>
|
|
98
|
+
</li>
|
|
99
|
+
</ng-container>
|
|
100
|
+
</ul>
|
|
101
|
+
</td>
|
|
102
|
+
</tr>
|
|
103
|
+
</ng-template>
|
|
104
|
+
</p-table>
|
|
105
|
+
<div *ngIf="data.object_count === 0 && data.unfiltered_count !== 0">
|
|
106
|
+
<pw-no-data [withImage]="true" [message]="'Search.NoDataMessage'| transloco" [description]="'Search.NoDataDescription' | transloco" >
|
|
107
|
+
</pw-no-data>
|
|
108
|
+
</div>
|
|
109
|
+
<span class="total-records-count"*ngIf="data.object_count !== 0">{{ 'Label.Total' | transloco }}: {{ data.object_count }}</span>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<div *ngIf="data.unfiltered_count === 0 && isLoaded">
|
|
114
|
+
<pw-no-data [withImage]="true" [message]="'Crm.Widgets.NoDataMessage' | transloco"> </pw-no-data>
|
|
115
|
+
</div>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { waitForAsync } 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 { SmartCrmPrivateModule } from '../../../smart-crm-private.module';
|
|
9
|
+
import { SmartCrmWidgetsComponent } from './smart-crm-widgets.component';
|
|
10
|
+
import { ActivatedRoute } from '@angular/router';
|
|
11
|
+
import { LazyLoadEvent } from 'primeng/api';
|
|
12
|
+
|
|
13
|
+
class UserServiceMock {
|
|
14
|
+
getUserState() {
|
|
15
|
+
return of({ currentUser: DEFAULT_USER });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
describe('SmartCrmWidgetsComponent', () => {
|
|
20
|
+
const createComponent = TestHelper.createComponentFactory({
|
|
21
|
+
component: SmartCrmWidgetsComponent,
|
|
22
|
+
imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
|
|
23
|
+
providers: [
|
|
24
|
+
...TestHelper.TEST_PROVIDERS,
|
|
25
|
+
MockProvider(PermissionService, {
|
|
26
|
+
evaluatePermissions: () => true
|
|
27
|
+
}),
|
|
28
|
+
MockProvider(CrmService, {
|
|
29
|
+
getAllSubscriptionWidgets: () =>
|
|
30
|
+
of({
|
|
31
|
+
crm_subscription_widgets: [
|
|
32
|
+
{
|
|
33
|
+
id: 1,
|
|
34
|
+
subscription_id: 31,
|
|
35
|
+
name: 'Test Widget',
|
|
36
|
+
position: 'top_left',
|
|
37
|
+
visible: false,
|
|
38
|
+
crm_widget_id: 1,
|
|
39
|
+
owner_id: 25
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
object_count: 1,
|
|
43
|
+
unfiltered_count: 1
|
|
44
|
+
}),
|
|
45
|
+
getAllWidgets: () =>
|
|
46
|
+
of({
|
|
47
|
+
crm_widgets: [{ id: 1, name: 'Feature1', code: 'feature1', active: true }],
|
|
48
|
+
object_count: 1,
|
|
49
|
+
unfiltered_count: 1
|
|
50
|
+
}),
|
|
51
|
+
getWidgetPositions: () => of(['top_left', 'bottom_left', 'middle-left']),
|
|
52
|
+
deleteSubscriptionWidget: () => of({})
|
|
53
|
+
}),
|
|
54
|
+
{
|
|
55
|
+
provide: UserService,
|
|
56
|
+
useClass: UserServiceMock
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
provide: ActivatedRoute,
|
|
60
|
+
useValue: {
|
|
61
|
+
parent: {
|
|
62
|
+
params: of({ slug: 'posiwise-263' })
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
beforeEach(() => {
|
|
70
|
+
TestHelper.setUpPermissionsAndUser();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('should create', waitForAsync(async () => {
|
|
74
|
+
const spectator = await createComponent();
|
|
75
|
+
expect(spectator.component).toBeTruthy();
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
it('should populate the table with widgets data', waitForAsync(async () => {
|
|
79
|
+
const spectator = await createComponent();
|
|
80
|
+
spectator.component.ngOnInit();
|
|
81
|
+
|
|
82
|
+
const lazyLoadEvent: LazyLoadEvent = {
|
|
83
|
+
first: 0,
|
|
84
|
+
rows: 10,
|
|
85
|
+
sortField: 'name',
|
|
86
|
+
sortOrder: 1
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
spectator.component.onLazyLoad(lazyLoadEvent);
|
|
90
|
+
spectator.detectChanges();
|
|
91
|
+
expect(spectator.query('table')).toContainText('Crm Widget Position Visible Actions');
|
|
92
|
+
}));
|
|
93
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
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, Paging, Subscription } from '@posiwise/common-utilities';
|
|
14
|
+
import { CrmWidgetResponse } from '../../../../shared/interface/crm-widget.interface';
|
|
15
|
+
import { AppBaseComponent } from '@posiwise/app-base-component';
|
|
16
|
+
import { HelperService } from '@posiwise/helper-service';
|
|
17
|
+
import { FilteredData } from 'libs/smart-crm/src/lib/shared/interface/smart-crm-module.interface';
|
|
18
|
+
|
|
19
|
+
@Component({
|
|
20
|
+
selector: 'pw-smart-crm-widgets',
|
|
21
|
+
templateUrl: './smart-crm-widgets.component.html'
|
|
22
|
+
})
|
|
23
|
+
export class SmartCrmWidgetsComponent
|
|
24
|
+
extends AppBaseComponent
|
|
25
|
+
implements OnInit, OnDestroy, AfterViewChecked
|
|
26
|
+
{
|
|
27
|
+
searchText = '';
|
|
28
|
+
|
|
29
|
+
loading = true;
|
|
30
|
+
|
|
31
|
+
data: CrmWidgetResponse = {
|
|
32
|
+
crm_widget_relationships: [],
|
|
33
|
+
object_count: 0,
|
|
34
|
+
unfiltered_count: 0
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
hasAccess = false;
|
|
38
|
+
|
|
39
|
+
isLoaded = false;
|
|
40
|
+
|
|
41
|
+
subscriptionId: number;
|
|
42
|
+
|
|
43
|
+
allWidgets: FilteredData[];
|
|
44
|
+
|
|
45
|
+
positions = [];
|
|
46
|
+
|
|
47
|
+
private page = 1;
|
|
48
|
+
|
|
49
|
+
subscription: Subscription;
|
|
50
|
+
|
|
51
|
+
routers = ROUTERS;
|
|
52
|
+
|
|
53
|
+
constructor(
|
|
54
|
+
injector: Injector,
|
|
55
|
+
private crmService: CrmService,
|
|
56
|
+
private cdr: ChangeDetectorRef
|
|
57
|
+
) {
|
|
58
|
+
super(injector);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
ngOnInit() {
|
|
62
|
+
this.getUserSubscription().subscribe(subscription => {
|
|
63
|
+
this.subscription = subscription;
|
|
64
|
+
if (this.subscription?.id) {
|
|
65
|
+
this.hasAccess = this.hasAdminAccess(this.subscription?.id);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ngAfterViewChecked() {
|
|
71
|
+
this.cdr.detectChanges();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
onLazyLoad(event: LazyLoadEvent) {
|
|
75
|
+
const pageDetails = HelperService.onTableLazyLoad(event);
|
|
76
|
+
this.page = pageDetails.page;
|
|
77
|
+
this.getAllSubscriptionWidgets({
|
|
78
|
+
page: this.page,
|
|
79
|
+
page_size: PAGE_SIZE,
|
|
80
|
+
order_by: pageDetails.sortField,
|
|
81
|
+
order_direction: pageDetails.sortOrder,
|
|
82
|
+
search: this.searchText
|
|
83
|
+
});
|
|
84
|
+
this.getWidgetPositions();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Function to get all widgets */
|
|
88
|
+
private getAllSubscriptionWidgets(paging: Paging) {
|
|
89
|
+
this.getUserSubscriptionId().subscribe(response => {
|
|
90
|
+
this.subscriptionId = response;
|
|
91
|
+
if (response) {
|
|
92
|
+
this.crmService
|
|
93
|
+
.getAllSubscriptionWidgets(this.subscriptionId, paging)
|
|
94
|
+
.subscribe(res => {
|
|
95
|
+
this.getAllWidgets();
|
|
96
|
+
this.data = res;
|
|
97
|
+
})
|
|
98
|
+
.add(() => {
|
|
99
|
+
this.isLoaded = true;
|
|
100
|
+
this.loading = false;
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Function to get all widgets */
|
|
107
|
+
private getAllWidgets() {
|
|
108
|
+
this.crmService.getAllWidgets(this.subscriptionId).subscribe(widgets => {
|
|
109
|
+
this.allWidgets = widgets.crm_widgets || [];
|
|
110
|
+
this.data.crm_widget_relationships?.forEach(subscriptionWidget => {
|
|
111
|
+
this.allWidgets?.forEach(widget => {
|
|
112
|
+
if (subscriptionWidget.crm_widget_id === widget.id) {
|
|
113
|
+
subscriptionWidget['crm_widget'] = widget.name;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Function to delete widget */
|
|
121
|
+
onDelete(id: number) {
|
|
122
|
+
HelperService.raiseDeletePopup().then(res => {
|
|
123
|
+
if (res.value) {
|
|
124
|
+
this.crmService
|
|
125
|
+
.deleteSubscriptionWidget(id, this.subscription?.id)
|
|
126
|
+
.subscribe(() => {
|
|
127
|
+
this.getAllSubscriptionWidgets({
|
|
128
|
+
page: this.page,
|
|
129
|
+
page_size: PAGE_SIZE,
|
|
130
|
+
search: this.searchText
|
|
131
|
+
});
|
|
132
|
+
this.toast.success(
|
|
133
|
+
this.translation.translate('Crm.Widgets.DeletedMessage')
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Function to get positions */
|
|
141
|
+
private getWidgetPositions() {
|
|
142
|
+
this.crmService.getWidgetPositions(this.subscriptionId).subscribe(response => {
|
|
143
|
+
this.positions = response;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
override ngOnDestroy() {
|
|
148
|
+
super.ngOnDestroy();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
<div class="me-auto col-xs-6">
|
|
2
|
+
<a href="javascript:void(0)"
|
|
3
|
+
(click)="back()"
|
|
4
|
+
class="previous"><i class="fa fa-arrow-alt-circle-left" aria-hidden="true"></i></a>
|
|
5
|
+
<h3 class="m-subheader__title m-subheader__title--separator">
|
|
6
|
+
<span>{{ 'Crm.ContactMessage.Contact' | transloco }}:
|
|
7
|
+
{{ isLoading ? '' :
|
|
8
|
+
(data?.first_name
|
|
9
|
+
? data?.first_name + ' ' + data.last_name
|
|
10
|
+
: ('Label.AddNew' | transloco))
|
|
11
|
+
}}</span>
|
|
12
|
+
</h3>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="w-100 text-center mt-3"
|
|
15
|
+
*ngIf="isLoading">
|
|
16
|
+
<p-progressSpinner strokeWidth="2"> </p-progressSpinner>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="p-2 mt-3">
|
|
19
|
+
<form [formGroup]="form"
|
|
20
|
+
*ngIf="!isLoading"
|
|
21
|
+
(ngSubmit)="onSave()">
|
|
22
|
+
<div class="row">
|
|
23
|
+
<div class="col-12 col-sm-4">
|
|
24
|
+
<pw-input-container [label]="'Crm.ContactMessage.FirstName' | transloco"
|
|
25
|
+
name="first_name"
|
|
26
|
+
[errorMsg]="'Crm.ContactMessage.FirstNameErrorMessage' | transloco">
|
|
27
|
+
<input type="text"
|
|
28
|
+
class="form-control"
|
|
29
|
+
formControlName="first_name"
|
|
30
|
+
id="first_name"
|
|
31
|
+
[ngClass]="{ 'is-invalid': submitted && f['first_name'].errors }" />
|
|
32
|
+
</pw-input-container>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div class="col-12 col-sm-4">
|
|
36
|
+
<pw-input-container [label]="'Crm.ContactMessage.LastName' | transloco"
|
|
37
|
+
name="last_name"
|
|
38
|
+
[errorMsg]="'Crm.ContactMessage.LastNameErrorMessage' | transloco">
|
|
39
|
+
<input type="text"
|
|
40
|
+
class="form-control"
|
|
41
|
+
formControlName="last_name"
|
|
42
|
+
id="last_name"
|
|
43
|
+
[ngClass]="{ 'is-invalid': submitted && f['last_name'].errors }" />
|
|
44
|
+
</pw-input-container>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div class="col-12 col-sm-4">
|
|
48
|
+
<pw-input-container [label]="'Crm.ContactMessage.Headline' | transloco"
|
|
49
|
+
name="headline"
|
|
50
|
+
[errorMsg]="'Crm.ContactMessage.HeadlineErrorMessage' | transloco">
|
|
51
|
+
<input type="text"
|
|
52
|
+
class="form-control"
|
|
53
|
+
formControlName="headline"
|
|
54
|
+
id="headline"
|
|
55
|
+
[ngClass]="{ 'is-invalid': submitted && f['headline'].errors }" />
|
|
56
|
+
</pw-input-container>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div class="col-12 col-sm-4 col-lg-4">
|
|
60
|
+
<pw-input-container [label]="'Crm.ContactMessage.Tel' | transloco"
|
|
61
|
+
name="tel"
|
|
62
|
+
[errorMsg]="'Crm.ContactMessage.TelErrorMessage' | transloco">
|
|
63
|
+
<input type="text"
|
|
64
|
+
class="form-control"
|
|
65
|
+
formControlName="tel"
|
|
66
|
+
id="tel"
|
|
67
|
+
[ngClass]="{ 'is-invalid': submitted && f['tel'].errors }" />
|
|
68
|
+
</pw-input-container>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="col-12 col-sm-4">
|
|
72
|
+
<pw-input-container [label]="'Crm.ContactMessage.Email' | transloco"
|
|
73
|
+
name="email"
|
|
74
|
+
errorMsg="{{
|
|
75
|
+
f['email']?.errors?.required ? 'Please enter email' : 'Please Enter valid email'
|
|
76
|
+
}}">
|
|
77
|
+
<input type="text"
|
|
78
|
+
class="form-control"
|
|
79
|
+
formControlName="email"
|
|
80
|
+
id="email"
|
|
81
|
+
[ngClass]="{ 'is-invalid': submitted && f['email'].errors }" />
|
|
82
|
+
</pw-input-container>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="col-12 col-sm-4">
|
|
86
|
+
<div class="mb-3">
|
|
87
|
+
<pw-input-container [label]="'Crm.ContactMessage.EmailVerified' | transloco"
|
|
88
|
+
class="nowrap"
|
|
89
|
+
name="email_verified">
|
|
90
|
+
<ui-switch formControlName="email_verified"
|
|
91
|
+
name="email_verified"
|
|
92
|
+
[ngClass]="{ 'is-invalid': submitted && f['email_verified'].errors }">
|
|
93
|
+
</ui-switch>
|
|
94
|
+
</pw-input-container>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<div class="col-12 col-sm-4">
|
|
99
|
+
<pw-input-container [label]="'Crm.ContactMessage.LinkedInUrl' | transloco"
|
|
100
|
+
name="linkedin_url">
|
|
101
|
+
<input type="text"
|
|
102
|
+
class="form-control"
|
|
103
|
+
formControlName="linkedin_url"
|
|
104
|
+
id="linkedin_url" />
|
|
105
|
+
</pw-input-container>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div class="ui-fluid skills-modal col-sm-4">
|
|
109
|
+
<label class="mb-2">{{ 'Crm.ContactMessage.Account' | transloco
|
|
110
|
+
}}<span class="text-danger required-icon">*</span></label>
|
|
111
|
+
<p-autoComplete [suggestions]="filteredAccounts"
|
|
112
|
+
formControlName="crm_account_id"
|
|
113
|
+
dataKey="id"
|
|
114
|
+
field="name"
|
|
115
|
+
[dropdown]="true"
|
|
116
|
+
(completeMethod)="search($event)"
|
|
117
|
+
styleClass="w-100"
|
|
118
|
+
placeholder="Search accounts"
|
|
119
|
+
[multiple]="false"
|
|
120
|
+
autocomplete="off">
|
|
121
|
+
</p-autoComplete>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="col-12 col-sm-4 col-lg-4">
|
|
125
|
+
<pw-input-container [label]="'Crm.ContactMessage.Department' | transloco"
|
|
126
|
+
name="department_id"
|
|
127
|
+
*ngIf="departments$ | async as departments">
|
|
128
|
+
<select class="form-select"
|
|
129
|
+
formControlName="department_id"
|
|
130
|
+
[ngClass]="{ 'is-invalid': submitted && f['department_id'].errors }">
|
|
131
|
+
<option *ngFor="let option of departments['organization_departments']"
|
|
132
|
+
[value]="option.id">
|
|
133
|
+
{{ option.name }}
|
|
134
|
+
</option>
|
|
135
|
+
</select>
|
|
136
|
+
</pw-input-container>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="col-12 col-sm-4 col-lg-4">
|
|
140
|
+
<label>{{ 'Crm.ContactMessage.Potential' | transloco }}</label>
|
|
141
|
+
<select formControlName="potential"
|
|
142
|
+
class="form-control form-select"
|
|
143
|
+
[ngClass]="{ 'is-invalid': submitted && f['potential'].errors }">
|
|
144
|
+
<option *ngFor="let option of potentials"
|
|
145
|
+
[value]="option">{{ option }}</option>
|
|
146
|
+
</select>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<div class="col-12 col-sm-4 col-lg-4">
|
|
150
|
+
<label>{{ 'Crm.ContactMessage.Labels' | transloco }} </label>
|
|
151
|
+
<p-multiSelect [options]="labels"
|
|
152
|
+
formControlName="labels"
|
|
153
|
+
appendTo="body"></p-multiSelect>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<div class="col-12 col-sm-4 col-lg-4"
|
|
157
|
+
*ngIf="crmSources$ | async as source">
|
|
158
|
+
<label>{{ 'Crm.ContactMessage.Source' | transloco }}</label>
|
|
159
|
+
<select formControlName="crm_source_id"
|
|
160
|
+
class="form-control form-select"
|
|
161
|
+
[ngClass]="{ 'is-invalid': submitted && f['crm_source_id'].errors }">
|
|
162
|
+
<option value="">select crm source</option>
|
|
163
|
+
<option *ngFor="let option of source['crm_sources']"
|
|
164
|
+
[value]="option.id">
|
|
165
|
+
{{ option.name }}
|
|
166
|
+
</option>
|
|
167
|
+
</select>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div class="col-12 col-sm-4">
|
|
171
|
+
<pw-input-container [label]="'Crm.ContactMessage.DateOfBirth' | transloco"
|
|
172
|
+
name="dob">
|
|
173
|
+
<div class="input-group">
|
|
174
|
+
<input class="form-control"
|
|
175
|
+
placeholder="dd-mm-yyyy"
|
|
176
|
+
formControlName="dob"
|
|
177
|
+
ngbDatepicker
|
|
178
|
+
#d="ngbDatepicker" />
|
|
179
|
+
<div class="input-group-append">
|
|
180
|
+
<button class="btn btn-primary"
|
|
181
|
+
(click)="d.toggle()"
|
|
182
|
+
type="button">
|
|
183
|
+
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
184
|
+
</button>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</pw-input-container>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<div class="col-12 text-end mt-3">
|
|
191
|
+
<button type="button"
|
|
192
|
+
class="btn btn-outline-default me-2"
|
|
193
|
+
(click)="back()">
|
|
194
|
+
{{ 'Button.Cancel' | transloco }}
|
|
195
|
+
</button>
|
|
196
|
+
<button type="submit"
|
|
197
|
+
[buttonBusy]="buttonBusy"
|
|
198
|
+
class="btn btn-primary"
|
|
199
|
+
[disabled]="form.invalid">
|
|
200
|
+
{{ 'Button.Submit' | transloco }}
|
|
201
|
+
</button>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</form>
|
|
205
|
+
</div>
|