-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Expand file tree
/
Copy pathapp.py
More file actions
31 lines (26 loc) · 977 Bytes
/
app.py
File metadata and controls
31 lines (26 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from dash import Dash, html, dcc, Input, Output
import dash_bootstrap_components as dbc
from pages import opportunities, cases, leads
from constants import salesforce_manager
from utils.components import Header
app = Dash(
__name__,
external_stylesheets=[dbc.themes.QUARTZ],
title="CRM Salesforce"
)
server = app.server
app.layout = dbc.Container([
Header(app),
dbc.Tabs([
dbc.Tab(opportunities.layout, label="Opportunities"),
dbc.Tab(leads.layout, label="Leads"),
dbc.Tab(cases.layout, label="Cases"),
]),
dcc.Store(id="opportunities_df", data=salesforce_manager.get_opportunities().to_json(orient="split")),
dcc.Store(id="leads_df", data=salesforce_manager.get_leads().to_json(orient="split")),
dcc.Store(id="cases_df", data=salesforce_manager.get_cases().to_json(orient="split")),
],
fluid=True,
)
if __name__ == "__main__":
app.run_server(debug=True)