fixed bug - v1.1 release

This commit is contained in:
friedemann.blume 2024-01-12 22:56:11 +01:00
parent f61c0bc375
commit 2b991c3ebf
1 changed files with 6 additions and 5 deletions

View File

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