This commit is contained in:
Suvodip
2024-05-25 18:01:42 +05:30
parent 9fb40c9bc8
commit 87311669a1
2 changed files with 35 additions and 35 deletions

View File

@@ -278,15 +278,15 @@
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
</td>
<?php }?>
<td class="border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
<td class="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="border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></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 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">
<p><i class="fa fa-envelope">&nbsp;<?php // echo $lead['email'] ?></i></p>
<p><i class="fa fa-phone">&nbsp;<?php // echo $lead['phone'] ?></i></p>
</td> -->
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
<td class="border-y-2 p-2"><?php echo $only_date; ?></td>
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
</tr>
<?php
}

View File

@@ -132,36 +132,36 @@
?>
<p class="text-[28px] font-bold p-4">Lead Management</p>
<div id="page-body" class="flex flex-row place-content-between px-4">
<dialog>
<button style="float: right; color: #FF0000; font-size: 25px; padding: 6px;">&#10008;</button>
<div class="flex flex-row">
<div class="flex flex-col p-6 space-y-4">
<a href="/leads?start_date=<?php echo $today_date ?>&end_date=<?php echo $next_day ?>">Today</a>
<a href="/leads?start_date=<?php echo $yesterday ?>&end_date=<?php echo $today_date ?>">Yesterday</a>
<a href="/leads?start_date=<?php echo $this_week ?>&end_date=<?php echo $today_date ?>">This Week</a>
<a href="/leads?start_date=<?php echo $firstDayOfCurrentMonth ?>&end_date=<?php echo $today_date ?>">This Month</a>
<a href="/leads?start_date=<?php echo $prev_month_date ?>&end_date=<?php echo $today_date ?>">Last Month</a>
<a href="/leads?start_date=<?php echo $firstDateOfYear ?>&end_date=<?php echo $today_date ?>">This Year</a>
<a href="/leads?start_date=<?php echo $firstDateOfPreviousYear ?>&end_date=<?php echo $today_date ?>">Last Year</a>
<a href="/leads">All Time</a>
<dialog id="d" class="rounded-lg">
<form class="text-2xl text-[#464E5F] border-[3px] m-2 border-[#464E5F] duration-700 rounded-full px-2 float-right" method="dialog" class=""><button class="">&#10008</button></form>
<div class="flex flex-row ">
<div class="flex flex-col p-4 space-y-4 border-r-[1px] border-[#464E5F]">
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $today_date ?>&end_date=<?php echo $next_day ?>">Today</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $yesterday ?>&end_date=<?php echo $today_date ?>">Yesterday</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $this_week ?>&end_date=<?php echo $today_date ?>">This Week</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDayOfCurrentMonth ?>&end_date=<?php echo $today_date ?>">This Month</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $prev_month_date ?>&end_date=<?php echo $today_date ?>">Last Month</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDateOfYear ?>&end_date=<?php echo $today_date ?>">This Year</a>
<a class="whitespace-nowrap" href="/leads?start_date=<?php echo $firstDateOfPreviousYear ?>&end_date=<?php echo $today_date ?>">Last Year</a>
<a class="whitespace-nowrap" href="/leads">All Time</a>
</div>
<form method="GET" class="p-6 flex flex-col pb-10">
<p>Choose Date for filter</p>
<p class="font-bold">Choose Date for filter</p>
<div class="flex flex-row rounded-xl py-10">
<div class="flex flex-row place-items-center">
<label for="start_date">From Date</label>
<input type="date" name="start_date" id="start_date" />
</div> &nbsp; | &nbsp;
<div class="flex flex-row place-items-center">
<label for="end_date">To Date</label>
<input type="date" name="end_date" id="end_date" />
<div class="flex flex-row place-items-center border-2 border-[#464E5F] rounded-md">
<label class="whitespace-nowrap" for="start_date">From Date</label>&nbsp;
<input class="focus:outline-none" type="date" name="start_date" id="start_date" />
</div> &nbsp;&nbsp; | &nbsp;&nbsp;
<div class="flex flex-row place-items-center border-2 border-[#464E5F] rounded-md">
<label class="whitespace-nowrap" for="end_date">To Date</label>
<input class="focus:outline-none" type="date" name="end_date" id="end_date" />
</div>
</div>
<button class="rounded-lg p-1 text-[#fff]" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;" type="submit"><p class="text-center p-1.5">Search</p></button>
</form>
</div>
</dialog>
<button class="rounded-lg p-2 h-fit bg-[#fff] text-[#464E5F] shadow-lg" style="">Select Date</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>
<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;">
@@ -173,10 +173,10 @@
echo '<p onclick="deleteCofermation();" class="rounded-lg h-fit py-2 px-6 text-[#fff] text-center" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); cursor: pointer;">Delete</p>';
}
?>
<button onclick="toggleDisplay();" class="rounded-lg p-2 h-fit text-[#fff]" style="background: linear-gradient(90deg, rgba(111, 107, 255, 0.91) 0%, rgba(68, 55, 128, 0.91) 100%); text-align: center;">Add Leads</button>
<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">&#43;</span><span>Add Leads</span></button>
</div>
<form method="post">
<form method="post" class="">
<table class="bg-[#fff] text-[#3F4254] rounded-lg font-bold" style="width: 100%;" >
<thead>
<tr>
@@ -193,11 +193,11 @@
</th>';
?>
<th class="text-center border-b-2 p-3">Name</th>
<th class="text-center border-b-2 p-3">ID</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-center border-b-2 p-3">Date</th>
<th class="text-left border-b-2 p-3">Date</th>
</tr>
</thead>
<tbody >
@@ -250,7 +250,7 @@
$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>";
// else echo "<p class='px-4'>".$totalRows." Leads </p>";
// Status Conditional Color
foreach($leads as $lead){
$only_date =isset($lead['time']) ? substr($lead['time'], 0, 10): 'Not Available';
@@ -269,15 +269,15 @@
<input type="checkbox" name="selected_records[]" value="<?php echo $lead['id']; ?>" id="<?php echo $lead['id']; ?>" />
</td>
<?php }?>
<td class="border-y-2 p-2"><label for="<?php echo $lead['id']; ?>"><?php echo $lead['name'] ?></label></td>
<td class="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="border-y-2 p-2"><div style="<?php echo $conditional_background_color; ?> font-weight: bold;"><?php echo $lead['status'];?></div></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 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">
<p><i class="fa fa-envelope">&nbsp;<?php // echo $lead['email'] ?></i></p>
<p><i class="fa fa-phone">&nbsp;<?php // echo $lead['phone'] ?></i></p>
</td> -->
<td class="border-y-2 p-2"><?php echo $lead['formname'] ?></td>
<td class="border-y-2 p-2"><?php echo $only_date; ?></td>
<td class="whitespace-nowrap border-y-2 p-2"><?php echo $only_date; ?></td>
</tr>
<?php
@@ -292,7 +292,7 @@
$execution_time = ($end_time - $start_time);
// Output execution time
echo "Page executed in: " . $execution_time . " seconds";
// echo "Page executed in: " . $execution_time . " seconds";
?>
</tbody>
</table>