df
This commit is contained in:
parent
b8da6b25e6
commit
09e1f6bd2f
|
|
@ -1,83 +1,122 @@
|
|||
<?php
|
||||
$this->titre = "INTER SANTE - Liste Utilisateurs Gestion Confiée";
|
||||
$codeGcAssureur = $this->nettoyer($gc['codeGcAssureur']);
|
||||
$nomGcAssureur = $this->nettoyer($gc['libelle']);
|
||||
$this->titre = "INTER SANTE - Utilisateurs Portail Garant";
|
||||
$codeGcAssureur = $this->nettoyer($gc['codeGcAssureur']);
|
||||
$nomGcAssureur = $this->nettoyer($gc['libelle']);
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<div class="page-content animate__animated animate__fadeIn">
|
||||
<div class="header-section mb-4">
|
||||
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
|
||||
<i class="fas fa-users-cog fs-4"></i>
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mb-0 fw-bold text-uppercase"><?= _("Utilisateurs Portail Garant") ?></h4>
|
||||
<p class="text-muted small mb-0"><?= $nomGcAssureur ?> — <?= _("Gestion des accès et permissions") ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary rounded-pill px-4 fw-bold shadow-sm btn-sm" onclick="ajouter_utilisateur_gc();">
|
||||
<i class="fas fa-plus me-1"></i> <?= _("Nouvel Utilisateur") ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</script>
|
||||
<input type="hidden" id="codeGcAssureur" value="<?= $codeGcAssureur ?>">
|
||||
<input type="hidden" id="idGc" value="<?= $this->nettoyer($gc['id']) ?>">
|
||||
|
||||
<input class="sr-only" type="text" id="codeGcAssureur" name="codeGcAssureur" value="<?= $codeGcAssureur ?>" >
|
||||
<input class="sr-only" type="text" id="idGc" name="idGc" value="<?= $this->nettoyer($gc['id']) ?>" >
|
||||
<div class="card border-0 shadow-sm">
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle mb-0 datatable-users" style="width:100%; font-size: 9.5pt;">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="py-3 ps-3">Login</th>
|
||||
<th class="py-3"><?= _("Nom & Prénoms") ?></th>
|
||||
<th class="py-3 text-center"><?= _("Langue") ?></th>
|
||||
<th class="py-3 text-center"><?= _("Accès Actes") ?></th>
|
||||
<th class="py-3 text-center"><?= _("Accès Affec.") ?></th>
|
||||
<th class="py-3 text-center"><?= _("État Compte") ?></th>
|
||||
<th class="py-3 text-center" width="150px"><?= _("Actions") ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user_gc):
|
||||
$id = $user_gc['idUtilisateur'];
|
||||
$code = $user_gc['codeUtilisateur'];
|
||||
?>
|
||||
<tr>
|
||||
<td class="ps-3 fw-bold text-primary"><?= $this->nettoyer($code) ?></td>
|
||||
<td><?= $this->nettoyer($user_gc['utilisateur']) ?></td>
|
||||
<td class="text-center">
|
||||
<span class="badge bg-light text-dark border"><?= $user_gc['codeLangue'] ?></span>
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch d-inline-block">
|
||||
<input class="form-check-input cursor-pointer" type="checkbox"
|
||||
<?= ($user_gc['actVisible'] == 1) ? 'checked' : '' ?>
|
||||
onchange="gerer_acces_actes_gc('<?= $code ?>', '<?= $user_gc['actVisible'] ?>');">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<div id="div_liste">
|
||||
<fieldset>
|
||||
<td class="text-center">
|
||||
<div class="form-check form-switch d-inline-block">
|
||||
<input class="form-check-input cursor-pointer" type="checkbox"
|
||||
<?= ($user_gc['AffectionVisible'] == 1) ? 'checked' : '' ?>
|
||||
onchange="gerer_acces_affection_gc('<?= $code ?>', '<?= $user_gc['AffectionVisible'] ?>');">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<legend> <?= _("Utilisateurs DU GARANT") . " : " . $nomGcAssureur ?> </legend>
|
||||
<td class="text-center">
|
||||
<?php if($user_gc['actif'] == 1): ?>
|
||||
<span class="badge rounded-pill bg-success-light text-success px-3"><?= _("Actif") ?></span>
|
||||
<?php else: ?>
|
||||
<span class="badge rounded-pill bg-danger-light text-danger px-3"><?= _("Désactivé") ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style='text-align:center' width="15%">Login</th>
|
||||
<th style='text-align:center'> <?= _("Nom") ?> </th>
|
||||
<th style='text-align:center' width="8%"> <?= _("Langue") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Ré-Init Mot de Passe") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Activer / Désactiver") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Actes visibles?") ?> </th>
|
||||
<th style='text-align:center'> <?= _("Affections Visibles?") ?> </th>
|
||||
<th style='text-align:center' width="10%"> <?= _("Action") ?> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($users as $user_gc):
|
||||
$idUtilisateur = $user_gc['idUtilisateur'];
|
||||
$codeUtilisateur = $user_gc['codeUtilisateur'];
|
||||
$actif = $user_gc['actif'];
|
||||
$actVisible = $user_gc['actVisible'];
|
||||
$AffectionVisible = $user_gc['AffectionVisible'];
|
||||
$reInit = $user_gc['reInit'];
|
||||
$codeLangue = $user_gc['codeLangue'];
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align='center'> <?= $this->nettoyer($user_gc['codeUtilisateur']) ?> </td>
|
||||
<td align='center'> <?= $this->nettoyer($user_gc['utilisateur']) ?></td>
|
||||
<td align='center'> <?= $codeLangue ?> </td>
|
||||
|
||||
<?php if($reInit==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Ré-Init Mot de Passe") ?>" onClick="javascript:reinitpaswd_gc('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Ré-Init Mot de Passe") ?>" onClick="javascript:reinitpaswd_gc('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php endif; ?>
|
||||
<td class="text-center">
|
||||
<div class="btn-group shadow-xs rounded-pill bg-white border p-1">
|
||||
<button class="btn btn-link btn-sm text-primary p-1 mx-1" title="<?= _("Modifier") ?>" onclick="afficher_users_gc_id(<?= $id ?>);">
|
||||
<i class="fas fa-edit"></i>
|
||||
</button>
|
||||
<button class="btn btn-link btn-sm <?= ($user_gc['reInit'] == 1) ? 'text-danger' : 'text-muted' ?> p-1 mx-1"
|
||||
title="<?= _("Réinitialiser MDP") ?>" onclick="reinitpaswd_gc('<?= $code ?>');">
|
||||
<i class="fas fa-key"></i>
|
||||
</button>
|
||||
<button class="btn btn-link btn-sm <?= ($user_gc['actif'] == 1) ? 'text-danger' : 'text-success' ?> p-1 mx-1"
|
||||
title="<?= ($user_gc['actif'] == 1) ? _("Désactiver") : _("Activer") ?>"
|
||||
onclick="<?= ($user_gc['actif'] == 1) ? "desactiver_user_gc('$code')" : "activer_user_gc('$code')" ?>;">
|
||||
<i class="fas <?= ($user_gc['actif'] == 1) ? 'fa-user-slash' : 'fa-user-check' ?>"></i>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($actif==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Désactiver") ?>" onClick="javascript:desactiver_user_gc('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Activer") ?>" onClick="javascript:activer_user_gc('<?= $codeUtilisateur ?>');"></td>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($actVisible==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Oui => Désactiver?") ?>" onClick="javascript:gerer_acces_actes_gc('<?= $codeUtilisateur ?>', '<?= $actVisible ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Non => Activer?") ?>" onClick="javascript:gerer_acces_actes_gc('<?= $codeUtilisateur ?>', '<?= $actVisible ?>');"></td>
|
||||
<?php endif; ?>
|
||||
<style>
|
||||
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08); }
|
||||
.bg-success-light { background-color: rgba(25, 135, 84, 0.1); }
|
||||
.bg-danger-light { background-color: rgba(220, 53, 69, 0.1); }
|
||||
.cursor-pointer { cursor: pointer; }
|
||||
.form-switch .form-check-input { width: 2.5em; height: 1.25em; cursor: pointer; }
|
||||
.btn-link { text-decoration: none; border: none; background: transparent; transition: 0.2s; }
|
||||
.btn-link:hover { transform: scale(1.2); }
|
||||
</style>
|
||||
|
||||
<?php if($AffectionVisible==1): ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-danger" type="button" value="<?= _("Oui => Désactiver?") ?>" onClick="javascript:gerer_acces_affection_gc('<?= $codeUtilisateur ?>', '<?= $AffectionVisible ?>');"></td>
|
||||
<?php else: ?>
|
||||
<td> <input style="font-size:10pt;" class = "form-control btn btn-primary" type="button" value="<?= _("Non => Activer?") ?>" onClick="javascript:gerer_acces_affection_gc('<?= $codeUtilisateur ?>', '<?= $AffectionVisible ?>');"></td>
|
||||
<?php endif; ?>
|
||||
|
||||
<td>
|
||||
<input class = "form-control btn btn-info" type="button" value="<?= _("Modifier") ?>" onClick="javascript:afficher_users_gc_id(<?= $idUtilisateur ?>);" style='font-size:9pt;' >
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id ="div_export_a">
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Initialisation sécurisée du DataTable
|
||||
var checkDTUsers = setInterval(function() {
|
||||
if (typeof initSmartTable === 'function') {
|
||||
initSmartTable('.datatable-users', 'Liste_Utilisateurs_Garant', false);
|
||||
clearInterval(checkDTUsers);
|
||||
}
|
||||
}, 100);
|
||||
</script>df
|
||||
Loading…
Reference in New Issue
Block a user