@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,319 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { byText } from '@ngneat/spectator';
|
|
3
|
+
import { CommonServicesModule, PermissionService, UserService } from '@posiwise/common-services';
|
|
4
|
+
import { SharedModule } from '@posiwise/shared-module';
|
|
5
|
+
import { CrmService } from '@posiwise/smart-crm-shared';
|
|
6
|
+
import { DEFAULT_USER, TestHelper } from '@posiwise/test-helpers';
|
|
7
|
+
import { MockProvider } from 'ng-mocks';
|
|
8
|
+
import { of } from 'rxjs';
|
|
9
|
+
import Swal from 'sweetalert2';
|
|
10
|
+
import { SmartCrmPrivateModule } from '../../../../smart-crm-private.module';
|
|
11
|
+
import { SmartCrmOpportunitiesInfoComponent } from './smart-crm-opportunities-info.component';
|
|
12
|
+
|
|
13
|
+
class UserServiceMock {
|
|
14
|
+
getUserState() {
|
|
15
|
+
return of({ currentUser: DEFAULT_USER });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
describe('SmartCrmOpportunitiesInfoComponent', () => {
|
|
19
|
+
const file = {
|
|
20
|
+
id: '1',
|
|
21
|
+
fileIndex: 1,
|
|
22
|
+
lastModifiedDate: new Date(),
|
|
23
|
+
name: 'test-file.xlsx',
|
|
24
|
+
size: 1,
|
|
25
|
+
type: 'xlsx',
|
|
26
|
+
form: new FormData(),
|
|
27
|
+
progress: { status: 2 }
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const createComponent = TestHelper.createComponentFactory({
|
|
31
|
+
component: SmartCrmOpportunitiesInfoComponent,
|
|
32
|
+
imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
|
|
33
|
+
providers: [
|
|
34
|
+
...TestHelper.TEST_PROVIDERS,
|
|
35
|
+
MockProvider(PermissionService, {
|
|
36
|
+
evaluatePermissions: () => {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}),
|
|
40
|
+
MockProvider(CrmService, {
|
|
41
|
+
getOpportunityDetails: () =>
|
|
42
|
+
of({
|
|
43
|
+
id: 8,
|
|
44
|
+
title: 'test',
|
|
45
|
+
crm_contact_id: null,
|
|
46
|
+
one_time_amount: 100,
|
|
47
|
+
win_chances: 10,
|
|
48
|
+
starting_at: '2021-10-06T00:00:00.000+00:00',
|
|
49
|
+
monthly_amount: 100,
|
|
50
|
+
product_id: null,
|
|
51
|
+
crm_account_id: 7,
|
|
52
|
+
owner_id: 25,
|
|
53
|
+
crm_opportunity_stage_id: 14,
|
|
54
|
+
crm_opportunity_category_ids: [9],
|
|
55
|
+
crm_account: {
|
|
56
|
+
id: 7,
|
|
57
|
+
name: 'test',
|
|
58
|
+
subscription_id: 31,
|
|
59
|
+
country: 'IN',
|
|
60
|
+
owner_id: 25
|
|
61
|
+
},
|
|
62
|
+
crm_opportunity_categories: []
|
|
63
|
+
}),
|
|
64
|
+
updateOpportunities: () => of({}),
|
|
65
|
+
updateAccountComment: () => of({}),
|
|
66
|
+
postAccountComment: () => of({}),
|
|
67
|
+
getOpportunitiesComments: () =>
|
|
68
|
+
of({
|
|
69
|
+
crm_account_actions: [
|
|
70
|
+
{
|
|
71
|
+
id: 7,
|
|
72
|
+
crm_action_id: 9,
|
|
73
|
+
comment: 'test222',
|
|
74
|
+
when: '2021-09-29T00:00:00.000+00:00',
|
|
75
|
+
crm_contact_id: 33,
|
|
76
|
+
completed: false,
|
|
77
|
+
cancelled: false,
|
|
78
|
+
owner_id: 25,
|
|
79
|
+
crm_account_id: 7,
|
|
80
|
+
crm_opportunity_id: null,
|
|
81
|
+
owner: {
|
|
82
|
+
id: 25,
|
|
83
|
+
first_name: 'saurabh'
|
|
84
|
+
},
|
|
85
|
+
crm_account: {
|
|
86
|
+
id: 7,
|
|
87
|
+
name: 'test'
|
|
88
|
+
},
|
|
89
|
+
crm_action: {
|
|
90
|
+
id: 9,
|
|
91
|
+
name: 'test'
|
|
92
|
+
},
|
|
93
|
+
crm_contact: {
|
|
94
|
+
id: 33,
|
|
95
|
+
first_name: 'test2',
|
|
96
|
+
last_name: 'test2'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
object_count: 1,
|
|
101
|
+
unfiltered_count: 1
|
|
102
|
+
}),
|
|
103
|
+
getAccountsBySubscription: () =>
|
|
104
|
+
of({
|
|
105
|
+
accounts: [
|
|
106
|
+
{
|
|
107
|
+
id: 7,
|
|
108
|
+
name: 'test'
|
|
109
|
+
}
|
|
110
|
+
],
|
|
111
|
+
object_count: 1,
|
|
112
|
+
unfiltered_count: 1
|
|
113
|
+
}),
|
|
114
|
+
getAllContacts: () =>
|
|
115
|
+
of({
|
|
116
|
+
contacts: [
|
|
117
|
+
{
|
|
118
|
+
id: 35,
|
|
119
|
+
first_name: 'test',
|
|
120
|
+
last_name: 'test',
|
|
121
|
+
email: 'test@gmail.com'
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
object_count: 1,
|
|
125
|
+
unfiltered_count: 1
|
|
126
|
+
}),
|
|
127
|
+
getActionsBySubscriptionId: () =>
|
|
128
|
+
of({
|
|
129
|
+
crm_actions: [
|
|
130
|
+
{
|
|
131
|
+
id: 9,
|
|
132
|
+
name: 'test',
|
|
133
|
+
visible: true
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
object_count: 1,
|
|
137
|
+
unfiltered_count: 1
|
|
138
|
+
}),
|
|
139
|
+
getContactVersion: () =>
|
|
140
|
+
of({
|
|
141
|
+
versions: [
|
|
142
|
+
{
|
|
143
|
+
item_id: 8,
|
|
144
|
+
item_type: 'CrmAccount',
|
|
145
|
+
event: 'created',
|
|
146
|
+
object: {
|
|
147
|
+
name: 'test'
|
|
148
|
+
},
|
|
149
|
+
created_at: '2021-09-09T10:37:26.256+00:00',
|
|
150
|
+
whoDoneIt: 25,
|
|
151
|
+
author: {
|
|
152
|
+
id: 25,
|
|
153
|
+
first_name: 'saurabh',
|
|
154
|
+
slug: 'saurabh-13702-176034-57934'
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
object_count: 1,
|
|
159
|
+
unfiltered_count: 1
|
|
160
|
+
})
|
|
161
|
+
}),
|
|
162
|
+
{
|
|
163
|
+
provide: UserService,
|
|
164
|
+
useClass: UserServiceMock
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
beforeEach(() => {
|
|
170
|
+
TestHelper.setUpPermissionsAndUser();
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
it('should create', async () => {
|
|
174
|
+
TestHelper.setActivatedRoute({
|
|
175
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
176
|
+
});
|
|
177
|
+
const spectator = await createComponent();
|
|
178
|
+
expect(spectator.component).toBeTruthy();
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('should edit info ', async () => {
|
|
182
|
+
TestHelper.setActivatedRoute({
|
|
183
|
+
params: { id: 1 },
|
|
184
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
185
|
+
});
|
|
186
|
+
const spectator = await createComponent();
|
|
187
|
+
const service = TestBed.inject(CrmService);
|
|
188
|
+
const spy = spyOn(service, 'updateOpportunities').and.callThrough();
|
|
189
|
+
spectator.click(byText('Edit'));
|
|
190
|
+
spectator.typeInElement('test2', 'input[formControlName="title"]');
|
|
191
|
+
spectator.click('input[value="Submit"]');
|
|
192
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
it('should set as completed', async () => {
|
|
196
|
+
TestHelper.setActivatedRoute({
|
|
197
|
+
params: { id: 1 },
|
|
198
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
199
|
+
});
|
|
200
|
+
const spectator = await createComponent();
|
|
201
|
+
const service = TestBed.inject(CrmService);
|
|
202
|
+
const spy = spyOn(service, 'updateAccountComment').and.callThrough();
|
|
203
|
+
spectator.click('.fa-tasks.completed');
|
|
204
|
+
expect(Swal.isVisible()).toBeTruthy();
|
|
205
|
+
Swal.clickConfirm();
|
|
206
|
+
await TestHelper.stabilize(spectator);
|
|
207
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
it('should set as cancelled ', async () => {
|
|
211
|
+
TestHelper.setActivatedRoute({
|
|
212
|
+
params: { id: 1 },
|
|
213
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
214
|
+
});
|
|
215
|
+
const spectator = await createComponent();
|
|
216
|
+
const service = TestBed.inject(CrmService);
|
|
217
|
+
const spy = spyOn(service, 'updateAccountComment').and.callThrough();
|
|
218
|
+
spectator.click('.delete-icon:first-of-type');
|
|
219
|
+
expect(Swal.isVisible()).toBeTruthy();
|
|
220
|
+
Swal.clickConfirm();
|
|
221
|
+
await TestHelper.stabilize(spectator);
|
|
222
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
it('should change action name ', async () => {
|
|
226
|
+
TestHelper.setActivatedRoute({
|
|
227
|
+
params: { id: 1 },
|
|
228
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
229
|
+
});
|
|
230
|
+
const spectator = await createComponent();
|
|
231
|
+
const service = TestBed.inject(CrmService);
|
|
232
|
+
const spy = spyOn(service, 'updateAccountComment').and.callThrough();
|
|
233
|
+
spectator.click('.edit-btn:first-of-type');
|
|
234
|
+
spectator.typeInElement('testname', 'textarea[name="comment"]');
|
|
235
|
+
spectator.click('.control-btns button:nth-child(2)');
|
|
236
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
it('should post comment', async () => {
|
|
240
|
+
TestHelper.setActivatedRoute({
|
|
241
|
+
params: { id: 1 },
|
|
242
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
243
|
+
});
|
|
244
|
+
const spectator = await createComponent();
|
|
245
|
+
const service = TestBed.inject(CrmService);
|
|
246
|
+
const spy = spyOn(service, 'postAccountComment').and.callThrough();
|
|
247
|
+
spectator.typeInElement('testname', 'textarea[formcontrolname="comment"]');
|
|
248
|
+
spectator.click('.action-btn:first-of-type');
|
|
249
|
+
spectator.click(
|
|
250
|
+
'ngb-datepicker > div.ngb-dp-months > div > ngb-datepicker-month div.ngb-dp-day.ngb-dp-today'
|
|
251
|
+
);
|
|
252
|
+
spectator.component.actionControls.controls['crm_account_id'].patchValue(2);
|
|
253
|
+
spectator.click('button[type="submit"]');
|
|
254
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
it('should upload', async () => {
|
|
258
|
+
TestHelper.setActivatedRoute({
|
|
259
|
+
params: { id: 1 },
|
|
260
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
261
|
+
});
|
|
262
|
+
const spectator = await createComponent();
|
|
263
|
+
expect(spectator.component).toBeTruthy();
|
|
264
|
+
spyOn(spectator.component.uploadInput, 'emit').and.stub();
|
|
265
|
+
spectator.component.files = [file];
|
|
266
|
+
spectator.component.onUploadOutput({ type: 'allAddedToQueue', file });
|
|
267
|
+
spectator.component.onUploadOutput({ type: 'addedToQueue', file });
|
|
268
|
+
spectator.component.onUploadOutput({ type: 'uploading', file });
|
|
269
|
+
spectator.component.onUploadOutput({ type: 'removed', file });
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('should search contact', async () => {
|
|
273
|
+
TestHelper.setActivatedRoute({
|
|
274
|
+
params: { id: 1 },
|
|
275
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
276
|
+
});
|
|
277
|
+
const spectator = await createComponent();
|
|
278
|
+
expect(spectator.component).toBeTruthy();
|
|
279
|
+
spectator.component.getAllContacts();
|
|
280
|
+
spectator.component.onContactSearch({ query: 'simple' });
|
|
281
|
+
expect(spectator.component.filteredContacts.length).toEqual(0);
|
|
282
|
+
spectator.component.onContactSearch({ query: '' });
|
|
283
|
+
expect(spectator.component.filteredContacts.length).toEqual(1);
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
it('should select date', async () => {
|
|
287
|
+
TestHelper.setActivatedRoute({
|
|
288
|
+
params: { id: 1 },
|
|
289
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
290
|
+
});
|
|
291
|
+
const spectator = await createComponent();
|
|
292
|
+
const service = TestBed.inject(CrmService);
|
|
293
|
+
const spy = spyOn(service, 'updateAccountComment').and.callThrough();
|
|
294
|
+
expect(spectator.component).toBeTruthy();
|
|
295
|
+
spectator.click('.when-btn');
|
|
296
|
+
spectator.fixture.detectChanges();
|
|
297
|
+
spectator.focus('.card-subtitle input');
|
|
298
|
+
spectator.fixture.detectChanges();
|
|
299
|
+
spectator.click(
|
|
300
|
+
'ngb-datepicker > div.ngb-dp-months > div > ngb-datepicker-month div.ngb-dp-day.ngb-dp-today'
|
|
301
|
+
);
|
|
302
|
+
spectator.click('.when-btn');
|
|
303
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
it('should search account', async () => {
|
|
307
|
+
TestHelper.setActivatedRoute({
|
|
308
|
+
params: { id: 1 },
|
|
309
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
310
|
+
});
|
|
311
|
+
const spectator = await createComponent();
|
|
312
|
+
expect(spectator.component).toBeTruthy();
|
|
313
|
+
spectator.component.getAccountsBySubscription();
|
|
314
|
+
spectator.component.accountSearch({ query: 'simple' });
|
|
315
|
+
expect(spectator.component.filteredContacts.length).toEqual(0);
|
|
316
|
+
spectator.component.accountSearch({ query: '' });
|
|
317
|
+
expect(spectator.component.filteredContacts.length).toEqual(1);
|
|
318
|
+
});
|
|
319
|
+
});
|