Merge branch 'features/feature-devis-cocher-par-mois' into staging
This commit is contained in:
commit
43741dfe90
@ -90,12 +90,9 @@ $('body').on('click', '#closeDevisModal', function () {
|
||||
|
||||
$('body').on('click', '#cocher', function () {
|
||||
var selectedMonth = document.getElementById("monthSelect").value;
|
||||
var yearMonth = selectedMonth.split('-');
|
||||
var selectedYear = parseInt(yearMonth[0]);
|
||||
var selectedMonthValue = parseInt(yearMonth[1]);
|
||||
var currentYear = new Date().getFullYear();
|
||||
|
||||
var oTable = $('.tabledt').DataTable();
|
||||
|
||||
var rowcollection = oTable.$(".devisToFacture", {"page": "all"}).toArray();
|
||||
|
||||
oTable.$(".devisToFacture").prop('checked', false);
|
||||
@ -109,8 +106,7 @@ $('body').on('click', '#cocher', function () {
|
||||
var rowDate = new Date(dateText);
|
||||
var rowYear = rowDate.getFullYear();
|
||||
var rowMonth = rowDate.getMonth() + 1;
|
||||
|
||||
if (rowYear === selectedYear && rowMonth === selectedMonthValue) {
|
||||
if (rowYear === currentYear && rowMonth === parseInt(selectedMonth)) {
|
||||
var checkbox = $(inputElem).closest("tr").find('.devisToFacture');
|
||||
checkbox.prop('checked', true);
|
||||
devisToSelect.push(checkbox.val());
|
||||
@ -129,3 +125,5 @@ $('body').on('click', '#cocher', function () {
|
||||
|
||||
$('#cocherparmois').hide();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -69,14 +69,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="cocherparmois" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Choisir le mois de facturation souhaitée</h5>
|
||||
<h5 class="modal-title">Choisir le mois de facturation souhaitée</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="month" id="monthSelect">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<select class="form-select w-auto" name="month" id="monthSelect">
|
||||
<option value="1">Janvier</option>
|
||||
<option value="2">Février</option>
|
||||
<option value="3">Mars</option>
|
||||
<option value="4">Avril</option>
|
||||
<option value="5">Mai</option>
|
||||
<option value="6">Juin</option>
|
||||
<option value="7">Juillet</option>
|
||||
<option value="8">Août</option>
|
||||
<option value="9">Septembre</option>
|
||||
<option value="10">Octobre</option>
|
||||
<option value="11">Novembre</option>
|
||||
<option value="12">Décembre</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="closeDevisModal" type="button" class="btn btn-secondary">Annuler</button>
|
||||
@ -86,3 +102,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user