@@ -92,11 +92,39 @@ <h5 class="mb-0"><i class="bi bi-file-text"></i> Submission Data</h5>
9292 </ div >
9393 </ div >
9494
95+ <!-- Completed Approval Steps (show previous approvals) -->
96+ {% for step in approval_steps %}
97+ {% if step.is_completed %}
98+ < div class ="card mb-4 border-success ">
99+ < div class ="card-header bg-success text-white ">
100+ < h5 class ="mb-0 "> < i class ="bi bi-check-circle "> </ i > Step {{ step.number }}: {{ step.group_name }}
101+ < span class ="badge bg-light text-success float-end "> Completed</ span >
102+ </ h5 >
103+ </ div >
104+ < div class ="card-body ">
105+ < table class ="table table-bordered table-sm mb-0 ">
106+ {% for key, value in submission.form_data.items %}
107+ {% if step.number == 1 and key|slice:":7" == "advisor" %}
108+ < tr > < th style ="width: 30%; "> {{ key|title }}</ th > < td > {{ value }}</ td > </ tr >
109+ {% elif step.number == 2 and key|slice:":3" == "fa_" %}
110+ < tr > < th style ="width: 30%; "> {{ key|title }}</ th > < td > {{ value }}</ td > </ tr >
111+ {% elif step.number == 3 and key|slice:":9" == "registrar" %}
112+ < tr > < th style ="width: 30%; "> {{ key|title }}</ th > < td > {{ value }}</ td > </ tr >
113+ {% elif step.number == 4 and key|slice:":7" == "manager" %}
114+ < tr > < th style ="width: 30%; "> {{ key|title }}</ th > < td > {{ value }}</ td > </ tr >
115+ {% endif %}
116+ {% endfor %}
117+ </ table >
118+ </ div >
119+ </ div >
120+ {% endif %}
121+ {% endfor %}
122+
95123 <!-- Approval Form with Step Fields -->
96124 < form method ="post " data-loading-message ="Processing your decision... ">
97125 {% csrf_token %}
98126
99- <!-- Current Step Fields Section -->
127+ <!-- Current Step Fields Section with Decision inline -->
100128 < div class ="card mb-4 border-primary ">
101129 < div class ="card-header bg-primary text-white ">
102130 < h5 class ="mb-0 "> < i class ="bi bi-pencil-square "> </ i > Step {{ current_step_number }}: {{ task.step_name }}
@@ -106,34 +134,14 @@ <h5 class="mb-0"><i class="bi bi-pencil-square"></i> Step {{ current_step_number
106134 < div class ="card-body ">
107135 < p class ="text-muted mb-4 "> Please review the submission above and fill in the required fields below.</ p >
108136 {{ approval_step_form|crispy }}
109- </ div >
110- </ div >
111137
112- <!-- Future Steps Preview (greyed out) -->
113- {% for step in approval_steps %}
114- {% if step.number > current_step_number %}
115- < div class ="card mb-4 border-secondary opacity-50 ">
116- < div class ="card-header bg-light text-muted ">
117- < h5 class ="mb-0 "> < i class ="bi bi-hourglass "> </ i > Step {{ step.number }}: {{ step.group_name }}
118- < span class ="badge bg-secondary float-end "> Pending</ span >
119- </ h5 >
120- </ div >
121- < div class ="card-body ">
122- < p class ="text-muted mb-0 "> < em > This step will be available after all previous steps are approved.</ em > </ p >
123- </ div >
124- </ div >
125- {% endif %}
126- {% endfor %}
138+ < hr class ="my-4 ">
127139
128- <!-- Decision Section -->
129- < div class ="card mb-4 border-success ">
130- < div class ="card-header bg-light ">
131- < h5 class ="mb-0 "> < i class ="bi bi-clipboard-check "> </ i > Your Decision</ h5 >
132- </ div >
133- < div class ="card-body ">
140+ <!-- Decision Section inline -->
141+ < h6 class ="mb-3 "> < i class ="bi bi-clipboard-check "> </ i > Your Decision</ h6 >
134142 < div class ="mb-3 ">
135143 < label for ="comments " class ="form-label "> Comments (Optional)</ label >
136- < textarea class ="form-control " id ="comments " name ="comments " rows ="3 " placeholder ="Add any comments about your decision... "> </ textarea >
144+ < textarea class ="form-control " id ="comments " name ="comments " rows ="2 " placeholder ="Add any comments about your decision... "> </ textarea >
137145 </ div >
138146 < div class ="d-grid gap-2 d-md-block ">
139147 < button type ="submit " name ="decision " value ="approve " class ="btn btn-success btn-lg ">
@@ -150,6 +158,22 @@ <h5 class="mb-0"><i class="bi bi-clipboard-check"></i> Your Decision</h5>
150158 </ div >
151159 </ form >
152160
161+ <!-- Future Steps Preview (greyed out) -->
162+ {% for step in approval_steps %}
163+ {% if step.number > current_step_number %}
164+ < div class ="card mb-4 border-secondary opacity-50 ">
165+ < div class ="card-header bg-light text-muted ">
166+ < h5 class ="mb-0 "> < i class ="bi bi-hourglass "> </ i > Step {{ step.number }}: {{ step.group_name }}
167+ < span class ="badge bg-secondary float-end "> Pending</ span >
168+ </ h5 >
169+ </ div >
170+ < div class ="card-body ">
171+ < p class ="text-muted mb-0 "> < em > This step will be available after all previous steps are approved.</ em > </ p >
172+ </ div >
173+ </ div >
174+ {% endif %}
175+ {% endfor %}
176+
153177 {% else %}
154178 <!-- Standard Approval (No Step Fields) -->
155179 <!-- Submission Data -->
0 commit comments