An error occurred while loading the file. Please try again.
-
Dorchies David authored13aefa2a
#' Check if the monthly time sheet can be validated
#'
#' Function used by [fdt_valid] before validation attempt.
#'
#' @inheritParams fdt_valid
#'
#' @return [logical] `TRUE` if the time sheet is ready for validation, `FALSE` otherwise
#' @export
#'
#' @examples
#' \dontrun{
#' library(hatata)
#' session <- login("pnom", "my_password")
#' fdt_valid(session, "15/04/2021")
#' }
fdt_isValidable <- function(session, date_validation) {
session <- jump_to_pointage(session, date = date_validation)
is.na(session %>% rvest::html_node(xpath = "//div[@id=\"edition_en_masse\"]/button") %>%
rvest::html_attr(name = "disabled"))
}