Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
Srinivas-Saravanan 2025-01-30 11:40:14 +05:30
commit 970e2adaa2
3 changed files with 167 additions and 178 deletions

View File

@ -244,34 +244,6 @@ class PolicyTransactionController extends BaseController
// print_r($data); die; // print_r($data); die;
// var_dump($data); die; // var_dump($data); die;
// Format dates
// $data['policy_issue_date'] = change_date_format($this->request->getPost('policy_issue_date'), 'd/m/Y', 'Y-m-d') ?? null;
// $data['policy_start_date'] = change_date_format($this->request->getPost('policy_start_date'), 'd/m/Y', 'Y-m-d') ?? null;
// $data['policy_end_date'] = change_date_format($this->request->getPost('policy_end_date'), 'd/m/Y', 'Y-m-d') ?? null;
// $data['renewal_date'] = change_date_format($this->request->getPost('renewal_date'), 'd/m/Y', 'Y-m-d') ?? null;
// $data['rollover_date'] = change_date_format($this->request->getPost('rollover_date'), 'd/m/Y', 'Y-m-d') ?? null;
// $data['policy_issue_date'] = (isset($data['policy_issue_date']) && $data['policy_issue_date'] !== null && $data['policy_issue_date'] !== '')
// ? date('d/m/Y', strtotime($data['policy_issue_date']))
// : null;
// $data['policy_start_date'] = (isset($data['policy_start_date']) && $data['policy_start_date'] !== null && $data['policy_start_date'] !== '')
// ? date('d/m/Y', strtotime($data['policy_start_date']))
// : null;
// $data['policy_end_date'] = (isset($data['policy_end_date']) && $data['policy_end_date'] !== null && $data['policy_end_date'] !== '')
// ? date('d/m/Y', strtotime($data['policy_end_date']))
// : null;
// $data['renewal_date'] = (isset($data['renewal_date']) && $data['renewal_date'] !== null && $data['renewal_date'] !== '')
// ? date('d/m/Y', strtotime($data['renewal_date']))
// : null;
// $data['rollover_date'] = (isset($data['rollover_date']) && $data['rollover_date'] !== null && $data['rollover_date'] !== '')
// ? date('d/m/Y', strtotime($data['rollover_date']))
// : null;
if(empty($data['policy_issue_date'])){ if(empty($data['policy_issue_date'])){
$data['policy_issue_date'] = null; $data['policy_issue_date'] = null;
} }
@ -302,7 +274,7 @@ class PolicyTransactionController extends BaseController
// Separate Insurer and TPA Branch IDs and IDs // Separate Insurer and TPA Branch IDs and IDs
if(isset($data['insurer_id']) && !empty($data['insurer_id'])){ if(isset($data['insurer_id']) && !empty($data['insurer_id'])){
list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']); list($data['insurer_branch_id'], $data['insurer_id']) = explode('-', $data['insurer_id']);
if ($data['tpa']) { if (isset($data['tpa'])) {
list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']); list($data['tpa_branch_id'], $data['tpa_id']) = explode('-', $data['tpa']);
} }
} }

View File

@ -250,9 +250,10 @@ class TicketController extends BaseController
$ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y'); $ticket_data = $this->formatDateForClaim($ticket_data, 'd/m/Y');
// dd($ticket_data); // dd($ticket_data);
$template_data = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id); $template_data = $this->ticketMasterModel->getTemplateDataByTicketID($ticket_id);
$template_data['mail_content'] = $this->replacePlaceholders($template_data['mail_content'], $ticket_data); if(!empty($template_data)){
$template_data['subject'] = $this->replacePlaceholders($template_data['subject'], $ticket_data); $template_data['mail_content'] = $this->replacePlaceholders($template_data['mail_content'], $ticket_data);
$template_data['subject'] = $this->replacePlaceholders($template_data['subject'], $ticket_data);
}
$data = $this->ticket_form_data($ticket_data['ticket_type_id']); $data = $this->ticket_form_data($ticket_data['ticket_type_id']);
$data['ticket_data'] = $ticket_data; $data['ticket_data'] = $ticket_data;
$data['reply_data'] = $template_data; $data['reply_data'] = $template_data;

View File

