added functions email and flag
This commit is contained in:
@@ -51,6 +51,15 @@
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="notify_function" name="notify_function" value="1">
|
||||
<label class="form-check-label" for="notify_function">
|
||||
Invia promemoria anche alla funzione selezionata
|
||||
</label>
|
||||
<div class="form-text">
|
||||
Se attivo, la mail giornaliera verrà inviata anche all’email collegata alla funzione.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<label for="dlLaw" class="form-label fw-semibold">Legge / Articolo</label>
|
||||
|
||||
@@ -36,23 +36,51 @@
|
||||
language: 'it',
|
||||
width: '100%'
|
||||
};
|
||||
$('#dlSubject').select2($.extend({}, s2Opts, { placeholder: 'Seleziona argomento...' }));
|
||||
$('#dlDepartments').select2($.extend({}, s2Opts, { placeholder: 'Seleziona reparti...' }));
|
||||
$('#dlEmployees').select2($.extend({}, s2Opts, { placeholder: 'Seleziona persone...' }));
|
||||
$('#dlFunction').select2($.extend({}, s2Opts, { placeholder: 'Seleziona funzione...' }));
|
||||
$('#dlSubject').select2($.extend({}, s2Opts, {
|
||||
placeholder: 'Seleziona argomento...'
|
||||
}));
|
||||
$('#dlDepartments').select2($.extend({}, s2Opts, {
|
||||
placeholder: 'Seleziona reparti...'
|
||||
}));
|
||||
$('#dlEmployees').select2($.extend({}, s2Opts, {
|
||||
placeholder: 'Seleziona persone...'
|
||||
}));
|
||||
$('#dlFunction').select2($.extend({}, s2Opts, {
|
||||
placeholder: 'Seleziona funzione...'
|
||||
}));
|
||||
|
||||
// --- Auto-calc due_date from document_date + recurrence ---
|
||||
var RECURRENCE_OFFSETS = {
|
||||
monthly: { months: 1 },
|
||||
quarterly: { months: 3 },
|
||||
semiannual: { months: 6 },
|
||||
annual: { years: 1 },
|
||||
biennial: { years: 2 },
|
||||
triennial: { years: 3 },
|
||||
quadriennial: { years: 4 },
|
||||
quinquennial: { years: 5 },
|
||||
decennial: { years: 10 },
|
||||
quindecennial: { years: 15 }
|
||||
monthly: {
|
||||
months: 1
|
||||
},
|
||||
quarterly: {
|
||||
months: 3
|
||||
},
|
||||
semiannual: {
|
||||
months: 6
|
||||
},
|
||||
annual: {
|
||||
years: 1
|
||||
},
|
||||
biennial: {
|
||||
years: 2
|
||||
},
|
||||
triennial: {
|
||||
years: 3
|
||||
},
|
||||
quadriennial: {
|
||||
years: 4
|
||||
},
|
||||
quinquennial: {
|
||||
years: 5
|
||||
},
|
||||
decennial: {
|
||||
years: 10
|
||||
},
|
||||
quindecennial: {
|
||||
years: 15
|
||||
}
|
||||
};
|
||||
|
||||
function computeDueDate() {
|
||||
@@ -106,6 +134,7 @@
|
||||
$('#dlDepartments').val(null).trigger('change');
|
||||
$('#dlEmployees').val(null).trigger('change');
|
||||
$('#dlFunction').val('').trigger('change');
|
||||
$('#notify_function').prop('checked', false);
|
||||
renderAttachments([]);
|
||||
modal.show();
|
||||
};
|
||||
@@ -126,6 +155,7 @@
|
||||
$('#dlSubject').val(d.subject_id || '').trigger('change');
|
||||
document.getElementById('dlTopic').value = d.topic || '';
|
||||
$('#dlFunction').val(d.function_id || '').trigger('change');
|
||||
$('#notify_function').prop('checked', Number(d.notify_function) === 1);
|
||||
document.getElementById('dlLaw').value = d.law_regulation || '';
|
||||
document.getElementById('dlRecurrence').value = d.recurrence_type || 'once';
|
||||
fpDocDate.setDate(d.document_date || null, false, 'Y-m-d');
|
||||
@@ -277,4 +307,4 @@
|
||||
window.openDeadlineEdit(autoEditId);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user