Browse Source

added edit and delete option for master menu and changes made for excel downloading

main
AJITHKUMAR12 5 months ago
parent
commit
95cf01ed7b
  1. 1042
      gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java
  2. 49
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html
  3. 108
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html
  4. 58
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentcorrectionmaster.html
  5. 56
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html
  6. 56
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html
  7. 44
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html
  8. 60
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html
  9. 59
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html
  10. 59
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html
  11. 58
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html
  12. 53
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html
  13. 55
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html
  14. 57
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html
  15. 9
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveylist.html
  16. 55
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html
  17. 56
      gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html

1042
gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java
File diff suppressed because it is too large
View File

49
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th> Caste Name</th>
<th>Slno</th>
<th>Caste Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -388,18 +389,22 @@
loadEducationTable();
});
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Caste");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function loadEducationTable() {
$.ajax({
@ -411,11 +416,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +437,24 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +476,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Caste");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +502,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

108
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html

@ -604,10 +604,12 @@
}
});
let allQuestions = {
...surveyData.personalInformation,
...surveyData.locationDetails,
...surveyData.personalInformation,
...surveyData.educationDetails,
...surveyData.healthDetails,
...surveyData.documentDetails,
@ -631,7 +633,100 @@
}
// CREATE WORKSHEET
const worksheet = XLSX.utils.json_to_sheet(excelData);
//const worksheet = XLSX.utils.json_to_sheet(excelData);
// FIXED COLUMN ORDER
const headers = [
"S.No",
"Survey ID",
// LOCATION
"Select the Area",
"Type of House Ownership",
"How Long You Have Been Staying Here?",
"Block No",
"House No",
// PERSONAL
"Name of the Child Name",
"Gender",
"Do you know DOB?",
"Date of Birth",
"Age",
"Place of Birth",
"Hospital of Birth",
"Religion",
"Caste",
"Sub Caste",
"Child Living With",
"Father Name",
"Mother Name",
"Where abouts",
"Guardian Name",
"Relationship",
"Occupation",
"Family Monthly Income",
"Contact Number",
// EDUCATION
"Are they Currently Studying",
"Education Status",
"School Name",
"School Location",
"Which standard they stopped",
"Which year did they stopped",
"Reason for Dropout",
"Is The Child Interested In Continuing Education?",
"What are you Interested In?",
"Are you Staying in any Educational Hostel",
"Name of the Hostel?",
"Location of the Hostel?",
// HEALTH
"Does the child have any history of health issues?",
"Health Details",
// DOCUMENT
"Documents Available",
"Aadhar card",
"Aadhar No",
"Community Certificate",
"Birth Certificate",
"Any corrections to be made in the document?",
"If Not Why?",
// VULNERABILITY
"Vulnerability Assessment",
"Any Other Support Needed?",
"Comments & Remarks",
"Where about of Father?",
"Where about of Mother?"
];
// CREATE NEW ORDERED DATA
let orderedExcelData = [];
excelData.forEach(function (row) {
let orderedRow = {};
headers.forEach(function (header) {
orderedRow[header] = row[header] || '';
});
orderedExcelData.push(orderedRow);
});
// CREATE SHEET
const worksheet = XLSX.utils.json_to_sheet(
orderedExcelData,
{
header: headers
}
);
// AUTO COLUMN WIDTH
//const columns = [];
@ -812,15 +907,16 @@
return sectionHtml;
}*/
html += buildSection(
"Personal Information",
data.personalInformation
);
html += buildSection(
"Location Details",
data.locationDetails
);
html += buildSection(
"Personal Information",
data.personalInformation
);
html += buildSection(
"Education Details",

58
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentcorrectionmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl No</th>
<th>Document Correction Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Document Correction");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,8 @@
let tbody = "";
data.forEach(function (row) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
data.forEach(function (row, index) {
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +447,25 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +487,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Document Correction");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -475,6 +514,7 @@
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),

56
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl No</th>
<th>Document Reason Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Document Reason");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -400,6 +416,7 @@
modal.show();
}
function loadEducationTable() {
$.ajax({
@ -411,11 +428,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -440,7 +455,19 @@
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +489,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Document Reason");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -475,6 +516,7 @@
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),

56
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl No</th>
<th>Dropout Reason Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Dropout Reason");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -440,7 +454,20 @@
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +489,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Dropout Reason");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -475,6 +516,7 @@
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),

44
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Slno</th>
<th>Education Name</th>
<th>Status</th>
<th>Action</th>
<th>Edit</th>
</tr>
</thead>
@ -390,13 +391,19 @@
});
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Education");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
@ -411,17 +418,15 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Disable
Delete
</button>
`
: `
@ -434,7 +439,7 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
@ -442,6 +447,13 @@
<td>${actionButton}</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
});
@ -462,6 +474,22 @@
}
});
}
let editId = 0;
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Education");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,12 +502,14 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),
success: function () {
editId = 0;
Swal.fire({
icon: 'success',

60
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html

@ -237,10 +237,12 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Slno</th>
<th>Gender Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -388,11 +390,14 @@
loadEducationTable();
});
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Gender");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -400,6 +405,17 @@
modal.show();
}
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
function loadEducationTable() {
$.ajax({
@ -411,17 +427,15 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Disable
Delete
</button>
`
: `
@ -434,7 +448,7 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
@ -442,6 +456,13 @@
<td>${actionButton}</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
});
@ -463,6 +484,25 @@
});
}
//update logic
let editId = 0;
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Gender");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
$.ajax({
@ -474,12 +514,14 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),
success: function () {
editId = 0;
Swal.fire({
icon: 'success',

59
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl No</th>
<th>Income Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -388,9 +389,24 @@
loadEducationTable();
});
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Income");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function openAddModal1() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +448,25 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +488,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Income");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +514,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

59
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl No</th>
<th>Interest Field Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Interest Field");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +448,25 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +488,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Interest Field");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,9 +514,8 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()
}),
success: function () {

58
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html

@ -237,10 +237,12 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl.No</th>
<th>Living Type Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>edit</th>
</tr>
</thead>
@ -389,10 +391,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Living");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +428,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +449,25 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +489,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Living");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +515,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

