#-- Get the demand_type from a given id demand type --> <#function getDemandType demand_types_list id_demand_type> <#if demand_types_list?? && demand_types_list?has_content> <#list demand_types_list as demand_type> <#if demand_type.idDemandType?string = id_demand_type> <#return demand_type> #if> #list> #if> #function> <#function getBgColor label > <#assign color = 'F2F6FF'/> <#if label?contains("TERM") || label?contains("ACQUI") > <#assign color = 'F2F6FF'/> <#elseif label?contains("COMPL") || label?contains("RÉGL") || label?contains("REGL") > <#assign color = 'FFFAE6'/> <#elseif label?contains("COUR")> <#assign color = 'F2F6FF'/> <#elseif label?contains("ANNUL")> <#assign color = 'F2F6FF'/> #if> <#return 'background-color:#'+ color +' !important;'/> #function> <#function getColorStatus label > <#assign color = '071F32'/> <#if label?contains("TERM") || label?contains("ACQUI") > <#assign color = '3AE932'/> <#elseif label?contains("COMPL") || label?contains("RÉGL") || label?contains("REGL") > <#assign color = 'E22C3F'/> <#elseif label?contains("COUR")> <#assign color = 'E4AB73'/> <#elseif label?contains("ANNUL")> <#assign color = '828E98'/> #if> <#return 'color:#'+ color +' !important;'/> #function> <#macro tabDemands listDemandDashboard class> <@cTable themed=false caption='Liste des demandes'> <@cThead> <@cTr> <@cTh>Demandes@cTh> <@cTh class='status'>#i18n{crm.crm.columnStatus}@cTh> <@cTh>Date de mise à jour@cTh> <@cTh>@cTh> @cTr> @cThead> <@cTbody> <#list listDemandDashboard as demandDashboard> <#assign demand = demandDashboard.demand> <#if getDemandType( demand_types_list, demand.typeId )?has_content><#assign demand_type = getDemandType( demand_types_list, demand.typeId)>#if> <#if demand_type??> <@cTr id="${class}-${(demand.UID)!}" class="${class} bg-content" params='data-id="${(demand.UID)!}" data-type-id="${(demand.typeId)!}" style="${getBgColor(demandDashboard.status?upper_case)}"'> <@cTd params='data-label="Type : "' nospan=true> ${(demand_type.label)!} <#if demandDashboard.listNotification??> <#list demandDashboard.listNotification?sort_by('date') as notification>
${(notification.date?number_to_date?string["dd.MM.yyyy"])!} - ${(notification.myDashboardNotification.subject)!} #list> <#else>
Aucune notification !
#if> @cTd> <@cTd params='data-label="Statut : " style="${getColorStatus(demandDashboard.status?upper_case)}"' class='status' nospan=true> ${(demandDashboard.status)!} @cTd> <@cTd class='pe-5' params='data-label="Date :"' nospan=true> <@cSection type='div' class='d-flex flex-column justify-content-center'> ${(demand.modifyDate?number_to_date?string["dd.MM.yyyy"])!} initié le ${(demand.modifyDate?number_to_date?string["dd.MM.yyyy"])!} @cSection> @cTd> <@cTd class='pe-5' params='data-label="Date :"' nospan=true> <#if demand_type.url?has_content><@cLink href='${demand_type.url!}' label='Accéder${(notification.myDashboardNotification.message)!}
@div> @div> @cTd> @cTr> #list> #if> #if> #list> @cTbody> @cTable> #macro>