Viewing file: 4b2e3d40cb17abb954a68e4bf5fcd64a65c9c115.php (8.89 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> Billings Change <?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- Content Header (Page header) -->
<section class="content-header">
</section>
<!-- Main content -->
<div class="content">
<div class="container-fluid">
<div class="row">
<!-- /.col-md-6 -->
<div class="col-lg-10 mx-auto">
<div class="card">
<div class="card-header">
<h5 class="card-title m-0"><?php echo e(trans('customer.billing_change')); ?></h5>
<a class="btn btn-info float-right"
href="<?php echo e(route('customer.billing.index')); ?>"><?php echo app('translator')->get('customer.back'); ?></a>
</div>
<div class="card-body">
<div id="plans" class="plans-wrapper mt-3">
<?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="columns <?php echo e(isset($customer_plan->plan_id) && $customer_plan->plan_id==$plan->id?'plan-active':''); ?>">
<ul class="price">
<li class="bg-sms_queued"><?php echo e($plan->title); ?> <span
class="plan-title-current"><?php echo e(isset($customer_plan->plan_id) && $customer_plan->plan_id==$plan->id?'(Current)':''); ?></span>
</li>
<li><?php echo e($plan->contact_limit); ?> <?php echo e(trans('customer.contact_limit')); ?></li>
<li><?php echo e($plan->device_limit); ?> <?php echo e(trans('customer.device_limit')); ?></li>
<li><?php echo e($plan->daily_receive_limit); ?> <?php echo e(trans('customer.daily_receive_limit')); ?></li>
<li><?php echo e($plan->daily_send_limit); ?> <?php echo e(trans('customer.daily_send_limit')); ?></li>
<li class="price-tag"><?php echo e(formatNumberWithCurrSymbol($plan->price)); ?></li>
<li>
<?php if(isset($customer_plan->plan_id) && $customer_plan->plan_id==$plan->id): ?>
<button
type="button"
class="btn btn-primary btn-sm disabled" disabled><?php echo e(trans('customer.choose')); ?>
</button>
<?php else: ?>
<?php if(Module::has('PaymentGateway') && Module::find('PaymentGateway')->isEnabled()): ?>
<button
data-message="<span class='text-sm text-muted'><?php echo e(trans('customer.update_plan_nb')); ?></span>"
data-action="<?php echo e(route('paymentgateway::process')); ?>"
data-input='{"id":"<?php echo e($plan->id); ?>"}'
data-toggle="modal" data-target="#modal-confirm"
type="button"
data-id="<?php echo e($plan->id); ?>"
class="btn btn-primary btn-sm choose_btn_<?php echo e($plan->id); ?> d-none"><?php echo e(trans('customer.choose')); ?>
</button>
<button data-id="<?php echo e($plan->id); ?>" class="btn btn-primary btn-sm choose-btn"><?php echo e(trans('customer.choose')); ?></button>
<?php else: ?>
<button
data-message="<span class='text-sm text-muted'><?php echo e(trans('customer.update_plan_nb')); ?></span>"
data-action="<?php echo e(route('customer.billing.update')); ?>"
data-input='{"id":"<?php echo e($plan->id); ?>"}'
data-toggle="modal" data-target="#modal-confirm"
type="button"
data-id="<?php echo e($plan->id); ?>"
class="btn btn-primary btn-sm choose_btn_<?php echo e($plan->id); ?> d-none"><?php echo e(trans('customer.choose')); ?>
</button>
<button data-id="<?php echo e($plan->id); ?>" class="btn btn-primary btn-sm choose-btn"><?php echo e(trans('customer.choose')); ?></button>
<?php endif; ?>
<?php endif; ?>
</li>
</ul>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</div>
</div>
<!-- /.col-md-6 -->
</div>
<!-- /.row -->
</div><!-- /.container-fluid -->
</div>
<!-- Modal -->
<div class="modal fade" id="pendingPlanModal">
<div class="modal-dialog" role="document">
<form action="<?php echo e(route('customer.billing.pending.plan.submit.form')); ?>" method="POST">
<?php echo csrf_field(); ?>
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Confirmation</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>You already have a pending plan. Are you sure you want to update your plan?</p>
<input type="hidden" name="pending_plan_id" id="pending_plan_id" value="" >
<input type="hidden" name="id" id="request_plan" value="" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">No</button>
<button type="submit" class="btn btn-primary">Yes</button>
</div>
</div>
</form>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('extra-scripts'); ?>
<script>
$(document).on('click', '.choose-btn', function (e) {
e.preventDefault()
const plan_id = $(this).attr('data-id');
$.ajax({
url: '<?php echo e(route('customer.billing.pending.plan')); ?>',
method: "GET",
data: {
plan_id: plan_id,
},
success: function (res) {
if (res.status == 'success') {
$('#pendingPlanModal').modal('show');
$('#pending_plan_id').val(res.data.pendingPlan.id);
$('#request_plan').val(res.data.requestPlanId);
}else {
$('.choose_btn_'+ plan_id).trigger('click')
}
}
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/picotech/domains/gateway.picotech.app/public_html/resources/views/customer/billings/billing_change.blade.php ENDPATH**/ ?>
|