-
+
+
+
+
+
+
+
@@ -1183,6 +1221,7 @@
if (Array.isArray(jsonObject[key])) {
jsonObject[key].forEach((value, index) => {
appendGMCSIAddMore(value);
+
});
} else {
console.log(`${key} is not an array.`);
@@ -1269,14 +1308,27 @@
if (element.value === jsonObject[key]) {
element.checked = element.value === jsonObject[key];
- if (element.name === "family_floater") {
- element.parentElement.nextElementSibling.style
- .display = '';
- element.parentElement.parentElement
- .parentElement.nextElementSibling.style
- .display = '';
- // alert('family floater');
- } else if (element.name ===
+ // if (element.name === "family_floater") { REF: VR
+ // element.parentElement.nextElementSibling.style
+ // .display = '';
+ // element.parentElement.parentElement
+ // .parentElement.nextElementSibling.style
+ // .display = '';
+ // // alert('family floater');
+ // }
+ if (element.name === "family_floater" && element.checked) {
+
+ let currentRow = element.closest('.row');
+
+ if (currentRow && currentRow.nextElementSibling) {
+ currentRow.nextElementSibling.style.display = '';
+ }
+
+ if (currentRow && currentRow.nextElementSibling && currentRow.nextElementSibling.nextElementSibling) {
+ currentRow.nextElementSibling.nextElementSibling.style.display = '';
+ }
+ }
+ else if (element.name ===
"waiverofpreexistingdiseases") {
element.parentElement.parentElement
.nextElementSibling.style.display = '';
@@ -1546,6 +1598,52 @@
}
};
+ $("#sum_insured").on("keyup", function() {
+ var inputNumber = $(this).val();
+ console.log('keyup sum insured 2nd');
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $("#numberToWordSumInsured").text(result);
+ } else {
+ $("#numberToWordSumInsured").text("");
+ }
+ });
+
+ $(".multiple_sum_insured").on("keyup", function() {
+
+ console.log('multiple_sum_insured key up')
+
+ var inputNumber = $(this).val();
+ console.log('inputNumber', inputNumber);
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ console.log(result);
+ $(".numberToWordSumInsured").text(result);
+ } else {
+ $(".numberToWordSumInsured").text("");
+ }
+ });
+
+ function numtowordinkeyup(input) {
+
+ console.log('numtowordinkeyup');
+ var inputNumber = $(input).val().toString().replace(/,/g, '').trim();
+ var $parentRow = $(input).closest('.row');
+ var $targetDiv = $parentRow.find('.numberToWordSumInsured');
+
+
+ if (inputNumber) {
+ var result = convertCommaNumberToWords(inputNumber);
+ $targetDiv.text(result);
+ } else {
+ $targetDiv.text("");
+ }
+
+
+
+ }
+
+
@@ -1749,35 +1847,67 @@
}
}
- function appendGMCSIAddMore(data = null) {
+ //REF: VR
+ // function appendGMCSIAddMore(data = null) {
+ // console.log('function called')
+ // var html = `
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
`;
+ // $('#gmc_si_add_more').append(html);
+ // }
+ function appendGMCSIAddMore(data = '') {
console.log('function called')
-
var html = `
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-`;
- $('#gmc_si_add_more').append(html);
+
+
+
+
+
+
+
+
+
+
+
+
`;
+
+ $('#gmc_si_add_more').append(html);
}
function removeGMCAdditionalSI(button) {
@@ -2037,5 +2167,4 @@
}
});
-
\ No newline at end of file
diff --git a/app/Views/policy_gpa_terms.php b/app/Views/policy_gpa_terms.php
index 87a151b9..e0304ae3 100755
--- a/app/Views/policy_gpa_terms.php
+++ b/app/Views/policy_gpa_terms.php
@@ -104,8 +104,8 @@