CHANGE_ADD_user_in_masters_minor_fix - VADIVEL J 2025-10-29 11:55
This commit is contained in:
parent
53dffb08e9
commit
f6e6056a76
@ -521,12 +521,13 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
<?php foreach($roleData as $value) {
|
<?php foreach($roleData as $value) {
|
||||||
|
|
||||||
$headRoleValue = $value['id']??"";
|
// $headRoleValue = $value['id']??"";
|
||||||
|
|
||||||
|
// // we are showing head role only to head's who logged in
|
||||||
|
// if($headRoleValue == "5" && $currentLogInRole != "5" ){
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
// we are showing head role only to head's who logged in
|
|
||||||
if($headRoleValue == "5" && $currentLogInRole != "5" ){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<option value="<?= $value['id'] ?>"><?= $value['role'] ?></option>
|
<option value="<?= $value['id'] ?>"><?= $value['role'] ?></option>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -164,7 +164,7 @@ table.dataTable tbody td {
|
|||||||
|
|
||||||
<thead class="bg-light">
|
<thead class="bg-light">
|
||||||
<tr>
|
<tr>
|
||||||
<th><div class="column-header">S.No </div></th>
|
<th><div class="column-header">S.No </div></th>
|
||||||
<th><div class="column-header">Lead Type </div></th>
|
<th><div class="column-header">Lead Type </div></th>
|
||||||
<th><div class="column-header">Issuer </div></th>
|
<th><div class="column-header">Issuer </div></th>
|
||||||
<th><div class="column-header">Client Type </div></th>
|
<th><div class="column-header">Client Type </div></th>
|
||||||
@ -209,8 +209,10 @@ table.dataTable tbody td {
|
|||||||
<td><?php echo $lead_status[$row['status']] ?? '-'; ?></td>
|
<td><?php echo $lead_status[$row['status']] ?? '-'; ?></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">
|
<a href="javascript:void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm"
|
||||||
<i class="mdi mdi-dots-horizontal"></i>
|
data-toggle="dropdown"
|
||||||
|
aria-expanded="false"
|
||||||
|
data-boundary="window"> <i class="mdi mdi-dots-horizontal"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" data-ft="<?= $row['lead_form_type']; ?>" onclick="getLeadsDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>', '<?= htmlspecialchars($row['lead_form_type'], ENT_QUOTES) ?>')">
|
<a class="dropdown-item btnEdit" data-id="<?= $row['id']; ?>" data-ft="<?= $row['lead_form_type']; ?>" onclick="getLeadsDataForEdit('<?= htmlspecialchars($row['id'], ENT_QUOTES) ?>', '<?= htmlspecialchars($row['lead_form_type'], ENT_QUOTES) ?>')">
|
||||||
@ -332,11 +334,42 @@ table.dataTable tbody td {
|
|||||||
document.body.appendChild(customDropdown);
|
document.body.appendChild(customDropdown);
|
||||||
|
|
||||||
row.addEventListener("click", function(event) {
|
row.addEventListener("click", function(event) {
|
||||||
// Ignore clicks on the action column
|
|
||||||
|
// 1. CRITICAL CHECK: Stop propagation if the click came from the dropdown toggle itself.
|
||||||
|
if (event.target.closest('.dropdown-toggle')) {
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
|
// **IMPORTANT:** Since you're using a custom script, you need to
|
||||||
|
// manually trigger the logic for your custom detached dropdown here.
|
||||||
|
// The code below should run when the dropdown toggle is clicked:
|
||||||
|
const originalDropdown = event.target.closest('.btn-group').querySelector('.dropdown-menu');
|
||||||
|
if (originalDropdown) {
|
||||||
|
|
||||||
|
// This is the code that opens your custom dropdown
|
||||||
|
if (activeDropdown) {
|
||||||
|
activeDropdown.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
const rect = event.target.getBoundingClientRect();
|
||||||
|
|
||||||
|
customDropdown.style.display = 'block';
|
||||||
|
customDropdown.style.position = 'fixed';
|
||||||
|
customDropdown.style.left = `${rect.left}px`;
|
||||||
|
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||||
|
|
||||||
|
activeDropdown = customDropdown;
|
||||||
|
}
|
||||||
|
|
||||||
|
return; // Exit the row listener early
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Ignore clicks on the entire action column (your existing, good check)
|
||||||
if (event.target.closest('td:last-child')) {
|
if (event.target.closest('td:last-child')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ... rest of your row logic for general row clicks ...
|
||||||
|
|
||||||
if (activeDropdown) {
|
if (activeDropdown) {
|
||||||
activeDropdown.style.display = 'none';
|
activeDropdown.style.display = 'none';
|
||||||
}
|
}
|
||||||
@ -349,7 +382,7 @@ table.dataTable tbody td {
|
|||||||
customDropdown.style.top = `${rect.bottom + 5}px`;
|
customDropdown.style.top = `${rect.bottom + 5}px`;
|
||||||
|
|
||||||
activeDropdown = customDropdown;
|
activeDropdown = customDropdown;
|
||||||
event.stopPropagation();
|
event.stopPropagation(); // Only needed if there is a parent handler
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle clicks on dropdown items
|
// Handle clicks on dropdown items
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user