@ -50,7 +50,7 @@ table.dataTable tbody td {
background-color: #f8f9fa !important; background-color: #f8f9fa !important;
color: #16181b !important; color: #16181b !important;
cursor: pointer !important; cursor: pointer !important;
} }
</style> </style>
<div class="col-12"> <div class="col-12">
@ -82,11 +82,16 @@ table.dataTable tbody td {
<td><?php echo $trigger_type[$row['trigger_type']]; ?></td> <td><?php echo $trigger_type[$row['trigger_type']]; ?></td>
<td><?=$row['is_auto_mail'] == 1?'Auto':"Manual" ?></td> <td><?=$row['is_auto_mail'] == 1?'Auto':"Manual" ?></td>
<td> <td>
<div class="btn-group dropdown"> <div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a> <a href="javascript: void(0);"
class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"
aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#" onclick="getMailTemplateData(<?=$row['id']?>)"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a> <a class="dropdown-item" href="#"
<a class="dropdown-item" onclick="deleteTemplate(<?=$row['id']?>)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a> onclick="getMailTemplateData(<?=$row['id']?>)"><i
class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a class="dropdown-item" onclick="deleteTemplate(<?=$row['id']?>)"><i
class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
</div> </div>
</div> </div>
</td> </td>
@ -116,19 +121,14 @@ table.dataTable tbody td {
<form role="form" class="parsley-examples" method="post" id="ticket_mail_editor_modal" <form role="form" class="parsley-examples" method="post" id="ticket_mail_editor_modal"
enctype="multipart/form-data" novalidate> enctype="multipart/form-data" novalidate>
<div class="form-group"> <div class="form-group">
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-4">
<label for="emp_code">Template Name</label> <label for="emp_code">Template Name</label>
<input type="text" id="template_name" name="template_name" class="form-control" placeholder="Template Name" required> <input type="text" id="template_name" name="template_name" class="form-control"
placeholder="Template Name" required>
</div> </div>
<div class="form-group col-md-6">
<label for="template_subject">Subject</label>
<input type="text" id="template_subject" name="subject" class="form-control" placeholder="Subject" required>
</div>
</div>
<div class="form-row">
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<label for="emp_code">Policy Type</label> <label for="emp_code">Policy Type</label>
@ -141,10 +141,10 @@ table.dataTable tbody td {
} }
} }
?> ?>
</select> </select>
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-2">
<label for="trigger_type">Trigger Type</label> <label for="trigger_type">Trigger Type</label>
<select class="form-control" id="trigger_type" name="trigger_type" required> <select class="form-control" id="trigger_type" name="trigger_type" required>
<option value="">Select status</option> <option value="">Select status</option>
@ -155,46 +155,58 @@ table.dataTable tbody td {
} }
} }
?> ?>
</select> <input id="primaryKey" type="hidden"> </select> <input id="primaryKey" type="hidden">
</div> </div>
<div class="form-group col-md-4"> <div class="form-group col-md-4">
<div> <div>
<div id="statusSwitchWrapper" class="dt-switch-wrapper" style="padding-top: 40px;padding-left: 10px;"> <div id="statusSwitchWrapper" class="dt-switch-wrapper"
style="padding-top: 40px;padding-left: 10px;">
<div class="custom-control custom-switch" style="text-align: left;"> <div class="custom-control custom-switch" style="text-align: left;">
<input type="checkbox" class="custom-control-input" id="statusSwitch"> <input type="checkbox" class="custom-control-input" id="statusSwitch">
<label class="custom-control-label" for="statusSwitch">Auto Mail</label> <label class="custom-control-label" for="statusSwitch">Auto Mail</label>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="form-row">
<div class="form-group col-md-12">
<label for="template_subject">Subject</label>
<input type="text" id="template_subject" name="subject" class="form-control"
placeholder="Subject" required>
</div>
</div>
<hr> <hr>
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<!-- <textarea class="form-control" rows="5" placeholder="Enter Mail Content"></textarea> --> <!-- <textarea class="form-control" rows="5" placeholder="Enter Mail Content"></textarea> -->
<div class="form-row" id="rac_rate_dropdown"> <div class="form-row" id="rac_rate_dropdown">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<select id="ticket_mail_customButton" class="form-control" style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;"> <select id="ticket_mail_customButton" class="form-control"
<option value="">PlaceHolders</option> style="border:none;right: 6px;width: auto;position: absolute;z-index: 1;top: 17px;height: 32px;float: right;">
<?php foreach ($placeHolders as $value): ?> <option value="">PlaceHolders</option>
<?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile <?php foreach ($placeHolders as $value): ?>
<?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?> <?php // if($value == 'member_name' || $value == 'member_mobile' || $value == 'nhance_logo' || $value == 'client_logo' || $value == 'app_link' || $value == 'client_name'){ ?>member_mobile
<option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?></option> <?php $valueChange = str_replace('_', ' ', $value); $valueChange = ucwords($valueChange); ?>
<?php //} ?> <option value="[[<?php echo $value; ?>]]"><?php echo $valueChange; ?>
<?php endforeach; ?> </option>
</select> <?php //} ?>
</div> <?php endforeach; ?>
</div> </select>
</div>
</div>
<div id="ticket_mail_editor" name="content" style="height: 300px;"></div> <div id="ticket_mail_editor" name="content" style="height: 300px;"></div>
</div> </div>
</div> </div>
<div class="form-group text-right m-b-0"> <div class="form-group text-right m-b-0">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit_2">Submit</button> <button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="btnGridSubmit_2">Submit</button>
</div> </div>
</div> </div>
</form> </form>
@ -237,32 +249,30 @@ $(document).ready(function() {
console.error("Table atet found."); console.error("Table atet found.");
} }
var toolbar = "bold,italic,strikethrough,|,superscript,subscript,|,align,"; var toolbar = "bold,italic,strikethrough,|,superscript,subscript,|,align,";
const editorConfig = { const editorConfig = {
buttons: toolbar.concat(['fontsize']), buttons: toolbar.concat(['fontsize']),
fontsize: [8, 10, 12, 14, 16, 18, 20, 22, 24], // Customize font sizes fontsize: [8, 10, 12, 14, 16, 18, 20, 22, 24], // Customize font sizes
showPlaceholder: false, showPlaceholder: false,
toolbarButtonSize: 'small', toolbarButtonSize: 'small',
toolbarAdaptive: false, toolbarAdaptive: false,
saveHeightInStorage: true, saveHeightInStorage: true,
minHeight: 400, minHeight: 400,
extraButtons: [ extraButtons: [{
{ name: 'info',
name: 'info', iconURL: '<?= base_url()."public"; ?>/assets/images/image-solid.svg', // Replace with the actual icon URL
iconURL: '<?= base_url()."public"; ?>/assets/images/image-solid.svg', // Replace with the actual icon URL exec: function(editor) {
exec: function (editor) { const fileInput = document.getElementById("Question_title_fileInput");
const fileInput = document.getElementById("Question_title_fileInput"); fileInput.click();
fileInput.click(); },
}, }, ],
}, };
],
};
const editor = Jodit.make("#ticket_mail_editor", editorConfig); const editor = Jodit.make("#ticket_mail_editor", editorConfig);
let lastActiveField = null; let lastActiveField = null;
// Track last active input field // Track last active input field
$("#template_subject").on("focus", function() { $("#template_subject").on("focus", function() {
lastActiveField = this; lastActiveField = this;
}); });
@ -270,8 +280,8 @@ $("#template_subject").on("focus", function() {
editor.events.on("focus", function() { editor.events.on("focus", function() {
lastActiveField = editor; lastActiveField = editor;
}); });
document.addEventListener('change', function(event) { document.addEventListener('change', function(event) {
var target = event.target; var target = event.target;
if (target.matches('#ticket_mail_customButton')) { if (target.matches('#ticket_mail_customButton')) {
let placeholderValue = $(target).val(); let placeholderValue = $(target).val();
@ -297,7 +307,8 @@ document.addEventListener('change', function(event) {
} else if (input.selectionStart || input.selectionStart === 0) { } else if (input.selectionStart || input.selectionStart === 0) {
let startPos = input.selectionStart; let startPos = input.selectionStart;
let endPos = input.selectionEnd; let endPos = input.selectionEnd;
input.value = input.value.substring(0, startPos) + textToInsert + input.value.substring(endPos, input.value.length); input.value = input.value.substring(0, startPos) + textToInsert + input.value.substring(endPos,
input.value.length);
input.selectionStart = input.selectionEnd = startPos + textToInsert.length; input.selectionStart = input.selectionEnd = startPos + textToInsert.length;
} else { } else {
input.value += textToInsert; input.value += textToInsert;
@ -305,22 +316,22 @@ document.addEventListener('change', function(event) {
} }
$('.close').click(function () { $('.close').click(function() {
$('#template_subject').val(''); $('#template_subject').val('');
$('#template_name').val(''); $('#template_name').val('');
$('#primaryKey').val(''); $('#primaryKey').val('');
$('#policy_type').val('').change(); $('#policy_type').val('').change();
$('#trigger_type').val('').change(); $('#trigger_type').val('').change();
editor.setEditorValue(''); editor.setEditorValue('');
$('#primaryKey').val(null); $('#primaryKey').val(null);
$('#statusSwitch').prop('checked', false); $('#statusSwitch').prop('checked', false);
}) })
$('#ticket_mail_editor_modal').submit(function (event) { $('#ticket_mail_editor_modal').submit(function(event) {
event.preventDefault(); event.preventDefault();
let isValid = true; let isValid = true;
$('#ticket_mail_editor_modal [required]').each(function () { $('#ticket_mail_editor_modal [required]').each(function() {
if (!this.value.trim()) { if (!this.value.trim()) {
isValid = false; isValid = false;
$(this).addClass('is-invalid'); // Add a red border for visibility $(this).addClass('is-invalid'); // Add a red border for visibility
@ -333,58 +344,61 @@ $('#ticket_mail_editor_modal').submit(function (event) {
toastr.error('Please fill all required fields.', 'Validation Error'); toastr.error('Please fill all required fields.', 'Validation Error');
return; // Prevent submission return; // Prevent submission
} }
var joditEditor = editor; var joditEditor = editor;
if (joditEditor) if (joditEditor) {
{ var mailContent = $(joditEditor.currentPlace.container).find('.jodit-wysiwyg').html();
var mailContent = $(joditEditor.currentPlace.container).find('.jodit-wysiwyg').html(); var formData = $(this).serializeArray();
var formData = $(this).serializeArray(); formData.push({
formData.push({ name: 'mail_content', value: mailContent }); name: 'mail_content',
// formData.push({ name: 'client_id', value: $('#general_PrimaryKey').val() }); value: mailContent
var isAutoMailEnabled = $('#statusSwitch').is(':checked') ? 1 : 0; });
formData.push({ name: 'is_auto_mail', value: isAutoMailEnabled }); // formData.push({ name: 'client_id', value: $('#general_PrimaryKey').val() });
var primary_key = $('#primaryKey').val(); var isAutoMailEnabled = $('#statusSwitch').is(':checked') ? 1 : 0;
if (primary_key != null && primary_key != ''){ formData.push({
formData.push({ name: 'id', value: primary_key}); name: 'is_auto_mail',
} value: isAutoMailEnabled
$('.loader').fadeIn(); });
$('.loader-mask').fadeIn(); var primary_key = $('#primaryKey').val();
var form_action = '<?= base_url("ticket/crud_mail_template/1") ?>'; if (primary_key != null && primary_key != '') {
$.ajax({ formData.push({
url: form_action, name: 'id',
type: "POST", value: primary_key
data: formData,
dataType: 'json',
success: function(res)
{
if(res.status == true){
$('#new_mail_template').find('.close').click();
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
toastr.success('Template saved successfully!', 'Success');
location.reload();
}else if (res.status == false){
toastr.error('Failed to Save Data', 'error');
}
},
error: function (xhr, status, error)
{
console.error(xhr.responseText);
console.error(status, error);
setTimeout(function()
{
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
toastr.error('Something Wrong!', 'warning');
}, 1000);
}
}); });
}
else
{
console.error("Jodit editor instance is not defined.");
} }
}) $('.loader').fadeIn();
$('.loader-mask').fadeIn();
var form_action = '<?= base_url("ticket/crud_mail_template/1") ?>';
$.ajax({
url: form_action,
type: "POST",
data: formData,
dataType: 'json',
success: function(res) {
if (res.status == true) {
$('#new_mail_template').find('.close').click();
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
toastr.success('Template saved successfully!', 'Success');
location.reload();
} else if (res.status == false) {
toastr.error('Failed to Save Data', 'error');
}
},
error: function(xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
setTimeout(function() {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
toastr.error('Something Wrong!', 'warning');
}, 1000);
}
});
} else {
console.error("Jodit editor instance is not defined.");
}
})
}); });
@ -393,9 +407,11 @@ function openModal() {
myModal.show(); myModal.show();
} }
function deleteTemplate(id){ function deleteTemplate(id) {
const url = '<?= base_url("ticket/crud_mail_template/3") ?>'; const url = '<?= base_url("ticket/crud_mail_template/3") ?>';
const data = { id: id }; // Ensure data is passed as an object const data = {
id: id
}; // Ensure data is passed as an object
Swal.fire({ Swal.fire({
title: "Are you sure?", title: "Are you sure?",
@ -437,13 +453,16 @@ function deleteTemplate(id){
} }
}); });
} }
function getMailTemplateData(id) { function getMailTemplateData(id) {
const template_name = 'new_mail_template'; const template_name = 'new_mail_template';
$('.loader').fadeIn(); $('.loader').fadeIn();
$('.loader-mask').fadeIn(); $('.loader-mask').fadeIn();
var form_action = '<?= base_url("ticket/crud_mail_template/2") ?>'; var form_action = '<?= base_url("ticket/crud_mail_template/2") ?>';
var data = { id: id }; var data = {
id: id
};
$.ajax({ $.ajax({
url: form_action, url: form_action,
@ -454,15 +473,15 @@ function getMailTemplateData(id) {
if (res) { if (res) {
if (res.status == true) { if (res.status == true) {
// Open the modal // Open the modal
openModal(); openModal();
// Populate the form fields // Populate the form fields
$('#template_subject').val(res.data.subject); $('#template_subject').val(res.data.subject);
$('#template_name').val(res.data.template_name); $('#template_name').val(res.data.template_name);
$('#primaryKey').val(res.data.id); $('#primaryKey').val(res.data.id);
$('#policy_type').val(res.data.ticket_type).change(); $('#policy_type').val(res.data.ticket_type).change();
$('#trigger_type').val(res.data.ticket_type).change(); $('#trigger_type').val(res.data.ticket_type).change();
$('.jodit-wysiwyg').html(res.data.mail_content); $('.jodit-wysiwyg').html(res.data.mail_content);
// Set the auto mail switch // Set the auto mail switch
if (res.data.is_auto_mail == 1) { if (res.data.is_auto_mail == 1) {
@ -486,7 +505,7 @@ function getMailTemplateData(id) {
$('.loader').fadeOut(); $('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
}, },
error: function (xhr, status, error) { error: function(xhr, status, error) {
console.error(xhr.responseText); console.error(xhr.responseText);
console.error(status, error); console.error(status, error);
setTimeout(function() { setTimeout(function() {
@ -497,27 +516,24 @@ function getMailTemplateData(id) {
} }
}); });
} }
</script> </script>
<script> <script>
document.addEventListener("DOMContentLoaded", function() {
document.addEventListener("DOMContentLoaded", function () {
const table = document.getElementById("scroll-horizontal-datatable"); const table = document.getElementById("scroll-horizontal-datatable");
// Create custom dropdown // Create custom dropdown
function createCustomDropdown(row) { function createCustomDropdown(row) {
// Get the original dropdown items // Get the original dropdown items
const originalDropdown = row.querySelector('.dropdown-menu'); const originalDropdown = row.querySelector('.dropdown-menu');
if (!originalDropdown) return null; if (!originalDropdown) return null;
// Create new dropdown with proper background and spacing // Create new dropdown with proper background and spacing
const customDropdown = document.createElement('div'); const customDropdown = document.createElement('div');
customDropdown.className = 'custom-dropdown-menu'; customDropdown.className = 'custom-dropdown-menu';
// Copy inner content while maintaining icon alignment // Copy inner content while maintaining icon alignment
customDropdown.innerHTML = originalDropdown.innerHTML; customDropdown.innerHTML = originalDropdown.innerHTML;
return customDropdown; return customDropdown;
} }
@ -527,7 +543,7 @@ document.addEventListener("DOMContentLoaded", function () {
table.querySelectorAll("tbody tr").forEach(row => { table.querySelectorAll("tbody tr").forEach(row => {
const customDropdown = createCustomDropdown(row); const customDropdown = createCustomDropdown(row);
if (!customDropdown) return; if (!customDropdown) return;
document.body.appendChild(customDropdown); document.body.appendChild(customDropdown);
row.addEventListener("click", function(event) { row.addEventListener("click", function(event) {
@ -543,16 +559,16 @@ document.addEventListener("DOMContentLoaded", function () {
// Get click position // Get click position
const rect = event.target.getBoundingClientRect(); const rect = event.target.getBoundingClientRect();
// Position the dropdown with some offset // Position the dropdown with some offset
customDropdown.style.display = 'block'; customDropdown.style.display = 'block';
customDropdown.style.position = 'fixed'; customDropdown.style.position = 'fixed';
customDropdown.style.left = `${rect.left}px`; customDropdown.style.left = `${rect.left}px`;
customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap customDropdown.style.top = `${rect.bottom + 5}px`; // Add 5px gap
// Set as active dropdown // Set as active dropdown
activeDropdown = customDropdown; activeDropdown = customDropdown;
event.stopPropagation(); event.stopPropagation();
}); });
@ -563,7 +579,7 @@ document.addEventListener("DOMContentLoaded", function () {
if (onclickAttr) { if (onclickAttr) {
eval(onclickAttr); eval(onclickAttr);
} }
const href = this.getAttribute('href'); const href = this.getAttribute('href');
if (href && href !== '#') { if (href && href !== '#') {
window.location.href = href; window.location.href = href;
@ -574,7 +590,7 @@ document.addEventListener("DOMContentLoaded", function () {
activeDropdown.style.display = 'none'; activeDropdown.style.display = 'none';
activeDropdown = null; activeDropdown = null;
} }
e.stopPropagation(); e.stopPropagation();
}); });
}); });