Files
unionflow-client-quarkus-pr…/target/classes/META-INF/resources/pages/secure/aide/traitement.xhtml

162 lines
8.6 KiB
HTML

<!DOCTYPE html>
<ui:composition template="/templates/main-template.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<ui:param name="page" value="#{demandesAideBean}"/>
<ui:define name="title">Traitement des Demandes d'Aide - UnionFlow</ui:define>
<ui:define name="content">
<h:form id="formTraitement">
<p:messages id="messages" showDetail="true" closable="true"/>
<!-- En-tête -->
<div class="card mb-3">
<div class="flex justify-content-between align-items-center flex-column md:flex-row">
<div>
<h3 class="m-0">
<i class="pi pi-inbox text-primary mr-2"></i>
Traitement des Demandes d'Aide
</h3>
<p class="text-600 m-0 mt-2">
Gérez et traitez les demandes d'aide des membres
</p>
</div>
<div class="flex gap-2 mt-2 md:mt-0">
<p:commandButton value="Actualiser"
icon="pi pi-refresh"
styleClass="ui-button-outlined ui-button-secondary"
action="#{demandesAideBean.actualiser}"
update="@form"/>
</div>
</div>
</div>
<!-- Statistiques -->
<div class="grid mb-3">
<div class="col-12 md:col-3">
<div class="card bg-blue-100 border-left-3 border-blue-500">
<div class="flex justify-content-between">
<div>
<div class="text-blue-900 font-bold text-2xl">#{demandesAideBean.statistiques.totalDemandes}</div>
<div class="text-blue-700">Total Demandes</div>
</div>
<div class="bg-blue-500 text-white border-round text-center"
style="width: 3rem; height: 3rem; line-height: 3rem;">
<i class="pi pi-inbox text-xl"></i>
</div>
</div>
</div>
</div>
<div class="col-12 md:col-3">
<div class="card bg-orange-100 border-left-3 border-orange-500">
<div class="flex justify-content-between">
<div>
<div class="text-orange-900 font-bold text-2xl">#{demandesAideBean.statistiques.demandesEnAttente}</div>
<div class="text-orange-700">En Attente</div>
</div>
<div class="bg-orange-500 text-white border-round text-center"
style="width: 3rem; height: 3rem; line-height: 3rem;">
<i class="pi pi-clock text-xl"></i>
</div>
</div>
</div>
</div>
<div class="col-12 md:col-3">
<div class="card bg-green-100 border-left-3 border-green-500">
<div class="flex justify-content-between">
<div>
<div class="text-green-900 font-bold text-2xl">#{demandesAideBean.statistiques.demandesApprouvees}</div>
<div class="text-green-700">Approuvées</div>
</div>
<div class="bg-green-500 text-white border-round text-center"
style="width: 3rem; height: 3rem; line-height: 3rem;">
<i class="pi pi-check text-xl"></i>
</div>
</div>
</div>
</div>
<div class="col-12 md:col-3">
<div class="card bg-red-100 border-left-3 border-red-500">
<div class="flex justify-content-between">
<div>
<div class="text-red-900 font-bold text-2xl">#{demandesAideBean.statistiques.demandesRejetees}</div>
<div class="text-red-700">Rejetées</div>
</div>
<div class="bg-red-500 text-white border-round text-center"
style="width: 3rem; height: 3rem; line-height: 3rem;">
<i class="pi pi-times text-xl"></i>
</div>
</div>
</div>
</div>
</div>
<!-- Liste des demandes -->
<div class="card">
<h5 class="mb-3">Demandes à Traiter</h5>
<p:dataTable id="dtDemandes"
var="demande"
value="#{demandesAideBean.demandesFiltrees}"
paginator="true"
rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,25"
currentPageReportTemplate="Affichage {startRecord}-{endRecord} sur {totalRecords}"
styleClass="mt-3">
<p:column headerText="Demandeur" sortBy="#{demande.demandeur}">
<div>
<div class="font-medium">#{demande.demandeur}</div>
<small class="text-600">#{demande.telephone}</small>
</div>
</p:column>
<p:column headerText="Type" sortBy="#{demande.type}">
<p:tag value="#{demande.typeLibelle}" severity="#{demande.typeSeverity}" icon="pi #{demande.typeIcon}"/>
</p:column>
<p:column headerText="Montant" sortBy="#{demande.montantDemande}">
<div class="font-bold text-green-500">#{demande.montantDemande} FCFA</div>
</p:column>
<p:column headerText="Statut" sortBy="#{demande.statut}">
<p:tag value="#{demande.statut}"
severity="#{demande.statutSeverity}"
icon="pi #{demande.statutIcon}"/>
</p:column>
<p:column headerText="Date" sortBy="#{demande.dateDemande}">
<h:outputText value="#{demande.dateDemande}">
<f:convertDateTime pattern="dd/MM/yyyy"/>
</h:outputText>
</p:column>
<p:column headerText="Actions" style="width:200px">
<div class="flex gap-1">
<p:commandButton icon="pi pi-eye"
styleClass="ui-button-rounded ui-button-text ui-button-info"
action="#{demandesAideBean.voirDetails(demande)}"
title="Voir détails"/>
<p:commandButton icon="pi pi-check"
styleClass="ui-button-rounded ui-button-text ui-button-success"
action="#{demandesAideBean.approuver(demande)}"
title="Approuver"
rendered="#{demande.statut == 'EN_ATTENTE'}"/>
<p:commandButton icon="pi pi-times"
styleClass="ui-button-rounded ui-button-text ui-button-danger"
action="#{demandesAideBean.rejeter(demande)}"
title="Rejeter"
rendered="#{demande.statut == 'EN_ATTENTE'}"/>
</div>
</p:column>
</p:dataTable>
</div>
</h:form>
</ui:define>
</ui:composition>