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 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('Customer/getReceiptDetails/(:num)', 'Customer::getReceiptDetails/$1');
// In your routes file (e.g., app/Config/Routes.php)

View File

@ -154,7 +154,7 @@ class Customer extends BaseController
}
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());
session()->setFlashdata('error', 'Message: ' . $e->getMessage());
}
return redirect()->route('Donor_list');
return redirect()->route('Contributor_list');
}
public function get_customer_address($id,$type){

View File

@ -48,16 +48,17 @@
</div>
<p class="text-muted mb-4 mt-3"></p>
</div>
<!-- <form action=""> -->
<form action="<?= base_url() . "authenticate" ?>" method="post">
<div class="form-group mb-3">
<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>
<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>
<label for="password">Password</label>
<div class="input-group input-group-merge">
@ -69,17 +70,27 @@
</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)) : ?>
<span class="widget-simple text-center">
<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>
</span>
<?php endif; ?>
<div class="form-group mb-0 text-center">
<button class="btn btn-primary btn-block" type="submit"> Log In </button>
</div>
</form>
</div> <!-- end card-body -->
</div>
@ -112,22 +123,22 @@
<script src="<?= base_url() . "public/assets/js/app.min.js" ?>"></script>
<script>
$(document).ready(function() {
// Check if email and password fields are empty before showing the reset link
$('#resetLink').on('click', function(event) {
event.preventDefault();
var emailValue = $('#emailaddress').val();
var passwordValue = $('#password').val();
if (emailValue === '' || passwordValue === '') {
$('.invalid-feedbacks').text('Please enter your email.');
} else {
// If both fields are filled, proceed with the reset link action
window.location.href = 'auth_confirm_mail?email=' + emailValue;
}
$(document).ready(function() {
// Fetch email value and set it as href for the reset link
$('#emailaddress').on('input', function() {
var emailValue = $(this).val();
$('#resetLink').attr('href', emailValue ? 'auth_confirm_mail?email=' + emailValue : '#');
});
// Check if email is entered before clicking on forgot password link
$('#resetLink').on('click', function(event) {
if (!$('#emailaddress').val()) {
event.preventDefault();
alert('Please enter your email before clicking on "Forgot your password?"');
}
});
});
});
</script>
</script>
</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>
<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>
</form>

View File

@ -3,7 +3,7 @@
<div class="card">
<div class="card-body">
<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-->
<br>
<h4 class="header-title mb-3"><?= $page_name; ?></h4>

View File

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

View File

@ -150,9 +150,10 @@
<?php if ($loggedin_person_role !== 'volunteer') : ?>
<?php
// Assuming $logged_in_user_id holds the ID of the logged-in user
// Assuming $user_id holds the ID of the user being edited
$user_id=$details['user_id'];
// Assuming $session_uid holds the ID of the logged-in user
// Assuming $details['user_id'] holds the ID of the user being edited
$user_id = isset($details['user_id']) ? $details['user_id'] : null;
// Check if the logged-in user's ID matches the user's ID
if ($session_uid == $user_id) {
// 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>
<!-- -->
<?php endif; ?>
</div>