From c140729c360dc3b209cb79c9fe93310a09fad701 Mon Sep 17 00:00:00 2001 From: Vikrant Date: Tue, 3 Mar 2026 12:45:03 +0530 Subject: [PATCH] fix: update form actions and enhance student details display with conditional rendering --- public/css/fund.css | 4 +- views/listings/archive.ejs | 2 +- views/listings/show.ejs | 96 +++++++++++++++++++++++--------------- 3 files changed, 61 insertions(+), 41 deletions(-) diff --git a/public/css/fund.css b/public/css/fund.css index 57cb593..f56e41c 100644 --- a/public/css/fund.css +++ b/public/css/fund.css @@ -124,9 +124,8 @@ body { color: white; text-decoration: none; font-size: 1.4rem; - margin: 2vh 0; border-bottom: 1px dashed #ddd; - padding-bottom: 5px; + padding: 5px 0; cursor: pointer; } @@ -258,7 +257,6 @@ input::-webkit-inner-spin-button { padding: 3.5vw; } .fee-entry { - margin: 2vh 0; font-size: 1rem; } .form { diff --git a/views/listings/archive.ejs b/views/listings/archive.ejs index 7548471..9917eef 100644 --- a/views/listings/archive.ejs +++ b/views/listings/archive.ejs @@ -106,7 +106,7 @@
-
+ diff --git a/views/listings/show.ejs b/views/listings/show.ejs index b82bc0f..27edffc 100644 --- a/views/listings/show.ejs +++ b/views/listings/show.ejs @@ -13,43 +13,63 @@

<%= student.name %>

Grade : <%= student.grade %>

-

Parent : <%= student.parent %>

-

- Contact : <%= student.contact %> - - - - -

-

- Phone : <%= student.phone %> -   - - - -

-

Note : <%= student.note %>

-

Joining Date : <%= formattedDate %>

Fees : <%= student.fees %>

Due Fees : <%= student.dueFees %>

-

- Remind on : -   -   - - - -

+

Joining Date : <%= formattedDate %>

+ <%if(student.parent){%> +

Parent : <%= student.parent %>

+ <%}%> + <%if(student.contact){%> +

+ Contact : <%= student.contact %> + + + + +

+ <%}%> + <%if(student.phone){%> +

+ Phone : <%= student.phone %> +   + + + +

+ <%}%> + <%if(student.dueFees > student.fees && (student.phone || student.contact)){%> + <%if(student.contact){%> +

+ Remind on : Contact +   + +

+ <%}%> + <%if(student.phone){%> +

+ Remind on : Phone +   + +

+ <%}%> + <%}%> + <%if(student.note){%> +

Note : <%= student.note %>

+ <%}%>

-

Note : <%=fees.note%>

+ <%if(fees.note){%> +

Note : <%=fees.note%>

+ <%}%>

<% }); %> <% } else { %> @@ -122,7 +144,7 @@