Hi everyone!
We embed a custom Angular Web-phone inside the standard Communication Panel. The panel must be expanded right after user login and on every page reload, otherwise the phone widget cannot initialise incoming/outgoing calls.
- Is there an out-of-the-box way to auto-expand the Communication Panel right after user authorization (and after every reload)?
- Is there any supported API to programmatically open the panel from a custom Angular component located on the same page? (when the component receives a call we have to reopen the communication panel)
Any best-practice, hints or code snippets would be highly appreciated. Thanks!
Like
You can fire a "crt.OpenSidebarRequest" request and provide the code of the sidebar to indicate which sidebar to open.
handlerChain.process({ type: 'crt.OpenSidebarRequest', sidebarCode: SOME_SIDEBAR_CODE, $context: {} });
You can see this request plus others related to the sidebar here: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/platform-customization/freedom-ui/sidebar/overview
Ryan
Ryan Farley,
Hi Ryan, Thanks a lot. Now I can open the sidebar page when I get a call from the component. But one more question remains: how can I make the sibebar page opened after reloading page and after login in system? I didn`t find the answer in Creatio academy
To do something like that you might need to either override the MainShell or MainHeaderSchema so that on initialize you send the request to open it (might need to use a setTimeout to delay and make sure the UI is all loaded)
To override the MailShell you'll need to enable the feature that allows you to override angular schemas - see this thread: https://community.creatio.com/questions/how-create-replacing-schema-freedom-ui-basepagetemplate
Ryan