Commit b4bde4f5 authored by Deep Dey's avatar Deep Dey

chore: update principal name for interaction-scoring template

parent 16d83eb8
...@@ -14,6 +14,7 @@ import java.time.format.DateTimeFormatter; ...@@ -14,6 +14,7 @@ import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Objects;
@Service @Service
@AllArgsConstructor(onConstructor_ = @__({@Autowired})) @AllArgsConstructor(onConstructor_ = @__({@Autowired}))
...@@ -101,6 +102,11 @@ public class TemplateService { ...@@ -101,6 +102,11 @@ public class TemplateService {
context.setVariable("serverPath", settings.getStaticServerPath()); context.setVariable("serverPath", settings.getStaticServerPath());
context.setVariable("admissionFormList", admissionFormDataList); context.setVariable("admissionFormList", admissionFormDataList);
context.setVariable("givenYear", Integer.parseInt(givenYear)); context.setVariable("givenYear", Integer.parseInt(givenYear));
if (Objects.equals(admissionFormDataList.get(0).getSchool(), "La Martiniere for Boys")) {
context.setVariable("principalName", "Mr. P.A. John Stephen");
} else {
context.setVariable("principalName", "Mrs. Rupkatha Sarkar");
}
return templateEngine.process("InteractionScoringTemplate", context); return templateEngine.process("InteractionScoringTemplate", context);
} }
......
...@@ -92,7 +92,11 @@ ...@@ -92,7 +92,11 @@
<th>Religion</th> <th>Religion</th>
<th>Income (Father/Mother)</th> <th>Income (Father/Mother)</th>
<th>Rev. (Dr.) S. Bar<br></br>(Ex-Officio, Governor)</th> <th>Rev. (Dr.) S. Bar<br></br>(Ex-Officio, Governor)</th>
<th>Mr. P.A. John Stephen<br></br>(Acting Principal, La Martiniere for Boys)</th> <th>
<span th:text="${principalName}"></span>
<br/>
(Acting Principal, <span th:text="${admissionFormList[0].school}"></span>)
</th>
<th>Mr. S. Dhar<br></br>(Secretary)</th> <th>Mr. S. Dhar<br></br>(Secretary)</th>
<th>TOTAL</th> <th>TOTAL</th>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment