@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,273 @@
|
|
|
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.OpportunitiesMessage.CrmOpportunity' | transloco }}:
|
|
7
|
+
{{ isLoading ? '': (data?.name ? data?.name : ('Label.AddNew' | transloco)) }}</span>
|
|
8
|
+
</h3>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="w-100 text-center mt-3"
|
|
11
|
+
*ngIf="isLoading">
|
|
12
|
+
<p-progressSpinner strokeWidth="2"> </p-progressSpinner>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="p-2 mt-3" *ngIf="!isLoading">
|
|
15
|
+
<form [formGroup]="form"
|
|
16
|
+
(ngSubmit)="onSave()">
|
|
17
|
+
<div class="row">
|
|
18
|
+
<div class="col-12 col-sm-8">
|
|
19
|
+
<pw-input-container [label]="'Crm.OpportunitiesMessage.Title' | transloco"
|
|
20
|
+
name="title"
|
|
21
|
+
[errorMsg]="'Crm.OpportunitiesMessage.TitleErrorMessage' | transloco">
|
|
22
|
+
<input type="text"
|
|
23
|
+
class="form-control"
|
|
24
|
+
formControlName="title"
|
|
25
|
+
[ngClass]="{ 'is-invalid': submitted && f['title'].errors }" />
|
|
26
|
+
</pw-input-container>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div class="ui-fluid skills-modal col-sm-4">
|
|
30
|
+
<label class="mb-2">{{ 'Crm.OpportunitiesMessage.Account' | transloco
|
|
31
|
+
}}<span class="text-danger required-icon">*</span></label>
|
|
32
|
+
<p-autoComplete [suggestions]="filteredAccounts"
|
|
33
|
+
formControlName="crm_account_id"
|
|
34
|
+
dataKey="id"
|
|
35
|
+
field="name"
|
|
36
|
+
[dropdown]="true"
|
|
37
|
+
(completeMethod)="searchAccount($event)"
|
|
38
|
+
styleClass="w-100"
|
|
39
|
+
placeholder="Search accounts"
|
|
40
|
+
[inputStyle]="
|
|
41
|
+
submitted && f['crm_account_id'].errors
|
|
42
|
+
? { border: '1px solid #ff586b' }
|
|
43
|
+
: { border: '1px solid gray' }
|
|
44
|
+
"
|
|
45
|
+
[multiple]="false">
|
|
46
|
+
</p-autoComplete>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="ui-fluid skills-modal col-sm-4">
|
|
50
|
+
<label>{{ 'Crm.OpportunitiesMessage.Contact' | transloco }}</label>
|
|
51
|
+
<p-autoComplete [suggestions]="filteredUsers"
|
|
52
|
+
formControlName="crm_contact_id"
|
|
53
|
+
dataKey="id"
|
|
54
|
+
field="displayName"
|
|
55
|
+
[dropdown]="true"
|
|
56
|
+
(completeMethod)="search($event)"
|
|
57
|
+
styleClass="w-100"
|
|
58
|
+
placeholder="Search contact"
|
|
59
|
+
[multiple]="false">
|
|
60
|
+
</p-autoComplete>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="col-12 col-md-4">
|
|
64
|
+
<div class="mb-3">
|
|
65
|
+
<label class="info-circle">{{ 'Crm.OpportunitiesMessage.OneTimeAmount' | transloco
|
|
66
|
+
}}<span class="text-danger required-icon">*</span><span class="tooltiptext gradient-custom-branding">{{
|
|
67
|
+
'Crm.OpportunitiesMessage.Tooltip.OneTimeAmount' | transloco
|
|
68
|
+
}}</span></label>
|
|
69
|
+
<input type="number"
|
|
70
|
+
numbersOnly
|
|
71
|
+
class="form-control"
|
|
72
|
+
formControlName="one_time_amount"
|
|
73
|
+
id="one_time_amount"
|
|
74
|
+
[ngClass]="{ 'is-invalid': submitted && f['one_time_amount'].errors }" />
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="col-12 col-md-4">
|
|
79
|
+
<div class="mb-3">
|
|
80
|
+
<label class="info-circle">{{ 'Crm.OpportunitiesMessage.MonthlyAmount' | transloco
|
|
81
|
+
}}<span class="text-danger required-icon">*</span><span class="tooltiptext gradient-custom-branding">{{
|
|
82
|
+
'Crm.OpportunitiesMessage.Tooltip.MonthlyAmount' | transloco
|
|
83
|
+
}}</span></label>
|
|
84
|
+
<input type="number"
|
|
85
|
+
numbersOnly
|
|
86
|
+
class="form-control"
|
|
87
|
+
formControlName="monthly_amount"
|
|
88
|
+
id="monthly_amount"
|
|
89
|
+
[ngClass]="{ 'is-invalid': submitted && f['monthly_amount'].errors }" />
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<!-- Features -->
|
|
94
|
+
<div class="mb-3 col-12 col-md-4">
|
|
95
|
+
<label class="info-circle">{{ 'Crm.OpportunitiesMessage.Features' | transloco }}
|
|
96
|
+
<span class="tooltiptext gradient-custom-branding feature-tooltip">{{ 'Crm.OpportunitiesMessage.Tooltip.Feature' | transloco }}</span>
|
|
97
|
+
</label>
|
|
98
|
+
<p-multiSelect [options]="featureKeys"
|
|
99
|
+
placeholder="Select feature keys"
|
|
100
|
+
[showHeader]="true"
|
|
101
|
+
[showToggleAll]="true"
|
|
102
|
+
formControlName="feature_keys"
|
|
103
|
+
appendTo="body"></p-multiSelect>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div class="col-12 col-md-4">
|
|
107
|
+
<div class="mb-3">
|
|
108
|
+
<label class="info-circle">{{ 'Crm.OpportunitiesMessage.WinChance' | transloco }}
|
|
109
|
+
<span class="text-danger required-icon">*</span>
|
|
110
|
+
<span class="tooltiptext gradient-custom-branding">{{ 'Crm.OpportunitiesMessage.Tooltip.WinChance' | transloco }}
|
|
111
|
+
</span>
|
|
112
|
+
</label>
|
|
113
|
+
<select formControlName="win_chances"
|
|
114
|
+
class="form-control form-select"
|
|
115
|
+
[ngClass]="{ 'is-invalid': submitted && f['win_chances'].errors }">
|
|
116
|
+
<option *ngFor="let option of winChance"
|
|
117
|
+
[value]="option">
|
|
118
|
+
{{ option }}
|
|
119
|
+
</option>
|
|
120
|
+
</select>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<div class="col-12 col-md-4">
|
|
125
|
+
<div class="mb-3">
|
|
126
|
+
<label class="info-circle">{{ 'Crm.OpportunitiesMessage.Won' | transloco }}
|
|
127
|
+
<span class="tooltiptext gradient-custom-branding">{{ 'Crm.OpportunitiesMessage.Tooltip.Won' | transloco }}
|
|
128
|
+
</span>
|
|
129
|
+
</label>
|
|
130
|
+
<input type="number"
|
|
131
|
+
NumberDirective
|
|
132
|
+
class="form-control"
|
|
133
|
+
formControlName="won"
|
|
134
|
+
id="won"
|
|
135
|
+
[ngClass]="{ 'is-invalid': submitted && f['won'].errors }" />
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div class="col-12 col-md-4">
|
|
140
|
+
<div class="mb-3">
|
|
141
|
+
<label class="info-circle mb-2">{{ 'Crm.OpportunitiesMessage.StartingAt' | transloco
|
|
142
|
+
}}<span class="text-danger required-icon">*</span><span class="tooltiptext gradient-custom-branding">{{
|
|
143
|
+
'Crm.OpportunitiesMessage.Tooltip.StartingAt' | transloco
|
|
144
|
+
}}</span></label>
|
|
145
|
+
<div class="input-group">
|
|
146
|
+
<input class="form-control"
|
|
147
|
+
placeholder="dd-mm-yyyy"
|
|
148
|
+
formControlName="starting_at"
|
|
149
|
+
ngbDatepicker
|
|
150
|
+
#d="ngbDatepicker"
|
|
151
|
+
[minDate]="{ day: 1, month: 1, year: 1950 }"
|
|
152
|
+
[maxDate]="{ day: 31, month: 12, year: 2050 }"
|
|
153
|
+
[ngClass]="{ 'is-invalid': submitted && f['starting_at'].errors }" />
|
|
154
|
+
<div class="input-group-append">
|
|
155
|
+
<button class="btn btn-primary"
|
|
156
|
+
(click)="d.toggle()"
|
|
157
|
+
type="button">
|
|
158
|
+
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
159
|
+
</button>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div class="col-12 col-sm-4">
|
|
166
|
+
<pw-input-container [showTooltip]="true"
|
|
167
|
+
[tooltipText]="'Crm.OpportunitiesMessage.Tooltip.Category' | transloco"
|
|
168
|
+
[label]="'Crm.OpportunitiesMessage.Categories' | transloco"
|
|
169
|
+
name="crm_opportunity_category_ids"
|
|
170
|
+
[errorMsg]="'Crm.OpportunitiesMessage.CategoryErrorMessage' | transloco">
|
|
171
|
+
<p-multiSelect [options]="categories"
|
|
172
|
+
(onChange)="onCategoryChange($event)"
|
|
173
|
+
formControlName="crm_opportunity_category_ids"
|
|
174
|
+
appendTo="body"></p-multiSelect>
|
|
175
|
+
</pw-input-container>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<div class="col-12 col-sm-4"
|
|
179
|
+
*ngIf="TrialStartField">
|
|
180
|
+
<pw-input-container [label]="'Crm.OpportunitiesMessage.TrialStartAt' | transloco"
|
|
181
|
+
name="trial_start_at"
|
|
182
|
+
[errorMsg]="'Crm.OpportunitiesMessage.TrialStartAt' | transloco">
|
|
183
|
+
<div class="input-group">
|
|
184
|
+
<input class="form-control"
|
|
185
|
+
placeholder="dd-mm-yyyy"
|
|
186
|
+
formControlName="trial_start_at"
|
|
187
|
+
ngbDatepicker
|
|
188
|
+
#c="ngbDatepicker"
|
|
189
|
+
[minDate]="{ day: 1, month: 1, year: 1950 }"
|
|
190
|
+
[maxDate]="{ day: 31, month: 12, year: 2050 }" />
|
|
191
|
+
<div class="input-group-append">
|
|
192
|
+
<button class="btn btn-primary"
|
|
193
|
+
(click)="c.toggle()"
|
|
194
|
+
type="button">
|
|
195
|
+
<i class="fa fa-calendar" aria-hidden="true"></i>
|
|
196
|
+
</button>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</pw-input-container>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div class="col-12 col-sm-4"
|
|
203
|
+
*ngIf="LostField">
|
|
204
|
+
<pw-input-container [label]="'Crm.OpportunitiesMessage.LostReason' | transloco"
|
|
205
|
+
name="lost_reason"
|
|
206
|
+
[errorMsg]="'Crm.OpportunitiesMessage.LostReason' | transloco">
|
|
207
|
+
<input type="text"
|
|
208
|
+
class="form-control"
|
|
209
|
+
formControlName="lost_reason"
|
|
210
|
+
id="lost_reason"
|
|
211
|
+
[ngClass]="{ 'is-invalid': submitted && f['lost_reason'].errors }" />
|
|
212
|
+
</pw-input-container>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<div class="col-12 col-sm-4"
|
|
216
|
+
*ngIf="WonField">
|
|
217
|
+
<pw-input-container [label]="'Crm.OpportunitiesMessage.WonReason' | transloco"
|
|
218
|
+
name="won_reason"
|
|
219
|
+
[errorMsg]="'Crm.OpportunitiesMessage.WonReason' | transloco">
|
|
220
|
+
<input type="text"
|
|
221
|
+
class="form-control"
|
|
222
|
+
formControlName="won_reason"
|
|
223
|
+
id="won_reason"
|
|
224
|
+
[ngClass]="{ 'is-invalid': submitted && f['won_reason'].errors }" />
|
|
225
|
+
</pw-input-container>
|
|
226
|
+
</div>
|
|
227
|
+
|
|
228
|
+
<div class="col-12 col-md-4">
|
|
229
|
+
<pw-input-container [showTooltip]="true"
|
|
230
|
+
[tooltipText]="'Crm.OpportunitiesMessage.Tooltip.StageOpportunity' | transloco"
|
|
231
|
+
[label]="'Crm.OpportunitiesMessage.Stage' | transloco"
|
|
232
|
+
name="crm_opportunity_stage_id"
|
|
233
|
+
errorMsg="Please select stage">
|
|
234
|
+
<select class="form-select"
|
|
235
|
+
formControlName="crm_opportunity_stage_id"
|
|
236
|
+
[ngClass]="{ 'is-invalid': submitted && f['crm_opportunity_stage_id'].errors }">
|
|
237
|
+
<option value="">Select Stage</option>
|
|
238
|
+
<option *ngFor="let option of stages"
|
|
239
|
+
[value]="option.id">
|
|
240
|
+
{{ option.name }}
|
|
241
|
+
</option>
|
|
242
|
+
</select>
|
|
243
|
+
</pw-input-container>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<div class="col-12 col-sm-12">
|
|
247
|
+
<pw-input-container [label]="'Crm.OpportunitiesMessage.Description' | transloco"
|
|
248
|
+
name="description"
|
|
249
|
+
[errorMsg]="'Crm.OpportunitiesMessage.DescriptionErrorMessage' | transloco">
|
|
250
|
+
<textarea rows="10"
|
|
251
|
+
type="text"
|
|
252
|
+
class="form-control description-field"
|
|
253
|
+
formControlName="description"
|
|
254
|
+
id="description"
|
|
255
|
+
[ngClass]="{ 'is-invalid': submitted && f['description'].errors }"></textarea>
|
|
256
|
+
</pw-input-container>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="col-12 text-end mt-3">
|
|
259
|
+
<button type="button"
|
|
260
|
+
class="btn btn-outline-default me-2"
|
|
261
|
+
(click)="back()">
|
|
262
|
+
{{ 'Button.Cancel' | transloco }}
|
|
263
|
+
</button>
|
|
264
|
+
<button type="submit"
|
|
265
|
+
[buttonBusy]="buttonBusy"
|
|
266
|
+
class="btn btn-primary"
|
|
267
|
+
[disabled]="form.invalid">
|
|
268
|
+
{{ 'Button.Submit' | transloco }}
|
|
269
|
+
</button>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</form>
|
|
273
|
+
</div>
|
|
@@ -0,0 +1,196 @@
|
|
|
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 { SmartCrmPrivateModule } from '../../../../smart-crm-private.module';
|
|
10
|
+
import { SmartCrmOpportunitiesDetailsComponent } from './smart-crm-opportunities-details.component';
|
|
11
|
+
|
|
12
|
+
class UserServiceMock {
|
|
13
|
+
getUserState() {
|
|
14
|
+
return of({ currentUser: DEFAULT_USER });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
describe('SmartCrmOpportunitiesDetailsComponent', () => {
|
|
18
|
+
const createComponent = TestHelper.createComponentFactory({
|
|
19
|
+
component: SmartCrmOpportunitiesDetailsComponent,
|
|
20
|
+
imports: [CommonServicesModule, SharedModule, SmartCrmPrivateModule],
|
|
21
|
+
providers: [
|
|
22
|
+
...TestHelper.TEST_PROVIDERS,
|
|
23
|
+
MockProvider(PermissionService, {
|
|
24
|
+
evaluatePermissions: () => {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
}),
|
|
28
|
+
MockProvider(CrmService, {
|
|
29
|
+
getOpportunityDetails: () =>
|
|
30
|
+
of({
|
|
31
|
+
id: 7,
|
|
32
|
+
title: 'test',
|
|
33
|
+
crm_contact_id: 37,
|
|
34
|
+
description: 'test',
|
|
35
|
+
one_time_amount: 100,
|
|
36
|
+
win_chances: 10,
|
|
37
|
+
starting_at: '2021-10-06T00:00:00.000+00:00',
|
|
38
|
+
monthly_amount: 100,
|
|
39
|
+
crm_account_id: 7,
|
|
40
|
+
owner_id: 1,
|
|
41
|
+
crm_opportunity_stage_id: 14,
|
|
42
|
+
crm_opportunity_category_ids: [7],
|
|
43
|
+
crm_contact: {
|
|
44
|
+
id: 37,
|
|
45
|
+
first_name: 'test1',
|
|
46
|
+
last_name: 'test'
|
|
47
|
+
},
|
|
48
|
+
crm_account: {
|
|
49
|
+
id: 7,
|
|
50
|
+
name: 'test'
|
|
51
|
+
},
|
|
52
|
+
crm_opportunity_stage: {
|
|
53
|
+
id: 14,
|
|
54
|
+
name: 'test'
|
|
55
|
+
},
|
|
56
|
+
crm_opportunity_categories: []
|
|
57
|
+
}),
|
|
58
|
+
updateOpportunities: () => of({}),
|
|
59
|
+
postOpportunities: () => of({}),
|
|
60
|
+
getAccountContacts: () =>
|
|
61
|
+
of({
|
|
62
|
+
contacts: [
|
|
63
|
+
{
|
|
64
|
+
id: 35,
|
|
65
|
+
first_name: 'test',
|
|
66
|
+
last_name: 'test',
|
|
67
|
+
crm_account_id: 7,
|
|
68
|
+
created_at: '2021-10-04T10:23:01.501+00:00',
|
|
69
|
+
headline: 'test',
|
|
70
|
+
owner: {
|
|
71
|
+
first_name: 'not',
|
|
72
|
+
last_name: 'available'
|
|
73
|
+
},
|
|
74
|
+
crm_account: {
|
|
75
|
+
id: 7,
|
|
76
|
+
name: 'test',
|
|
77
|
+
owner_id: 25
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
object_count: 1,
|
|
82
|
+
unfiltered_count: 1
|
|
83
|
+
}),
|
|
84
|
+
getCrmProducts: () =>
|
|
85
|
+
of({
|
|
86
|
+
available_crm_subscription_products: [
|
|
87
|
+
{
|
|
88
|
+
id: 22,
|
|
89
|
+
name: 'test'
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}),
|
|
93
|
+
getAvailableOpportunityStages: () =>
|
|
94
|
+
of({
|
|
95
|
+
available_crm_opportunity_stages: [
|
|
96
|
+
{
|
|
97
|
+
id: 1,
|
|
98
|
+
name: 'test'
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}),
|
|
102
|
+
getAllOpportunityCategories: () =>
|
|
103
|
+
of({
|
|
104
|
+
crm_opportunity_categories: [
|
|
105
|
+
{
|
|
106
|
+
id: 7,
|
|
107
|
+
name: 'test'
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
object_count: 1,
|
|
111
|
+
unfiltered_count: 1
|
|
112
|
+
}),
|
|
113
|
+
getAllAccounts: () =>
|
|
114
|
+
of({
|
|
115
|
+
accounts: [
|
|
116
|
+
{
|
|
117
|
+
id: 7,
|
|
118
|
+
name: 'test'
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
object_count: 1,
|
|
122
|
+
unfiltered_count: 1
|
|
123
|
+
})
|
|
124
|
+
}),
|
|
125
|
+
{
|
|
126
|
+
provide: UserService,
|
|
127
|
+
useClass: UserServiceMock
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
beforeEach(() => {
|
|
133
|
+
TestHelper.setUpPermissionsAndUser();
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it('should create', async () => {
|
|
137
|
+
TestHelper.setActivatedRoute({
|
|
138
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
139
|
+
});
|
|
140
|
+
const spectator = await createComponent();
|
|
141
|
+
expect(spectator.component).toBeTruthy();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
it('should add submit form ', async () => {
|
|
145
|
+
TestHelper.setActivatedRoute({
|
|
146
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
147
|
+
});
|
|
148
|
+
const spectator = await createComponent();
|
|
149
|
+
const service = TestBed.inject(CrmService);
|
|
150
|
+
const spy = spyOn(service, 'postOpportunities').and.callThrough();
|
|
151
|
+
spectator.typeInElement('test', 'input[formControlName="title"]');
|
|
152
|
+
spectator.typeInElement(
|
|
153
|
+
'This is a test description',
|
|
154
|
+
'textarea[formControlName="description"]'
|
|
155
|
+
);
|
|
156
|
+
spectator.typeInElement('1', 'input[formControlName="one_time_amount"]');
|
|
157
|
+
spectator.typeInElement('1', 'input[formControlName="monthly_amount"]');
|
|
158
|
+
spectator.component.form.patchValue({
|
|
159
|
+
crm_opportunity_stage_id: 1,
|
|
160
|
+
starting_at: { year: 2021, month: 7, day: 29 }
|
|
161
|
+
});
|
|
162
|
+
spectator.click(
|
|
163
|
+
'p-autocomplete[formcontrolname="crm_account_id"] button.p-autocomplete-dropdown'
|
|
164
|
+
);
|
|
165
|
+
const account = spectator.query('.p-autocomplete-panel > :first-child >:first-child');
|
|
166
|
+
spectator.click(account);
|
|
167
|
+
spectator.selectOption(
|
|
168
|
+
'select[formControlName="win_chances"]',
|
|
169
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
170
|
+
spectator.query(byText('10')) as HTMLOptionElement
|
|
171
|
+
);
|
|
172
|
+
spectator.click(
|
|
173
|
+
'p-multiSelect[formcontrolname="crm_opportunity_category_ids"] .p-multiselect-trigger'
|
|
174
|
+
);
|
|
175
|
+
spectator.click(
|
|
176
|
+
spectator.query('.p-multiselect-items-wrapper >:first-child >:nth-child(1) > li', {
|
|
177
|
+
root: true
|
|
178
|
+
})
|
|
179
|
+
);
|
|
180
|
+
spectator.click('button[type="submit"]');
|
|
181
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
it('should edit', async () => {
|
|
185
|
+
TestHelper.setActivatedRoute({
|
|
186
|
+
params: { id: 1 },
|
|
187
|
+
parent: { params: of({ slug: 'posiwise-263' }) }
|
|
188
|
+
});
|
|
189
|
+
const spectator = await createComponent();
|
|
190
|
+
const service = TestBed.inject(CrmService);
|
|
191
|
+
const spy = spyOn(service, 'updateOpportunities').and.callThrough();
|
|
192
|
+
spectator.typeInElement('test2', 'input[formControlName="title"]');
|
|
193
|
+
spectator.click('button[type="submit"]');
|
|
194
|
+
expect(spy).toHaveBeenCalledTimes(1);
|
|
195
|
+
});
|
|
196
|
+
});
|