This commit is contained in:
Suvodip
2024-08-31 18:49:18 +05:30
parent 2056e1e4af
commit 2eca9ab2c6
10 changed files with 390 additions and 33 deletions

View File

@@ -15,7 +15,6 @@
echo "Error: " . $e->getMessage();
}
};
?>
<form method="post">
<div>
@@ -23,9 +22,10 @@
<p class="text-[25px] font-bold">Notifications</p>
<div>
<a href="/notifications?tab=past" class="text-[#6F6BFF]">Past Notifications</a> |
<input name="mark_all_read" type="submit" value="Mark all as read" class="text-[#6F6BFF] pr-6 cursor-pointer " />
<input name="mark_all_read" type="submit" value="Mark all as read" class="text-[#6F6BFF] pr-6 cursor-pointer" />
</div>
</div>
</div>
</form>
<?php
try {
@@ -42,15 +42,15 @@
if($appt['view_status'] == 0){
$notification_bg = 'background: #F5F4FFE8;';
$notification_batch = '<div style="width: 8px; height: 8px; background-color: red; border-radius: 50%;"></div>';
$clickButton = '';
// $clickButton = '';
}elseif($appt['view_status'] == 1){
$notification_bg = 'background: #fff;';
$notification_batch = '<div style="width: 8px; height: 8px; background-color: #fff; border-radius: 50%;"></div>';
$clickButton = 'disabled';
// $clickButton = 'disabled';
}
?> <div class="p-2">
<form method="post">
<button type="submit" class="w-full text-left" <?php echo $clickButton; ?>>
<button type="submit" class="w-full text-left" >
<div class="flex flex-col w-full p-2 rounded-md shadow" style="border: 3px solid #F5F4FFE8; <?php echo $notification_bg; ?>">
<div class="flex flex-row place-items-center justify-between">
<div class="flex flex-row place-items-center">🕑 Reminders for &nbsp;<?php echo $appt['lead_name'].'&nbsp;&nbsp;'. $notification_batch; ?></div>
@@ -69,8 +69,6 @@
} catch (PDOException $e) {
echo "<p class='text-danger'>Error: " . $e->getMessage() . "</p>";
};
if($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['status_id']) && $_POST['status_id']){
try {
$conn = new PDO("mysql:host=$mariaServer;dbname=$mariaDb", $mariaUser, $mariaPass);