Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LaMartin-Webomagic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sneha
LaMartin-Webomagic
Commits
24b548b2
Commit
24b548b2
authored
Jul 04, 2024
by
Deep Dey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update report templates
parent
e25e0439
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
20 deletions
+51
-20
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
...aMartin/admission/controller/AdmissionFormController.java
+2
-3
lamartinBackend/src/main/java/com/example/LaMartin/common/service/TemplateService.java
.../com/example/LaMartin/common/service/TemplateService.java
+12
-2
lamartinBackend/src/main/resources/static/la-martin-logo.png
lamartinBackend/src/main/resources/static/la-martin-logo.png
+0
-0
lamartinBackend/src/main/resources/templates/CounsellorScoringTemplate.html
...c/main/resources/templates/CounsellorScoringTemplate.html
+9
-4
lamartinBackend/src/main/resources/templates/InteractionMasterTemplate.html
...c/main/resources/templates/InteractionMasterTemplate.html
+6
-2
lamartinBackend/src/main/resources/templates/InteractionScoringTemplate.html
.../main/resources/templates/InteractionScoringTemplate.html
+22
-9
No files found.
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
View file @
24b548b2
...
@@ -287,8 +287,7 @@ public class AdmissionFormController {
...
@@ -287,8 +287,7 @@ public class AdmissionFormController {
HttpServletResponse
response
,
HttpServletResponse
response
,
@RequestParam
(
"apikey"
)
String
apiKey
,
@RequestParam
(
"apikey"
)
String
apiKey
,
@RequestParam
String
schoolName
,
@RequestParam
String
schoolName
,
@RequestParam
String
interactionDate
,
@RequestParam
String
interactionDate
@RequestParam
String
interactionTime
)
throws
Exception
{
)
throws
Exception
{
List
<
AdmissionFormData
>
admissionFormDataList
=
List
<
AdmissionFormData
>
admissionFormDataList
=
...
@@ -296,7 +295,7 @@ public class AdmissionFormController {
...
@@ -296,7 +295,7 @@ public class AdmissionFormController {
schoolName
,
schoolName
,
null
,
null
,
interactionDate
,
interactionDate
,
interactionTime
null
);
);
if
(
admissionFormDataList
.
isEmpty
())
{
if
(
admissionFormDataList
.
isEmpty
())
{
...
...
lamartinBackend/src/main/java/com/example/LaMartin/common/service/TemplateService.java
View file @
24b548b2
...
@@ -9,6 +9,8 @@ import org.springframework.stereotype.Service;
...
@@ -9,6 +9,8 @@ import org.springframework.stereotype.Service;
import
org.thymeleaf.TemplateEngine
;
import
org.thymeleaf.TemplateEngine
;
import
org.thymeleaf.context.Context
;
import
org.thymeleaf.context.Context
;
import
java.time.LocalDate
;
import
java.time.format.DateTimeFormatter
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
...
@@ -26,7 +28,11 @@ public class TemplateService {
...
@@ -26,7 +28,11 @@ public class TemplateService {
return
templateEngine
.
process
(
"AdmissionFormListTemplate"
,
context
);
return
templateEngine
.
process
(
"AdmissionFormListTemplate"
,
context
);
}
}
public
String
generateAdmissionInterviewTemplate
(
AdmissionFormData
admissionFormData
)
{
public
String
generateAdmissionInterviewTemplate
(
@NotNull
AdmissionFormData
admissionFormData
)
{
String
originalDate
=
"2024-07-04"
;
// Example date string
LocalDate
date
=
LocalDate
.
parse
(
admissionFormData
.
getInteractionDate
());
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"dd-MM-yyyy"
);
admissionFormData
.
setInteractionDate
(
date
.
format
(
formatter
));
Context
context
=
new
Context
();
Context
context
=
new
Context
();
context
.
setVariable
(
"admissionForm"
,
admissionFormData
);
context
.
setVariable
(
"admissionForm"
,
admissionFormData
);
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
...
@@ -34,7 +40,7 @@ public class TemplateService {
...
@@ -34,7 +40,7 @@ public class TemplateService {
return
templateEngine
.
process
(
"AdmissionInterviewTemplate"
,
context
);
return
templateEngine
.
process
(
"AdmissionInterviewTemplate"
,
context
);
}
}
public
String
generateAutoReplyTemplate
(
AdmissionFormData
admissionFormData
)
{
public
String
generateAutoReplyTemplate
(
@NotNull
AdmissionFormData
admissionFormData
)
{
Context
context
=
new
Context
();
Context
context
=
new
Context
();
context
.
setVariable
(
"admissionForm"
,
admissionFormData
);
context
.
setVariable
(
"admissionForm"
,
admissionFormData
);
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
...
@@ -45,6 +51,7 @@ public class TemplateService {
...
@@ -45,6 +51,7 @@ public class TemplateService {
public
String
generateCounsellorScoringTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
public
String
generateCounsellorScoringTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
String
givenYear
=
admissionFormDataList
.
get
(
0
).
getInteractionDate
().
substring
(
0
,
4
);
String
givenYear
=
admissionFormDataList
.
get
(
0
).
getInteractionDate
().
substring
(
0
,
4
);
Context
context
=
new
Context
();
Context
context
=
new
Context
();
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
));
...
@@ -54,6 +61,7 @@ public class TemplateService {
...
@@ -54,6 +61,7 @@ public class TemplateService {
public
String
generateInteractionScoringTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
public
String
generateInteractionScoringTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
String
givenYear
=
admissionFormDataList
.
get
(
0
).
getInteractionDate
().
substring
(
0
,
4
);
String
givenYear
=
admissionFormDataList
.
get
(
0
).
getInteractionDate
().
substring
(
0
,
4
);
Context
context
=
new
Context
();
Context
context
=
new
Context
();
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
));
...
@@ -62,6 +70,8 @@ public class TemplateService {
...
@@ -62,6 +70,8 @@ public class TemplateService {
public
String
generateMasterInteractionTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
public
String
generateMasterInteractionTemplate
(
@NotNull
List
<
AdmissionFormData
>
admissionFormDataList
)
{
Context
context
=
new
Context
();
Context
context
=
new
Context
();
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
context
.
setVariable
(
"admissionFormList"
,
admissionFormDataList
);
context
.
setVariable
(
"admissionFormList"
,
admissionFormDataList
);
return
templateEngine
.
process
(
"InteractionMasterTemplate"
,
context
);
return
templateEngine
.
process
(
"InteractionMasterTemplate"
,
context
);
...
...
lamartinBackend/src/main/resources/static/la-martin-logo.png
0 → 100644
View file @
24b548b2
57.3 KB
lamartinBackend/src/main/resources/templates/CounsellorScoringTemplate.html
View file @
24b548b2
...
@@ -58,10 +58,13 @@
...
@@ -58,10 +58,13 @@
<body>
<body>
<div
class=
"container"
>
<div
class=
"container"
>
<div
style=
"text-align: center"
>
<img
th:src=
"@{${serverPath + 'static/la-martin-logo.png'}}"
alt=
"Logo"
height=
"80px"
/>
</div>
<h1
style=
"text-transform: uppercase"
th:text=
"${admissionFormList[0].school}"
></h1>
<h1
style=
"text-transform: uppercase"
th:text=
"${admissionFormList[0].school}"
></h1>
<h2>
<h2
style=
"text-transform: uppercase"
>
INTERACTION SCORING SHEET FOR
THE YEAR
INTERACTION SCORING SHEET FOR
<span
th:text=
"${admissionFormList[0].admissionClass}"
></span>
<span
th:text=
"${givenYear} + ' - ' + (${givenYear + 1})"
></span>
(
<span
th:text=
"${givenYear} + ' - ' + (${givenYear + 1})"
></span>
)
</h2>
</h2>
<div
class=
"date"
>
<div
class=
"date"
>
DATE:
<span
th:text=
"${admissionFormList[0].interactionDate}"
></span>
DATE:
<span
th:text=
"${admissionFormList[0].interactionDate}"
></span>
...
@@ -83,7 +86,9 @@
...
@@ -83,7 +86,9 @@
</tr>
</tr>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${admissionForm.fullName}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fullName} + ', ' + ${admissionForm.dateOfBirth} + ' & ' + ${admissionForm.community}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.admissionClass}"
>
Upper Nursery
</td>
<td
th:text=
"${admissionForm.admissionClass}"
>
Upper Nursery
</td>
<td></td>
<td></td>
<td></td>
<td></td>
...
...
lamartinBackend/src/main/resources/templates/InteractionMasterTemplate.html
View file @
24b548b2
...
@@ -62,10 +62,12 @@
...
@@ -62,10 +62,12 @@
<body>
<body>
<div
class=
"container"
>
<div
class=
"container"
>
<div
style=
"text-align: center"
>
<img
th:src=
"@{${serverPath + 'static/la-martin-logo.png'}}"
alt=
"Logo"
height=
"80px"
/>
</div>
<div
class=
"h1"
th:text=
"${admissionFormList[0].school}"
>
LA MARTINIERE FOR BOYS
</div>
<div
class=
"h1"
th:text=
"${admissionFormList[0].school}"
>
LA MARTINIERE FOR BOYS
</div>
<div
class=
"h4"
>
INTERACTION MASTER LIST FOR
<div
class=
"h4"
>
INTERACTION MASTER LIST FOR
<span
th:text=
"${admissionFormList[0].interactionDate}"
></span>
AT
<span
th:text=
"${admissionFormList[0].interactionDate}"
></span>
<span
th:text=
"${admissionFormList[0].interactionTime}"
></span>
</div>
</div>
<table
style=
"font-size: 12px;"
>
<table
style=
"font-size: 12px;"
>
<tr
class=
"header-row"
>
<tr
class=
"header-row"
>
...
@@ -73,12 +75,14 @@
...
@@ -73,12 +75,14 @@
<th>
Reference Id
</th>
<th>
Reference Id
</th>
<th>
Name
</th>
<th>
Name
</th>
<th>
Father's Name
</th>
<th>
Father's Name
</th>
<th>
Interaction Time
</th>
</tr>
</tr>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${admissionForm.fatherEmail}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fatherEmail}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fullName}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fullName}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fatherName}"
>
Upper Nursery
</td>
<td
th:text=
"${admissionForm.fatherName}"
>
Upper Nursery
</td>
<td
th:text=
"${admissionForm.interactionTime}"
>
10:00 AM
</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
...
...
lamartinBackend/src/main/resources/templates/InteractionScoringTemplate.html
View file @
24b548b2
...
@@ -4,7 +4,10 @@
...
@@ -4,7 +4,10 @@
<head>
<head>
<title>
Interaction Scoring Sheet
</title>
<title>
Interaction Scoring Sheet
</title>
<style>
<style>
@page
{
size
:
landscape
;
margin
:
0
;
}
@page
{
size
:
landscape
;
margin
:
0
;
}
*
{
*
{
margin
:
0
;
margin
:
0
;
...
@@ -63,10 +66,13 @@
...
@@ -63,10 +66,13 @@
<body>
<body>
<div
class=
"container"
>
<div
class=
"container"
>
<div
style=
"text-align: center"
>
<img
th:src=
"@{${serverPath + 'static/la-martin-logo.png'}}"
alt=
"Logo"
height=
"80px"
/>
</div>
<h1
style=
"text-transform: uppercase"
th:text=
"${admissionFormList[0].school}"
></h1>
<h1
style=
"text-transform: uppercase"
th:text=
"${admissionFormList[0].school}"
></h1>
<h2>
<h2
style=
"text-transform: uppercase"
>
INTERACTION SCORING SHEET FOR
THE YEAR
INTERACTION SCORING SHEET FOR
<span
th:text=
"${admissionFormList[0].admissionClass}"
></span>
<span
th:text=
"${givenYear} + ' - ' + (${givenYear + 1})"
></span>
(
<span
th:text=
"${givenYear} + ' - ' + (${givenYear + 1})"
></span>
)
</h2>
</h2>
<div
style=
"margin-top: 10px;"
>
<div
style=
"margin-top: 10px;"
>
<div
class=
"date"
style=
"float: right;"
>
<div
class=
"date"
style=
"float: right;"
>
...
@@ -83,20 +89,27 @@
...
@@ -83,20 +89,27 @@
<th>
Name, DOB
&
Comm.
</th>
<th>
Name, DOB
&
Comm.
</th>
<th>
Class
</th>
<th>
Class
</th>
<th>
Category
</th>
<th>
Category
</th>
<th>
Religion
</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>
Rev. Abir Adhikari
<br></br>
(Member, Board of Acting Governors)
</th>
<th>
Mr. P.A. John Stephen
<br></br>
(Acting Principal, La Martiniere for Boys)
</th>
<th>
Mr. P.A. John Stephen
<br></br>
(Acting Principal, La Martiniere for Boys)
</th>
<th>
Mr. S. Dhar
<br></br>
(Secretary)
</th>
<th>
Mr. S. Dhar
<br></br>
(Secretary)
</th>
<th>
Mr. R. Sarkar
<br></br>
(Bursar-cum-Assistant Secretary)
</th>
<th>
TOTAL
</th>
<th>
TOTAL
</th>
</tr>
</tr>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<tr
th:each=
"admissionForm, iterStat : ${admissionFormList}"
>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${iterStat.count}"
>
1
</td>
<td
th:text=
"${admissionForm.fullName}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.fullName} + ', ' + ${admissionForm.dateOfBirth} + ' & ' + ${admissionForm.community}"
>
VIVANN SURANA
</td>
<td
th:text=
"${admissionForm.admissionClass}"
>
Upper Nursery
</td>
<td
th:text=
"${admissionForm.admissionClass}"
>
Upper Nursery
</td>
<td
th:text=
"${admissionForm.category}"
></td>
<td
th:text=
"${admissionForm.category}"
></td>
<td></td>
<td
th:text=
"${admissionForm.religion}"
>
Hindu
</td>
<td></td>
<td>
<span
th:text=
"${admissionForm.fatherMonthlyIncome}"
></span>
<span
th:if=
"${admissionForm.motherMonthlyIncome != null and !#strings.isEmpty(admissionForm.motherMonthlyIncome)}"
>
/
<br></br>
<span
th:text=
"${admissionForm.motherMonthlyIncome}"
></span>
</span>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment