fixed scadenziario new field, dpi, dpi trash

This commit is contained in:
2026-07-16 12:05:37 +02:00
parent 1ef6cca149
commit 4e61426be7
8 changed files with 186 additions and 18 deletions
@@ -20,6 +20,7 @@ try {
$notification_days = isset($_POST['notification_days']) && is_numeric($_POST['notification_days']) ? (int)$_POST['notification_days'] : 7;
$storage_location = trim($_POST['storage_location'] ?? '') ?: null;
$notes = trim($_POST['notes'] ?? '') ?: null;
$variazioni = trim($_POST['variazioni'] ?? '') ?: null;
$employee_ids = $_POST['employee_ids'] ?? [];
$department_names = $_POST['department_names'] ?? [];
@@ -56,7 +57,7 @@ try {
UPDATE scad_deadlines SET
subject_id = ?, function_id = ?, notify_function = ?, topic = ?, law_regulation = ?, recurrence_type = ?,
due_date = ?, check_date = ?, document_date = ?, notification_days = ?,
storage_location = ?, notes = ?, departments = ?
storage_location = ?, notes = ?, variazioni = ?, departments = ?
WHERE id = ?
");
$stmt->execute([
@@ -72,6 +73,7 @@ try {
$notification_days,
$storage_location,
$notes,
$variazioni,
$departmentsStr,
$id
]);
@@ -89,8 +91,8 @@ try {
$stmt = $pdo->prepare("
INSERT INTO scad_deadlines
(subject_id, function_id, notify_function, topic, law_regulation, recurrence_type, due_date, check_date,
document_date, notification_days, storage_location, notes, created_by, departments)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
document_date, notification_days, storage_location, notes, variazioni, created_by, departments)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
");
$stmt->execute([
$subject_id,
@@ -105,6 +107,7 @@ try {
$notification_days,
$storage_location,
$notes,
$variazioni,
$currentUserId,
$departmentsStr
]);
@@ -146,6 +146,10 @@
<label for="dlNotes" class="form-label fw-semibold">Note</label>
<textarea class="form-control" id="dlNotes" name="notes" rows="3" placeholder="es. Scadenza 09/06/2026, Attività in appalto a Ditta specializzata..."></textarea>
</div>
<div class="col-12">
<label for="dlVariazioni" class="form-label fw-semibold">In caso di variazioni</label>
<textarea class="form-control" id="dlVariazioni" name="variazioni" rows="3" placeholder="es. In caso di variazioni normative, aggiornare la procedura..."></textarea>
</div>
</div>
<!-- Group 5: Allegati -->
@@ -155,7 +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);
$('#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');
@@ -164,6 +164,7 @@
document.getElementById('dlNotifDays').value = d.notification_days || 7;
document.getElementById('dlStorage').value = d.storage_location || '';
document.getElementById('dlNotes').value = d.notes || '';
document.getElementById('dlVariazioni').value = d.variazioni || '';
document.getElementById('dlFiles').value = '';
document.getElementById('modalTitle').textContent = 'Modifica Scadenza';
$('#dlDepartments').val(d.department_names || []).trigger('change');
+1
View File
@@ -941,6 +941,7 @@ function getContrastTextColor($hexColor)
<?php if ((int)$row['attachment_count'] > 0): ?>
<span><i class="fa-solid fa-paperclip"></i> <?= (int)$row['attachment_count'] ?></span>
<?php endif; ?>
</div>
<?php if (!$row['_isCompleted']): ?>
<div class="card-actions">