53
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html

@ -237,10 +237,12 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Slno</th>
<th>Location Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +391,24 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Location");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -400,6 +416,7 @@
modal.show();
}
function loadEducationTable() {
$.ajax({
@ -411,7 +428,7 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
@ -434,13 +451,24 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +490,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Location");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +516,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

55
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl.No</th>
<th>Owner Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Owner");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -440,7 +454,19 @@
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +488,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Owner");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +514,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

57
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>Sl.No</th>
<th>Religion Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Religion");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -434,13 +448,25 @@
tbody += `
<tr>
<td>${row.id}</td>
<td>${index + 1}</td>
<td>${row.english_name}</td>
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +488,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Religion");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +514,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

9
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveylist.html

@ -518,16 +518,17 @@
return sectionHtml;
}
html += buildSection(
"Location Details",
data.locationDetails
);
html += buildSection(
"Personal Information",
data.personalInformation
);
html += buildSection(
"Location Details",
data.locationDetails
);
html += buildSection(
"Education Details",

55
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>S.No</th>
<th>Vulnerability Name</th>
<th>Status</th>
<th>Action</th>
<th>Delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Vulnerability");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,9 @@
let tbody = "";
data.forEach(function (row) {
data.forEach(function (row, index) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -440,7 +454,19 @@
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +488,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Vulnerability");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +514,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

56
gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html

@ -237,10 +237,11 @@
<thead class="thead-dark">
<tr>
<th>ID</th>
<th>S.No</th>
<th>Where About Name</th>
<th>Status</th>
<th>Action</th>
<th>delete</th>
<th>Edit</th>
</tr>
</thead>
@ -389,10 +390,25 @@
});
/*function openAddModal() {
$("#educationName").val('');
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}*/
let editId = 0;
function openAddModal() {
editId = 0;
$("#educationName").val('');
$(".modal-title").text("Add Where About");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
@ -411,11 +427,8 @@
let tbody = "";
data.forEach(function (row) {
let statusBadge = row.isactive == 1
? `<span class="badge">Active</span>`
: `<span class="badge">Disabled</span>`;
data.forEach(function (row, index) {
let statusBadge = `<span class="badge">Active</span>`;
let actionButton = row.isactive == 1
? `
@ -440,7 +453,19 @@
<td>${statusBadge}</td>
<td>${actionButton}</td>
<td>
<button class="btn btn-danger btn-sm"
onclick="toggleStatus(${row.id},0)">
Delete
</button>
</td>
<td>
<button class="btn btn-primary btn-sm"
onclick="editEducation(${row.id},'${row.english_name}')">
Edit
</button>
</td>
</tr>
`;
@ -462,6 +487,20 @@
}
});
}
function editEducation(id, name) {
editId = id;
$("#educationName").val(name);
$(".modal-title").text("Edit Where About");
let modal = new bootstrap.Modal(
document.getElementById('educationModal')
);
modal.show();
}
function saveEducation() {
@ -474,6 +513,7 @@
contentType: "application/json",
data: JSON.stringify({
id: editId,
english_name: $("#educationName").val()

Loading…
Cancel
Save