diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 06d67bd7..f1363b80 100644
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -213,10 +213,10 @@ $routes->post("/employeeUpload", "EmployeeRestController::employeeUpload");
$routes->group("employeeRest", ["filter" => "authJWT"], function($routes){
+ $routes->get("/relationshipList", "EmployeeRestController::relationshipList");
$routes->get("getEmployeeAndDependence", "EmployeeRestController::getEmployeeAndDependence");
$routes->post("editEmployeeAndDependence", "EmployeeRestController::editEmployeeAndDependence");
$routes->post("addEmployeeAndDependence", "EmployeeRestController::addEmployeeAndDependence");
- $routes->get("/relationshipList", "EmployeeRestController::relationshipList");
});
diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php
index ab1c21fc..8d8b8104 100644
--- a/app/Controllers/ClientController.php
+++ b/app/Controllers/ClientController.php
@@ -598,7 +598,13 @@ class ClientController extends AdminController
$this->policyPremium1Model->where('client_id', $client_id)->where('client_policy_id', $client_policy_id)->set('is_active', 0)->update();
- $premiumData = $this->request->getPost('premium');
+ if($si_or_bp == '1'){
+ $premiumData = $this->request->getPost('sum_premium');
+
+ }else{
+ $premiumData = $this->request->getPost('premium');
+ }
+
for ($i = 0; $i < count($premiumData); $i++) {
$data = [
'client_id' => $client_id,
@@ -607,17 +613,35 @@ class ClientController extends AdminController
'created_by' => get_session_userid(),
];
- if(is_array($this->request->getPost('si'))){
- $si = isset($this->request->getPost('si')[$i]) ? $this->request->getPost('si')[$i] : null;
+ if ($si_or_bp == '2') {
+ if(is_array($this->request->getPost('basic_si'))){
+ $si = isset($this->request->getPost('basic_si')[$i]) ? $this->request->getPost('basic_si')[$i] : null;
+ }else{
+ $si = $this->request->getPost('basic_si');
+ }
+ } else {
+ if(is_array($this->request->getPost('si'))){
+ $si = isset($this->request->getPost('si')[$i]) ? $this->request->getPost('si')[$i] : null;
+ }else{
+ $si = $this->request->getPost('si');
+ }
+ }
+
+
+ if($si_or_bp == '1'){
+ if(is_array($this->request->getPost('sum_premium'))){
+ $premium = isset($this->request->getPost('sum_premium')[$i]) ? $this->request->getPost('sum_premium')[$i] : null;
+ }else{
+ $premium = $this->request->getPost('sum_premium');
+ }
}else{
- $si = $this->request->getPost('si');
+ if(is_array($this->request->getPost('premium'))){
+ $premium = isset($this->request->getPost('premium')[$i]) ? $this->request->getPost('premium')[$i] : null;
+ }else{
+ $premium = $this->request->getPost('premium');
+ }
}
- if(is_array($this->request->getPost('premium'))){
- $premium = isset($this->request->getPost('premium')[$i]) ? $this->request->getPost('premium')[$i] : null;
- }else{
- $premium = $this->request->getPost('premium');
- }
// $basic_gpa_premium = isset($basic_gpa_premium[$i]) ? $basic_gpa_premium[$i] : null;
if ($si !== null) {
$data['si'] = $si;
@@ -626,17 +650,21 @@ class ClientController extends AdminController
$data['premium'] = $premium;
}
- if ($multiplier !== null) {
- $data['multiplier'] = $multiplier;
+ if($si_or_bp == 2){
+ if ($premium_multiplier !== null) {
+ $data['multiplier'] = $premium_multiplier;
+ }
+ }else{
+ if ($multiplier !== null) {
+ $data['multiplier'] = $multiplier;
+ }
}
if ($si_or_bp !== null) {
$data['si_or_bp'] = $si_or_bp;
}
- if ($premium_multiplier !== null) {
- $data['multiplier'] = $premium_multiplier;
- }
+
if ($basic_multiplier !== null) {
$data['basic_multiplier'] = $basic_multiplier;
diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php
index 8692e2df..87ada1ac 100644
--- a/app/Controllers/EmployeeRestController.php
+++ b/app/Controllers/EmployeeRestController.php
@@ -180,8 +180,9 @@ class EmployeeRestController extends AdminController
public function getEmployeePolicy()
{
- $id= 1;
+ // $id= 4;
try {
+ $id = $this->request->getGet('id');
$keysToRemove = ["sum_insured","family_floater","corporatebuffer","family_floaters"];
$empPolicy = $this->employeeModel->getEmployeePolicy($id);
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php
index 3048d0ca..a9df6485 100644
--- a/app/Views/client_policy.php
+++ b/app/Views/client_policy.php
@@ -654,31 +654,31 @@
};
function convertNumberToWords(number) {
- if (number === 0) {
- return numberWords[number];
- }
+ if (number === 0) {
+ return numberWords[number];
+ }
- let word = '';
+ let word = '';
- if (number >= 10000000) {
- word += convertNumberToWords(Math.floor(number / 10000000)) + " Crore ";
- number %= 10000000;
- }
+ if (number >= 10000000) {
+ word += convertNumberToWords(Math.floor(number / 10000000)) + " Crore ";
+ number %= 10000000;
+ }
- if (number >= 100000) {
- word += convertNumberToWords(Math.floor(number / 100000)) + " Lakh ";
- number %= 100000;
- }
+ if (number >= 100000) {
+ word += convertNumberToWords(Math.floor(number / 100000)) + " Lakh ";
+ number %= 100000;
+ }
- if (number >= 1000) {
- word += convertNumberToWords(Math.floor(number / 1000)) + " Thousand ";
- number %= 1000;
- }
+ if (number >= 1000) {
+ word += convertNumberToWords(Math.floor(number / 1000)) + " Thousand ";
+ number %= 1000;
+ }
- if (number >= 100) {
- word += convertNumberToWords(Math.floor(number / 100)) + " Hundred ";
- number %= 100;
- }
+ if (number >= 100) {
+ word += convertNumberToWords(Math.floor(number / 100)) + " Hundred ";
+ number %= 100;
+ }
if (number > 0) {
if (word !== '') {
@@ -708,22 +708,67 @@
function formatNumber(input, maxLength) {
- maxLength=16;
- let value = input.value.replace(/\D/g, ''); // Remove non-numeric characters
-
- // Limit the number of digits
- value = value.slice(0, maxLength);
-
- // Format the number with commas using Indian numbering system
- value = Number(value).toLocaleString('en-IN');
- input.value = value;
+
+ maxLength=16;
+ let value = input.value.replace(/\D/g, ''); // Remove non-numeric characters
+
+ // Limit the number of digits
+ value = value.slice(0, maxLength);
+
+ // Format the number with commas using Indian numbering system
+ value = Number(value).toLocaleString('en-IN');
+ input.value = value;
- basicPayMultiple(input)
- if (input.id == 'gpa_si') {
- gpaSumInsureMultiplier();
- }
+ basicPayMultiple(input)
+ if (input.id == 'gpa_si') {
+ gpaSumInsureMultiplier();
+ }
- return ;
+ if(input.id == 'basic_pay'){
+ var inputNumber = input.value;
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#gpa_basic_pay_number_word").text(result);
+ } else {
+ $("#gpa_basic_pay_number_word").text("");
+ }
+ }else if(input.id == 'basic_gpa_si'){
+ var inputNumber = input.value;
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#basic_gpa_si_number_word").text(result);
+ } else {
+ $("#basic_gpa_si_number_word").text("");
+ }
+ }else if(input.id == 'basic_gpa_premium'){
+ var inputNumber = input.value;
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#basic_gpa_premium_number_word").text(result);
+ } else {
+ $("#basic_gpa_premium_number_word").text("");
+ }
+ }else if(input.id == 'gpa_si'){
+ var inputNumber = input.value;
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#gpa_sum_si_number_word").text(result);
+ } else {
+ $("#gpa_sum_si_number_word").text("");
+ }
+ }else if(input.id == 'gpa_premium'){
+ var inputNumber = input.value;
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#gpa_sum_premium_number_word").text(result);
+ } else {
+ $("#gpa_sum_premium_number_word").text("");
+ }
+ }
+
+ return ;
+ // }
+
}
\ No newline at end of file
diff --git a/app/Views/policy_gmc_terms.php b/app/Views/policy_gmc_terms.php
index d0f182a1..e03b3e9d 100644
--- a/app/Views/policy_gmc_terms.php
+++ b/app/Views/policy_gmc_terms.php
@@ -465,9 +465,7 @@
+
`;
} else if(dataIdValue == '2'){
@@ -414,107 +463,31 @@
$('#btnGridSubmit').hide();
}
+
+
+
grid_container.insertAdjacentHTML('beforeend', grid_html);
$('#gpa_sum_insured').hide();
$('#btnGridSubmit').show();
-
- $('#si_or_bp').change(function(){
- var selectedValue = $(this).val();
-
-
-
- si_or_bp_two(selectedValue);
-
- });
-
- if(data !== false && data.si){
- console.log('show');
- $('#gpa_sum_insured').show();
- $('#si_or_bp').val("1");
- }else{
- $('#si_or_bp').val("2");
- }
-
- $("#gpa_si").on("keyup", function() {
- var inputNumber = $(this).val();
- if (inputNumber) {
- var result = convertCommaNumberToWords(inputNumber);
- $("#gpa_si_number_word").text(result);
- } else {
- $("#gpa_si_number_word").text("");
- }
+ $('#si_or_bp').val(si_or_bp);
+ setTimeout(() => {
+ $('#si_or_bp').trigger('change');
+ }, 300);
- });
-
- $("#basic_gpa_premium").on("keyup", function() {
- var inputNumber = $(this).val();
- if (inputNumber) {
- var result = convertCommaNumberToWords(inputNumber);
- $("#gpa_premium_number_word").text(result);
- } else {
- $("#gpa_premium_number_word").text("");
- }
- });
- $("#sum_insured").on("keyup", function() {
- var inputNumber = $(this).val();
- if (inputNumber) {
- var result = convertCommaNumberToWords(inputNumber);
- $("#sum_insured_number_word").text(result);
- } else {
- $("#sum_insured_number_word").text("");
- }
- });
+
- $("#premium").on("keyup", function() {
- var inputNumber = $(this).val();
- if (inputNumber) {
- var result = convertCommaNumberToWords(inputNumber);
- $("#premium_number_word").text(result);
- } else {
- $("#premium_number_word").text("");
- }
- });
-
-
- if (si_or_bp == '1') {
- si_or_bp_two(si_or_bp);
- }else if(si_or_bp == '2'){
- si_or_bp_two(si_or_bp);
- }
-
- if (si_or_bp == '2') {
-
- console.log("data line-> 490", data);
- $('#si_or_bp').val(si_or_bp);
- $('#basic_multiplier').val(data.basic_multiplier);
- $('#basic_pay').val(data.basic_pay);
- $('#premium_multiplier').val(data.multiplier);
- $('#basic_gpa_si').val(data.si);
- $('#basic_gpa_premium').val(data.premium);
- }else if (si_or_bp == '1') {
- console.log("start");
- console.log(data);
- $('#si_or_bp').val(si_or_bp);
- $('#multiplier').val(data.multiplier);
- $('#gpa_si').val(data.si);
- $('#basic_gpa_premium').val(data.premium);
- }
-
+
};
$("#GridForm").submit(function(event) {
var check = checkDuplicate();
-
- console.log("check.....");
- console.log(check);
-
event.preventDefault();
@@ -551,7 +524,7 @@
contentType: false,
success: function(res) {
- console.log(res);
+ console.log("Response",res);
if (res.status === false) {
toastr.error('Policy Dose Not Create', 'Error');
@@ -602,6 +575,7 @@
data: { client_policy_id: client_policy_id},
dataType: 'json',
success: function (res) {
+ console.log('res',res);
$('#nameOfThePolicy').html(' - ' + res.policy_name);
$('#grid_emp_count').val(res.count);
@@ -623,14 +597,20 @@
});
$('#grid').html(policeGridOptionHTML);
-
+ var si_or_bp_value = '';
if (res.premiumData && res.premiumData.length > 0) {
- addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id, res.premiumData[0].si_or_bp);
+ if(res.premiumData[0].si_or_bp){
+ si_or_bp_value = res.premiumData[0].si_or_bp;
+ }
+
+ addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id, si_or_bp_value);
+
+
res.premiumData.shift();
$.each(res.premiumData, function(index, item){
if (item.si_or_bp == '1') {
- appendGridtHtml('1_1_1_1', item);
+ appendGridtHtml('1', item);
}else{
appendGridtHtml(item.policy_grid_id, item);
}
@@ -643,19 +623,23 @@
$('#bs-example-modal-lg').modal('show');
- $("#gpa_si").trigger("keyup");
- $("#basic_gpa_premium").trigger("keyup");
+ // $("#gpa_si").trigger("keyup");
+ // $("#basic_gpa_premium").trigger("keyup");
+
+ // $("#sum_insured").trigger("keyup");
+ // $("#premium").trigger("keyup");
- $("#sum_insured").trigger("keyup");
- $("#premium").trigger("keyup");
-
- $("input[name='si[]']").trigger("keyup");
- $("input[name='premium[]']").trigger("keyup")
+ // $('#basic_pay').trigger('keyup');
+ // $("input[name='si[]']").trigger("keyup");
+ // $("input[name='premium[]']").trigger("keyup")
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
}, 1000);
+
+ $('#basic_gpa_si').trigger('keyup');
+
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
@@ -674,6 +658,8 @@
var grid_id=$(this)[0].value;
var client_policy_id =$('#client_policy_id')[0].value;
+
+
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
@@ -683,8 +669,6 @@
data: { client_policy_id: client_policy_id},
dataType: 'json',
success: function (res) {
- appendGridtHtml('1_2');
- appendGridtHtml('1_2_1');
console.log('responce :', res);
setTimeout(function() {
@@ -692,7 +676,6 @@
$('.loader-mask').delay(350).fadeOut('slow');
}, 1000);
if (res.premiumData.length > 0 && res.premiumData[0].policy_grid_id === grid_id) {
- console.log("heelo");
$('#nameOfThePolicy').html(' - ' + res.policy_name);
$('#grid_emp_count').val(res.count);
@@ -714,43 +697,35 @@
policeGridOptionHTML += '
';
});
// $('#grid').html(policeGridOptionHTML);
-
+ var si_or_bp_value = '';
if (res.premiumData && res.premiumData.length > 0) {
+
+ if(res.premiumData[0].si_or_bp){
+ si_or_bp_value = res.premiumData[0].si_or_bp;
- addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id, res.premiumData[0].si_or_bp);
+ $('#si_or_bp').val(si_or_bp_value);
+
+ }
+
+
+
+ addGridHTML(false, res.premiumData[0], res.premiumData[0].policy_grid_id, si_or_bp_value);
res.premiumData.shift();
$.each(res.premiumData, function(index, item){
- // console.log('premiumData index :',index)
- // appendGridtHtml(item.policy_grid_id, item);
- if (item.si_or_bp == '1') {
- appendGridtHtml('1_1_1_1', item);
- }else{
appendGridtHtml(item.policy_grid_id, item);
- }
});
} else {
console.log("res.premiumData is undefined, null, or empty.");
- }
+ }
+ }else if(res.data[0].policy_type == "GPA"){
+ $('#si_or_bp').val('2');
- $('#bs-example-modal-lg').modal('show');
- $("#gpa_si").trigger("keyup");
- $("#basic_gpa_premium").trigger("keyup");
-
- $("#sum_insured").trigger("keyup");
- $("#premium").trigger("keyup");
-
- $("input[name='si[]']").trigger("keyup");
- $("input[name='premium[]']").trigger("keyup");
- }else{
- if($('#si_or_bp').val() == 2){
- addGridHTML(false, false, grid_id,)
- }
- // console.log("novkfdmmk");
- addGridHTML(false, false, grid_id)
+ setTimeout(() => {
+ $('#si_or_bp').trigger('change')
+ }, 300);
}
- // console.log("hello");
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
@@ -764,7 +739,6 @@
});
})
-
var Count = 1
function appendGridtHtml(ui_type = false, data = false,) {
@@ -773,66 +747,29 @@
Count++;
var container = document.getElementById('grid_content_input');
-
- if(ui_type == '1_1' || ui_type == '1_1_1' || ui_type == '1_1_1_1')
+ if(ui_type == '1')
{
- if (ui_type == '1_1_1' || ui_type == '1_1_1_1') {
- html=`
`;
- // return html;
- }else{
- html =`
-
-
-
- `;
-
- // return html;
- }
- }
- else if(ui_type == '1_2' || ui_type == '1_2_1')
- {
- if (ui_type == '1_2_1') {
- html=`
-
-
-
-
-
-
+ html = `
`;
- }else{
- html =`
-
-
-
-
-
-
-
- `;
- }
+ }
+ else if(ui_type == '1_2' )
+ {
+
}
else if(ui_type == '3'){
@@ -1072,77 +1009,14 @@
}
- if (ui_type == '1_1' || ui_type == '1_1_1' || ui_type == '1_2' || ui_type == '1_2_1' || ui_type == '1_1_1_1') {
- if(ui_type == '1_1'){
- $('#si_or_bp_1').empty().append(html);
- $('#si_or_bp_1_1').empty();
- $('#gmc_add_more').hide()
- $('#gmc_remove').show()
- Count--
- $('#gmc_add_more_'+Count).hide()
- Count++
- }else if(ui_type == '1_1_1'){
- $('#si_or_bp_2').empty().append(html);
- $('#gmc_add_more').hide()
- $('#gmc_remove').show()
- Count--
- $('#gmc_add_more_'+Count).hide()
- Count++
- }else if(ui_type == '1_2'){
-
- $('#si_or_bp_1').empty();
- $('#si_or_bp_1_1').empty().append(html);
- $('#gmc_add_more').hide()
- $('#gmc_remove').show()
- Count--
- $('#gmc_add_more_'+Count).hide()
- Count++
- }else if(ui_type == '1_2_1'){
- $('#si_or_bp_2').empty().append(html);
- $('#gmc_add_more').hide()
- $('#gmc_remove').show()
- Count--
- $('#gmc_add_more_'+Count).hide()
- Count++
- }else if(ui_type == '1_1_1_1'){
- $('#si_or_bp_2').append(html);
- $('#gmc_add_more').hide()
- $('#gmc_remove').show()
- Count--
- $('#gmc_add_more_'+Count).hide()
- Count++
-
-
- console.log("data", data);
-
- if(data){
- $('input[name="premium[]"]').length;
- $('input[name="premium[]"]').each(function(index) {
- if (index === $('input[name="premium[]"]').length - 1) {
- console.log("data.premium",data.premium);
- $(this).val(data.premium);
- // console.log("This ", $(this)[0].val(data.premium));
- // var basicGpaPremiumValue = $(this).val();
-
- // if (basicGpaPremiumValue !== "" && basicGpaPremiumValue !== null) {
- // console.log("Value of basic_gpa_premium[]: " + basicGpaPremiumValue);
- // } else {
- // console.log("basic_gpa_premium[] value is empty or null");
- // }
- }
- });
- }
-
- }
-
- }else{
+
container.insertAdjacentHTML('beforeend', html);
$('#gmc_add_more').hide();
$('#gmc_remove').show();
Count--
$('#gmc_add_more_'+Count).hide()
Count++
- }
+
@@ -1185,7 +1059,6 @@
}
-
function checkDuplicate()
{
// console.log($('#grid')[0].value);
@@ -1208,11 +1081,9 @@
premiumValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < siValues.length; i++) {
for (var j = i + 1; j < siValues.length; j++) {
if (siValues[i] === siValues[j] && premiumValues[i] === premiumValues[j]) {
- console.log('Duplicate values found in si[] at indices', i, 'and', j);
siDuplicates = true;
}
}
@@ -1220,10 +1091,8 @@
if (siDuplicates || premiumDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '4'){
@@ -1244,12 +1113,10 @@
ageToValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < ageFromValues.length; i++) {
for (var j = i + 1; j < ageFromValues.length; j++) {
// Check for duplicates between age_from[] and age_to[]
if (ageFromValues[i] === ageFromValues[j] && ageToValues[i] === ageToValues[j]) {
- console.log('Duplicate values found in age_from[] and age_to[] at indices', i, 'and', j);
ageDuplicates = true;
}
}
@@ -1257,10 +1124,8 @@
if (ageDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
@@ -1297,10 +1162,8 @@
if (siDuplicates || ageDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '6'){
@@ -1320,12 +1183,10 @@
ageToValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < ageFromValues.length; i++) {
for (var j = i + 1; j < ageFromValues.length; j++) {
// Check for duplicates between age_from[] and age_to[]
if (ageFromValues[i] === ageFromValues[j] && ageToValues[i] === ageToValues[j]) {
- console.log('Duplicate values found in age_from[] and age_to[] at indices', i, 'and', j);
ageDuplicates = true;
}
}
@@ -1333,10 +1194,8 @@
if (ageDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '7'){
@@ -1372,10 +1231,8 @@
if (siDuplicates || ageDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '10'){
@@ -1412,10 +1269,8 @@
if (siDuplicates || ageDuplicates) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '8'){
@@ -1435,12 +1290,10 @@
gradeValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < siValues.length; i++) {
for (var j = i + 1; j < siValues.length; j++) {
// Check for duplicates between si[] and grade[]
if (siValues[i] === siValues[j] && gradeValues[i] === gradeValues[j]) {
- console.log('Duplicate values found in si[] and grade[] at indices', i, 'and', j);
duplicatesFound = true;
}
}
@@ -1448,10 +1301,8 @@
if (duplicatesFound) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if($('#grid')[0].value === '9'){
@@ -1471,12 +1322,10 @@
gradeValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < siValues.length; i++) {
for (var j = i + 1; j < siValues.length; j++) {
// Check for duplicates between si[] and grade[]
if (siValues[i] === siValues[j] && gradeValues[i] === gradeValues[j]) {
- console.log('Duplicate values found in si[] and grade[] at indices', i, 'and', j);
duplicatesFound = true;
}
}
@@ -1484,10 +1333,8 @@
if (duplicatesFound) {
toastr.warning('Duplicates found!', 'warning');
- console.log('Duplicates found');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}else if ($('#grid')[0].value === '11') {
@@ -1513,46 +1360,25 @@
maxSiValues.push($(this).val());
});
- console.log("Checking for duplicates...");
for (var i = 0; i < siValues.length; i++) {
for (var j = i + 1; j < siValues.length; j++) {
- console.log(maxSiValues);
- console.log("maxSiValues[i] ", maxSiValues[i] );
- console.log("maxSiValues[j]", maxSiValues[j]);
+ // console.log(maxSiValues);
+ // console.log("maxSiValues[i] ", maxSiValues[i] );
+ // console.log("maxSiValues[j]", maxSiValues[j]);
if (siValues[i] === siValues[j] && gradeValues[i] === gradeValues[j] && maxSiValues[i] === maxSiValues[j]) {
- console.log('Duplicate values found in si[], grade[], and max_si[] at indices', i, 'and', j);
duplicatesFound = true;
}
}
}
if (duplicatesFound) {
- console.log('Duplicates found');
toastr.warning('Duplicates found!', 'warning');
return true;
} else {
- console.log('No duplicates found');
return false;
}
}
}
-
-
-
\ No newline at end of file