+ style="position: relative; left: 45px; display:none"
+ id="additional_rack_rate_premium_type">
@@ -158,6 +165,24 @@ $('.close').click(function() {
}
});
+$('#copyfromexcel').click(function() {
+ // alert('called');
+ // $('#copyfromexcel').toggle();
+ // $("#copied_excel_data").val(result.exampleMessage);
+ $('#copied_excel_data').val("");
+ if ($(this).text() == "Copy from excel") {
+ $(this).text("Manual entry")
+
+ } else {
+ $(this).text("Copy from excel");
+ }
+
+ $('#grid_content_input').toggle();
+ $('#grid_content_from_excel').toggle();
+
+
+
+});
function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = false, rr_type = false) {
@@ -166,7 +191,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
console.log('secondaryValue', secondaryValue)
console.log(rr_type);
- if(!secondaryValue){
+ if (!secondaryValue) {
secondaryValue = rr_type
}
@@ -200,7 +225,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
if (dataIdValue == '1') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -322,7 +347,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else if (dataIdValue == '2') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var + i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -344,7 +369,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -369,7 +394,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -403,7 +428,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -436,7 +461,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -471,7 +496,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -504,7 +529,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
@@ -534,7 +559,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else if (dataIdValue == '9') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -556,7 +581,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -588,7 +613,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else if (dataIdValue == '11') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -622,7 +647,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else if (dataIdValue == '12') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -660,7 +685,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else if (dataIdValue == '13') {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = `
@@ -705,7 +730,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
} else {
for (var i = 1; i <= 13; i++) {
- $('#'+id_var+ i).remove();
+ $('#' + id_var + i).remove();
}
grid_html = '';
$('#btnGridSubmit').hide();
@@ -782,7 +807,8 @@ $("#GridForm").submit(function(event) {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
- var message = (policy_PrimaryKey === '') ? 'Policy Premium Added successfully' : 'Policy Premium Added Successfully';
+ var message = (policy_PrimaryKey === '') ? 'Policy Premium Added successfully' :
+ 'Policy Premium Added Successfully';
toastr.success(message, 'Success');
// $('.close').click();
@@ -847,7 +873,9 @@ $("#AdditionalGridForm").submit(function(event) {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
- var message = (policy_PrimaryKey === '') ? 'Policy Additional Rack Rate Added successfully' : 'Policy Additional Rack Rate Added Successfully';
+ var message = (policy_PrimaryKey === '') ?
+ 'Policy Additional Rack Rate Added successfully' :
+ 'Policy Additional Rack Rate Added Successfully';
toastr.success(message, 'Success');
$('.close').click();
@@ -886,13 +914,13 @@ $('body').on('click', '.btnPolicyModel', function() {
$('.loader-mask').fadeIn();
- if(policy_type_string == 'GPA'){
- $('#rack_rate_one').hide()
- $('#rack_rate_two').hide()
- $('#AdditionalGridForm').hide()
- $('#additional_rack_rate_premium_type').hide()
+ if (policy_type_string == 'GPA') {
+ $('#rack_rate_one').hide()
+ $('#rack_rate_two').hide()
+ $('#AdditionalGridForm').hide()
+ $('#additional_rack_rate_premium_type').hide()
- }else{
+ } else {
$('#rack_rate_one').show()
$('#rack_rate_two').show()
$('#AdditionalGridForm').show()
@@ -909,10 +937,11 @@ $('body').on('click', '.btnPolicyModel', function() {
dataType: 'json',
success: function(res) {
- if(res.self == ""){
+ if (res.self == "") {
$('.close').click();
- toastr.warning('Unable to create rack rate due to the absence of policy terms.', 'Warning');
- }
+ toastr.warning('Unable to create rack rate due to the absence of policy terms.',
+ 'Warning');
+ }
$('#GridForm')[0].reset();
$('#AdditionalGridForm')[0].reset();
@@ -1023,10 +1052,12 @@ $('body').on('click', '.btnPolicyModel', function() {
var policeGridOptionHTMLforSecondary = '';
- policeGridOptionHTMLforSecondary += `
`;
+ policeGridOptionHTMLforSecondary +=
+ `
`;
$.each(res.data, function(index, item) {
policeGridOptionHTMLforSecondary += '
';
});
@@ -1062,7 +1093,7 @@ $('body').on('click', '.btnPolicyModel', function() {
res.premiumData.shift();
$.each(res.premiumData, function(index, item) {
-
+
if (item.si_or_bp == '1') {
appendGridtHtml('1', item.rack_rate_type, item);
} else {
@@ -1368,7 +1399,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
Count++;
var container = document.getElementById('grid_content_input');
- if(secondary == 1){
+ if (secondary == 1) {
container = document.getElementById('additional_grid_content_input')
}
@@ -1795,12 +1826,12 @@ function checkDuplicate(val) {
$('#additional_grid_content_input');
$('#grid_content_input')
-
+
var id = $('#additional_grid')[0];
var container = $('#additional_grid_content_input');
- if(val == 0){
- id = $('#grid')[0];
- container = $('#grid_content_input');
+ if (val == 0) {
+ id = $('#grid')[0];
+ container = $('#grid_content_input');
}
console.log(id);
@@ -2533,10 +2564,6 @@ function createCheckboxes(obj, additional_relationship) {
function formatString(str) {
- return str.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
+ return str.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
}
-
-
-
-
\ No newline at end of file
diff --git a/app/Views/policy_grid_excel.php b/app/Views/policy_grid_excel.php
new file mode 100644
index 00000000..50487a0a
--- /dev/null
+++ b/app/Views/policy_grid_excel.php
@@ -0,0 +1,241 @@
+
+
+