RC: restituer historique et valeurs par defaut
This commit is contained in:
parent
4919940a26
commit
e4cb9906b4
|
|
@ -186,6 +186,17 @@ hr.form {
|
|||
padding: 5px 12px !important;
|
||||
}
|
||||
|
||||
.chip-info{
|
||||
padding: 5px;
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
background: darkblue;
|
||||
color: white;
|
||||
border-radius: 10px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#goodParcoursModal {
|
||||
width: 80%;
|
||||
max-height: 80%;
|
||||
|
|
|
|||
|
|
@ -1911,14 +1911,13 @@ window.initSubmenuForm = initSubmenuForm;// Module IIFE pour éviter la pollutio
|
|||
|
||||
// Peupler le formulaire avec les données
|
||||
function populateFormData() {
|
||||
//Poupulate select historique
|
||||
if (!contrat.historique) {
|
||||
document.getElementById('historiqueDiv').style.display = "none";
|
||||
} else {
|
||||
document.getElementById('historiqueDiv').style.display = "block";
|
||||
|
||||
//Poupulate select historique (toujours affiché, options ajoutées si présentes)
|
||||
const historiqueDiv = document.getElementById('historiqueDiv');
|
||||
const idSelect = document.getElementById('idSelect');
|
||||
|
||||
if (historiqueDiv) {
|
||||
historiqueDiv.style.display = "block";
|
||||
}
|
||||
if (idSelect && contrat?.historique && contrat.historique.length) {
|
||||
contrat.historique.forEach(function (item) {
|
||||
var option = document.createElement('option');
|
||||
option.value = item.id;
|
||||
|
|
@ -1988,6 +1987,10 @@ window.initSubmenuForm = initSubmenuForm;// Module IIFE pour éviter la pollutio
|
|||
document.getElementById('activity-selector').querySelector('option[value="voiturier"]').selected = true;
|
||||
document.getElementById('activity-selector').querySelector('option[value="loueur"]').selected = true;
|
||||
document.getElementById('activity-selector').dispatchEvent(new Event('change'));
|
||||
|
||||
// Marchandises ordinaires par défaut
|
||||
document.getElementById('marchandise-selector').querySelector('option[value="ordinaire"]').selected = true;
|
||||
document.getElementById('marchandise-selector').dispatchEvent(new Event('change'));
|
||||
}
|
||||
|
||||
// Populate assurés additionnel
|
||||
|
|
|
|||
Loading…
Reference in New Issue