Current File : //home/tradevaly/www/storage/framework/views/b3c0e16d6a9e4ef79c1b3bee7e44a43a263aae28.php |
<?php $__env->startPush('title'); ?> View <?php echo e($user->name); ?> Profile <?php $__env->stopPush(); ?>
<?php $__env->startSection('css'); ?>
<!-- DataTables -->
<link href="<?php echo e(asset('/assets/libs/datatables/datatables.min.css')); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo e(asset('/assets/libs/bootstrap-datepicker/bootstrap-datepicker.min.css')); ?>" rel="stylesheet"
type="text/css">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $__env->startComponent('components.breadcrumb'); ?>
<?php $__env->slot('li_1'); ?> Dashboards <?php $__env->endSlot(); ?>
<?php $__env->slot('title'); ?> View <?php echo e($user->name); ?> Profile <?php $__env->endSlot(); ?>
<?php echo $__env->renderComponent(); ?>
<div class="row">
<div class="col-xl-4">
<div class="card overflow-hidden">
<div class="bg-primary bg-soft">
<div class="row">
<div class="col-7">
<div class="text-primary p-3">
<h5 class="text-primary"><?php echo e($company->name); ?></h5>
<p><?php echo e($company->phone); ?></p>
</div>
</div>
<div class="col-5 align-self-end">
<img src="<?php echo e(asset('assets/images/profile-img.png')); ?>" alt="" class="img-fluid">
</div>
</div>
</div>
<div class="card-body pt-0">
<div class="row">
<div class="col-sm-4">
<div class="avatar-md profile-user-wid mb-4">
<img src="<?php echo e(asset('storage/images/user/avatar/'.$company->image.'')); ?>" alt="" class="img-thumbnail rounded-circle">
</div>
<h5 class="font-size-15"><?php echo e($user->name); ?></h5>
<p class="text-muted mb-0"><?php if($user->type == 'seller'): ?> Seller <?php else: ?> Buyer <?php endif; ?></p>
</div>
<div class="col-sm-8">
<div class="pt-4">
<div class="row">
<?php if($user->type == 'seller'): ?>
<div class="col-6">
<h5 class="font-size-15"><?php echo e(\App\Models\Product::where('supplier_id', $user->id)->count()); ?></h5>
<p class="text-muted mb-0">Products</p>
</div>
<?php else: ?>
<div class="col-6">
<h5 class="font-size-15"><?php echo e(\App\Models\BuyOffer::where('buyer_id', $user->id)->count()); ?></h5>
<p class="text-muted mb-0">Buy Offer</p>
</div>
<?php endif; ?>
<div class="col-6">
<h5 class="font-size-15"><?php echo e(\App\Models\Thread::where('sender_id', $user->id)->where('receiver_id', $user->id)->count()); ?></h5>
<p class="text-muted mb-0">Message Queries</p>
</div>
</div>
<div class="mt-4">
<a href="<?php echo e(route('supplier.view', $user->username)); ?>" class="btn btn-primary waves-effect waves-light btn-sm">View Profile <i class="mdi mdi-arrow-right ms-1"></i></a>
<a href="" class="btn btn-primary waves-effect waves-light btn-sm" data-bs-toggle="modal"
data-bs-target=".update-profile">Edit Profile</a>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-body">
<h4 class="card-title mb-4">Company Information</h4>
<p class="text-muted mb-4"><?php echo $company->des; ?></p>
<div class="table-responsive">
<table class="table table-nowrap mb-0">
<tbody>
<tr>
<th scope="row">Name :</th>
<td><?php echo e($company->name); ?></td>
</tr>
<tr>
<th scope="row">Type :</th>
<td><?php echo e($company->type); ?></td>
</tr>
<tr>
<th scope="row">Main Products :</th>
<td><?php echo e($company->main_products); ?></td>
</tr>
<tr>
<th scope="row">Location :</th>
<td><?php echo e($company->location); ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- end card -->
<div class="card">
<div class="card-body">
<h4 class="card-title mb-4">Personal Information</h4>
<div class="table-responsive">
<table class="table table-nowrap mb-0">
<tbody>
<tr>
<th scope="row">Name :</th>
<td><?php echo e($user->name); ?></td>
</tr>
<tr>
<th scope="row">Email :</th>
<td><?php echo e($user->email); ?></td>
</tr>
<tr>
<th scope="row">Country :</th>
<td><?php echo e($user->country->name); ?></td>
</tr>
<tr>
<th scope="row">Package :</th>
<td><?php echo e($user->package->name); ?></td>
</tr>
<?php if($user->package_id != 0): ?>
<tr>
<th scope="row">Expiring :</th>
<td><?php echo e($user->next_pay); ?></td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
<!-- end card -->
</div>
<div class="col-xl-8">
<div class="card">
<div class="card-body">
<div class="row mb-2">
<?php if($user->type == 'seller'): ?>
<div class="col-sm-4">
<div class="search-box me-2 mb-2 d-inline-block">
<div class="position-relative">
<h4 class="card-title mb-4">Product List</h4>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="text-sm-end">
<a href="<?php echo e(route('admin.product_list.product_list', $user->id)); ?>" class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i class="mdi mdi-plus me-1"></i> View All</a>
</div>
</div><!-- end col-->
<?php else: ?>
<div class="col-sm-4">
<div class="search-box me-2 mb-2 d-inline-block">
<div class="position-relative">
<h4 class="card-title mb-4">Offer List</h4>
</div>
</div>
</div>
<div class="col-sm-8">
<div class="text-sm-end">
<a href="<?php echo e(route('admin.buy_offer.buy_offer', $user->id)); ?>" class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i class="mdi mdi-plus me-1"></i> View All</a>
</div>
</div><!-- end col-->
<?php endif; ?>
</div>
<div class="table-responsive">
<table class="table table-nowrap table-hover mb-0">
<thead>
<tr>
<th class="text-center">#</th>
<?php if($user->type == 'seller'): ?>
<th><?php echo e(translate("Title")); ?></th>
<th><?php echo e(translate("Details")); ?></th>
<th><?php echo e(translate("Stock")); ?></th>
<th><?php echo e(translate("Processing Time")); ?></th>
<?php else: ?>
<th><?php echo e(translate("Title")); ?></th>
<th><?php echo e(translate("details")); ?></th>
<th><?php echo e(translate("tags")); ?></th>
<?php endif; ?>
</tr>
</thead>
<tbody>
<?php if($user->type == 'seller'): ?>
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td class="text-center"><?php echo e($loop->iteration); ?></td>
<td><a href="<?php echo e(route('product.view', $product->slug)); ?>"><?php echo e($product['title']); ?></a></td>
<td><?php echo $product['details']; ?></td>
<td><?php echo e($product->stock); ?></td>
<td><?php echo e($product->processing_time); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<?php $__currentLoopData = $offers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $offer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td class="text-center"><?php echo e($loop->iteration); ?></td>
<td><a href="<?php echo e(route('buy.view', $offer->slug)); ?>"><?php echo e($offer['title']); ?></a></td>
<td><?php echo $offer['details']; ?></td>
<td><?php echo e($offer->tags); ?></td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<h4 class="card-title mb-4">Messages Activity</h4>
<div class="table-responsive">
<table class="table table-nowrap table-hover mb-0" id="datatable-buttons">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Subject</th>
<th scope="col">Sender</th>
<th scope="col">Receiver</th>
<th scope="col">Last Reply</th>
<th scope="col">Last Activivity</th>
<th scope="col">View Messages</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<?php if(Auth::guard('admin')->check()): ?>
<?php if($user->status==0): ?>
<a class="btn btn-info" href="<?php echo e(route('admin.user.approve', $user->id)); ?>">
<?php echo e(translate('Approve')); ?>
</a>
<?php endif; ?>
<?php if($user->verify !=1): ?>
<a class="btn btn-success" href="<?php echo e(route('admin.users.verified', $user->id)); ?>">
<?php echo e(translate('Verified')); ?>
</a>
<?php endif; ?>
<a class="btn btn-danger" href="<?php echo e(route('admin.users.delete', $user->id)); ?>">
<?php echo e(translate('Delete')); ?>
</a>
<?php endif; ?>
</div>
</div>
<!-- end row -->
<!-- Update Profile example -->
<div class="modal fade update-profile" tabindex="-1" role="dialog"
aria-labelledby="myLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="myLargeModalLabel">Edit Profile</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<form class="form-horizontal" method="POST" enctype="multipart/form-data" id="update-profile">
<?php echo csrf_field(); ?>
<input type="hidden" value="<?php echo e($user->id); ?>" id="data_id">
<div class="mb-3">
<label for="useremail" class="form-label">Email</label>
<input type="email" class="form-control <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
id="useremail" value="<?php echo e($user->email); ?>" name="email"
placeholder="Enter email" autofocus>
<div class="text-danger" id="emailError" data-ajax-feedback="email"></div>
</div>
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
value="<?php echo e($user->name); ?>" id="username" name="name" autofocus
placeholder="Enter username">
<div class="text-danger" id="nameError" data-ajax-feedback="name"></div>
</div>
<div class="mb-3">
<label for="username" class="form-label">Password(Keep Empty For Unchage)</label>
<input type="text" class="form-control <?php $__errorArgs = ['password'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="password" name="password" autofocus
placeholder="Enter Password">
<div class="text-danger" id="PasswordError" data-ajax-feedback="password"></div>
</div>
<div class="mt-3 d-grid">
<button class="btn btn-primary waves-effect waves-light UpdateProfile" data-id="<?php echo e($user->id); ?>"
type="submit">Update</button>
</div>
</form>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<!-- Required datatable js -->
<script src="<?php echo e(asset('/assets/libs/datatables/datatables.min.js')); ?>"></script>
<script src="<?php echo e(asset('/assets/libs/jszip/jszip.min.js')); ?>"></script>
<script src="<?php echo e(asset('/assets/libs/pdfmake/pdfmake.min.js')); ?>"></script>
<!-- Datatable init js -->
<script src="<?php echo e(asset('/assets/libs/bootstrap-datepicker/bootstrap-datepicker.min.js')); ?>"></script>
<script type="text/javascript">
$(function () {
$(document).ready(function () {
var table = $('#datatable-buttons').DataTable({
lengthChange: false,
processing: true,
dom: 'Bfrtip',
serverSide: true,
ajax: "<?php echo e(route('admin.users.view', $user->id)); ?>",
columns: [
{data: 'DT_RowIndex', name: 'DT_RowIndex'},
{data: 'title', name: 'title'},
{data: 'sender', name: 'sender'},
{data: 'receiver', name: 'receiver'},
{data: 'lastreply', name: 'lastreply'},
{data: 'time', name: 'time'},
{data: 'view', name: 'view'},
],
buttons: ['copy', 'excel', 'pdf', 'colvis']
});
table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
$(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
<script>
$('#update-profile').on('submit',function(event){
event.preventDefault();
var Id = $('#data_id').val();
let formData = new FormData(this);
$('#emailError').text('');
$('#nameError').text('');
$('#PasswordError').text('');
$.ajax({
url: "<?php echo e(url('b2b/users/update-profile')); ?>" + "/" + Id,
type:"POST",
data: formData,
contentType: false,
processData: false,
success:function(response){
$('#emailError').text('');
$('#nameError').text('');
$('#PasswordError').text('');
if(response.isSuccess == false){
alert(response.Message);
}else if(response.isSuccess == true){
setTimeout(function () {
window.location.reload();
}, 1000);
}
},
error: function(response) {
$('#emailError').text(response.responseJSON.errors.email);
$('#nameError').text(response.responseJSON.errors.name);
$('#PasswordError').text(response.responseJSON.errors.dob);
}
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.ayaan.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/tradevaly/public_html/resources/views/backend/pages/users/view.blade.php ENDPATH**/ ?>