added functions email and flag

This commit is contained in:
2026-06-11 10:20:46 +02:00
parent 33b627f328
commit fdde16b113
5 changed files with 213 additions and 25 deletions
@@ -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>