aephidayatuloh
commited on
Commit
·
37f141e
1
Parent(s):
9874742
upd: re-design layout
Browse files
app.R
CHANGED
|
@@ -34,25 +34,27 @@ ui <- fluidPage(
|
|
| 34 |
choices = list("Tanggal" = "tanggal", "Karbohidrat" = "karbo", "Protein Hewani" = "protein_hewani", "Protein Nabati" = "protein_nabati", "Buah/Sayur" = "buah_sayur", "Lemak Tambahan" = "lemak_tambahan", "Camilan" = "camilan", "Gejala Alergi" = "gejala")),
|
| 35 |
conditionalPanel("input.komponen == 'tanggal'",
|
| 36 |
div(style="display:flex;margin:auto 0px;",
|
| 37 |
-
column(1,
|
| 38 |
-
actionButton("prev", "<")
|
| 39 |
-
),
|
| 40 |
-
column(1,
|
| 41 |
-
airDatepickerInput("cari_date", NULL, width = "100%", value = Sys.Date())
|
| 42 |
-
),
|
| 43 |
-
column(1,
|
| 44 |
-
actionButton("nex", ">")
|
| 45 |
-
)
|
| 46 |
),
|
| 47 |
-
column(12,
|
| 48 |
-
|
| 49 |
-
|
|
|
|
|
|
|
| 50 |
),
|
| 51 |
conditionalPanel("input.komponen != 'tanggal'",
|
| 52 |
textInput("keyword", "Kata kunci", width = "100%"),
|
| 53 |
-
column(12,
|
| 54 |
uiOutput("out_cari_komponen")
|
| 55 |
-
)
|
| 56 |
)
|
| 57 |
)
|
| 58 |
)
|
|
@@ -144,8 +146,8 @@ server <- function(input, output, session){
|
|
| 144 |
h4(cari_menu$camilan, style="margin: 5px 0px 20px;"),
|
| 145 |
# br(),
|
| 146 |
h5("Gejala Alergi"),
|
| 147 |
-
h4(cari_menu$gejala, style="margin: 5px 0px 20px;color: red;")
|
| 148 |
-
br()
|
| 149 |
)
|
| 150 |
}
|
| 151 |
})
|
|
@@ -168,10 +170,13 @@ server <- function(input, output, session){
|
|
| 168 |
|
| 169 |
output$out_history <- renderUI({
|
| 170 |
if(ncol(cari_history()) == 1 | input$keyword == "" | nrow(history()) == 0){
|
| 171 |
-
|
|
|
|
|
|
|
| 172 |
} else if(ncol(cari_history()) >= 1){
|
| 173 |
tagList(
|
| 174 |
-
|
|
|
|
| 175 |
h4(format(as.Date(history()$tanggal), "%d %b %Y"), style="margin: 5px 0px 20px;"),
|
| 176 |
# br(),
|
| 177 |
h5("Karbohidrat"),
|
|
@@ -193,8 +198,9 @@ server <- function(input, output, session){
|
|
| 193 |
h4(history()$camilan, style="margin: 5px 0px 20px;"),
|
| 194 |
# br(),
|
| 195 |
h5("Gejala Alergi"),
|
| 196 |
-
h4(history()$gejala, style="margin: 5px 0px 20px;color: red;")
|
| 197 |
-
br()
|
|
|
|
| 198 |
|
| 199 |
)
|
| 200 |
}
|
|
@@ -206,23 +212,24 @@ server <- function(input, output, session){
|
|
| 206 |
} else if(nrow(cari_history()) > 1){
|
| 207 |
tagList(
|
| 208 |
div(style="display:flex;margin:auto 0px;",
|
| 209 |
-
column(1,
|
| 210 |
-
actionButton("prev_history", "<")
|
| 211 |
-
),
|
| 212 |
-
column(10,
|
| 213 |
airDatepickerInput("history_date", NULL, width = "100%",
|
| 214 |
-
value = min(cari_history()$tanggal))
|
| 215 |
-
),
|
| 216 |
-
column(1,
|
| 217 |
-
actionButton("nex_history", ">")
|
| 218 |
-
)
|
| 219 |
),
|
| 220 |
uiOutput("out_history")
|
| 221 |
)
|
| 222 |
|
| 223 |
} else {
|
| 224 |
tagList(
|
| 225 |
-
|
|
|
|
| 226 |
h4(format(as.Date(cari_history()$tanggal), "%d %b %Y"), style="margin: 5px 0px 20px;"),
|
| 227 |
# br(),
|
| 228 |
h5("Karbohidrat"),
|
|
@@ -244,8 +251,9 @@ server <- function(input, output, session){
|
|
| 244 |
h4(cari_history()$camilan, style="margin: 5px 0px 20px;"),
|
| 245 |
# br(),
|
| 246 |
h5("Gejala Alergi"),
|
| 247 |
-
h4(cari_history()$gejala, style="margin: 5px 0px 20px;color: red;")
|
| 248 |
-
br()
|
|
|
|
| 249 |
)
|
| 250 |
}
|
| 251 |
|
|
|
|
| 34 |
choices = list("Tanggal" = "tanggal", "Karbohidrat" = "karbo", "Protein Hewani" = "protein_hewani", "Protein Nabati" = "protein_nabati", "Buah/Sayur" = "buah_sayur", "Lemak Tambahan" = "lemak_tambahan", "Camilan" = "camilan", "Gejala Alergi" = "gejala")),
|
| 35 |
conditionalPanel("input.komponen == 'tanggal'",
|
| 36 |
div(style="display:flex;margin:auto 0px;",
|
| 37 |
+
# column(1,
|
| 38 |
+
actionButton("prev", "<", style="width:5rem;height:3.4rem;"),
|
| 39 |
+
# ),
|
| 40 |
+
# column(1,
|
| 41 |
+
airDatepickerInput("cari_date", NULL, width = "100%", value = Sys.Date()),
|
| 42 |
+
# ),
|
| 43 |
+
# column(1,
|
| 44 |
+
actionButton("nex", ">", style="width:5rem;height:3.4rem;")
|
| 45 |
+
# )
|
| 46 |
),
|
| 47 |
+
# column(12,
|
| 48 |
+
wellPanel(style="background-color:transparent;",
|
| 49 |
+
uiOutput("out_cari_tgl")
|
| 50 |
+
)
|
| 51 |
+
# )
|
| 52 |
),
|
| 53 |
conditionalPanel("input.komponen != 'tanggal'",
|
| 54 |
textInput("keyword", "Kata kunci", width = "100%"),
|
| 55 |
+
# column(12,
|
| 56 |
uiOutput("out_cari_komponen")
|
| 57 |
+
# )
|
| 58 |
)
|
| 59 |
)
|
| 60 |
)
|
|
|
|
| 146 |
h4(cari_menu$camilan, style="margin: 5px 0px 20px;"),
|
| 147 |
# br(),
|
| 148 |
h5("Gejala Alergi"),
|
| 149 |
+
h4(cari_menu$gejala, style="margin: 5px 0px 20px;color: red;")#,
|
| 150 |
+
# br()
|
| 151 |
)
|
| 152 |
}
|
| 153 |
})
|
|
|
|
| 170 |
|
| 171 |
output$out_history <- renderUI({
|
| 172 |
if(ncol(cari_history()) == 1 | input$keyword == "" | nrow(history()) == 0){
|
| 173 |
+
wellPanel(style="background-color:transparent;",
|
| 174 |
+
p("Tidak ada data", style="text-align: center;")
|
| 175 |
+
)
|
| 176 |
} else if(ncol(cari_history()) >= 1){
|
| 177 |
tagList(
|
| 178 |
+
wellPanel(style="background-color:transparent;",
|
| 179 |
+
h5("Tanggal"),
|
| 180 |
h4(format(as.Date(history()$tanggal), "%d %b %Y"), style="margin: 5px 0px 20px;"),
|
| 181 |
# br(),
|
| 182 |
h5("Karbohidrat"),
|
|
|
|
| 198 |
h4(history()$camilan, style="margin: 5px 0px 20px;"),
|
| 199 |
# br(),
|
| 200 |
h5("Gejala Alergi"),
|
| 201 |
+
h4(history()$gejala, style="margin: 5px 0px 20px;color: red;")#,
|
| 202 |
+
# br()
|
| 203 |
+
)
|
| 204 |
|
| 205 |
)
|
| 206 |
}
|
|
|
|
| 212 |
} else if(nrow(cari_history()) > 1){
|
| 213 |
tagList(
|
| 214 |
div(style="display:flex;margin:auto 0px;",
|
| 215 |
+
# column(1,
|
| 216 |
+
actionButton("prev_history", "<", style="width:5rem;height:3.4rem;"),
|
| 217 |
+
# ),
|
| 218 |
+
# column(10,
|
| 219 |
airDatepickerInput("history_date", NULL, width = "100%",
|
| 220 |
+
value = min(cari_history()$tanggal)),
|
| 221 |
+
# ),
|
| 222 |
+
# column(1,
|
| 223 |
+
actionButton("nex_history", ">", style="width:5rem;height:3.4rem;")
|
| 224 |
+
# )
|
| 225 |
),
|
| 226 |
uiOutput("out_history")
|
| 227 |
)
|
| 228 |
|
| 229 |
} else {
|
| 230 |
tagList(
|
| 231 |
+
wellPanel(style="background-color:transparent;",
|
| 232 |
+
h5("Tanggal"),
|
| 233 |
h4(format(as.Date(cari_history()$tanggal), "%d %b %Y"), style="margin: 5px 0px 20px;"),
|
| 234 |
# br(),
|
| 235 |
h5("Karbohidrat"),
|
|
|
|
| 251 |
h4(cari_history()$camilan, style="margin: 5px 0px 20px;"),
|
| 252 |
# br(),
|
| 253 |
h5("Gejala Alergi"),
|
| 254 |
+
h4(cari_history()$gejala, style="margin: 5px 0px 20px;color: red;")#,
|
| 255 |
+
# br()
|
| 256 |
+
)
|
| 257 |
)
|
| 258 |
}
|
| 259 |
|