aephidayatuloh
commited on
Commit
·
fc8ce0a
1
Parent(s):
7d8eda3
upd: change actionbutton edit page width
Browse files
app.R
CHANGED
|
@@ -66,7 +66,8 @@ ui <- fluidPage(
|
|
| 66 |
dateInput("edit_tgl_gejala", "Tanggal Terjadi Gejala", width = "100%"),
|
| 67 |
textInput("edit_gejala", "Gejala Alergi", width = "100%"),
|
| 68 |
dateInput("edit_tanggal", "Tanggal Pemberian MPASI", width = "100%"),
|
| 69 |
-
actionButton("update_edit", "Update", icon = icon("paper-plane")
|
|
|
|
| 70 |
)
|
| 71 |
)
|
| 72 |
|
|
@@ -85,7 +86,7 @@ server <- function(input, output, session){
|
|
| 85 |
callbackR = function(x){
|
| 86 |
if(x != FALSE){
|
| 87 |
shinyalert(text = "Menyimpan data ...", type = "info", showConfirmButton = FALSE, closeOnEsc = FALSE, closeOnClickOutside = FALSE)
|
| 88 |
-
tgl_gejala <-
|
| 89 |
|
| 90 |
# source("dbconnect.R")
|
| 91 |
# query <- glue("INSERT INTO public.menu (id_parent, id_anak, tanggal, karbo, protein_hewani, protein_nabati, buah_sayur, lemak_tambahan, camilan, gejala, tgl_gejala, created_date)
|
|
|
|
| 66 |
dateInput("edit_tgl_gejala", "Tanggal Terjadi Gejala", width = "100%"),
|
| 67 |
textInput("edit_gejala", "Gejala Alergi", width = "100%"),
|
| 68 |
dateInput("edit_tanggal", "Tanggal Pemberian MPASI", width = "100%"),
|
| 69 |
+
actionButton("update_edit", "Update", icon = icon("paper-plane"), width = "100%")
|
| 70 |
+
)
|
| 71 |
)
|
| 72 |
)
|
| 73 |
|
|
|
|
| 86 |
callbackR = function(x){
|
| 87 |
if(x != FALSE){
|
| 88 |
shinyalert(text = "Menyimpan data ...", type = "info", showConfirmButton = FALSE, closeOnEsc = FALSE, closeOnClickOutside = FALSE)
|
| 89 |
+
tgl_gejala <- if_else(input$gejala %in% c(NA, NULL, "", "-"), NA , as.Date(input$tgl_gejala))
|
| 90 |
|
| 91 |
# source("dbconnect.R")
|
| 92 |
# query <- glue("INSERT INTO public.menu (id_parent, id_anak, tanggal, karbo, protein_hewani, protein_nabati, buah_sayur, lemak_tambahan, camilan, gejala, tgl_gejala, created_date)
|