-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.R
57 lines (44 loc) · 1.38 KB
/
app.R
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
tictoc::toc()
source(here::here("02_source", "utility.R"))
source(here::here("02_source", "crud_modules.R"))
source(here::here("02_source", "calendar_modules.R"))
source(here::here("02_source", "dashboard_modules.R"))
# UI ====================================
## Header --------------------------------
header <- dashboardHeader(title = "WNBA Dashboard")
## Sidebar -------------------------------
sidebar <- dashboardSidebar(
sidebarMenu(
menuItem(text = "Dashboard",icon = icon('chart-simple'),tabName = 'dashboard'),
menuItem(text = "Calendar",icon = icon('calendar'), tabName = 'calendar'),
menuItem(text = "Manage Data",icon = icon('wrench'), tabName = 'crud')
)
)
## Body ----------------------------------
body <- dashboardBody(
tabItems(
### Calling module UI functions ----------------------------
dashboard_ui("dashboard"),
calendar_ui("calendar"),
crud_ui("crud")
)
)
## UI Consolidated -----------------------
ui <- dashboardPage(
## calling UI components
header = header,
sidebar = sidebar,
body = body
)
# Server ==================================
server <- function(input, output, session) {
## calling module server functions
dashboard_server("dashboard")
calendar_server("calendar")
crud_server("crud")
print(session$user)
## Menu -----------------------
output$menu <- renderMenu({
})
}
shinyApp(ui, server)