change some desgine
This commit is contained in:
@@ -161,7 +161,8 @@
|
||||
</form>
|
||||
</div>
|
||||
</dialog>
|
||||
<button onclick="d.showModal()" class="rounded-lg pl-2 h-fit bg-[#fff] text-[#464E5F] shadow-lg flex flex-row justify-center place-items-center">Select Date<span class="fa fa-calendar-o -ml-[17px] pt-1.5"></span></button>
|
||||
<button onclick="d.showModal()" class="rounded-lg pl-2 h-fit bg-[#fff] text-[#464E5F] shadow-lg flex flex-row justify-center place-items-center">Select Date<span class="fa fa-calendar-o -ml-[17px] pt-1.5"></span></button>
|
||||
<button onclick="downloadCSV(data, filename)" class="text-[#fff] rounded-lg h-fit inline-flex justify-center place-items-center p-2" style="background: linear-gradient(90deg, rgba(70, 68, 142, 0.91) 0%, rgba(120, 117, 244, 0.91) 100%);">Downloat csv</button>
|
||||
<div class="flex flex-row">
|
||||
<form method="GET" action="" class="bg-[#fff] flex flex-row place-items-center">
|
||||
<input class="p-2.5 rounded-l-lg focus:outline-none w-[320px]" type="text" name="search" placeholder="Name, lead ID, Mobile, Email..." style="border: 2px solid #8E8E8E;">
|
||||
@@ -176,13 +177,13 @@
|
||||
<button onclick="toggleDisplay();" class="rounded-lg px-2 h-fit text-[#fff] flex flex-row justify-center place-items-center" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;"><span style="font-size: 30px; font-weight: bold">+</span><span>Add Leads</span></button>
|
||||
</div>
|
||||
|
||||
<form method="post" class="">
|
||||
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold" style="width: 100%;" >
|
||||
<thead>
|
||||
<form method="post" class="table-container">
|
||||
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold min-w-full leading-normal" style="" >
|
||||
<thead class="fixed-header">
|
||||
<tr>
|
||||
<?php
|
||||
if(isset($_SESSION['user_type']) && $_SESSION['user_type'] == 'admin')
|
||||
echo ' <th class="text-center border-b-2 p-3">
|
||||
echo ' <th class=" border-b-2 p-3">
|
||||
<div class="delete-confirm" id="delete-button" style="display: none;">
|
||||
<p>Are you sure you want to delete this lead?</p>
|
||||
<div class="flex flex-row space-x-4">
|
||||
@@ -192,12 +193,13 @@
|
||||
</div>
|
||||
</th>';
|
||||
?>
|
||||
<th class="text-center border-b-2 p-3">Name</th>
|
||||
<th class="text-left border-b-2 p-3">ID</th>
|
||||
<th class="text-center border-b-2 p-3">Status Update</th>
|
||||
<!-- <th class="text-center border-b-2 p-3">Contact Detail</th> -->
|
||||
<th class="text-center border-b-2 p-3">Form Name</th>
|
||||
<th class="text-left border-b-2 p-3">Date</th>
|
||||
<th class="border-b-2 p-3 text-left">Date</th>
|
||||
<th class="border-b-2 p-3 text-left">Name</th>
|
||||
<th class="border-b-2 p-3 text-left">Country / State</th>
|
||||
<th class="border-b-2 p-3 text-left">ID</th>
|
||||
<th class="border-b-2 p-3 text-left">Status</th>
|
||||
<th class="border-b-2 p-3 text-left">Form Name</th>
|
||||
<th class="border-b-2 p-3">Assigned to</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody >
|
||||
@@ -250,9 +252,11 @@
|
||||
$totalResults = count($leads);
|
||||
$totalPages = ceil($totalRows / $resultsPerPage);
|
||||
if($resultsPerPage <= $totalRows) echo "<p class='px-4'>".$resultsPerPage." Out of ".$totalRows." Leads </p>";
|
||||
|
||||
// else echo "<p class='px-4'>".$totalRows." Leads </p>";
|
||||
// Status Conditional Color
|
||||
foreach($leads as $lead){
|
||||
$leadCountry = strlen($lead['country']) > 0 ? $lead['country'] . ($lead['state'] > 0 ? '/' : ' ') : ' ';
|
||||
$only_date =isset($lead['time']) ? substr($lead['time'], 0, 10): 'Not Available';
|
||||
$lead_id = $lead['id'];
|
||||
if($lead['status'] == 'New'){$conditional_background_color = 'background-color: #FFD9D9; border: 2px solid #FB5555; border-radius: 20px; text-align: center; color: #FB5555;';}
|
||||
@@ -269,7 +273,9 @@
|
||||
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
|
||||
</td>
|
||||
<?php }?>
|
||||
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
|
||||
<td class="whitespace-nowrap border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
|
||||
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $leadCountry.$lead['state']; ?></td>
|
||||
<td class="whitespace-nowrap border-y-2 p-2 text-blue-500 hover:text-blue-700 hover:underline"><a href="/edit-lead/?id=<?php echo $lead['id'] ?>"><?php echo $lead['id'] ?></a></td>
|
||||
<td class="whitespace-nowrap border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></td>
|
||||
<!-- <td class="border-y-2 p-2">
|
||||
@@ -277,7 +283,7 @@
|
||||
<p><i class="fa fa-phone"> <?php // echo $lead['phone'] ?></i></p>
|
||||
</td> -->
|
||||
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
|
||||
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
|
||||
<td class="border-y-2 p-2"><?php echo $lead['user'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -497,6 +503,43 @@ echo'<div class="flex flex-row justify-end">
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
position: relative;
|
||||
height: 100vh;
|
||||
overflow-y: scroll;
|
||||
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
||||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
.table-container::-webkit-scrollbar {
|
||||
display: none; /* Safari and Chrome */
|
||||
}
|
||||
|
||||
/* Fixed header */
|
||||
.fixed-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: white;
|
||||
z-index: 996;
|
||||
}
|
||||
|
||||
/* Ensure the fixed header matches the table headers */
|
||||
.fixed-header th {
|
||||
background-color: inherit; /* Maintain background color */
|
||||
box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4); /* Optional: Add a shadow for better visibility */
|
||||
}
|
||||
|
||||
/* Optional: Style table for better visibility */
|
||||
.table-container table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.add-lead-form {
|
||||
background-color: #F8F8F8;
|
||||
display: none;
|
||||
|
||||
Reference in New Issue
Block a user