This commit is contained in:
parent
bf2be03d89
commit
e5e6ebcf7d
262
src/main/java/com/triz/trizservice/bean/FormMedecinBean.java
Normal file
262
src/main/java/com/triz/trizservice/bean/FormMedecinBean.java
Normal file
@ -0,0 +1,262 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Examen;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.ServiceUser;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import com.triz.util.UtilContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.context.FacesContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Component("formMedecinBean")
|
||||
@Scope("view")
|
||||
public class FormMedecinBean {
|
||||
|
||||
private Medecin selectedMedecin;
|
||||
private String idMedecin;
|
||||
private ServiceUser user;
|
||||
private Centre centre;
|
||||
private String modifier;
|
||||
private boolean canEdit;
|
||||
private boolean isNew;
|
||||
private List<Consultation> listeHistoriqueConsultation;
|
||||
private List<SpecialiteMedicale> listSelectedSepecialite;
|
||||
private List<SpecialiteMedicale> listAllSepecialite;
|
||||
private List<ServiceUser> listeUsers;
|
||||
|
||||
@Autowired
|
||||
public TransactionService service;
|
||||
|
||||
@Autowired
|
||||
public UtilContext context;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
user = context.getCurrentUser();
|
||||
centre = context.getCurrentEtablissement();
|
||||
listSelectedSepecialite = new ArrayList<>();
|
||||
listAllSepecialite = service.findAll(SpecialiteMedicale.class);
|
||||
if (modifier != null) {
|
||||
if (modifier.equals("true")) {
|
||||
canEdit = true;
|
||||
}
|
||||
}
|
||||
if (idMedecin == null) {
|
||||
if (canEdit == true) {
|
||||
isNew = true;
|
||||
}
|
||||
selectedMedecin = new Medecin();
|
||||
listeUsers = service.getAllUserByCentreNotInMedecin(centre);
|
||||
} else {
|
||||
selectedMedecin = service.findById(Medecin.class, UUID.fromString(idMedecin));
|
||||
listeHistoriqueConsultation = service.getAllConsultationByMedecin(selectedMedecin);
|
||||
listSelectedSepecialite = service.getAllSpecialitiesByMedecin(selectedMedecin);
|
||||
listeUsers = service.getAllUserByCentreNotInMedecinByUser(centre, selectedMedecin);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Medecin getSelectedMedecin() {
|
||||
return selectedMedecin;
|
||||
}
|
||||
|
||||
public void setSelectedMedecin(Medecin selectedMedecin) {
|
||||
this.selectedMedecin = selectedMedecin;
|
||||
}
|
||||
|
||||
public String getIdMedecin() {
|
||||
return idMedecin;
|
||||
}
|
||||
|
||||
public void setIdMedecin(String idMedecin) {
|
||||
this.idMedecin = idMedecin;
|
||||
}
|
||||
|
||||
public Centre getCentre() {
|
||||
return centre;
|
||||
}
|
||||
|
||||
public void setCentre(Centre centre) {
|
||||
this.centre = centre;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier;
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public boolean isCanEdit() {
|
||||
return canEdit;
|
||||
}
|
||||
|
||||
public void setCanEdit(boolean canEdit) {
|
||||
this.canEdit = canEdit;
|
||||
}
|
||||
|
||||
public boolean isIsNew() {
|
||||
return isNew;
|
||||
}
|
||||
|
||||
public void setIsNew(boolean isNew) {
|
||||
this.isNew = isNew;
|
||||
}
|
||||
|
||||
public String voirMedecin() {
|
||||
System.out.println("isNew " + isNew);
|
||||
System.out.println("canEdit " + canEdit);
|
||||
if (!isNew) {
|
||||
if (!canEdit) {
|
||||
return "list.xhtml?faces-redirect=true";
|
||||
} else {
|
||||
|
||||
return "form.xhtml?faces-redirect=true&medecin=" + selectedMedecin.getId();
|
||||
}
|
||||
} else {
|
||||
return "list.xhtml?faces-redirect=true";
|
||||
}
|
||||
}
|
||||
|
||||
public String editMedecin() {
|
||||
return "form.xhtml?faces-redirect=true&modifier=true&medecin=" + selectedMedecin.getId();
|
||||
}
|
||||
|
||||
public String deleteMedecin() {
|
||||
if (selectedMedecin.getFkUser() != null) {
|
||||
selectedMedecin.getFkUser().setActif("false");
|
||||
service.saveUser(selectedMedecin.getFkUser());
|
||||
context.saveNewManipulation("User", selectedMedecin.getFkUser().getUserid(), "Supprimer user", new Date(), new Date(), user, "", "");
|
||||
FacesContext.getCurrentInstance().addMessage(null,
|
||||
new FacesMessage(FacesMessage.SEVERITY_INFO,
|
||||
"L'utilisateur a été supprimé avec succès", null));
|
||||
|
||||
return voirMedecin();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String saveMedecin() {
|
||||
selectedMedecin.setFkCentre(centre);
|
||||
service.save(selectedMedecin);
|
||||
if (isNew) {
|
||||
context.saveNewManipulation("medecin", selectedMedecin.getId().toString(), "Ajouter medecin", new Date(), new Date(), user, "", "");
|
||||
} else {
|
||||
if (canEdit) {
|
||||
Medecin oldMedecin = service.findById(Medecin.class, selectedMedecin.getId());
|
||||
|
||||
if (selectedMedecin.getSexe().equalsIgnoreCase(oldMedecin.getSexe())) {
|
||||
context.saveNewManipulation("Medecin", selectedMedecin.getFkUser().getUserid(), "modifier sexe medecin", new Date(), new Date(), user, oldMedecin.getSexe(),
|
||||
selectedMedecin.getSexe());
|
||||
}
|
||||
|
||||
if (selectedMedecin.getNbRdvMax() != oldMedecin.getNbRdvMax()) {
|
||||
context.saveNewManipulation("Medecin", selectedMedecin.getFkUser().getUserid(), "modifier nb max consultation/jour", new Date(), new Date(), user,
|
||||
String.valueOf(oldMedecin.getNbRdvMax()), String.valueOf(selectedMedecin.getNbRdvMax()));
|
||||
}
|
||||
context.saveNewManipulation("Medecin", selectedMedecin.getFkUser().getUserid(), "modifier medecin", new Date(), new Date(), user, "", "");
|
||||
}
|
||||
|
||||
}
|
||||
List<SpecialiteMedicale> oldspecList
|
||||
= service.getAllSpecialitiesByMedecin(selectedMedecin);
|
||||
|
||||
for (SpecialiteMedicale spc : listSelectedSepecialite) {
|
||||
|
||||
boolean existeDeja = false;
|
||||
|
||||
if (oldspecList.contains(spc)) {
|
||||
existeDeja = true;
|
||||
oldspecList.remove(spc);
|
||||
}
|
||||
|
||||
if (!existeDeja) {
|
||||
|
||||
MedecinSpecialiste medecinSpecialiste = new MedecinSpecialiste();
|
||||
|
||||
medecinSpecialiste.setFkMedecin(selectedMedecin);
|
||||
medecinSpecialiste.setFkSpecialite(spc);
|
||||
|
||||
service.save(medecinSpecialiste);
|
||||
}
|
||||
}
|
||||
for (SpecialiteMedicale oldSpc : oldspecList) {
|
||||
|
||||
service.delete(service.getMedecinSpecialisteByMedcinBySpecialiste(selectedMedecin, oldSpc));
|
||||
|
||||
}
|
||||
|
||||
return voirMedecin();
|
||||
}
|
||||
|
||||
public List<Consultation> getListeHistoriqueConsultation() {
|
||||
return listeHistoriqueConsultation;
|
||||
}
|
||||
|
||||
public void setListeHistoriqueConsultation(List<Consultation> listeHistoriqueConsultation) {
|
||||
this.listeHistoriqueConsultation = listeHistoriqueConsultation;
|
||||
}
|
||||
|
||||
public String voirExamen(Consultation consul) {
|
||||
return "/views/Examen/form.xhtml?faces-redirect=true&examen=" + consul.getFkExamen().getId();
|
||||
}
|
||||
|
||||
public List<SpecialiteMedicale> getListSelectedSepecialite() {
|
||||
return listSelectedSepecialite;
|
||||
}
|
||||
|
||||
public void setListSelectedSepecialite(List<SpecialiteMedicale> listSelectedSepecialite) {
|
||||
this.listSelectedSepecialite = listSelectedSepecialite;
|
||||
}
|
||||
|
||||
public List<SpecialiteMedicale> getListAllSepecialite() {
|
||||
return listAllSepecialite;
|
||||
}
|
||||
|
||||
public void setListAllSepecialite(List<SpecialiteMedicale> listAllSepecialite) {
|
||||
this.listAllSepecialite = listAllSepecialite;
|
||||
}
|
||||
|
||||
public List<ServiceUser> getListeUsers() {
|
||||
return listeUsers;
|
||||
}
|
||||
|
||||
public void setListeUsers(List<ServiceUser> listeUsers) {
|
||||
this.listeUsers = listeUsers;
|
||||
}
|
||||
|
||||
public String activerMedecin() {
|
||||
if (selectedMedecin.getFkUser() != null) {
|
||||
selectedMedecin.getFkUser().setActif("true");
|
||||
service.saveUser(selectedMedecin.getFkUser());
|
||||
context.saveNewManipulation("User", selectedMedecin.getFkUser().getUserid(), "Activer user", new Date(), new Date(), user, "", "");
|
||||
FacesContext.getCurrentInstance().addMessage(null,
|
||||
new FacesMessage(FacesMessage.SEVERITY_INFO,
|
||||
"L'utilisateur a été activé avec succès", null));
|
||||
|
||||
return voirMedecin();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -100,34 +100,38 @@ public class FormUserBean {
|
||||
} else {
|
||||
if (canEdit) {
|
||||
ServiceMember oldMember = service.getGroupByUser(user);
|
||||
if (member.getFkGroupe().getId() == oldMember.getFkGroupe().getId()) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier groupe user", new Date(), new Date(), user, oldMember.getFkGroupe().getNomGroupe(),
|
||||
member.getFkGroupe().getNomGroupe());
|
||||
if (oldMember != null) {
|
||||
if (member.getFkGroupe().getId() == oldMember.getFkGroupe().getId()) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier groupe user", new Date(), new Date(), user, oldMember.getFkGroupe().getNomGroupe(),
|
||||
member.getFkGroupe().getNomGroupe());
|
||||
}
|
||||
}
|
||||
ServiceUser oldUser = service.getUserById(user1);
|
||||
if (userSelected.getUserpw().equalsIgnoreCase(oldUser.getUserpw())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier pw user", new Date(), new Date(), user, "",
|
||||
"");
|
||||
}
|
||||
if (userSelected.getActif().equalsIgnoreCase(oldUser.getActif())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier Statut user", new Date(), new Date(), user, oldUser.getActif(),
|
||||
userSelected.getActif());
|
||||
}
|
||||
if (userSelected.getPrenom().equalsIgnoreCase(oldUser.getPrenom())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier prenom user", new Date(), new Date(), user, oldUser.getPrenom(),
|
||||
userSelected.getPrenom());
|
||||
}
|
||||
if (userSelected.getNom().equalsIgnoreCase(oldUser.getNom())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier nom user", new Date(), new Date(), user, oldUser.getNom(),
|
||||
userSelected.getNom());
|
||||
}
|
||||
if (userSelected.getTelephone().equalsIgnoreCase(oldUser.getTelephone())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier telephone user", new Date(), new Date(), user, oldUser.getTelephone(),
|
||||
userSelected.getTelephone());
|
||||
}
|
||||
if (userSelected.getMail().equalsIgnoreCase(oldUser.getMail())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier mail user", new Date(), new Date(), user, oldUser.getMail(),
|
||||
userSelected.getMail());
|
||||
if (oldUser != null) {
|
||||
if (userSelected.getUserpw().equalsIgnoreCase(oldUser.getUserpw())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier pw user", new Date(), new Date(), user, "",
|
||||
"");
|
||||
}
|
||||
if (userSelected.getActif().equalsIgnoreCase(oldUser.getActif())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier Statut user", new Date(), new Date(), user, oldUser.getActif(),
|
||||
userSelected.getActif());
|
||||
}
|
||||
if (userSelected.getPrenom().equalsIgnoreCase(oldUser.getPrenom())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier prenom user", new Date(), new Date(), user, oldUser.getPrenom(),
|
||||
userSelected.getPrenom());
|
||||
}
|
||||
if (userSelected.getNom().equalsIgnoreCase(oldUser.getNom())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier nom user", new Date(), new Date(), user, oldUser.getNom(),
|
||||
userSelected.getNom());
|
||||
}
|
||||
if (userSelected.getTelephone().equalsIgnoreCase(oldUser.getTelephone())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier telephone user", new Date(), new Date(), user, oldUser.getTelephone(),
|
||||
userSelected.getTelephone());
|
||||
}
|
||||
if (userSelected.getMail().equalsIgnoreCase(oldUser.getMail())) {
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier mail user", new Date(), new Date(), user, oldUser.getMail(),
|
||||
userSelected.getMail());
|
||||
}
|
||||
}
|
||||
|
||||
context.saveNewManipulation("User", userSelected.getUserid(), "modifier user", new Date(), new Date(), user, "", "");
|
||||
|
||||
119
src/main/java/com/triz/trizservice/bean/MedecinBean.java
Normal file
119
src/main/java/com/triz/trizservice/bean/MedecinBean.java
Normal file
@ -0,0 +1,119 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.ServiceUser;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import com.triz.util.UtilContext;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.PostConstruct;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@Component("medecinBean")
|
||||
@Scope("view")
|
||||
public class MedecinBean {
|
||||
|
||||
private Centre currentCenter;
|
||||
private ServiceUser user;
|
||||
private List<Medecin> allMedecin;
|
||||
private Medecin selectedMedecin;
|
||||
private List<SpecialiteMedicale> selectedRowSpecialites = new ArrayList<>();
|
||||
|
||||
@Autowired
|
||||
public TransactionService service;
|
||||
@Autowired
|
||||
public UtilContext context;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
currentCenter = context.getCurrentEtablissement();
|
||||
user = context.getCurrentUser();
|
||||
allMedecin = service.getAllMedecinByCenter(currentCenter);
|
||||
}
|
||||
|
||||
public Centre getCurrentCenter() {
|
||||
return currentCenter;
|
||||
}
|
||||
|
||||
public void setCurrentCenter(Centre currentCenter) {
|
||||
this.currentCenter = currentCenter;
|
||||
}
|
||||
|
||||
public ServiceUser getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
public void setUser(ServiceUser user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public List<Medecin> getAllMedecin() {
|
||||
return allMedecin;
|
||||
}
|
||||
|
||||
public void setAllMedecin(List<Medecin> allMedecin) {
|
||||
this.allMedecin = allMedecin;
|
||||
}
|
||||
|
||||
public List<SpecialiteMedicale> getSpecialitesList(Medecin medecin) {
|
||||
if (medecin == null || medecin.getId() == null) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return service.getAllSpecialitiesByMedecin(medecin);
|
||||
}
|
||||
|
||||
public String getSpecialitesDisplay(Medecin medecin) {
|
||||
List<SpecialiteMedicale> liste = getSpecialitesList(medecin);
|
||||
if (liste == null || liste.isEmpty()) {
|
||||
return "-";
|
||||
}
|
||||
return liste.stream().map(SpecialiteMedicale::getName).collect(Collectors.joining(", "));
|
||||
}
|
||||
|
||||
public List<SpecialiteMedicale> getSelectedRowSpecialites() {
|
||||
return selectedRowSpecialites;
|
||||
}
|
||||
|
||||
public void onShowSpecialites(Medecin medecin) {
|
||||
this.selectedRowSpecialites = getSpecialitesList(medecin);
|
||||
}
|
||||
|
||||
public String getStatusMedecin(Medecin medecin) {
|
||||
if (medecin == null || medecin.getDisponible() == null) {
|
||||
return "indisponible";
|
||||
}
|
||||
if (Boolean.TRUE.equals(medecin.getDisponible())) {
|
||||
return "disponible";
|
||||
}
|
||||
return "false";
|
||||
}
|
||||
|
||||
public String ajouterUser() {
|
||||
return "form.xhtml?faces-redirect=true&modifier=true";
|
||||
}
|
||||
|
||||
public String voirUser() {
|
||||
return "form.xhtml?faces-redirect=true&medecin=" + selectedMedecin.getId();
|
||||
}
|
||||
|
||||
public Medecin getSelectedMedecin() {
|
||||
return selectedMedecin;
|
||||
}
|
||||
|
||||
public void setSelectedMedecin(Medecin selectedMedecin) {
|
||||
this.selectedMedecin = selectedMedecin;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean.converter;
|
||||
|
||||
import com.triz.trizservice.modeles.ServiceUser;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import java.util.UUID;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@FacesConverter("serviceUserConverter")
|
||||
@Component
|
||||
public class ServiceUserConverter implements Converter {
|
||||
|
||||
@Autowired
|
||||
protected transient TransactionService service;
|
||||
|
||||
@Override
|
||||
public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
|
||||
try {
|
||||
return service.findById(ServiceUser.class, value);
|
||||
} catch (NumberFormatException e) {
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "User n'existe pas.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsString(FacesContext fc, UIComponent uic, Object object) {
|
||||
if (object != null) {
|
||||
return String.valueOf(((ServiceUser) object).getUserid());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package com.triz.trizservice.bean.converter;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
import javax.faces.application.FacesMessage;
|
||||
import javax.faces.component.UIComponent;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.convert.Converter;
|
||||
import javax.faces.convert.FacesConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author FORCE TECH
|
||||
*/
|
||||
@FacesConverter("specialiteMedicaleConverter")
|
||||
@Component
|
||||
public class SpecialiteMedicaleConverter implements Converter {
|
||||
@Autowired
|
||||
protected transient TransactionService service;
|
||||
|
||||
@Override
|
||||
public Object getAsObject(FacesContext fc, UIComponent uic, String value) {
|
||||
try {
|
||||
return service.findById(SpecialiteMedicale.class, value);
|
||||
} catch (NumberFormatException e)
|
||||
{
|
||||
new FacesMessage(FacesMessage.SEVERITY_ERROR, "Conversion Error", "Specialite Medicale n'existe pas.");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAsString(FacesContext fc, UIComponent uic, Object object) {
|
||||
if (object != null) {
|
||||
return String.valueOf(((SpecialiteMedicale) object).getName());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -73,6 +73,9 @@ public class Consultation implements Serializable {
|
||||
@JoinColumn(name = "fk_medecin", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Medecin fkMedecin;
|
||||
@JoinColumn(name = "fk_patient", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Patient fkPatient;
|
||||
|
||||
public Consultation() {
|
||||
}
|
||||
@ -186,4 +189,12 @@ public class Consultation implements Serializable {
|
||||
return "com.triz.trizservice.modeles.Consultation[ id=" + id + " ]";
|
||||
}
|
||||
|
||||
public Patient getFkPatient() {
|
||||
return fkPatient;
|
||||
}
|
||||
|
||||
public void setFkPatient(Patient fkPatient) {
|
||||
this.fkPatient = fkPatient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -6,9 +6,11 @@ package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -41,9 +43,9 @@ public class Medecin implements Serializable {
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@Column(name = "nb_rdv_max")
|
||||
private Integer nbRdvMax;
|
||||
@Column(name = "nb_patient_max")
|
||||
@ -67,15 +69,15 @@ public class Medecin implements Serializable {
|
||||
public Medecin() {
|
||||
}
|
||||
|
||||
public Medecin(Object id) {
|
||||
public Medecin(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@ -5,9 +5,11 @@
|
||||
package com.triz.trizservice.modeles;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.UUID;
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
@ -33,9 +35,9 @@ public class MedecinSpecialiste implements Serializable {
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@NotNull
|
||||
@Lob
|
||||
@GeneratedValue
|
||||
@Column(name = "id")
|
||||
private Object id;
|
||||
private UUID id;
|
||||
@JoinColumn(name = "fk_medecin", referencedColumnName = "id")
|
||||
@ManyToOne
|
||||
private Medecin fkMedecin;
|
||||
@ -46,15 +48,15 @@ public class MedecinSpecialiste implements Serializable {
|
||||
public MedecinSpecialiste() {
|
||||
}
|
||||
|
||||
public MedecinSpecialiste(Object id) {
|
||||
public MedecinSpecialiste(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Object getId() {
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Object id) {
|
||||
public void setId(UUID id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
package com.triz.trizservice.service;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -16,6 +19,7 @@ import com.triz.trizservice.modeles.ServicehistoriqueConnection;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@ -117,8 +121,24 @@ public interface DaoService {
|
||||
|
||||
public ServiceFonctiongroupe getFonctiongroupeById(UUID id);
|
||||
|
||||
public <T extends Serializable> void save(final T object);
|
||||
public <T extends Serializable> void save(final T object);
|
||||
|
||||
public <T extends Serializable> void delete(final T object);
|
||||
|
||||
public List<Medecin> getAllMedecinByCenter(Centre centre);
|
||||
|
||||
public <T extends Serializable, ID extends Serializable> T findById(Class<T> clazz, ID id);
|
||||
|
||||
public List<SpecialiteMedicale> getAllSpecialitiesByMedecin(Medecin medecin);
|
||||
|
||||
public List<Consultation> getAllConsultationByMedecin(Medecin medecin);
|
||||
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre, Medecin medecin);
|
||||
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre);
|
||||
|
||||
}
|
||||
|
||||
@ -7,6 +7,9 @@
|
||||
package com.triz.trizservice.service;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -17,6 +20,7 @@ import com.triz.trizservice.modeles.ServicehistoriqueConnection;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@ -121,4 +125,20 @@ public interface TransactionService {
|
||||
public <T extends Serializable> void save(final T object);
|
||||
|
||||
public <T extends Serializable> void delete(final T object);
|
||||
|
||||
public List<Medecin> getAllMedecinByCenter(Centre centre);
|
||||
|
||||
public <T extends Serializable, ID extends Serializable> T findById(Class<T> clazz, ID id);
|
||||
|
||||
public List<SpecialiteMedicale> getAllSpecialitiesByMedecin(Medecin medecin);
|
||||
|
||||
public List<Consultation> getAllConsultationByMedecin(Medecin medecin);
|
||||
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin);
|
||||
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin,SpecialiteMedicale spc);
|
||||
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre);
|
||||
}
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
package com.triz.trizservice.service.impl;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.service.DaoService;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
@ -16,6 +19,7 @@ import com.triz.trizservice.modeles.ServiceUser;
|
||||
import com.triz.trizservice.modeles.ServicehistoriqueConnection;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@ -316,4 +320,47 @@ public class DaoServiceImpl implements DaoService {
|
||||
System.out.println("delete");
|
||||
getCurrentSession().delete(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Medecin> getAllMedecinByCenter(Centre centre) {
|
||||
return getCurrentSession().createQuery("select s from Medecin s where s.fkCentre=:centre ").setParameter("centre", centre).list();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Serializable, ID extends Serializable> T findById(Class<T> clazz, ID id) {
|
||||
return getCurrentSession().get(clazz, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecialiteMedicale> getAllSpecialitiesByMedecin(Medecin medecin) {
|
||||
return getCurrentSession().createQuery("select s.fkSpecialite from MedecinSpecialiste s where s.fkMedecin =:medecin ").setParameter("medecin", medecin).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Consultation> getAllConsultationByMedecin(Medecin medecin) {
|
||||
return getCurrentSession().createQuery("select s from Consultation s where s.fkMedecin =:medecin ").setParameter("medecin", medecin).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz) {
|
||||
return getCurrentSession().createCriteria(clazz).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin) {
|
||||
return getCurrentSession().createQuery("select s.fkUser from ServiceUserCentre s where s.fkCentre =:centre and (s.fkUser=:user or s.fkUser not in"
|
||||
+ " (select m.fkUser from Medecin m)) ").setParameter("centre", centre).setParameter("user", medecin.getFkUser()).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc) {
|
||||
return (MedecinSpecialiste) getCurrentSession().createQuery("select s from MedecinSpecialiste s where s.fkMedecin =:medecin and s.fkSpecialite=:spc ").setParameter("spc", spc).setParameter("medecin", medecin).setMaxResults(1).uniqueResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre) {
|
||||
return getCurrentSession().createQuery("select s.fkUser from ServiceUserCentre s where s.fkCentre =:centre and ( s.fkUser not in"
|
||||
+ " (select m.fkUser from Medecin m)) ").setParameter("centre", centre).list();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,9 @@
|
||||
package com.triz.trizservice.service.impl;
|
||||
|
||||
import com.triz.trizservice.modeles.Centre;
|
||||
import com.triz.trizservice.modeles.Consultation;
|
||||
import com.triz.trizservice.modeles.Medecin;
|
||||
import com.triz.trizservice.modeles.MedecinSpecialiste;
|
||||
import com.triz.trizservice.modeles.ServiceFonctiongroupe;
|
||||
import com.triz.trizservice.modeles.ServiceFonctionnaliter;
|
||||
import com.triz.trizservice.modeles.ServiceGroupe;
|
||||
@ -16,6 +19,7 @@ import com.triz.trizservice.modeles.ServicehistoriqueConnection;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceHistoriqueManipulation;
|
||||
import com.triz.trizservice.modeles.ServiceUserCentre;
|
||||
import com.triz.trizservice.modeles.SpecialiteMedicale;
|
||||
import com.triz.trizservice.modeles.Wilaya;
|
||||
import com.triz.trizservice.service.DaoService;
|
||||
import com.triz.trizservice.service.TransactionService;
|
||||
@ -315,4 +319,52 @@ public class TransactionServiceImpl implements TransactionService {
|
||||
public <T extends Serializable> void delete(T object) {
|
||||
daoService.delete(object);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<Medecin> getAllMedecinByCenter(Centre centre) {
|
||||
return daoService.getAllMedecinByCenter(centre);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public <T extends Serializable, ID extends Serializable> T findById(Class<T> clazz, ID id) {
|
||||
return daoService.findById(clazz, id);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<SpecialiteMedicale> getAllSpecialitiesByMedecin(Medecin medecin) {
|
||||
return daoService.getAllSpecialitiesByMedecin(medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<Consultation> getAllConsultationByMedecin(Medecin medecin) {
|
||||
return daoService.getAllConsultationByMedecin(medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public <T extends Serializable> List<T> findAll(Class<T> clazz) {
|
||||
return daoService.findAll(clazz);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecinByUser(Centre centre,Medecin medecin) {
|
||||
return daoService.getAllUserByCentreNotInMedecinByUser(centre,medecin);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public MedecinSpecialiste getMedecinSpecialisteByMedcinBySpecialiste(Medecin medecin, SpecialiteMedicale spc) {
|
||||
return daoService.getMedecinSpecialisteByMedcinBySpecialiste(medecin, spc);
|
||||
}
|
||||
|
||||
@Transactional("transactionManager")
|
||||
@Override
|
||||
public List<ServiceUser> getAllUserByCentreNotInMedecin(Centre centre) {
|
||||
return daoService.getAllUserByCentreNotInMedecin(centre);
|
||||
}
|
||||
}
|
||||
|
||||
@ -626,3 +626,9 @@ ADD COLUMN can_see boolean;
|
||||
|
||||
INSERT INTO service_fonctionnaliter (id, nom) VALUES
|
||||
('modifier_groupe', 'Modifier le groupe');
|
||||
|
||||
ALTER TABLE consultation
|
||||
ADD COLUMN fk_patient uuid,
|
||||
ADD CONSTRAINT fk_consultation_patient
|
||||
FOREIGN KEY (fk_patient)
|
||||
REFERENCES patient(id);
|
||||
@ -783,6 +783,7 @@ distribution.page.entreprise.selectionner=Veuillez s\u00e9l\u00e9ctionner un ent
|
||||
|
||||
distribution.page.groupes=Groupes
|
||||
distribution.page.Utilisateurs=Utilisateurs
|
||||
distribution.page.medecin=Liste des M\u00e9decins
|
||||
|
||||
|
||||
distribution.page.prix=Prix
|
||||
@ -4305,5 +4306,16 @@ service.page.Telephone.ajouter = Ajouter Telephone
|
||||
service.page.Telephone.liste.message.non=Pas de telephone enregistr\u00e9 !
|
||||
distribution.buttons.changerEtablissement=changer Centre
|
||||
distribution.page.etablissement.selectionner=Veuillez s\u00e9l\u00e9ctionner un centre
|
||||
distribution.page.specialite.selectionner=Veuillez s\u00e9l\u00e9ctionner une Sp\u00e9cialit\u00e9
|
||||
distribution.page.medecins.user.choisir=Veuillez s\u00e9l\u00e9ctionner un utilisateur
|
||||
distribution.page.fonctionGroup.voir=Voir
|
||||
distribution.page.fonctionGroup.modifierCeJour=modifier le jour meme
|
||||
distribution.page.medecins.sexe=Sexe
|
||||
distribution.page.medecins.specialite=Sp\u00e9cialit\u00e9s
|
||||
distribution.page.medecins.nbMaxConsultation=Nb Max consultation / jour
|
||||
distribution.page.medecins.historiqueConsultation=Historique de Consultation
|
||||
distribution.page.activer=Activer
|
||||
distribution.page.medecins.confirmerSuppression=\u00cates-vous s\u00fbr de vouloir supprimer ce m\u00e9decin ?
|
||||
distribution.page.medecins.confirmerActivation=\u00cates-vous s\u00fbr de vouloir activer ce m\u00e9decin ?
|
||||
distribution.page.oui=Oui
|
||||
distribution.page.non=Non
|
||||
@ -170,7 +170,7 @@
|
||||
<p:menuitem id="m_medecins"
|
||||
value="Médecins"
|
||||
icon="pi pi-user"
|
||||
url="#{request.contextPath}/views/user/list.xhtml?idpage=Suivis_flotte"
|
||||
url="#{request.contextPath}/views/medecin/list.xhtml?idpage=Suivis_flotte"
|
||||
rendered="#{utilControleAccess.isshowPrivilegeAdd('medecins')}" />
|
||||
|
||||
<p:menuitem id="m_groupes"
|
||||
|
||||
970
src/main/webapp/views/medecin/form.xhtml
Normal file
970
src/main/webapp/views/medecin/form.xhtml
Normal file
@ -0,0 +1,970 @@
|
||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:p="http://primefaces.org/ui"
|
||||
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
|
||||
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
|
||||
template="/WEB-INF/layout/template.xhtml">
|
||||
<f:metadata>
|
||||
<f:viewParam name="medecin" value="#{formMedecinBean.idMedecin}" />
|
||||
<f:viewParam name="modifier" value="#{formMedecinBean.modifier}" />
|
||||
</f:metadata>
|
||||
<ui:define name="title">
|
||||
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
#{formMedecinBean.init()}
|
||||
|
||||
<style>
|
||||
|
||||
.user-card-profile,
|
||||
.user-card-right {
|
||||
border-radius: 16px !important;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
|
||||
border: 1px solid #E5E7EB !important;
|
||||
}
|
||||
.user-card-profile .ui-panel-content,
|
||||
.user-card-right .ui-panel-content {
|
||||
border-radius: 16px !important;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.user-cards-row {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 1.5%;
|
||||
margin-bottom: 1rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
.user-card-profile-wrapper {
|
||||
width: 33%;
|
||||
}
|
||||
.user-card-right-wrapper {
|
||||
width: 65.5%;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
border-radius: 50%;
|
||||
background-color: #DBEAFE;
|
||||
color: #0D9488;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
font-family: 'Inter', sans-serif;
|
||||
margin: 10px auto 18px auto;
|
||||
}
|
||||
|
||||
.user-fullname {
|
||||
text-align: center;
|
||||
font-size: 1.15rem;
|
||||
font-weight: 700;
|
||||
color: #0D1B2E;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.info-block {
|
||||
text-align: left;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 4px;
|
||||
}
|
||||
.info-row i {
|
||||
color: #0D9488 !important;
|
||||
font-size: 1rem;
|
||||
margin-right: 8px;
|
||||
width: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.info-label {
|
||||
color: #0D9488 !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 0.98rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.info-value {
|
||||
color: #334155;
|
||||
font-size: 1rem;
|
||||
text-align: left;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.info-divider {
|
||||
border: none;
|
||||
border-top: 1px solid #E5E7EB;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.status-chip {
|
||||
display: inline-block;
|
||||
background-color: #0D9488;
|
||||
color: #ffffff;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
padding: 3px 14px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.status-chip.inactive {
|
||||
background-color: #EF4444;
|
||||
}
|
||||
|
||||
.count-chip {
|
||||
display: inline-block;
|
||||
background-color: #F5A623;
|
||||
color: #ffffff;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 700;
|
||||
padding: 3px 14px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-outline-gray,
|
||||
.btn-outline-gray.ui-button {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #E2E8F0 !important;
|
||||
color: #334155 !important;
|
||||
border-radius: 10px !important;
|
||||
padding: 8px 18px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
.btn-outline-gray:hover {
|
||||
background-color: #F3F4F6 !important;
|
||||
}
|
||||
|
||||
.btn-teal-pill,
|
||||
.btn-teal-pill.ui-button {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 10px !important;
|
||||
padding: 8px 18px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
.btn-teal-pill:hover {
|
||||
background-color: #0b7d73 !important;
|
||||
}
|
||||
|
||||
.btn-red-pill,
|
||||
.btn-red-pill.ui-button {
|
||||
background-color: #EF4444 !important;
|
||||
border-color: #EF4444 !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 10px !important;
|
||||
padding: 8px 18px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
.btn-red-pill:hover {
|
||||
background-color: #DC2626 !important;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-nav {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
border-bottom: 1px solid #E5E7EB !important;
|
||||
padding-left: 4px;
|
||||
display: flex !important;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-nav li {
|
||||
margin-right: 0 !important;
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-nav li a {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
border-radius: 8px 8px 0 0 !important;
|
||||
color: #64748B !important;
|
||||
font-weight: 500 !important;
|
||||
padding: 10px 16px !important;
|
||||
margin: 0 !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
height: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
.form-tabs .ui-tabs-nav li a i {
|
||||
color: inherit !important;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-nav li:not(.ui-state-active):not(.ui-tabs-selected) a:hover {
|
||||
background-color: rgba(13, 148, 136, 0.1) !important;
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-nav li.ui-state-active a,
|
||||
.form-tabs .ui-tabs-nav li.ui-tabs-selected a {
|
||||
background-color: rgba(13, 148, 136, 0.12) !important;
|
||||
color: #0D9488 !important;
|
||||
border-bottom: 2px solid #0D9488 !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
.form-tabs .ui-tabs-panel {
|
||||
padding: 20px 4px !important;
|
||||
}
|
||||
|
||||
.table-subheader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.table-subheader-title {
|
||||
font-weight: 700;
|
||||
font-size: 0.95rem;
|
||||
color: #0D1B2E;
|
||||
}
|
||||
.btn-export {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #dee2e6 !important;
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
.btn-export:hover {
|
||||
background-color: #e6f5f4 !important;
|
||||
border-color: #0D9488 !important;
|
||||
}
|
||||
|
||||
.user-card-right .ui-datatable-tablewrapper table td,
|
||||
.user-card-right .ui-datatable-tablewrapper table th {
|
||||
vertical-align: middle !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.consult-status {
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
min-width: 90px;
|
||||
text-align: center;
|
||||
}
|
||||
.consult-status-termine {
|
||||
background-color: #29ABE2;
|
||||
}
|
||||
.consult-status-examen-annule {
|
||||
background-color: #B08D57;
|
||||
}
|
||||
.consult-status-annule {
|
||||
background-color: #F16B77;
|
||||
}
|
||||
.consult-status-encours {
|
||||
background-color: #F5A623;
|
||||
}
|
||||
|
||||
.btn-action-view,
|
||||
.btn-action-view.ui-button {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 8px !important;
|
||||
width: 34px !important;
|
||||
height: 34px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.btn-action-view:hover {
|
||||
background-color: #0b7d73 !important;
|
||||
}
|
||||
|
||||
.edit-field-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.edit-field-label {
|
||||
color: #0D9488 !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 0.98rem;
|
||||
width: 160px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.edit-field-label i {
|
||||
margin-right: 8px;
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
.edit-field-input .ui-inputtext,
|
||||
.edit-field-input .ui-selectonemenu,
|
||||
.edit-field-input .ui-password {
|
||||
width: 100% !important;
|
||||
background-color: #F3F4F6 !important;
|
||||
border: 1px solid #E5E7EB !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
.edit-field-input {
|
||||
flex: 1;
|
||||
max-width: 380px;
|
||||
}
|
||||
.specialite-chips-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.specialite-chip {
|
||||
display: inline-block;
|
||||
background-color: rgba(13, 148, 136, 0.1);
|
||||
color: #0D9488;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
padding: 3px 12px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(13, 148, 136, 0.25);
|
||||
}
|
||||
|
||||
.specialite-more-badge,
|
||||
.specialite-more-badge.ui-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #0D1B2E;
|
||||
color: #ffffff;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
padding: 3px 10px;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.specialite-more-badge:hover {
|
||||
background-color: #0D9488;
|
||||
}
|
||||
|
||||
.specialite-chip-block {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.specialites-checkbox-panel .ui-selectcheckboxmenu-item {
|
||||
padding: 6px 10px !important;
|
||||
}
|
||||
|
||||
.edit-field-input .ui-inputtext[readonly],
|
||||
.edit-field-input .ui-inputtext.ui-state-disabled {
|
||||
background-color: #EDEFF2 !important;
|
||||
color: #6B7280 !important;
|
||||
cursor: not-allowed !important;
|
||||
border-style: dashed !important;
|
||||
}
|
||||
|
||||
.edit-field-input .ui-selectcheckboxmenu {
|
||||
width: 100% !important;
|
||||
background-color: #F3F4F6 !important;
|
||||
border: 1px solid #E5E7EB !important;
|
||||
border-radius: 8px !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu:not(.ui-state-disabled):hover {
|
||||
border-color: #0D9488 !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu.ui-state-focus {
|
||||
border-color: #0D9488 !important;
|
||||
box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15) !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu-label-container {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu-label {
|
||||
color: #334155 !important;
|
||||
font-size: 1rem !important;
|
||||
padding: 8px 12px !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu-label.ui-placeholder {
|
||||
color: #94A3B8 !important;
|
||||
}
|
||||
.edit-field-input .ui-selectcheckboxmenu-trigger {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
color: #0D9488 !important;
|
||||
width: 34px !important;
|
||||
}
|
||||
|
||||
.ui-selectcheckboxmenu-panel {
|
||||
border: 1px solid #E5E7EB !important;
|
||||
border-radius: 12px !important;
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
|
||||
padding: 6px !important;
|
||||
margin-top: 4px !important;
|
||||
}
|
||||
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-filter-container {
|
||||
padding: 6px 6px 10px 6px !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-filter-container input {
|
||||
width: 100% !important;
|
||||
background-color: #F3F4F6 !important;
|
||||
border: 1px solid #E5E7EB !important;
|
||||
border-radius: 8px !important;
|
||||
padding: 8px 10px 8px 30px !important;
|
||||
font-size: 0.9rem !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-filter-container input:focus {
|
||||
border-color: #0D9488 !important;
|
||||
box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15) !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-filter-icon {
|
||||
color: #0D9488 !important;
|
||||
left: 16px !important;
|
||||
}
|
||||
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-header {
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
border-bottom: 1px solid #E5E7EB !important;
|
||||
color: #0D1B2E !important;
|
||||
padding: 6px !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-close {
|
||||
color: #64748B !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-close:hover {
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-items {
|
||||
padding: 4px 0 !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item {
|
||||
border-radius: 8px !important;
|
||||
padding: 8px 10px !important;
|
||||
margin: 2px 4px !important;
|
||||
transition: background-color 0.15s ease;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item:not(.ui-state-disabled):hover {
|
||||
background-color: rgba(13, 148, 136, 0.1) !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-selectcheckboxmenu-item .ui-selectcheckboxmenu-item-value {
|
||||
color: #334155 !important;
|
||||
font-size: 0.92rem !important;
|
||||
}
|
||||
|
||||
.ui-selectcheckboxmenu-panel .ui-chkbox-box {
|
||||
width: 18px !important;
|
||||
height: 18px !important;
|
||||
border: 1.5px solid #CBD5E1 !important;
|
||||
border-radius: 5px !important;
|
||||
background-color: #ffffff !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-chkbox-box.ui-state-active {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-chkbox-box .ui-chkbox-icon {
|
||||
color: #ffffff !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
.ui-selectcheckboxmenu-panel .ui-chkbox-box.ui-state-focus {
|
||||
box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2) !important;
|
||||
}
|
||||
|
||||
/* ===== Dialog spécialités ===== */
|
||||
.specialites-dialog .ui-dialog-titlebar {
|
||||
background-color: #0D1B2E !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 8px 8px 0 0 !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-titlebar-close .ui-icon {
|
||||
filter: brightness(0) invert(1) !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-titlebar-close:hover {
|
||||
background-color: rgba(255,255,255,0.15) !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-content {
|
||||
padding: 18px !important;
|
||||
border-radius: 0 0 8px 8px !important;
|
||||
}
|
||||
.specialites-dialog-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.info-row-nowrap {
|
||||
align-items: center;
|
||||
}
|
||||
.info-row-nowrap .info-label {
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
min-width: 160px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
/* ===== Bouton Activer ===== */
|
||||
.btn-activate-pill,
|
||||
.btn-activate-pill.ui-button {
|
||||
background-color: #0F766E !important;
|
||||
border-color: #0F766E !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 10px !important;
|
||||
padding: 8px 18px !important;
|
||||
font-weight: 500 !important;
|
||||
}
|
||||
.btn-activate-pill:hover {
|
||||
background-color: #0c5f59 !important;
|
||||
}
|
||||
|
||||
/* ===== Confirm dialog (Supprimer / Activer) ===== */
|
||||
.confirm-dialog-medecin.ui-dialog {
|
||||
border-radius: 16px !important;
|
||||
box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
|
||||
border: none !important;
|
||||
overflow: hidden;
|
||||
width: 400px !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-titlebar {
|
||||
background-color: #0D1B2E !important;
|
||||
color: #ffffff !important;
|
||||
padding: 16px 20px !important;
|
||||
border: none !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-title {
|
||||
font-size: 1.05rem !important;
|
||||
font-weight: 700 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-titlebar-close {
|
||||
display: inline-block !important;
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-titlebar-close .ui-icon {
|
||||
filter: brightness(0) invert(1) !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-titlebar-close:hover {
|
||||
background-color: rgba(255,255,255,0.15) !important;
|
||||
border-radius: 6px !important;
|
||||
}
|
||||
|
||||
.confirm-dialog-medecin .ui-dialog-content {
|
||||
background-color: #ffffff !important;
|
||||
padding: 28px 24px 8px 24px !important;
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
text-align: center !important;
|
||||
gap: 16px;
|
||||
width: 100% !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.confirm-dialog-icon-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(13, 148, 136, 0.1);
|
||||
margin: 0 auto;
|
||||
order: -1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.confirm-dialog-icon-wrap i {
|
||||
color: #0D9488 !important;
|
||||
font-size: 1.6rem !important;
|
||||
}
|
||||
|
||||
.confirm-dialog-medecin .ui-confirm-dialog-message {
|
||||
color: #334155 !important;
|
||||
font-size: 1rem !important;
|
||||
font-weight: 500 !important;
|
||||
margin: 0 !important;
|
||||
order: 0;
|
||||
width: 100%;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.confirm-dialog-medecin .ui-dialog-buttonpane {
|
||||
background-color: #ffffff !important;
|
||||
border: none !important;
|
||||
padding: 16px 24px 24px 24px !important;
|
||||
display: flex !important;
|
||||
justify-content: center !important;
|
||||
gap: 10px !important;
|
||||
border-radius: 0 0 16px 16px !important;
|
||||
}
|
||||
.confirm-dialog-medecin .ui-dialog-buttonpane .ui-button {
|
||||
min-width: 110px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h:form id="medecinsForm">
|
||||
|
||||
<div class="user-cards-row">
|
||||
|
||||
<div class="user-card-profile-wrapper">
|
||||
<p:card id="card" styleClass="user-card-profile" style="height: 100%;">
|
||||
<div style="display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;">
|
||||
|
||||
<div style="width: 150px;">
|
||||
<p:commandButton value="#{msg['distribution.page.etatVGlobal.retour']}" icon="pi pi-arrow-left"
|
||||
action="#{formMedecinBean.voirMedecin()}" ajax="false"
|
||||
styleClass="btn-outline-gray" />
|
||||
</div>
|
||||
|
||||
<div style=" text-align: right;
|
||||
display: flex;
|
||||
gap: 8px;">
|
||||
<p:commandButton value="#{msg['distribution.page.supprimer']}" icon="pi pi-trash"
|
||||
rendered="#{utilControleAccess.isshowPrivilegeRemove('medecins') and formMedecinBean.canEdit and formMedecinBean.selectedMedecin.fkUser.actif eq 'true'}"
|
||||
styleClass="btn-red-pill"
|
||||
onclick="PF('confirmDeleteMedecinWidget').show(); return false;" />
|
||||
|
||||
<p:commandButton value="#{msg['distribution.page.activer']}" icon="pi pi-check"
|
||||
rendered="#{utilControleAccess.isshowPrivilegeRemove('medecins') and formMedecinBean.canEdit and formMedecinBean.selectedMedecin.fkUser.actif ne 'true'}"
|
||||
styleClass="btn-activate-pill"
|
||||
onclick="PF('confirmActivateMedecinWidget').show(); return false;" />
|
||||
|
||||
<p:commandButton value="#{msg['distribution.page.enregistrer']}" icon="pi pi-save"
|
||||
rendered="#{formMedecinBean.canEdit}"
|
||||
action="#{formMedecinBean.saveMedecin()}"
|
||||
update="@form"
|
||||
styleClass="btn-teal-pill" />
|
||||
|
||||
<p:commandButton value="#{msg['distribution.page.modifier']}" icon="pi pi-pencil"
|
||||
rendered="#{!formMedecinBean.canEdit and utilControleAccess.isshowPrivilegeUpdate('medecins')}"
|
||||
action="#{formMedecinBean.editMedecin()}"
|
||||
styleClass="btn-teal-pill" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-avatar">
|
||||
#{fn:substring(formMedecinBean.selectedMedecin.fkUser.nom,0,1)}#{fn:substring(formMedecinBean.selectedMedecin.fkUser.prenom,0,1)}
|
||||
</div>
|
||||
|
||||
<!-- ===================== MODE CONSULTATION ===================== -->
|
||||
<h:panelGroup rendered="#{!formMedecinBean.canEdit}">
|
||||
<div class="user-fullname">
|
||||
<h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.nom} #{formMedecinBean.selectedMedecin.fkUser.prenom}" />
|
||||
</div>
|
||||
|
||||
<div class="info-block">
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-user"></i>#{msg['distribution.page.user.nom']}</span>
|
||||
<span class="info-value"><h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.nom}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-users"></i>#{msg['distribution.page.user.prenom']}</span>
|
||||
<span class="info-value"><h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.prenom}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-phone"></i>#{msg['stock.page.fournisseur.Telephone']}</span>
|
||||
<span class="info-value"><h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.telephone}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-envelope"></i>#{msg['stock.page.fournisseur.mail']}</span>
|
||||
<span class="info-value"><h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.mail}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-user"></i>#{msg['distribution.page.medecins.sexe']}</span>
|
||||
<span class="info-value"><h:outputText value="#{formMedecinBean.selectedMedecin.sexe}" /></span>
|
||||
</div>
|
||||
|
||||
<div class="info-row" style="align-items: flex-start;">
|
||||
<span class="info-label"><i class="pi pi-briefcase"></i>#{msg['distribution.page.medecins.specialite']}</span>
|
||||
<span class="info-value">
|
||||
<div class="specialite-chips-wrapper">
|
||||
<ui:repeat value="#{formMedecinBean.listSelectedSepecialite}" var="spec" varStatus="status">
|
||||
<h:panelGroup styleClass="specialite-chip" rendered="#{status.index lt 2}">
|
||||
<h:outputText value="#{spec.name}" />
|
||||
</h:panelGroup>
|
||||
</ui:repeat>
|
||||
|
||||
<h:outputLink styleClass="specialite-more-badge"
|
||||
rendered="#{formMedecinBean.listSelectedSepecialite.size() gt 2}"
|
||||
onclick="PF('specDialogWidget').show(); return false;">
|
||||
<h:outputText value="+#{formMedecinBean.listSelectedSepecialite.size() - 2}" />
|
||||
</h:outputLink>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="info-divider" />
|
||||
|
||||
<div class="info-block">
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-check-circle"></i>Status</span>
|
||||
<span class="info-value">
|
||||
<span class="status-chip #{formMedecinBean.selectedMedecin.fkUser.actif ne 'true' ? 'inactive' : ''}">
|
||||
#{formMedecinBean.selectedMedecin.fkUser.actif eq 'true' ? 'Actif' : 'Inactif'}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="info-divider" />
|
||||
|
||||
<div class="info-row">
|
||||
<span class="info-label"><i class="pi pi-user"></i>#{msg['distribution.page.user']}</span>
|
||||
<span class="info-value">
|
||||
<h:link styleClass="user-link" outcome="/views/user/form.xhtml?faces-redirect=true">
|
||||
<f:param name="user1" value="#{formMedecinBean.selectedMedecin.fkUser.userid}" />
|
||||
<h:outputText value="#{formMedecinBean.selectedMedecin.fkUser.userid}" />
|
||||
<i class="pi pi-external-link" style="margin-left: 4px;
|
||||
font-size: 0.75rem;"></i>
|
||||
</h:link>
|
||||
</span>
|
||||
</div>
|
||||
<hr class="info-divider" />
|
||||
|
||||
<div class="info-block">
|
||||
<div class="info-row info-row-nowrap">
|
||||
<span class="info-label"><i class="pi pi-users"></i>#{msg['distribution.page.medecins.nbMaxConsultation']}</span>
|
||||
<span class="info-value">
|
||||
<span class="count-chip">
|
||||
<h:outputText value="#{formMedecinBean.selectedMedecin.nbRdvMax}" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</h:panelGroup>
|
||||
|
||||
<!-- ===================== MODE EDITION ===================== -->
|
||||
<h:panelGroup rendered="#{formMedecinBean.canEdit}">
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-user"></i>#{msg['distribution.page.user']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:selectOneMenu id="user" value="#{formMedecinBean.selectedMedecin.fkUser}"
|
||||
filter="true" filterMatchMode="contains"
|
||||
converter="serviceUserConverter"
|
||||
style="width: 100%;">
|
||||
<f:converter binding="#{serviceUserConverter}" />
|
||||
<f:selectItem itemLabel="#{msg['distribution.page.medecins.user.choisir']}" itemValue="#{null}" noSelectionOption="true" />
|
||||
<f:selectItems value="#{formMedecinBean.listeUsers}" var="u"
|
||||
itemLabel="#{u.nom} #{u.prenom} (#{u.userid})" itemValue="#{u}" />
|
||||
<p:ajax event="change" update="medecinsForm" />
|
||||
</p:selectOneMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-user"></i>#{msg['distribution.page.user.nom']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:inputText id="nom" value="#{formMedecinBean.selectedMedecin.fkUser.nom}" readonly="true">
|
||||
<p:ajax event="blur" />
|
||||
</p:inputText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-users"></i>#{msg['distribution.page.user.prenom']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:inputText id="prenom" value="#{formMedecinBean.selectedMedecin.fkUser.prenom}" readonly="true">
|
||||
<p:ajax event="blur" />
|
||||
</p:inputText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-phone"></i>#{msg['stock.page.fournisseur.Telephone']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:inputText id="telephone" value="#{formMedecinBean.selectedMedecin.fkUser.telephone}" readonly="true">
|
||||
<p:ajax event="blur" />
|
||||
</p:inputText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-envelope"></i>#{msg['stock.page.fournisseur.mail']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:inputText id="mail" value="#{formMedecinBean.selectedMedecin.fkUser.mail}" readonly="true">
|
||||
<p:ajax event="blur" />
|
||||
</p:inputText>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-user"></i>#{msg['distribution.page.medecins.sexe']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:selectOneMenu id="sexe" value="#{formMedecinBean.selectedMedecin.sexe}">
|
||||
<f:selectItem itemLabel="Homme" itemValue="Homme" />
|
||||
<f:selectItem itemLabel="Femme" itemValue="Femme" />
|
||||
<p:ajax event="change" />
|
||||
</p:selectOneMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="edit-field-row" style="align-items: flex-start;">
|
||||
<span class="edit-field-label"><i class="pi pi-briefcase"></i>#{msg['distribution.page.medecins.specialite']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:selectCheckboxMenu id="specialites"
|
||||
value="#{formMedecinBean.listSelectedSepecialite}"
|
||||
label="#{msg['distribution.page.specialite.selectionner']}"
|
||||
converter="specialiteMedicaleConverter"
|
||||
multiple="true" filter="true" filterMatchMode="contains"
|
||||
panelStyleClass="specialites-checkbox-panel"
|
||||
style="width: 100%;">
|
||||
<f:converter binding="#{specialiteMedicaleConverter}" />
|
||||
<f:selectItems value="#{formMedecinBean.listAllSepecialite}" var="spec"
|
||||
itemLabel="#{spec.name}" itemValue="#{spec}" />
|
||||
<p:ajax event="change" />
|
||||
</p:selectCheckboxMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="info-divider" />
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-check-circle"></i>#{msg['distribution.page.client.actif']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:selectOneMenu value="#{formMedecinBean.selectedMedecin.fkUser.actif}" disabled="true">
|
||||
<f:selectItem itemLabel="Oui" itemValue="true" />
|
||||
<f:selectItem itemLabel="Non" itemValue="false" />
|
||||
<p:ajax event="change" />
|
||||
</p:selectOneMenu>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="info-divider" />
|
||||
|
||||
<div class="edit-field-row">
|
||||
<span class="edit-field-label"><i class="pi pi-users"></i>#{msg['distribution.page.medecins.nbMaxConsultation']}</span>
|
||||
<div class="edit-field-input">
|
||||
<p:inputNumber id="nbMaxConsultation" value="#{formMedecinBean.selectedMedecin.nbRdvMax}" decimalPlaces="0" minValue="0">
|
||||
<p:ajax event="blur" />
|
||||
</p:inputNumber>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</h:panelGroup>
|
||||
|
||||
<!-- Dialog partagé pour voir toutes les spécialités -->
|
||||
<p:dialog widgetVar="specDialogWidget" header="#{msg['distribution.page.medecins.specialite']}"
|
||||
modal="true" resizable="false" closable="true"
|
||||
styleClass="specialites-dialog" width="360">
|
||||
<div class="specialites-dialog-list">
|
||||
<ui:repeat value="#{formMedecinBean.listSelectedSepecialite}" var="spec">
|
||||
<span class="specialite-chip specialite-chip-block">
|
||||
<h:outputText value="#{spec.name}" />
|
||||
</span>
|
||||
</ui:repeat>
|
||||
</div>
|
||||
</p:dialog>
|
||||
|
||||
<p:confirmDialog widgetVar="confirmDeleteMedecinWidget"
|
||||
message="#{msg['distribution.page.medecins.confirmerSuppression']}"
|
||||
header="#{msg['distribution.page.supprimer']}"
|
||||
closable="true"
|
||||
styleClass="confirm-dialog-medecin">
|
||||
|
||||
<p:commandButton value="#{msg['distribution.page.oui']}" icon="pi pi-check"
|
||||
action="#{formMedecinBean.deleteMedecin()}"
|
||||
styleClass="btn-red-pill"
|
||||
onclick="PF('confirmDeleteMedecinWidget').hide();" />
|
||||
<p:commandButton value="#{msg['distribution.page.non']}" icon="pi pi-times"
|
||||
styleClass="btn-outline-gray"
|
||||
onclick="PF('confirmDeleteMedecinWidget').hide();" type="button" />
|
||||
</p:confirmDialog>
|
||||
|
||||
<p:confirmDialog widgetVar="confirmActivateMedecinWidget"
|
||||
message="#{msg['distribution.page.medecins.confirmerActivation']}"
|
||||
header="#{msg['distribution.page.activer']}"
|
||||
closable="true"
|
||||
styleClass="confirm-dialog-medecin">
|
||||
|
||||
<p:commandButton value="#{msg['distribution.page.oui']}" icon="pi pi-check"
|
||||
action="#{formMedecinBean.activerMedecin()}"
|
||||
styleClass="btn-activate-pill"
|
||||
onclick="PF('confirmActivateMedecinWidget').hide();" />
|
||||
<p:commandButton value="#{msg['distribution.page.non']}" icon="pi pi-times"
|
||||
styleClass="btn-outline-gray"
|
||||
onclick="PF('confirmActivateMedecinWidget').hide();" type="button" />
|
||||
</p:confirmDialog>
|
||||
|
||||
</p:card>
|
||||
</div>
|
||||
|
||||
<div class="user-card-right-wrapper">
|
||||
<p:card styleClass="user-card-right" style="height: 100%;">
|
||||
<p:tabView scrollable="true" styleClass="form-tabs">
|
||||
<p:tab title="#{msg['distribution.page.medecins.historiqueConsultation']}">
|
||||
|
||||
<div class="table-subheader">
|
||||
<span class="table-subheader-title">#{msg['distribution.page.medecins.historiqueConsultation']}</span>
|
||||
<div>
|
||||
<p:commandButton styleClass="mr-2 btn-export" icon="pi pi-file-excel" title="Excel" ajax="false">
|
||||
<p:dataExporter type="xls" target="dataTable" fileName="historique_consultation" />
|
||||
</p:commandButton>
|
||||
<p:commandButton styleClass="btn-export" icon="pi pi-file-pdf" title="PDF" ajax="false">
|
||||
<p:dataExporter type="pdf" target="dataTable" fileName="historique_consultation" />
|
||||
</p:commandButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p:dataTable id="dataTable" var="consultation"
|
||||
rows="30" paginator="true" draggableColumns="true"
|
||||
value="#{formMedecinBean.listeHistoriqueConsultation}"
|
||||
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||
rowsPerPageTemplate="10,30,40,60,80,100"
|
||||
emptyMessage="#{msg['distribution.page.produit.liste.historique.non'] }"
|
||||
selectionMode="single"
|
||||
rowKey="#{consultation.id}">
|
||||
|
||||
<p:column style="text-align: center;" headerText="Date et heure" filterBy="#{consultation.date} à #{consultation.heureDebut}" filterMatchMode="contains" sortBy="#{consultation.date} à #{consultation.heureDebut}">
|
||||
<h:outputText value="#{consultation.date} à #{consultation.heureDebut}" />
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="Patient" filterBy="#{consultation.fkPatient.nom} #{consultation.fkPatient.prenom}" filterMatchMode="contains" sortBy="#{consultation.fkPatient.nom} #{consultation.fkPatient.prenom}">
|
||||
<h:outputText value="#{consultation.fkPatient.nom} #{consultation.fkPatient.prenom}" />
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="Status" filterMatchMode="contains" >
|
||||
<h:panelGroup styleClass="consult-status consult-status-termine" >
|
||||
<h:outputText value="Terminé" />
|
||||
</h:panelGroup>
|
||||
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;
|
||||
width: 60px;" headerText="Action">
|
||||
<p:commandButton icon="pi pi-search" styleClass="btn-action-view"
|
||||
action="#{formMedecinBean.voirExamen(consultation)}" />
|
||||
</p:column>
|
||||
|
||||
</p:dataTable>
|
||||
</p:tab>
|
||||
</p:tabView>
|
||||
</p:card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</h:form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).on('click', '.ui-widget-overlay, .ui-dialog-mask', function () {
|
||||
['specDialogWidget', 'confirmDeleteMedecinWidget', 'confirmActivateMedecinWidget'].forEach(function (name) {
|
||||
if (PF(name)) {
|
||||
PF(name).hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
330
src/main/webapp/views/medecin/list.xhtml
Normal file
330
src/main/webapp/views/medecin/list.xhtml
Normal file
@ -0,0 +1,330 @@
|
||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:p="http://primefaces.org/ui"
|
||||
template="/WEB-INF/layout/template.xhtml">
|
||||
<ui:define name="title">
|
||||
#{msg['distribution.page.medecin']}
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="breadcrumb">
|
||||
<f:metadata>
|
||||
<f:viewParam name="homeOutcome" value="/favorites/dashboard" />
|
||||
<f:viewParam name="value" value="Utilisateurs" />
|
||||
<f:event type="preRenderView" listener="#{userBean.init}" />
|
||||
</f:metadata>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<style>
|
||||
.inactive-row {
|
||||
background-color: #f8d7da !important;
|
||||
background-image: none !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.card .ui-datatable-tablewrapper table td,
|
||||
.card .ui-datatable-tablewrapper table th {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
.card .ui-datatable-tablewrapper table td {
|
||||
padding-top: 14px !important;
|
||||
padding-bottom: 14px !important;
|
||||
}
|
||||
|
||||
.page-center-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: calc(100vh - 160px);
|
||||
}
|
||||
.page-center-wrapper .card {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-header-title {
|
||||
font-weight: 700;
|
||||
font-size: 1.05rem;
|
||||
color: #343a40;
|
||||
}
|
||||
|
||||
.btn-green,
|
||||
.btn-green.ui-button,
|
||||
.btn-green .ui-button-text {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.btn-green:hover {
|
||||
background-color: #0b7d73 !important;
|
||||
border-color: #0b7d73 !important;
|
||||
}
|
||||
|
||||
.btn-green-outline,
|
||||
.btn-green-outline.ui-button {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #0D9488 !important;
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
.btn-green-outline:hover {
|
||||
background-color: #e6f5f4 !important;
|
||||
}
|
||||
|
||||
.btn-view-green,
|
||||
.btn-view-green.ui-button {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.btn-view-green:hover {
|
||||
background-color: #0b7d73 !important;
|
||||
}
|
||||
|
||||
.btn-export {
|
||||
background-color: #ffffff !important;
|
||||
border: 1px solid #dee2e6 !important;
|
||||
color: #0D9488 !important;
|
||||
}
|
||||
.btn-export:hover {
|
||||
background-color: #e6f5f4 !important;
|
||||
border-color: #0D9488 !important;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 14px;
|
||||
border-radius: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
min-width: 90px;
|
||||
}
|
||||
|
||||
.status-badge-actif {
|
||||
background-color: #29ABE2;
|
||||
}
|
||||
|
||||
.status-badge-inactif {
|
||||
background-color: #F16B77;
|
||||
}
|
||||
|
||||
.status-badge-indisponible {
|
||||
background-color: #F5A623;
|
||||
}
|
||||
|
||||
.ui-chkbox-box.ui-state-active,
|
||||
.ui-datatable-toggler-content .ui-chkbox-box.ui-state-active {
|
||||
background-color: #0D9488 !important;
|
||||
border-color: #0D9488 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.ui-chkbox-box:hover,
|
||||
.ui-chkbox-box.ui-state-hover {
|
||||
border-color: #0D9488 !important;
|
||||
}
|
||||
.ui-chkbox-box.ui-state-focus {
|
||||
border-color: #0D9488 !important;
|
||||
box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2) !important;
|
||||
}
|
||||
|
||||
/* MODIF : spécialités - texte tronqué cliquable, ouvre un dialog avec la liste complète */
|
||||
.specialite-text {
|
||||
display: inline-block;
|
||||
max-width: 170px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #0D9488;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px dashed rgba(13, 148, 136, 0.4);
|
||||
vertical-align: middle;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.specialite-text:hover {
|
||||
color: #0b7d73;
|
||||
border-bottom-color: #0D9488;
|
||||
}
|
||||
|
||||
.specialites-dialog .ui-dialog-titlebar {
|
||||
background-color: #0D1B2E !important;
|
||||
color: #ffffff !important;
|
||||
border-radius: 8px 8px 0 0 !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-titlebar-close .ui-icon {
|
||||
filter: brightness(0) invert(1) !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-titlebar-close:hover {
|
||||
background-color: rgba(255,255,255,0.15) !important;
|
||||
}
|
||||
.specialites-dialog .ui-dialog-content {
|
||||
padding: 18px !important;
|
||||
border-radius: 0 0 8px 8px !important;
|
||||
}
|
||||
.specialites-dialog-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.specialite-chip {
|
||||
display: inline-block;
|
||||
background-color: rgba(13, 148, 136, 0.1);
|
||||
color: #0D9488;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
padding: 4px 14px;
|
||||
border-radius: 20px;
|
||||
border: 1px solid rgba(13, 148, 136, 0.25);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="page-center-wrapper">
|
||||
<h:form id="form">
|
||||
<div class="card">
|
||||
<p:dataTable id="dataTable" var="user"
|
||||
rows="30" paginator="true" draggableColumns="true"
|
||||
value="#{medecinBean.allMedecin}"
|
||||
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
|
||||
rowsPerPageTemplate="20,30,40,60,80,100"
|
||||
emptyMessage="#{msg['distribution.page.user.liste.message.non'] }"
|
||||
selectionMode="single"
|
||||
rowKey="#{user.id}" >
|
||||
<f:facet name="header">
|
||||
<div class="flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="table-header-title">#{msg['distribution.page.Utilisateurs']}</span>
|
||||
</div>
|
||||
<div>
|
||||
<p:commandButton id="xlsExport"
|
||||
styleClass="mr-2 mb-2 btn-export"
|
||||
type="button"
|
||||
icon="pi pi-file-excel"
|
||||
title="Excel">
|
||||
|
||||
<p:dataExporter type="xls"
|
||||
target="dataTable"
|
||||
fileName="utilisateurs" />
|
||||
</p:commandButton>
|
||||
|
||||
<p:commandButton id="pdfExport"
|
||||
styleClass="mr-2 mb-2 btn-export"
|
||||
type="button"
|
||||
icon="pi pi-file-pdf"
|
||||
title="PDF">
|
||||
|
||||
<p:dataExporter type="pdf"
|
||||
target="dataTable"
|
||||
fileName="utilisateurs" />
|
||||
</p:commandButton>
|
||||
<p:commandButton id="toggler" styleClass="mr-2 mb-2 btn-green-outline" type="button" value="Columns" icon="pi pi-align-justify"/>
|
||||
<p:columnToggler datasource="dataTable"
|
||||
trigger="toggler">
|
||||
<p:ajax event="toggle" oncomplete="updateLastColumnState();" />
|
||||
</p:columnToggler>
|
||||
|
||||
<p:commandButton title="#{msg['distribution.page.entreprise.ajouterenreprise']}" icon="pi pi-plus" styleClass="ui-button-success btn-green mr-2" action="#{medecinBean.ajouterUser()}" rendered="#{utilControleAccess.isshowPrivilegeAdd('user')}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:facet>
|
||||
|
||||
<p:column style="text-align: center;" headerText="#{msg['distribution.page.user.nom']}" filterBy="#{user.fkUser.nom}" filterMatchMode="contains" sortBy="#{user.fkUser.nom}" >
|
||||
<h:outputText value="#{user.fkUser.nom}" />
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="#{msg['distribution.page.user.prenom']}" filterBy="#{user.fkUser.prenom}" filterMatchMode="contains" sortBy="#{user.fkUser.prenom}" >
|
||||
<h:outputText value="#{user.fkUser.prenom}" />
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="#{msg['stock.page.fournisseur.Telephone']}" filterBy="#{user.fkUser.telephone}" filterMatchMode="contains" sortBy="#{user.fkUser.telephone}" >
|
||||
<h:outputText value="#{user.fkUser.telephone}" />
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="#{msg['stock.page.fournisseur.mail']}" filterBy="#{user.fkUser.mail}" filterMatchMode="contains" sortBy="#{user.fkUser.mail}" >
|
||||
<h:outputText value="#{user.fkUser.mail}" />
|
||||
</p:column>
|
||||
|
||||
<!-- MODIF : spécialités cliquables, ouvre un dialog partagé avec la liste complète -->
|
||||
<p:column style="text-align: center; width: 190px;" headerText="#{msg['distribution.page.medecins.specialite']}">
|
||||
<p:commandLink styleClass="specialite-text"
|
||||
process="@this"
|
||||
actionListener="#{medecinBean.onShowSpecialites(user)}"
|
||||
update=":form:specDialogContent"
|
||||
oncomplete="PF('specDialogWidget').show()">
|
||||
<h:outputText value="#{medecinBean.getSpecialitesDisplay(user)}" />
|
||||
</p:commandLink>
|
||||
</p:column>
|
||||
|
||||
<p:column style="text-align: center;" headerText="Status">
|
||||
<h:panelGroup styleClass="status-badge status-badge-actif"
|
||||
rendered="#{medecinBean.getStatusMedecin(user) eq 'disponible'}">
|
||||
<h:outputText value="Actif" />
|
||||
</h:panelGroup>
|
||||
<h:panelGroup styleClass="status-badge status-badge-inactif"
|
||||
rendered="#{medecinBean.getStatusMedecin(user) eq 'false'}">
|
||||
<h:outputText value="Inactif" />
|
||||
</h:panelGroup>
|
||||
<h:panelGroup styleClass="status-badge status-badge-indisponible"
|
||||
rendered="#{medecinBean.getStatusMedecin(user) eq 'indisponible'}">
|
||||
<h:outputText value="Indisponible" />
|
||||
</h:panelGroup>
|
||||
</p:column>
|
||||
|
||||
<p:column style="width:130px; text-align: center;" exportable="false" visible="true" draggable="false" toggleable="false" headerText="Action">
|
||||
<p:commandButton id="buttonSelect" styleClass="btn-view-green" style="height:30px; text-align: center" action="#{medecinBean.voirUser()}" icon="pi pi-search" title="#{msg['distribution.page.consulter']}">
|
||||
<f:setPropertyActionListener value="#{user}" target="#{medecinBean.selectedMedecin}" />
|
||||
</p:commandButton>
|
||||
</p:column>
|
||||
|
||||
</p:dataTable>
|
||||
|
||||
<p:dialog widgetVar="specDialogWidget" header="#{msg['distribution.page.medecins.specialite']}"
|
||||
modal="true" resizable="false" closable="true"
|
||||
styleClass="specialites-dialog" width="360">
|
||||
<h:panelGroup id="specDialogContent">
|
||||
<div class="specialites-dialog-list">
|
||||
<ui:repeat value="#{medecinBean.selectedRowSpecialites}" var="spec">
|
||||
<span class="specialite-chip">
|
||||
<h:outputText value="#{spec.name}" />
|
||||
</span>
|
||||
</ui:repeat>
|
||||
</div>
|
||||
</h:panelGroup>
|
||||
</p:dialog>
|
||||
</div>
|
||||
</h:form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
$(document).on('click', '.ui-widget-overlay', function () {
|
||||
if (PF('specDialogWidget')) {
|
||||
PF('specDialogWidget').hide();
|
||||
}
|
||||
});
|
||||
|
||||
function updateLastColumnState() {
|
||||
|
||||
var active = $('.ui-columntoggler .ui-chkbox-box.ui-state-active');
|
||||
|
||||
$('.ui-columntoggler .ui-chkbox-box')
|
||||
.removeClass('ui-state-disabled')
|
||||
.css('pointer-events', '');
|
||||
|
||||
if (active.length === 1) {
|
||||
active.addClass('ui-state-disabled')
|
||||
.css('pointer-events', 'none');
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('click', '#form\\:toggler', function () {
|
||||
setTimeout(updateLastColumnState, 200);
|
||||
});
|
||||
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
Loading…
Reference in New Issue
Block a user