Tracker issue

This commit is contained in:
heama 2024-03-15 14:18:26 +05:30
parent 74711d22df
commit 262bf676c5
7 changed files with 42 additions and 28 deletions

View File

@ -81,7 +81,7 @@ $routes->post("insert_org/", "Business::insert_org");
$routes->get("delete_org/(:any)", "Business::delete_org/$1"); $routes->get("delete_org/(:any)", "Business::delete_org/$1");
#Routes for Donor Routes #Routes for Donor Routes
$routes->get("Donor_list/", "Customer::index"); $routes->get("Contributor_list/", "Customer::index");
$routes->get("new_Donor/(:any)", "Customer::new_Donor/$1"); $routes->get("new_Donor/(:any)", "Customer::new_Donor/$1");
$routes->get('Customer/getReceiptDetails/(:num)', 'Customer::getReceiptDetails/$1'); $routes->get('Customer/getReceiptDetails/(:num)', 'Customer::getReceiptDetails/$1');
// In your routes file (e.g., app/Config/Routes.php) // In your routes file (e.g., app/Config/Routes.php)

View File

@ -154,7 +154,7 @@ class Customer extends BaseController
} }
else else
{ {
return redirect()->route('Donor_list'); return redirect()->route('Contributor_list');
} }
} }
@ -187,7 +187,7 @@ class Customer extends BaseController
$this->logger->error("Customer: Err Occur = " . $e->getMessage()); $this->logger->error("Customer: Err Occur = " . $e->getMessage());
session()->setFlashdata('error', 'Message: ' . $e->getMessage()); session()->setFlashdata('error', 'Message: ' . $e->getMessage());
} }
return redirect()->route('Donor_list'); return redirect()->route('Contributor_list');
} }
public function get_customer_address($id,$type){ public function get_customer_address($id,$type){

View File

@ -48,16 +48,17 @@
</div> </div>
<p class="text-muted mb-4 mt-3"></p> <p class="text-muted mb-4 mt-3"></p>
</div> </div>
<!-- <form action=""> --> <!-- <form action=""> -->
<form action="<?= base_url() . "authenticate" ?>" method="post"> <form action="<?= base_url() . "authenticate" ?>" method="post">
<div class="form-group mb-3"> <div class="form-group mb-3">
<label for="emailaddress">Email address</label> <label for="emailaddress">Email address</label>
<input class="form-control" type="email" name="username" id="emailaddress" placeholder="Enter your email" autocomplete="off" required> <input class="form-control" type="email" name="username" id="emailaddress" placeholder="Enter your email" autocomplete="off"required>
<div class="invalid-feedback"> Please enter the email id</div> <div class="invalid-feedback"> Please enter the email id</div>
</div> </div>
<div class="form-group mb-3"> <div class="form-group mb-3">
<!-- <a href="auth-recoverpw-2.html" class="text-muted float-right"><small>Forgot your password?</small></a> -->
<!-- <a href="<?= base_url()."auth_confirm_mail"; ?>" class="text-muted float-right"><small>Forgot your password?</small></a> -->
<a href="#" id="resetLink" class="text-muted float-right"><small>Forgot your password?</small></a> <a href="#" id="resetLink" class="text-muted float-right"><small>Forgot your password?</small></a>
<label for="password">Password</label> <label for="password">Password</label>
<div class="input-group input-group-merge"> <div class="input-group input-group-merge">
@ -69,17 +70,27 @@
</div> </div>
</div> </div>
</div> </div>
<div class="invalid-feedbacks"> </div>
<!-- <div class="form-group mb-3">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="checkbox-signin" checked>
<label class="custom-control-label" for="checkbox-signin">Remember me</label>
</div>
</div> -->
<?php if (isset($validationErrors)) : ?> <?php if (isset($validationErrors)) : ?>
<span class="widget-simple text-center"> <span class="widget-simple text-center">
<div class="media-body align-self-center font-24 avatar-title"> <div class="media-body align-self-center font-24 avatar-title">
<small class="mt-3" style="color: black; font-size:18px;"><?= $validationErrors; ?></small> <small class="mt-3" style="color: black; font-size:18px;"><?= $validationErrors; ?></small>
</div> </div>
</span> </span>
<?php endif; ?> <?php endif; ?>
<div class="form-group mb-0 text-center"> <div class="form-group mb-0 text-center">
<button class="btn btn-primary btn-block" type="submit"> Log In </button> <button class="btn btn-primary btn-block" type="submit"> Log In </button>
</div> </div>
</form> </form>
</div> <!-- end card-body --> </div> <!-- end card-body -->
</div> </div>
@ -113,21 +124,21 @@
<script> <script>
$(document).ready(function() { $(document).ready(function() {
// Check if email and password fields are empty before showing the reset link // Fetch email value and set it as href for the reset link
$('#resetLink').on('click', function(event) { $('#emailaddress').on('input', function() {
event.preventDefault(); var emailValue = $(this).val();
var emailValue = $('#emailaddress').val(); $('#resetLink').attr('href', emailValue ? 'auth_confirm_mail?email=' + emailValue : '#');
var passwordValue = $('#password').val(); });
if (emailValue === '' || passwordValue === '') { // Check if email is entered before clicking on forgot password link
$('.invalid-feedbacks').text('Please enter your email.'); $('#resetLink').on('click', function(event) {
} else { if (!$('#emailaddress').val()) {
// If both fields are filled, proceed with the reset link action event.preventDefault();
window.location.href = 'auth_confirm_mail?email=' + emailValue; alert('Please enter your email before clicking on "Forgot your password?"');
} }
}); });
}); });
</script> </script>
</body> </body>

View File

@ -165,7 +165,7 @@
<button class="btn btn-success waves-effect waves-light mr-1" id="submitBtn" type="submit"><?= isset($customer['donor_id']) ? 'Update' : 'Save' ?></button> <button class="btn btn-success waves-effect waves-light mr-1" id="submitBtn" type="submit"><?= isset($customer['donor_id']) ? 'Update' : 'Save' ?></button>
<a href="<?= base_url() . "Donor_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a> <a href="<?= base_url() . "Contributor_list"; ?>" class="btn btn-secondary waves-effect">Cancel</a>
</div> </div>
</form> </form>

View File

@ -3,7 +3,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<div class="float-right"> <div class="float-right">
<a href="<?= base_url()."view_donor_group/0"; ?>" class="btn btn-primary"><i class="ri-team-line"></i> Add Donor Group </a> <a href="<?= base_url()."view_donor_group/0"; ?>" class="btn btn-primary"><i class="ri-team-line"></i> Add Contributor Group </a>
</div><!-- end col--> </div><!-- end col-->
<br> <br>
<h4 class="header-title mb-3"><?= $page_name; ?></h4> <h4 class="header-title mb-3"><?= $page_name; ?></h4>

View File

@ -131,7 +131,7 @@
</a> </a>
</li> </li>
<li> <li>
<a href="<?= base_url()."Donor_list"; ?>"> <a href="<?= base_url()."Contributor_list"; ?>">
<i class="ri-map-pin-user-fill"></i> <i class="ri-map-pin-user-fill"></i>
<span> Contributor </span> <span> Contributor </span>
</a> </a>

View File

@ -150,9 +150,10 @@
<?php if ($loggedin_person_role !== 'volunteer') : ?> <?php if ($loggedin_person_role !== 'volunteer') : ?>
<?php <?php
// Assuming $logged_in_user_id holds the ID of the logged-in user // Assuming $session_uid holds the ID of the logged-in user
// Assuming $user_id holds the ID of the user being edited // Assuming $details['user_id'] holds the ID of the user being edited
$user_id=$details['user_id']; $user_id = isset($details['user_id']) ? $details['user_id'] : null;
// Check if the logged-in user's ID matches the user's ID // Check if the logged-in user's ID matches the user's ID
if ($session_uid == $user_id) { if ($session_uid == $user_id) {
// Redirect to the dashboard with logged_user_id parameter // Redirect to the dashboard with logged_user_id parameter
@ -164,6 +165,8 @@ $user_id=$details['user_id'];
?> ?>
<a href="<?= $redirect_url; ?>" class="btn btn-secondary waves-effect">Cancel</a> <a href="<?= $redirect_url; ?>" class="btn btn-secondary waves-effect">Cancel</a>
<!-- -->
<?php endif; ?> <?php endif; ?>
</div> </div>