CHANGE_LEAD_FORM_PAGE_CHANGE : RV
This commit is contained in:
parent
e5f84f7fe4
commit
e6f292901b
@ -207,6 +207,8 @@ class LeadsController extends BaseController
|
||||
private function prepareLeadData()
|
||||
{
|
||||
$data = $this->request->getPost();
|
||||
$data['client_type'] = 1;
|
||||
$data['pan'] = "";
|
||||
|
||||
if ($data['lead_type'] != 1) {
|
||||
$client_data = $this->clientModel->where('id', $data['client_id'])->where('is_active', 1)->first();
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 freshFields">
|
||||
<!-- <div class="form-group col-md-3 freshFields">
|
||||
<label for="client_type">Client Type<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="client_type" name="client_type" required>
|
||||
<option value="">Select Client type</option>
|
||||
@ -182,7 +182,7 @@
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group col-md-3 freshFields">
|
||||
<label for="entity_type_id">Entity Type<span class="text-danger">*</span></label>
|
||||
@ -210,7 +210,7 @@
|
||||
placeholder="Enter Client Short Name" onkeyup="validateInput(this, 'clients', 'short_name')" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<!-- <div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<label for="source_policy_id"> Source Policy <span id="base_danger"
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="source_policy_id" name="source_policy_id">
|
||||
@ -226,14 +226,14 @@
|
||||
<div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<label for="source_policy_end_date">Source Policy End Date<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="source_policy_end_date" name="source_policy_end_date" readonly>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<!-- <div class="form-group col-md-3">
|
||||
<label for="pan">PAN<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="pan" placeholder="Enter PAN Number"
|
||||
data-parsley-error-message="Invalid PAN Number. Example: ABCDE1234F" name="pan"
|
||||
data-parsley-trigger="change" data-parsley-pattern="^[A-Z]{5}[0-9]{4}[A-Z]$">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
<!-- end client row -->
|
||||
@ -263,15 +263,14 @@
|
||||
placeholder="Enter Branch Code" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="contact_person_summary">Contact Person's</label>
|
||||
<div class="form-group col-md-3 renewalFields">
|
||||
<label for="contact_person_summary">Contact Person</label>
|
||||
<select class="form-control" name="contact_person_summary" id="contact_person_summary">
|
||||
<option value="">Select a Person</option>
|
||||
<option value="">Select a Contact</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<div class="form-group col-md-3 freshFields">
|
||||
<label for="client_branch">Contact Person Name<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="contact_person_name" name="contact_person_name"
|
||||
placeholder="Enter Contact Name" required>
|
||||
@ -302,9 +301,9 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="salse_person_id">Salse Person<span class="text-danger">*</span></label>
|
||||
<label for="salse_person_id">Sales Person<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="salse_person_id" name="salse_person_id" multiple required>
|
||||
<option value="">Select Salse Person</option>
|
||||
<option value="">Select Sales Person</option>
|
||||
<?php if (isset($salse_team)) { ?>
|
||||
<?php foreach ($salse_team as $value) { ?>
|
||||
<option value="<?= $value['id']; ?>">
|
||||
@ -337,7 +336,7 @@
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="notes">Note</label>
|
||||
<label for="notes">Remarks</label>
|
||||
<textarea class="form-control" id="notes" name="notes" rows="4"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
@ -771,7 +770,8 @@
|
||||
|
||||
if (value.name && value.email) {
|
||||
|
||||
let display_value = `${value.name} - ${value.email} - ${value.mobile}`;
|
||||
// let display_value = `${value.name} - ${value.email} - ${value.mobile}`;
|
||||
let display_value = value.name;
|
||||
|
||||
$('#contact_person_summary').append($('<option>', {
|
||||
value: key, // index or key in array/object
|
||||
@ -1059,6 +1059,24 @@
|
||||
// Main div
|
||||
newRow.innerHTML += `
|
||||
|
||||
<div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<label for="source_policy_id"> Source Policy <span id="base_danger"
|
||||
class="text-danger">*</span></label>
|
||||
<select class="form-control" id="source_policy_id" name="source_policy_id">
|
||||
<option value="" selected>Select Source Policy</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<label for="source_policy_start_date">Source Policy Start Date<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control readonly-select" id="source_policy_start_date" name="source_policy_start_date" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3 renewalFields" style="display: none;">
|
||||
<label for="source_policy_end_date">Source Policy End Date<span class="text-danger"></span></label>
|
||||
<input type="text" class="form-control" id="source_policy_end_date" name="source_policy_end_date" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="policy_type_id">Policy Type <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="policy_type_id_${increment}" name="policy_type_id[]" onchange="getCustomFields(this, ${increment})" required>
|
||||
@ -2054,8 +2072,10 @@
|
||||
$("#client_branch_id").select2();
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
|
||||
$('#client_id').closest('.form-group').show();
|
||||
$('#client_branch_id').closest('.form-group').show();
|
||||
$('#contact_person_summary').closest('.form-group').show();
|
||||
|
||||
$('#client_type').addClass('readonly-select');
|
||||
$('#entity_type_id').addClass('readonly-select');
|
||||
@ -2066,9 +2086,20 @@
|
||||
$("#client_id").prop("required", true);
|
||||
$("#client_branch_id").prop("required", true);
|
||||
|
||||
$("#contact_person_summary").prop("required", true);
|
||||
|
||||
$("#contact_person_name").prop("required", false);
|
||||
$('#contact_person_name').closest('.form-group').hide();
|
||||
|
||||
$("#client_name").prop("required", false);
|
||||
$('#client_name').closest('.form-group').hide();
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
$('#client_id').closest('.form-group').hide();
|
||||
$('#client_branch_id').closest('.form-group').hide();
|
||||
$('#contact_person_summary').closest('.form-group').hide();
|
||||
|
||||
$('#client_type').removeClass('readonly-select');
|
||||
$('#entity_type_id').removeClass('readonly-select');
|
||||
@ -2078,6 +2109,14 @@
|
||||
|
||||
$("#client_id").prop("required", false);
|
||||
$("#client_branch_id").prop("required", false);
|
||||
|
||||
$("#contact_person_summary").prop("required", false);
|
||||
|
||||
$("#contact_person_name").prop("required", true);
|
||||
$('#contact_person_name').closest('.form-group').show();
|
||||
|
||||
$("#client_name").prop("required", true);
|
||||
$('#client_name').closest('.form-group').show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ if (isset($selected_lead_type)) {
|
||||
$('#client_id').select2();
|
||||
$('#client_branch_id').select2();
|
||||
$('#salse_person_id').select2({
|
||||
placeholder: "Select Salse Person",
|
||||
placeholder: "Select Sales Person",
|
||||
});
|
||||
|
||||
$('#policy_type_id').select2();
|
||||
|
||||
@ -63,7 +63,85 @@ table.dataTable tbody td {
|
||||
background-color: #f8f9fa !important;
|
||||
color: #16181b !important;
|
||||
cursor: pointer !important;
|
||||
}
|
||||
}
|
||||
|
||||
.addbtnStyle{
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
|
||||
/* Modeal class */
|
||||
.modal-content {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
background: #f8f9fa;
|
||||
border-bottom: 1px solid #dee2e6;
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
font-size: 1.1rem;
|
||||
font-weight: 500;
|
||||
color: #495057;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.policy-label {
|
||||
font-weight: 500;
|
||||
color: #495057;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.radio-option {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
padding: 0.75rem 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.radio-option:hover {
|
||||
border-color: #007bff;
|
||||
background: #f8f9fa;
|
||||
}
|
||||
|
||||
.radio-option.selected {
|
||||
border-color: #007bff;
|
||||
background: #e7f3ff;
|
||||
}
|
||||
|
||||
.form-check {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.form-check-label {
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: 1px solid #dee2e6;
|
||||
padding: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
font-size: 0.9rem;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
/* Modeal class */
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@ -77,7 +155,7 @@ table.dataTable tbody td {
|
||||
</div>
|
||||
|
||||
<div class="col-3" id="status_change" style="text-align: right; position: relative;top: 56px; left: 291px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="openLeadTypeAskModal();">Add</button>
|
||||
<!-- <button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" onclick="openLeadTypeAskModal();">Add</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@ -130,11 +208,11 @@ table.dataTable tbody td {
|
||||
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 1; ?>" class="dropdown-item btnEdit2" data-id="<?= $row['id']; ?>">
|
||||
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>RFQ
|
||||
</a>
|
||||
<!-- <?php if($row['qcr_count'] > 0) { ?>
|
||||
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 2; ?>" class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>">
|
||||
<?php if(!in_array($row['status'], ['queued', 'rfq_created', 'rfq_sent'])) { ?>
|
||||
<a href="<?= base_url('/rfq/list/').$row['id'] . '/' . 2; ?>" class="dropdown-item btnEdit3" data-id="<?= $row['id']; ?>">
|
||||
<i class="mdi mdi-note-text mr-2 text-muted font-18 vertical-middle"></i>QCR
|
||||
</a>
|
||||
<?php } ?> -->
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -155,26 +233,31 @@ table.dataTable tbody td {
|
||||
</div><!-- end col -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="New_Lead_modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myCenterModalLabel"></h4>
|
||||
<h4 class="modal-title" id="myCenterModalLabel">Select Leaad Type</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="lead_form_type"> Policy Type <span class="text-danger"></span></label>
|
||||
<select class="form-control" id="openLeadTypeAskModal">
|
||||
<option value="1">Lead EB</option>
|
||||
<option value="2">Lead Non-EB</option>
|
||||
</select>
|
||||
|
||||
<div class="radio-option selected" onclick="selectOption(this, 'lead_eb')">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="lead_form_type" id="lead_eb" value="1" checked>
|
||||
<label class="form-check-label" for="lead_eb">Lead EB</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="radio-option" onclick="selectOption(this, 'lead_non_eb')">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="lead_form_type" id="lead_non_eb" value="2">
|
||||
<label class="form-check-label" for="lead_non_eb">Lead Non-EB</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-primary" onclick="submitToRedirectLeadNewUrl(this)">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
@ -293,18 +376,27 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
// scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-7'f><'col-sm-5 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Policy-Tranction-Inception-List',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}, ],
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Policy-Tranction-Inception-List',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
},
|
||||
{
|
||||
text: 'Add',
|
||||
className: 'buttons-html5 addbtnStyle',
|
||||
action: function (e, dt, node, config) {
|
||||
openLeadTypeAskModal();
|
||||
}
|
||||
}
|
||||
],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
@ -327,7 +419,8 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
console.log('function called')
|
||||
|
||||
let Lead_type = $('#openLeadTypeAskModal').val()
|
||||
// let Lead_type = $('#openLeadTypeAskModal').val()
|
||||
let Lead_type = $('input[name="lead_form_type"]:checked').val();
|
||||
console.log('Lead_type ', Lead_type)
|
||||
let url = '<?=base_url('/util/getLeadNonEB/')?>' + Lead_type
|
||||
console.log('url ', url)
|
||||
@ -346,3 +439,32 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function selectOption(element, radioId) {
|
||||
// Remove selected class from all options
|
||||
document.querySelectorAll('.radio-option').forEach(option => {
|
||||
option.classList.remove('selected');
|
||||
});
|
||||
|
||||
// Add selected class to clicked option
|
||||
element.classList.add('selected');
|
||||
|
||||
// Check the corresponding radio button
|
||||
document.getElementById(radioId).checked = true;
|
||||
}
|
||||
|
||||
// Add click event to radio inputs directly
|
||||
document.querySelectorAll('input[name="lead_form_type"]').forEach(radio => {
|
||||
radio.addEventListener('change', function() {
|
||||
// Remove selected class from all options
|
||||
document.querySelectorAll('.radio-option').forEach(option => {
|
||||
option.classList.remove('selected');
|
||||
});
|
||||
|
||||
// Add selected class to parent of checked radio
|
||||
this.closest('.radio-option').classList.add('selected');
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@ -363,7 +363,7 @@
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="notes">Note</label>
|
||||
<label for="notes">Remarks</label>
|
||||
<textarea class="form-control" id="notes" name="notes" rows="4"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -42,13 +42,13 @@
|
||||
|
||||
#rfqTable th:nth-child(-n+3),
|
||||
#rfqTable td:nth-child(-n+3) {
|
||||
border: 3px solid snow;
|
||||
border: 2px solid #007bff;
|
||||
}
|
||||
|
||||
#rfqTable th:nth-child(n+4),
|
||||
#rfqTable td:nth-child(n+4) {
|
||||
border: 2px solid #007bff;
|
||||
/* outline: none; */
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#rfqTable thead th {
|
||||
@ -59,6 +59,7 @@
|
||||
#rfqTable_for_calc th,
|
||||
#rfqTable_for_calc td {
|
||||
border: 2px solid #007bff;
|
||||
|
||||
}
|
||||
|
||||
/* Remove border from first 2 and last column */
|
||||
@ -240,11 +241,26 @@
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.save-indicator {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background: #28a745;
|
||||
color: white;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
font-size: 11px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.save-indicator.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row" id="inception_list">
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@ -277,13 +293,14 @@
|
||||
<input type="hidden" id="qcr_count" value="<?= isset($qcr_count) ? $qcr_count : 0 ?>">
|
||||
<!-- <button id="openDialogBtn">Open Dialog</button> -->
|
||||
|
||||
<div class="save-indicator" id="saveIndicator">Saved</div>
|
||||
<div class="table-container" id="first_table">
|
||||
<table id="rfqTable" class="table table-bordered mt-3">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sticky no-border" style="border-right: 3px solid snow !important; border-left: 3px solid snow !important; border-top: 3px solid snow !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No.</span></th>
|
||||
<th class="hidden no-border" style="border-right: 2px solid snow !important;">Item Key</th>
|
||||
<th class="sticky no-border" style="border-top: 3px solid snow !important; border-right: 3px solid snow !important;">Particulars</th>
|
||||
<th class="sticky no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"><span class="key_name" style="display: none;">Sno</span><span class="display_name">S.No.</span></th>
|
||||
<th class="hidden no-border" style="border-right: 2px solid rgb(0, 123, 255) !important;">Item Key</th>
|
||||
<th class="sticky no-border" style="border-top: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;">Particulars</th>
|
||||
<th contenteditable="false" id="first_proposel_title" ><span class="key_name" style="display: none;">Proposal 1</span><span class="display_name">Proposal Coverage 1</span>
|
||||
<span class="dropdown" onclick="showThreeDottedMenu(event)">
|
||||
<button class="dropbtn">⋮</button>
|
||||
@ -301,14 +318,14 @@
|
||||
</div>
|
||||
</span>
|
||||
</th>
|
||||
<th class="action">Action</th>
|
||||
<th class="action no-border" style="border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; border-top: 2px solid rgb(0, 123, 255) !important;">Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="sticky no-border" style="color: rgb(191, 224, 226); border-right: 3px solid snow !important; border-left: 3px solid snow !important; min-width: 72px !important;"> - </th>
|
||||
<th class="hidden no-border" style="color: #bfe0e2; border-right: 2px solid snow !important;"> - </th>
|
||||
<th class="sticky no-border" style="color: rgb(191, 224, 226); border-bottom: 3px solid snow !important; border-right: 3px solid snow !important;"> - </th>
|
||||
<th class="sticky no-border" style="color: rgb(191, 224, 226); border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important; min-width: 72px !important;"> - </th>
|
||||
<th class="hidden no-border" style="color: #bfe0e2; border-right: 2px solid rgb(0, 123, 255) !important;"> - </th>
|
||||
<th class="sticky no-border" style="color: rgb(191, 224, 226); border-bottom: 2px solid rgb(0, 123, 255) !important; border-right: 2px solid rgb(0, 123, 255) !important;"> - </th>
|
||||
<th colspan="X" style="background-color: inherit;"><span class="key_name" style="display: none;">Quote Asked</span><span class="display_name">Quote Asked</span></th>
|
||||
<th class="action"> - </th>
|
||||
<th class="action no-border" style="color: rgb(255, 255, 255); border-right: 2px solid rgb(0, 123, 255) !important; border-left: 2px solid rgb(0, 123, 255) !important;"> - </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -446,7 +463,7 @@
|
||||
<div class="form-group">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="to">To </label>
|
||||
<label for="to">TO</label>
|
||||
<select class="form-control" id="to" name="to" required>
|
||||
<?php if (isset($userList)) { ?>
|
||||
<?php foreach ($userList as $user) { ?>
|
||||
@ -604,16 +621,16 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="proposals"> Proposals/Insurer <span id="base_danger"class="text-danger">*</span></label>
|
||||
<label for="proposals"> Proposal(s) / Insurer(s) <span id="base_danger"class="text-danger">*</span></label>
|
||||
<select class="form-control" id="proposals"name="proposals" onchange="getInsurerBranchContacts(this)" required>
|
||||
<option value="" >Select Proposals</option>
|
||||
<option value="" >Select a Proposal</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="placement_to"> To <span id="base_danger"class="text-danger">*</span></label>
|
||||
<label for="placement_to"> TO <span id="base_danger"class="text-danger">*</span></label>
|
||||
<select class="form-control" id="placement_to" name="placement_to" required>
|
||||
<option value="" >Select To Mail</option>
|
||||
<option value="" >Select TO Mail</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -684,6 +701,7 @@
|
||||
var multi_file_data = [];
|
||||
var totalSumAssuredData = [];
|
||||
var snoColumnWidth = "72px";
|
||||
var borderPixel = "2px solid #007bff";
|
||||
|
||||
const editorConfig = {
|
||||
buttons: [
|
||||
@ -851,15 +869,15 @@
|
||||
});
|
||||
|
||||
$('#proposals').select2({
|
||||
placeholder: 'Select To proposal',
|
||||
placeholder: 'Select proposal',
|
||||
});
|
||||
|
||||
$('#placement_to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$("textarea.select2-search__field").attr('rows', '1');
|
||||
@ -1410,7 +1428,6 @@ function addSuggestionsToTable() {
|
||||
actionCell.classList.add('action');
|
||||
actionCell.innerHTML =
|
||||
'<input type="checkbox" name="qcr" onchange="setRowWiseQCRandSTCDatachange(this)" checked> <span class="qcr_check_box_title">QCR</span> <input type="checkbox" name="client" onchange="setRowWiseQCRandSTCDatachange(this)" checked> Client <button class="btn btn-danger btn-sm removeRow">−</button> ';
|
||||
|
||||
suggestionKeys.push(key);
|
||||
}
|
||||
}
|
||||
@ -3979,18 +3996,18 @@ function ajaxRequest(formData) {
|
||||
});
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
$('#cc').val('').select2({
|
||||
placeholder : 'select CC Mail'
|
||||
placeholder : 'Select CC Mail'
|
||||
});
|
||||
// $('#subject').val('');
|
||||
$('#proposals').val('');
|
||||
$('#placement_to').val('').select2({
|
||||
placeholder : 'select To Mail'
|
||||
placeholder : 'Select TO Mail'
|
||||
});
|
||||
$('#placement_cc').val('').select2({
|
||||
placeholder : 'select CC Mail'
|
||||
placeholder : 'Select CC Mail'
|
||||
});
|
||||
// $('#placement_subject').val('');
|
||||
|
||||
@ -4040,7 +4057,7 @@ function appendInsurerContact(data) {
|
||||
// Clear existing options and CC entries
|
||||
$('#placement_to').empty().append($('<option>', {
|
||||
value: '',
|
||||
text: 'Select'
|
||||
text: 'Select TO Mail'
|
||||
}));
|
||||
$('.ccInsurerMail').remove();
|
||||
|
||||
@ -4072,19 +4089,19 @@ function appendInsurerContact(data) {
|
||||
$('.close').click(function(){
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$('#cc').val('').select2({
|
||||
placeholder : 'select CC Mail'
|
||||
placeholder : 'Select CC Mail'
|
||||
});
|
||||
// $('#subject').val('');
|
||||
$('#proposals').val('');
|
||||
$('#placement_to').val('').select2({
|
||||
placeholder : 'select To Mail'
|
||||
placeholder : 'Select TO Mail'
|
||||
});
|
||||
$('#placement_cc').val('').select2({
|
||||
placeholder : 'select CC Mail'
|
||||
placeholder : 'Select CC Mail'
|
||||
});
|
||||
// $('#placement_subject').val('');
|
||||
|
||||
@ -4625,19 +4642,27 @@ function jsonToTable(json) {
|
||||
|
||||
if (header.parentHeader === "Particulars") {
|
||||
parentTh.classList.add('sticky', 'no-border');
|
||||
parentTh.style.setProperty('border-top', '3px solid snow', 'important');
|
||||
parentTh.style.setProperty('border-right', '3px solid snow', 'important');
|
||||
parentTh.style.setProperty('border-top', borderPixel, 'important');
|
||||
parentTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Sno") {
|
||||
parentTh.classList.add('sticky', 'no-border');
|
||||
parentTh.style.setProperty('border-right', '3px solid snow', 'important');
|
||||
parentTh.style.setProperty('border-left', '3px solid snow', 'important');
|
||||
parentTh.style.setProperty('border-top', '3px solid snow', 'important');
|
||||
parentTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
parentTh.style.setProperty('border-left', borderPixel, 'important');
|
||||
parentTh.style.setProperty('border-top', borderPixel, 'important');
|
||||
parentTh.style.setProperty('min-width', snoColumnWidth, 'important');
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Action") {
|
||||
|
||||
parentTh.classList.add('no-border');
|
||||
parentTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
parentTh.style.setProperty('border-left', borderPixel, 'important');
|
||||
parentTh.style.setProperty('border-top', borderPixel, 'important');
|
||||
}
|
||||
|
||||
if (RFQ_or_QCR == 2) {
|
||||
if (proposels[header.parentHeader] && proposels[header.parentHeader].qcr !== undefined) {
|
||||
if (proposels[header.parentHeader].qcr == 0 || proposels[header.parentHeader].qcr == false) {
|
||||
@ -4659,24 +4684,31 @@ function jsonToTable(json) {
|
||||
if (header.parentHeader === "Item Key") {
|
||||
subTh.classList.add('hidden', 'no-border');
|
||||
subTh.style.color = '#bfe0e2';
|
||||
subTh.style.setProperty('border-right', '2px solid snow', 'important');
|
||||
subTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Particulars") {
|
||||
subTh.classList.add('sticky', 'no-border');
|
||||
subTh.style.color = '#bfe0e2';
|
||||
subTh.style.setProperty('border-bottom', '3px solid snow', 'important');
|
||||
subTh.style.setProperty('border-right', '3px solid snow', 'important');
|
||||
subTh.style.setProperty('border-bottom', borderPixel, 'important');
|
||||
subTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Sno") {
|
||||
subTh.classList.add('sticky', 'no-border');
|
||||
subTh.style.color = '#bfe0e2';
|
||||
subTh.style.setProperty('border-right', '3px solid snow', 'important');
|
||||
subTh.style.setProperty('border-left', '3px solid snow', 'important');
|
||||
subTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
subTh.style.setProperty('border-left', borderPixel, 'important');
|
||||
subTh.style.setProperty('min-width', snoColumnWidth, 'important');
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Action") {
|
||||
subTh.classList.add('no-border');
|
||||
subTh.style.color = '#fff';
|
||||
subTh.style.setProperty('border-right', borderPixel, 'important');
|
||||
subTh.style.setProperty('border-left', borderPixel, 'important');
|
||||
}
|
||||
|
||||
// Add dropdown menu only if subHeader is not "Quote Asked" or "-"
|
||||
if (!["Quote Asked", "-", ""].includes(subHeader)) {
|
||||
|
||||
@ -4809,7 +4841,7 @@ function jsonToTable(json) {
|
||||
const td = document.createElement('td');
|
||||
|
||||
if(rowData.SNO == "1"){
|
||||
td.style.setProperty('border-top', '2px solid #007bff', 'important');
|
||||
td.style.setProperty('border-top', borderPixel, 'important');
|
||||
}
|
||||
|
||||
if (dataEntry.parentth === "Action") {
|
||||
@ -4952,14 +4984,22 @@ function populateTable(json) {
|
||||
|
||||
// Create the parent header
|
||||
const th = document.createElement("th");
|
||||
let calc_renewal_or_rollover = header.parentHeader;
|
||||
let calc_renewal_or_rollover_display_name = "Proposal Coverage " + (proposel_count);
|
||||
|
||||
if(["Sno", "Particulars", "Action"].includes(header.parentHeader)){
|
||||
th.textContent = header.parentHeader;
|
||||
}else{
|
||||
|
||||
let calc_renewal_or_rollover = header.parentHeader;
|
||||
let calc_renewal_or_rollover_display_name = "Proposal Coverage " + (proposel_count);
|
||||
|
||||
if(["Existing Renewal", "Existing Rollover"].includes(header.parentHeader)){
|
||||
calc_renewal_or_rollover_display_name = "Existing Coverage";
|
||||
}else{
|
||||
proposel_count ++;
|
||||
}
|
||||
|
||||
th.innerHTML = `<span class="key_name" style="display: none;">${calc_renewal_or_rollover}</span><span class="display_name">${calc_renewal_or_rollover_display_name}</span>`
|
||||
proposel_count ++
|
||||
|
||||
}
|
||||
|
||||
if (header.parentHeader === "Particulars") {
|
||||
@ -5785,7 +5825,12 @@ function appendMultiFileData(data) {
|
||||
console.log('Data sent successfully:', response);
|
||||
|
||||
if (response.status == true) {
|
||||
toastr.success(response.message, 'SUCCESS');
|
||||
if(input == 1){
|
||||
console.log(response.message, 'SUCCESS');
|
||||
showTinyToast();
|
||||
}else{
|
||||
toastr.success(response.message, 'SUCCESS');
|
||||
}
|
||||
$('#rfq_primaryKey').val(response.id);
|
||||
} else {
|
||||
toastr.warning(response.message, 'WARNING');
|
||||
@ -6659,7 +6704,6 @@ function appendMultiFileData(data) {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
setTimeout(function(){
|
||||
$('.payment_date').flatpickr({
|
||||
@ -6667,5 +6711,18 @@ function appendMultiFileData(data) {
|
||||
});
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
function showTinyToast(){
|
||||
const saveIndicator = document.getElementById('saveIndicator');
|
||||
saveIndicator.classList.add('show');
|
||||
setTimeout(() => {
|
||||
saveIndicator.classList.remove('show');
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -5,13 +5,12 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.btn-custom {
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.readonly-select {
|
||||
pointer-events: none;
|
||||
background-color: #f0f0f0;
|
||||
@ -35,12 +34,12 @@
|
||||
background-color: #bfe0e2;
|
||||
border: 1px solid #007bff;
|
||||
}
|
||||
|
||||
table thead tr:nth-child(2) th {
|
||||
background-color: #bfe0e2;
|
||||
border: 1px solid #007bff;
|
||||
}
|
||||
|
||||
|
||||
/* Apply styles to the first column, accounting for rowspan */
|
||||
table th:nth-child(1),
|
||||
table td:nth-child(1) {
|
||||
@ -48,8 +47,6 @@
|
||||
background-color: #bfe0e2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Ensure rowspan cells in the first column inherit the same styles */
|
||||
table td[rowspan]:nth-child(1) {
|
||||
width: 110px;
|
||||
@ -69,14 +66,13 @@
|
||||
text-align: left; /* Optional: Aligns text inside cells */
|
||||
}
|
||||
|
||||
|
||||
|
||||
th:nth-child(2),
|
||||
td:nth-child(2) {
|
||||
width: 720px;
|
||||
background-color: #bfe0e2;
|
||||
/* Adjust first column width */
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
@ -116,7 +112,6 @@
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
|
||||
.dropdown-content button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
@ -261,7 +256,23 @@
|
||||
line-height: 33px !important;
|
||||
}
|
||||
|
||||
|
||||
.save-indicator {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
background: #28a745;
|
||||
color: white;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
font-size: 11px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.save-indicator.show {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@ -297,6 +308,7 @@
|
||||
<input type="hidden" id="lead_id" value="<?= htmlspecialchars($lead_data['id'] ?? "", ENT_QUOTES, 'UTF-8') ?>" />
|
||||
<input type="hidden" id="rfq_primaryKey" name="rfq_primaryKey" value="<?= isset($rfq_data['id']) ? $rfq_data['id'] : '' ?>">
|
||||
|
||||
<div class="save-indicator" id="saveIndicator">Saved</div>
|
||||
<div id="allTableContainer">
|
||||
<div id="tablesContainer"></div>
|
||||
<?php include('policyRegisterModel.php'); ?>
|
||||
@ -355,7 +367,7 @@
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="to">To </label>
|
||||
<label for="to">TO</label>
|
||||
<select class="form-control" id="to" name="to" required>
|
||||
<?php if (isset($userList)) { ?>
|
||||
<?php foreach ($userList as $user) { ?>
|
||||
@ -509,16 +521,16 @@
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="proposals"> Proposals/Insurer <span id="base_danger" class="text-danger">*</span></label>
|
||||
<label for="proposals"> Proposal(s) / Insurer(s) <span id="base_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="proposals" name="proposals" onchange="getInsurerBranchContacts(this)" required>
|
||||
<option value="">Select Proposals</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
<label for="placement_to"> To <span id="base_danger" class="text-danger">*</span></label>
|
||||
<label for="placement_to"> TO <span id="base_danger" class="text-danger">*</span></label>
|
||||
<select class="form-control" id="placement_to" name="placement_to" required>
|
||||
<option value="">Select To Mail</option>
|
||||
<option value="">Select TO Mail</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -2629,7 +2641,6 @@
|
||||
$('.loader-mask').fadeIn();
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: formData,
|
||||
@ -2639,10 +2650,9 @@
|
||||
console.log('RFQ NON EB FORM SUBMIT RESPONSE : ', response);
|
||||
|
||||
if (response.status == true) {
|
||||
toastr.success(response.message, "Success");
|
||||
|
||||
|
||||
if (!isAutoSave) {
|
||||
|
||||
toastr.success(response.message, "Success");
|
||||
localStorage.removeItem('policyData');
|
||||
|
||||
$('.actionBtns').show();
|
||||
@ -2651,6 +2661,8 @@
|
||||
}
|
||||
} else {
|
||||
$('#rfq_primaryKey').val(response.id);
|
||||
console.log(response.message, "Success");
|
||||
showTinyToast()
|
||||
}
|
||||
// window.location.reload();
|
||||
} else {
|
||||
@ -4435,15 +4447,15 @@
|
||||
});
|
||||
|
||||
$('#proposals').select2({
|
||||
placeholder: 'Select To proposal',
|
||||
placeholder: 'Select proposal',
|
||||
});
|
||||
|
||||
$('#placement_to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$("textarea.select2-search__field").attr('rows', '1');
|
||||
@ -5059,18 +5071,18 @@
|
||||
});
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
$('#cc').val('').select2({
|
||||
placeholder: 'select CC Mail'
|
||||
placeholder: 'Select CC Mail'
|
||||
});
|
||||
// $('#subject').val('');
|
||||
$('#proposals').val('');
|
||||
$('#placement_to').val('').select2({
|
||||
placeholder: 'select To Mail'
|
||||
placeholder: 'Select TO Mail'
|
||||
});
|
||||
$('#placement_cc').val('').select2({
|
||||
placeholder: 'select CC Mail'
|
||||
placeholder: 'Select CC Mail'
|
||||
});
|
||||
$('#placement_subject').val('');
|
||||
|
||||
@ -5135,19 +5147,19 @@
|
||||
$('.close').click(function() {
|
||||
|
||||
$('#to').select2({
|
||||
placeholder: 'Select To Mail',
|
||||
placeholder: 'Select TO Mail',
|
||||
});
|
||||
|
||||
$('#cc').val('').select2({
|
||||
placeholder: 'select CC Mail'
|
||||
placeholder: 'Select CC Mail'
|
||||
});
|
||||
// $('#subject').val('');
|
||||
$('#proposals').val('');
|
||||
$('#placement_to').val('').select2({
|
||||
placeholder: 'select To Mail'
|
||||
placeholder: 'Select TO Mail'
|
||||
});
|
||||
$('#placement_cc').val('').select2({
|
||||
placeholder: 'select CC Mail'
|
||||
placeholder: 'Select CC Mail'
|
||||
});
|
||||
$('#placement_subject').val('');
|
||||
|
||||
@ -5804,6 +5816,14 @@
|
||||
});
|
||||
}
|
||||
|
||||
function showTinyToast(){
|
||||
const saveIndicator = document.getElementById('saveIndicator');
|
||||
saveIndicator.classList.add('show');
|
||||
setTimeout(() => {
|
||||
saveIndicator.classList.remove('show');
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user