Files

80 lines
4.0 KiB
HTML

<!DOCTYPE html>
<ui:composition 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"
template="/templates/main-template.xhtml">
<ui:param name="page" value="#{demandesAideBean}"/>
<ui:define name="title">Mes Demandes d'Aide - UnionFlow</ui:define>
<ui:define name="content">
<h:form id="formRequests">
<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-list text-primary mr-2"></i>
Mes Demandes d'Aide
</h3>
<p class="text-600 m-0 mt-2">
Consultez l'état de vos demandes d'aide
</p>
</div>
<div class="flex gap-2 mt-2 md:mt-0">
<ui:include src="/templates/components/buttons/button-success.xhtml">
<ui:param name="value" value="Nouvelle demande"/>
<ui:param name="icon" value="pi pi-plus"/>
<ui:param name="outcome" value="aideDemandePage"/>
</ui:include>
</div>
</div>
</div>
<!-- Liste des demandes -->
<div class="card">
<h5 class="mb-3">Historique de mes Demandes</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}">
<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.statutLibelle}"
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:150px">
<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:column>
</p:dataTable>
</div>
</h:form>
</ui:define>
</ui:composition>