fix front
This commit is contained in:
parent
5bd38a465f
commit
38f53ae91e
@ -20,10 +20,10 @@
|
||||
<p class="mb-0">Дата конца:</p>
|
||||
<input id="date-to-input" class="form-control" type="date" />
|
||||
</div>
|
||||
<button id="generate-button" class="button-primary text-button mb-2">
|
||||
<button id="generate-button" class="btn btn-primary mb-2">
|
||||
Показать
|
||||
</button>
|
||||
<button id="send-by-mail-button" class="btn btn-primary text-button mb-2">
|
||||
<button id="send-by-mail-button" class="btn btn-primary mb-2">
|
||||
На почту
|
||||
</button>
|
||||
</div>
|
||||
@ -34,7 +34,7 @@
|
||||
<span> по </span>
|
||||
<span id="date-to-span" class="fw-bold">...</span>
|
||||
</p>
|
||||
<div class="table-shell mb-2 border">
|
||||
<div class="mb-2 border">
|
||||
<table class="table mb-0">
|
||||
<thead class="table-head">
|
||||
<tr>
|
||||
@ -106,14 +106,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
dateFromInput.addEventListener("input", () => {
|
||||
errorDivShell.style.gridTemplateRows = "0fr";
|
||||
});
|
||||
|
||||
dateToInput.addEventListener("input", () => {
|
||||
errorDivShell.style.gridTemplateRows = "0fr";
|
||||
});
|
||||
|
||||
// ![Event listeners]
|
||||
|
||||
// [HTML gen]
|
||||
@ -169,17 +161,14 @@
|
||||
|
||||
const validate = function (reportModel) {
|
||||
if (isNaN(reportModel["DateFrom"])) {
|
||||
errorDivShell.style.gridTemplateRows = "1fr";
|
||||
errorP.innerHTML = "Выберите начальную дату";
|
||||
return false;
|
||||
}
|
||||
if (isNaN(reportModel["DateTo"])) {
|
||||
errorDivShell.style.gridTemplateRows = "1fr";
|
||||
errorP.innerHTML = "Выберите конечную дату";
|
||||
return false;
|
||||
}
|
||||
if (reportModel["DateFrom"] >= reportModel["DateTo"]) {
|
||||
errorDivShell.style.gridTemplateRows = "1fr";
|
||||
errorP.innerHTML = "Начальная дата должна быть меньше конечной";
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user