fixed bug - v1.1 release
This commit is contained in:
parent
f61c0bc375
commit
2b991c3ebf
11
eprilog.r
11
eprilog.r
|
@ -71,8 +71,8 @@ ui <- navbarPage("EpriLog",
|
||||||
sidebarPanel(
|
sidebarPanel(
|
||||||
h2('Add New Coffees'),
|
h2('Add New Coffees'),
|
||||||
textInput("brandName", "Brand Name", value = ""),
|
textInput("brandName", "Brand Name", value = ""),
|
||||||
textInput("coffeeName", "Coffee Name", value = ""),
|
textInput("coffeeNameNew", "Coffee Name", value = ""),
|
||||||
textInput("alias", "Nick Name", value = ""),
|
textInput("aliasNew", "Nick Name", value = ""),
|
||||||
dateInput("expDate", "Expiration Date"),
|
dateInput("expDate", "Expiration Date"),
|
||||||
numericInput("arabicaPercentage", "Arabica Percentage", value = "50"),
|
numericInput("arabicaPercentage", "Arabica Percentage", value = "50"),
|
||||||
numericInput("robustaPercentage", "Robusta Percentage", value = "50"),
|
numericInput("robustaPercentage", "Robusta Percentage", value = "50"),
|
||||||
|
@ -132,6 +132,7 @@ server <- function(input, output, session){
|
||||||
|
|
||||||
# save changes to .csv file
|
# save changes to .csv file
|
||||||
write.csv(brews, file = "./data/brews.csv")
|
write.csv(brews, file = "./data/brews.csv")
|
||||||
|
showNotification("New Record added.")
|
||||||
session$reload()
|
session$reload()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -157,8 +158,8 @@ server <- function(input, output, session){
|
||||||
# inserting new row
|
# inserting new row
|
||||||
coffees[nrow(coffees) + 1, 1] <- newID
|
coffees[nrow(coffees) + 1, 1] <- newID
|
||||||
coffees[nrow(coffees), 2] <- input$brandName
|
coffees[nrow(coffees), 2] <- input$brandName
|
||||||
coffees[nrow(coffees), 3] <- input$coffeeName
|
coffees[nrow(coffees), 3] <- input$coffeeNameNew
|
||||||
coffees[nrow(coffees), 4] <- input$alias
|
coffees[nrow(coffees), 4] <- input$aliasNew
|
||||||
coffees[nrow(coffees), 5] <- input$expDate
|
coffees[nrow(coffees), 5] <- input$expDate
|
||||||
coffees[nrow(coffees), 6] <- input$arabicaPercentage
|
coffees[nrow(coffees), 6] <- input$arabicaPercentage
|
||||||
coffees[nrow(coffees), 7] <- input$robustaPercentage
|
coffees[nrow(coffees), 7] <- input$robustaPercentage
|
||||||
|
@ -171,7 +172,7 @@ server <- function(input, output, session){
|
||||||
# save changes to .csv file
|
# save changes to .csv file
|
||||||
write.csv(coffees, file = "./data/coffees.csv")
|
write.csv(coffees, file = "./data/coffees.csv")
|
||||||
showNotification("New Coffee added.")
|
showNotification("New Coffee added.")
|
||||||
#session$reload()
|
session$reload()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue