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;
|
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 {
|
#goodParcoursModal {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
max-height: 80%;
|
max-height: 80%;
|
||||||
|
|
|
||||||
|
|
@ -1911,14 +1911,13 @@ window.initSubmenuForm = initSubmenuForm;// Module IIFE pour éviter la pollutio
|
||||||
|
|
||||||
// Peupler le formulaire avec les données
|
// Peupler le formulaire avec les données
|
||||||
function populateFormData() {
|
function populateFormData() {
|
||||||
//Poupulate select historique
|
//Poupulate select historique (toujours affiché, options ajoutées si présentes)
|
||||||
if (!contrat.historique) {
|
const historiqueDiv = document.getElementById('historiqueDiv');
|
||||||
document.getElementById('historiqueDiv').style.display = "none";
|
|
||||||
} else {
|
|
||||||
document.getElementById('historiqueDiv').style.display = "block";
|
|
||||||
|
|
||||||
const idSelect = document.getElementById('idSelect');
|
const idSelect = document.getElementById('idSelect');
|
||||||
|
if (historiqueDiv) {
|
||||||
|
historiqueDiv.style.display = "block";
|
||||||
|
}
|
||||||
|
if (idSelect && contrat?.historique && contrat.historique.length) {
|
||||||
contrat.historique.forEach(function (item) {
|
contrat.historique.forEach(function (item) {
|
||||||
var option = document.createElement('option');
|
var option = document.createElement('option');
|
||||||
option.value = item.id;
|
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="voiturier"]').selected = true;
|
||||||
document.getElementById('activity-selector').querySelector('option[value="loueur"]').selected = true;
|
document.getElementById('activity-selector').querySelector('option[value="loueur"]').selected = true;
|
||||||
document.getElementById('activity-selector').dispatchEvent(new Event('change'));
|
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
|
// Populate assurés additionnel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue