Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

actions.ts 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { IStore } from '../app/types';
  2. import { openDialog } from '../base/dialog/actions';
  3. import { hideNotification, showNotification } from '../notifications/actions';
  4. import {
  5. NOTIFICATION_TIMEOUT_TYPE,
  6. NOTIFICATION_TYPE,
  7. SALESFORCE_LINK_NOTIFICATION_ID
  8. } from '../notifications/constants';
  9. import { SalesforceLinkDialog } from './components';
  10. import { isSalesforceEnabled } from './functions';
  11. /**
  12. * Displays the notification for linking the meeting to Salesforce.
  13. *
  14. * @returns {void}
  15. */
  16. export function showSalesforceNotification() {
  17. return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
  18. if (!isSalesforceEnabled(getState())) {
  19. return;
  20. }
  21. dispatch(showNotification({
  22. descriptionKey: 'notify.linkToSalesforceDescription',
  23. titleKey: 'notify.linkToSalesforce',
  24. uid: SALESFORCE_LINK_NOTIFICATION_ID,
  25. customActionNameKey: [ 'notify.linkToSalesforceKey' ],
  26. customActionHandler: [ () => {
  27. dispatch(hideNotification(SALESFORCE_LINK_NOTIFICATION_ID));
  28. dispatch(openDialog(SalesforceLinkDialog));
  29. } ],
  30. appearance: NOTIFICATION_TYPE.NORMAL
  31. }, NOTIFICATION_TIMEOUT_TYPE.LONG));
  32. };
  33. }