fixed country client and parts column matrice
This commit is contained in:
parent
29e4b41874
commit
218fc14462
@ -1084,7 +1084,7 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
clientData.forEach(client => {
|
||||
const nome = client.Nominativo || "Nome non disponibile";
|
||||
const id = client.IdCliente || "ID non disponibile";
|
||||
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
|
||||
const option = new Option(`${nome.trim()} - ${client.CodiceNazioneFatturazione} (ID: ${id})`, id);
|
||||
if (parseInt(id) === parseInt(<?php echo json_encode($default_idclient ?? 0); ?>)) {
|
||||
option.selected = true;
|
||||
}
|
||||
@ -1116,7 +1116,7 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
clientData.forEach(client => {
|
||||
const nome = client.Nominativo || "Nome non disponibile";
|
||||
const id = client.IdCliente || "ID non disponibile";
|
||||
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
|
||||
const option = new Option(`${nome.trim()} - ${client.CodiceNazioneFatturazione} (ID: ${id})`, id);
|
||||
if (String(id) === String(currentValue)) {
|
||||
option.selected = true;
|
||||
}
|
||||
@ -1347,7 +1347,9 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
clientData.forEach(client => {
|
||||
const nome = client.Nominativo || "Nome non disponibile";
|
||||
const id = client.IdCliente || "ID non disponibile";
|
||||
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
|
||||
const codice = (client.CodiceNazioneFatturazione || '').trim();
|
||||
const option = new Option(`${nome.trim()} - ${codice} (ID: ${id})`, id);
|
||||
|
||||
if (parseInt(id) === parseInt(<?php echo json_encode($default_idclient ?? 0); ?>)) {
|
||||
option.selected = true;
|
||||
}
|
||||
@ -1377,7 +1379,9 @@ foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $row) {
|
||||
clientData.forEach(client => {
|
||||
const nome = client.Nominativo || "Nome non disponibile";
|
||||
const id = client.IdCliente || "ID non disponibile";
|
||||
const option = new Option(`${nome.trim()} (ID: ${id})`, id);
|
||||
const codice = (client.CodiceNazioneFatturazione || '').trim();
|
||||
const option = new Option(`${nome.trim()} - ${codice} (ID: ${id})`, id);
|
||||
|
||||
if (String(id) === String(currentValue)) {
|
||||
option.selected = true;
|
||||
}
|
||||
|
||||
@ -13,13 +13,13 @@ if (session_status() == PHP_SESSION_NONE) {
|
||||
}
|
||||
|
||||
// Imposta variabili di sessione di default per evitare errori
|
||||
$_SESSION['iduserlogin'] = null; // Nessun utente loggato
|
||||
$_SESSION['iduserlogin'] = '1'; // Nessun utente loggato
|
||||
$_SESSION['nameuser'] = 'Ospite';
|
||||
$_SESSION['surnameuser'] = '';
|
||||
$_SESSION['emailuser'] = '';
|
||||
$_SESSION['photouser'] = '';
|
||||
$photouser = $_SESSION['photouser'];
|
||||
$photousername = '';
|
||||
|
||||
$iduserlogin = $_SESSION['iduserlogin'];
|
||||
// Include file di lingua, se necessario
|
||||
require_once(__DIR__ . '/../../languages/en/general.php');
|
||||
|
||||
@ -143,172 +143,215 @@
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* --- Base --- */
|
||||
#partsModal {
|
||||
z-index: 1060 !important;
|
||||
z-index: 1060 !important
|
||||
}
|
||||
|
||||
#partsModal .modal-backdrop {
|
||||
z-index: 1055 !important;
|
||||
z-index: 1055 !important
|
||||
}
|
||||
|
||||
#partsModal .modal-content {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
max-width: 100% !important
|
||||
}
|
||||
|
||||
/* Tabelle */
|
||||
#partsTable tr {
|
||||
display: table-row !important;
|
||||
display: table-row !important
|
||||
}
|
||||
|
||||
#partsTable tr:hover {
|
||||
background-color: #f5f5f5;
|
||||
display: table-row !important;
|
||||
background: #f5f5f5
|
||||
}
|
||||
|
||||
#partsTable td,
|
||||
#partsTable th {
|
||||
padding: 0.2rem;
|
||||
vertical-align: middle;
|
||||
padding: .2rem;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
#partsTable input,
|
||||
#partsTable select {
|
||||
height: 24px;
|
||||
padding: 0.1rem 0.3rem;
|
||||
padding: .1rem .3rem
|
||||
}
|
||||
|
||||
#partsTable button {
|
||||
padding: 0.1rem 0.3rem;
|
||||
margin: 0 2px;
|
||||
padding: .1rem .3rem;
|
||||
margin: 0 2px
|
||||
}
|
||||
|
||||
#partsTable i {
|
||||
font-size: 0.6rem !important;
|
||||
font-size: .6rem !important
|
||||
}
|
||||
|
||||
#global-matrice,
|
||||
.part-matrice,
|
||||
/* --- Larghezze fisse header --- */
|
||||
/* MacroMatrici = 250px */
|
||||
#macro-matrice-filter {
|
||||
width: 100% !important;
|
||||
min-width: 100% !important;
|
||||
width: 250px !important;
|
||||
min-width: 250px !important;
|
||||
max-width: 250px !important;
|
||||
flex: 0 0 250px !important;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2-container--default #global-matrice {
|
||||
width: 350px !important;
|
||||
#macro-matrice-filter.select2-hidden-accessible+.select2 {
|
||||
width: 250px !important;
|
||||
min-width: 250px !important;
|
||||
max-width: 250px !important;
|
||||
flex: 0 0 250px !important;
|
||||
}
|
||||
|
||||
#macro-matrice-filter.select2-hidden-accessible+.select2 .select2-selection__rendered {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Matrice globale = 450px */
|
||||
#global-matrice {
|
||||
width: 450px !important;
|
||||
min-width: 450px !important;
|
||||
max-width: 450px !important;
|
||||
flex: 0 0 450px !important;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#global-matrice.select2-hidden-accessible+.select2 {
|
||||
width: 450px !important;
|
||||
min-width: 450px !important;
|
||||
max-width: 450px !important;
|
||||
flex: 0 0 450px !important;
|
||||
}
|
||||
|
||||
#global-matrice.select2-hidden-accessible+.select2 .select2-selection__rendered {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Select delle righe (colonna Matrice) = 150px */
|
||||
.part-matrice {
|
||||
width: 300px !important;
|
||||
min-width: 300px !important;
|
||||
max-width: 300px !important;
|
||||
flex: 0 0 300px !important;
|
||||
}
|
||||
|
||||
.part-matrice.select2-hidden-accessible+.select2 {
|
||||
width: 300px !important;
|
||||
min-width: 300px !important;
|
||||
max-width: 300px !important;
|
||||
flex: 0 0 300px !important;
|
||||
}
|
||||
|
||||
/* Colonna Descrizione (2ª colonna) = 420px */
|
||||
#partsTable th:nth-child(2),
|
||||
#partsTable td:nth-child(2) {
|
||||
width: 350 !important;
|
||||
min-width: 350px !important;
|
||||
max-width: 350px !important;
|
||||
}
|
||||
|
||||
.select2-container--default #macro-matrice-filter {
|
||||
width: 200px !important;
|
||||
min-width: 200px !important;
|
||||
}
|
||||
|
||||
.select2-container--default .part-matrice {
|
||||
width: 150px !important;
|
||||
min-width: 150px !important;
|
||||
#partsTable td:nth-child(2) .part-description {
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Aspetto Select2 */
|
||||
.select2-container--default .select2-selection--single {
|
||||
height: 24px !important;
|
||||
padding: 0.1rem 0.3rem !important;
|
||||
font-size: 0.8rem !important;
|
||||
padding: .1rem .3rem !important;
|
||||
font-size: .8rem !important;
|
||||
border: 1px solid #ced4da !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection__rendered {
|
||||
line-height: 22px !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection__arrow {
|
||||
height: 24px !important;
|
||||
height: 24px !important
|
||||
}
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
z-index: 1061 !important;
|
||||
border: 1px solid #aaa !important;
|
||||
border-radius: 4px !important;
|
||||
background: white !important;
|
||||
overflow-y: auto !important;
|
||||
background: #fff !important;
|
||||
max-height: 200px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
/* Evita stretching del flex nella riga dei filtri */
|
||||
#partsModal .modal-body>.row .col-md-9>div[style*="display: flex"]>* {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
/* Altri modali e pulsanti */
|
||||
.propagate-matrice-btn,
|
||||
.propagate-all-btn {
|
||||
padding: 0.1rem 0.3rem !important;
|
||||
font-size: 0.8rem !important;
|
||||
padding: .1rem .3rem !important;
|
||||
font-size: .8rem !important
|
||||
}
|
||||
|
||||
.save-status,
|
||||
.save-loading {
|
||||
margin-left: 5px;
|
||||
margin-left: 5px
|
||||
}
|
||||
|
||||
#confirmDeleteModal {
|
||||
z-index: 1070 !important;
|
||||
z-index: 1070 !important
|
||||
}
|
||||
|
||||
#confirmDeleteModal .modal-backdrop {
|
||||
z-index: 1065 !important;
|
||||
z-index: 1065 !important
|
||||
}
|
||||
|
||||
.note-btn {
|
||||
padding: 0.2rem 0.4rem !important;
|
||||
/* Aumentato leggermente il padding per un pulsante più grande */
|
||||
font-size: 0.9rem !important;
|
||||
/* Aumentato il font-size per un'icona più grande */
|
||||
padding: .2rem .4rem !important;
|
||||
font-size: .9rem !important
|
||||
}
|
||||
|
||||
.note-btn.has-note {
|
||||
color: #dc3545 !important;
|
||||
/* Rosso quando la nota è presente */
|
||||
color: #dc3545 !important
|
||||
}
|
||||
|
||||
#noteModal {
|
||||
z-index: 1090 !important;
|
||||
z-index: 1090 !important
|
||||
}
|
||||
|
||||
#noteModal .modal-backdrop {
|
||||
z-index: 1085 !important;
|
||||
z-index: 1085 !important
|
||||
}
|
||||
|
||||
#noteModal .modal-dialog {
|
||||
position: relative;
|
||||
z-index: 1090 !important;
|
||||
z-index: 1090 !important
|
||||
}
|
||||
|
||||
#noteModal textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.propagate-date-btn {
|
||||
padding: 0.2rem 0.4rem !important;
|
||||
font-size: 0.9rem !important;
|
||||
}
|
||||
|
||||
.propagate-note-btn {
|
||||
padding: 0.2rem 0.4rem !important;
|
||||
font-size: 0.9rem !important;
|
||||
#noteModal textarea,
|
||||
#commonNoteModal textarea {
|
||||
resize: vertical
|
||||
}
|
||||
|
||||
#commonNoteModal {
|
||||
z-index: 1095 !important;
|
||||
/* Sopra #noteModal (1090) */
|
||||
z-index: 1095 !important
|
||||
}
|
||||
|
||||
#commonNoteModal .modal-backdrop {
|
||||
z-index: 1090 !important;
|
||||
/* Sopra il backdrop di #noteModal (1085) */
|
||||
z-index: 1090 !important
|
||||
}
|
||||
|
||||
#commonNoteModal .modal-dialog {
|
||||
position: relative;
|
||||
z-index: 1095 !important;
|
||||
}
|
||||
|
||||
#commonNoteModal textarea {
|
||||
resize: vertical;
|
||||
z-index: 1095 !important
|
||||
}
|
||||
</style>
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
// upload_photos_mobile.php
|
||||
include('include/headscript.php');
|
||||
include('include/headscriptnologin.php');
|
||||
|
||||
$db = DBHandlerSelect::getInstance();
|
||||
$pdo = $db->getConnection();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user