src/main/resources/static/js/viewController.js
/**
 * - RECEIVE OPTION-FILTER AND SHOW YOUT INPUT
 * @param {HTMLSelectElement} element 
 */
- RECEIVE OPTION-FILTER AND SHOW YOUT INPUT
@param {HTMLSelectElement} element
- RECEIVE OPTION - FILTER AND SHOW YOUT INPUT @param { HTMLSelectElement } element
function changeFilterRelatorio(element)
{
    let form = element.parentElement;
    let selectedOption = form.getElementsByTagName("select")[0].value;
    let inputPedidoId = form.getElementsByClassName("numero-filter");
    let inputsDate = form.getElementsByClassName("periodo-filter");
    if(selectedOption === "IDPEDIDO" || selectedOption === "ITEMID")
    {
        alterVisibilityFilter(inputsDate, inputPedidoId, false);
        let clearBtnDatePickers = document.getElementsByClassName("clear-btn");
        clearBtnDatePickers[0].click();
        clearBtnDatePickers[1].click();
    }
    else if(selectedOption === "PERIODO")
    {
        alterVisibilityFilter(inputPedidoId, inputsDate, false);
    }
    else if(selectedOption == "PERIODO_AND_ITEMID")
    {
        alterVisibilityFilter(inputPedidoId, inputsDate, true);
    }
}
function changeFilterRelatorio ( element ) { let form = element . parentElement ; let selectedOption = form . getElementsByTagName ( "select" ) [ 0 ] . value ; let inputPedidoId = form . getElementsByClassName ( "numero-filter" ) ; let inputsDate = form . getElementsByClassName ( "periodo-filter" ) ; if ( selectedOption === "IDPEDIDO" || selectedOption === "ITEMID" ) { alterVisibilityFilter ( inputsDate , inputPedidoId , false ) ; let clearBtnDatePickers = document . getElementsByClassName ( "clear-btn" ) ; clearBtnDatePickers [ 0 ] . click ( ) ; clearBtnDatePickers [ 1 ] . click ( ) ; } else if ( selectedOption === "PERIODO" ) { alterVisibilityFilter ( inputPedidoId , inputsDate , false ) ; } else if ( selectedOption == "PERIODO_AND_ITEMID" ) { alterVisibilityFilter ( inputPedidoId , inputsDate , true ) ; } }
- RECEIVE OPTION-FILTER AND SHOW YOUT INPUT
 @param {HTMLSelectElement} element
- RECEIVE OPTION - FILTER AND SHOW YOUT INPUT @param { HTMLSelectElement } element
// Fixed bug clearDate