fd
This commit is contained in:
parent
17b5878902
commit
9c0b53546d
27
Controleur/ControleurAjaxmotifdepassement.php
Executable file
27
Controleur/ControleurAjaxmotifdepassement.php
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleur.php';
|
||||||
|
require_once 'Modele/Societeuser.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ControleurAjaxmotifdepassement extends Controleur {
|
||||||
|
private $menuvue;
|
||||||
|
private $societeuser;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
|
||||||
|
$this->societeuser = new Societeuser();
|
||||||
|
|
||||||
|
}
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$motifs = $this->societeuser->getMotifsDepassement();
|
||||||
|
|
||||||
|
$this->genererVueAjax(array(
|
||||||
|
'motifs' => $motifs
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
25
Controleur/ControleurAjaxtextefacturationgarant.php
Executable file
25
Controleur/ControleurAjaxtextefacturationgarant.php
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleur.php';
|
||||||
|
require_once 'Modele/Societeuser.php';
|
||||||
|
|
||||||
|
|
||||||
|
class ControleurAjaxtextefacturationgarant extends Controleur {
|
||||||
|
private $menuvue;
|
||||||
|
private $societeuser;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
|
||||||
|
$this->societeuser = new Societeuser();
|
||||||
|
|
||||||
|
}
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$textes = $this->societeuser->getTexteFacturationGarant();
|
||||||
|
|
||||||
|
$this->genererVueAjax(array(
|
||||||
|
'textes' => $textes
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -91618,4 +91618,28 @@ function ui_refresh_select(selector) {
|
||||||
container: false // Garde le menu dans son parent direct
|
container: false // Garde le menu dans son parent direct
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadMessageSection(section) {
|
||||||
|
let url = "";
|
||||||
|
let target = "#content-" + section;
|
||||||
|
let donnees = "";
|
||||||
|
|
||||||
|
if (section === 'Motifs') url = $("#racineWeb").val() + "Ajaxmotifdepassement/";
|
||||||
|
if (section === 'Facturation') url = $("#racineWeb").val() + "Ajaxtextefacturationgarant/";
|
||||||
|
|
||||||
|
// Éviter de recharger si déjà chargé (optionnel)
|
||||||
|
if ($(target).find('table').length > 0) return;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'post',
|
||||||
|
data: donnees,
|
||||||
|
success: function(data) {
|
||||||
|
$(target).html(data);
|
||||||
|
},
|
||||||
|
error: function() {
|
||||||
|
$(target).html('<div class="alert alert-danger m-3">Erreur de chargement</div>');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
31
Vue/Ajaxmotifdepassement/index.php
Executable file
31
Vue/Ajaxmotifdepassement/index.php
Executable file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<div class="p-4 bg-white">
|
||||||
|
<div class="d-flex align-items-center mb-3">
|
||||||
|
<span class="badge bg-warning text-dark me-2"><?= count($motifs) ?></span>
|
||||||
|
<h6 class="fw-bold mb-0 text-uppercase small"><?= _("Configuration des motifs") ?></h6>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle border">
|
||||||
|
<thead class="bg-light small fw-bold">
|
||||||
|
<tr>
|
||||||
|
<th width="15%" class="text-center"><?= _("CODE") ?></th>
|
||||||
|
<th><?= _("MESSAGE PERSONNALISÉ") ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $i=0; foreach ($motifs as $v): $i++; $idMessage = $v['id']; ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center fw-bold text-primary bg-light"><?= $this->nettoyer($v['codeMotifDepassement']) ?></td>
|
||||||
|
<td>
|
||||||
|
<input class="form-control border-0 bg-transparent fw-medium"
|
||||||
|
value="<?= est_anglophone() ? $this->nettoyer($v['libelleEng']) : $this->nettoyer($v['libelle']) ?>"
|
||||||
|
onchange="majmotifdepassement(<?=$idMessage ?>, <?=$i ?>);"
|
||||||
|
placeholder="<?= _("Saisir le texte ici...") ?>">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
37
Vue/Ajaxtextefacturationgarant/index.php
Executable file
37
Vue/Ajaxtextefacturationgarant/index.php
Executable file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<div class="p-4 bg-white">
|
||||||
|
<div class="d-flex align-items-center mb-3 text-primary">
|
||||||
|
<i class="fas fa-info-circle me-2"></i>
|
||||||
|
<h6 class="fw-bold mb-0 text-uppercase small"><?= _("Mentions légales sur factures") ?></h6>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-hover align-middle border">
|
||||||
|
<thead class="bg-light small fw-bold">
|
||||||
|
<tr>
|
||||||
|
<th width="10%" class="text-center"><?= _("CODE") ?></th>
|
||||||
|
<th><?= _("TEXTE DE L'ÉTAT") ?></th>
|
||||||
|
<th width="15%"><?= _("ÉCHÉANCE") ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($textes as $v): $idTexte = $v['id']; ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center fw-bold text-dark bg-light"><?= $this->nettoyer($v['codeTypeFacturationGarant']) ?></td>
|
||||||
|
<td>
|
||||||
|
<textarea class="form-control form-control-sm border-0 bg-transparent" rows="2"
|
||||||
|
onchange="majtextefacturation(<?=$idTexte ?>, this.value);"><?= est_anglophone() ? $this->nettoyer($v['texteEng']) : $this->nettoyer($v['texte']) ?></textarea>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="input-group input-group-sm">
|
||||||
|
<input type="number" class="form-control fw-bold text-center border-0 bg-light"
|
||||||
|
value="<?= $this->nettoyer($v['echeance']); ?>"
|
||||||
|
onchange="majecheancefacturation(<?=$idTexte ?>, this.value);">
|
||||||
|
<span class="input-group-text bg-light border-0 small">Jrs</span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -50,29 +50,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
|
||||||
function loadMessageSection(section) {
|
|
||||||
let url = "";
|
|
||||||
let target = "#content-" + section;
|
|
||||||
|
|
||||||
if (section === 'Motifs') url = $("#racineWeb").val() + "Motifdepassement/";
|
|
||||||
if (section === 'Facturation') url = $("#racineWeb").val() + "Textefacturationgarant/";
|
|
||||||
|
|
||||||
// Éviter de recharger si déjà chargé (optionnel)
|
|
||||||
if ($(target).find('table').length > 0) return;
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: url,
|
|
||||||
type: 'GET',
|
|
||||||
success: function(data) {
|
|
||||||
$(target).html(data);
|
|
||||||
},
|
|
||||||
error: function() {
|
|
||||||
$(target).html('<div class="alert alert-danger m-3">Erreur de chargement</div>');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.accordion-button:not(.collapsed) {
|
.accordion-button:not(.collapsed) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user