susee
This commit is contained in:
commit
d3b9223645
@ -709,13 +709,14 @@ class Admin_controller extends BaseController
|
||||
|
||||
}else{
|
||||
|
||||
$userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_admin_user'));
|
||||
// $userdata['userdata'] = $this->dModel->getLoggedInUserData(session()->get('logged_admin_user'));
|
||||
|
||||
$creditsData = $this->TransactionModel->select('transactions.* , member.name as member_name ')
|
||||
->join('member', 'transactions.member_id = member.id', 'left')
|
||||
->orderBy('transactions.created_at' , 'desc')
|
||||
->where('md5(transactions.member_id)', $member_id )
|
||||
->findAll();
|
||||
|
||||
$output = '<div class="table-responsive"><table class="table mb-0"><thead class="thead-light"><tr> <th>Order Id</th><th>Order Date</th><th>Transaction Id</th><th>Cost</th><th>Purchased by</th><th>Status</th></tr></thead><tbody>';
|
||||
foreach ($creditsData as $row) {
|
||||
$date = new DateTime($row['created_at']);
|
||||
|
||||
@ -319,8 +319,18 @@ class Member_controller extends BaseController
|
||||
{
|
||||
$id = session()->get('logged_admin_user');
|
||||
$userdata['userdata']=$this->dModel->getLoggedInUserData($id);
|
||||
$data['Membersdata'] = $this->MemberModel->findAll();
|
||||
|
||||
$data['Membersdata'] = [];
|
||||
|
||||
$Membersdata = $this->MemberModel->findAll();
|
||||
foreach ($Membersdata as $Membersdataindex => $MembersdataValue) {
|
||||
$credits = $this->creditsModel->selectSum('running_balance')->groupBy('member_id')->where('member_id',$MembersdataValue['id'])->where('is_active',1)->get()->getRow()->running_balance;
|
||||
$MembersdataValue['credits'] = $credits;
|
||||
array_push($data['Membersdata'] , $MembersdataValue);
|
||||
}
|
||||
// echo '<pre>';
|
||||
// print_r($data['Membersdata']);
|
||||
// echo '</pre>'; die();
|
||||
//$data['Membersdata'] = $this->MemberModel->findAll();
|
||||
echo view('layout/header',$userdata);
|
||||
echo view('members_list',$data);
|
||||
echo view('layout/footer');
|
||||
|
||||
@ -573,8 +573,8 @@ $web_payment_sdk_url = $_ENV["ENVIRONMENT"] === Environment::PRODUCTION ? "https
|
||||
$('#card-button').click(function() {
|
||||
// $('#card-button').prop("disabled", true);
|
||||
// $('#loading-spinner-overlay').css('visibility', 'visible');
|
||||
//$('#card-button').prop("disabled", true);
|
||||
// $('#loading-spinner-overlay').css('visibility', 'visible');
|
||||
$('#card-button').prop("disabled", true);
|
||||
$('#loading-spinner-overlay').css('visibility', 'visible');
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -134,9 +134,74 @@
|
||||
</div>
|
||||
<!-- end row-->
|
||||
|
||||
|
||||
|
||||
<?php if(isset($Memberdata)){ ?>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"> Change Password </h4>
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<!-- <li class="breadcrumb-item"><a href="javascript: void(0);">Minton</a></li>
|
||||
<li class="breadcrumb-item"><a href="javascript: void(0);">Forms</a></li>
|
||||
<li class="breadcrumb-item active">Advanced</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<form role="form" class="parsley-examples" method="post" action="<?= base_url()."member_edit"; ?>"/>
|
||||
<?php if(isset($Memberdata)){ ?>
|
||||
<input type="hidden" required name="id" value="<?= $Memberdata[0]['id']; ?>" >
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputEmail3" class="col-4 col-form-label">Password<span class="text-danger">*</span></label>
|
||||
<div class="col-7">
|
||||
<input type="password" id="pass2" class="form-control" required
|
||||
placeholder="Password" name="password"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputEmail3" class="col-4 col-form-label">Confirm Password<span class="text-danger">*</span></label>
|
||||
<div class="col-7">
|
||||
<input type="password" class="form-control" required
|
||||
data-parsley-equalto="#pass2"
|
||||
placeholder="Re-Type Password"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-8 offset-4">
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
|
||||
Update
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- end card-box -->
|
||||
|
||||
</div> <!-- end col-->
|
||||
</div>
|
||||
<!-- end row-->
|
||||
<?php } ?>
|
||||
<script>
|
||||
|
||||
|
||||
function check_if_exists() {
|
||||
|
||||
const validateEmail = (email) => {
|
||||
|
||||
@ -48,6 +48,7 @@
|
||||
<th>Name</th>
|
||||
<th>Mobile</th>
|
||||
<th>Email</th>
|
||||
<th>Credits</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
@ -62,6 +63,7 @@
|
||||
<td><?php echo $row['name'];?></td>
|
||||
<td><?php echo $row['mobile'];?></td>
|
||||
<td><?php echo $row['email'];?></td>
|
||||
<td><?php echo $row['credits'];?></td>
|
||||
<td><?php if($row['is_active'] == 1){ echo "Active"; }else{ echo "Deactive"; }?></td>
|
||||
<td><a href="<?= base_url() ?>member_edit/<?php echo md5($row['id']);?>"><i class="mdi mdi-lead-pencil" style="font-size:18px;"></i></a>
|
||||
<?php if ($row['is_active'] == 1) { ?>
|
||||
@ -70,7 +72,7 @@
|
||||
<a href="<?= base_url() ?>member_activate/<?php echo md5($row['id']);?>"><i class="mdi mdi-account-cancel-outline" title="Activate" style="font-size:18px;"></i></a>
|
||||
<?php } ?>
|
||||
|
||||
<i class="mdi mdi-eye-outline credit_usage" data-toggle="modal" data-target="#full-width-modal" id="<?php echo $row['id'];?>" style="font-size:18px;" title="Transactions"></i>
|
||||
<i class="mdi mdi-eye-outline credit_usage" id="<?php echo md5($row['id']);?>" style="font-size:18px;" title="Transactions"></i>
|
||||
</td>
|
||||
|
||||
|
||||
@ -87,11 +89,11 @@
|
||||
<!-- end row-->
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<!-- <div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal fade" id="bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">Member Details</h4>
|
||||
<h4 class="modal-title" id="myLargeModalLabel">Transaction Details</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body" id="model-table" >
|
||||
@ -101,33 +103,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- Full width modal content -->
|
||||
<div id="full-width-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="fullWidthModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="fullWidthModalLabel">Modal Heading</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on('click','.credit_usage',function(){
|
||||
<!-- <script>
|
||||
$(document).on('click','.',function(){
|
||||
|
||||
var member_id = $(this).closest('i').attr('id');
|
||||
$.ajax({
|
||||
url:"<?= base_url(); ?>view_member_details/"+member_id,
|
||||
url:"<?= base_url(); ?>view_credit_details/"+member_id,
|
||||
method: 'GET',
|
||||
success: function(response) {
|
||||
|
||||
@ -141,11 +129,12 @@ $(document).on('click','.credit_usage',function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- <script>
|
||||
</script> -->
|
||||
<script>
|
||||
$(document).on('click','.credit_usage',function(){
|
||||
|
||||
var member_id = $(this).closest('i').attr('id');
|
||||
alert(member_id);
|
||||
$.ajax({
|
||||
url:"<?= base_url(); ?>/transactions_list/"+member_id,
|
||||
method: 'GET',
|
||||
@ -160,7 +149,7 @@ $(document).on('click','.credit_usage',function(){
|
||||
}
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user