UNPKG

cluedin-widget

Version:

This is the project for creating and managing widgets in CluedIn.

108 lines (104 loc) 5.31 kB
import React, { Component } from 'react'; import config from '../config'; const locationHelper = config.location; export default class NoEntities extends Component { render() { const { entityType } = this.props; let html; let providerCrm = locationHelper.goToAppProvider( 'CRM' ); switch( entityType ) { case '/Sales/Deal': html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> To see all you latest deals in CluedIn, please add one of our CRM integration. </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={providerCrm}>Add CRM Integration</a> </div> </div>); break; case '/Task': let taskUrl = locationHelper.goToAppProvider( 'TASK' ); html = (<div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> To see all you latest tasks in CluedIn, please add one of our project management integration. </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={taskUrl}>Add Project Management Integration</a> </div> </div>); break; case '/Tool': let allProvider = locationHelper.goToAppProvider(); html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> CluedIn needs to be connected with your cloud tools, choose among our list of integrations to connect them. </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={allProvider}>Add Integration</a> </div> </div>); break; case '/Organization': html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> To see all you latest contacts and organizations in CluedIn, please add one of our CRM integration. </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={providerCrm}>Add CRM Integration</a> </div> </div>); break; case '/Issue': let providerSupport = locationHelper.goToAppProvider( 'SUPPORT' ); html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> To see all your latest tickets in CluedIn, please, add a support integration. </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={providerSupport}>Add Support Integration</a> </div> </div>); break; case '/Document/Document': let cloudFileLink = locationHelper.goToAppProvider( 'CLOUDFILE' ); html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> To see all you latest cloud files being created in your Team, please add one of our numerous cloud file integrations ( dropbox, box.net, google drive,...) </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={cloudFileLink}>Add Cloud File Integration</a> </div> </div>); break; default: let defaultLocation = locationHelper.goToAppProvider(); html = ( <div className="cluedIn_noEntities"> <div className="cluedIn_noEntities_text"> Please, add more integrations to see relevant information for this widget </div> <div className="cluedIn_noEntities_action"> <a className="cluedIn_btn cluedIn_btn-primary" href={defaultLocation}>Add Integration</a> </div> </div>); break; } return html; } };