PATH:
home
/
rwabteecom
/
project_11
/
resources
/
views
/
dashboard
/
pages
/
Editing: billing.blade.php
@extends('dashboard.layouts.app') @section('css') <link rel="stylesheet" href="{{ asset('dashboard/css/flatpickr.min.css') }}" /> @endsection @section('body') @php use Carbon\Carbon; @endphp <div class="billing_page py-5"> <div class="container"> @if (!auth()->user()->currentPlan) <div class="text-center no_plans"> <h4 class="mb-4"> {{ __('you do not have plan yet') }}</h4> <a href="{{ route('plan') }}" class="main-btn mx-auto py-2 px-4">{{ __('see our plans') }}</a> </div> @else <div class="billing_header"> <h5>{{ __('Billing') }}</h5> <p>{{ __('Effortlessly handle your billing and invoices right here.') }}</p> </div> <div class="row"> <div class="col-12 col-lg-6 my-2"> <div class="billing_box h-100 d-flex flex-column"> <div class="px-3 py-2 d-flex align-items-center justify-content-between billing_box_header"> <p class="my-2">{{ __('Current Plan Summary') }}</p> <a href="{{ route('plan') }}" class="upgrade-btn my-2"> {{ __('Upgrade') }} </a> </div> <div class="billing_box_body p-4"> <div class="d-flex align-items-center justify-content-between flex-wrap"> <div class="plan_prop"> <p class="mb-2">{{ __('PLAN NAME') }}</p> <h5 class="pt-1">{{ auth()->user()->currentPlan->title }}</h5> </div> {{-- <div class="plan_prop"> <p class="mb-2">{{ __('BILLING CYCLE') }}</p> <h5 class="pt-1">Yearly</h5> </div> --}} <div class="plan_prop"> <p class="mb-2">{{ __('PLAN COST') }}</p> <h5 class="pt-1">{{ auth()->user()->currentPlan->price . ' ' . __('SR') }}</h5> </div> </div> <div class="plan-remain mt-3"> <p class="mb-0">{{ __('RENEWAL') }}</p> <div class="d-flex align-items-center justify-content-between"> @php $remaining = 0; if (auth()->user()->currentPlan->plan_end_at > now()) { $remaining = Carbon::parse( auth()->user()->currentPlan->plan_end_at, )->diffInDays(now()); } $totalDays = auth() ->user() ->currentPlan->created_at->diffInDays( auth()->user()->currentPlan->plan_end_at, ); $progress = intval(round(100 - ($remaining / $totalDays) * 100)); @endphp <p class="my-3"> {{ auth()->user()->currentPlan->plan_end_at . ' ' . ($remaining ? ' ' . __('Remaining') . ' ' . $remaining . ' ' . __('Days') : '') }} </p> @if (!$remaining) <a href="" class="renew-link">{{ __('Pay Now') }}</a> @endif </div> <div class="progress" style="height: 20px;"> <div class="progress-bar" role="progressbar" style="width:{{ $progress }}%" aria-valuenow="{{ $progress }}" aria-valuemin="0" aria-valuemax="100"> </div> </div> </div> </div> </div> </div> <div class="col-12 col-lg-6 my-2"> <div class="billing_box h-100 d-flex flex-column"> <div class="px-3 py-2 d-flex align-items-center justify-content-between billing_box_header"> <p class="my-2">{{ __('Need help with your billing ?') }}</p> </div> <div class="billing_box_body p-4 d-flex align-items-center justify-content-center h-100"> <div class="billing_contact w-100 text-center"> <h5 class="mb-3 text-black">{{ __('Contact Support Now') }}</h5> <a href="" class="mx-auto py-2"> <svg width="25" height="25" viewBox="0 0 25 25" fill="none" class="me-3" xmlns="http://www.w3.org/2000/svg"> <path d="M12.54 2.50787C7.08005 2.50787 2.63005 6.95787 2.63005 12.4179C2.63005 14.1679 3.09005 15.8679 3.95005 17.3679L2.55005 22.5079L7.80005 21.1279C9.25005 21.9179 10.88 22.3379 12.54 22.3379C18 22.3379 22.4501 17.8879 22.4501 12.4279C22.4501 9.77787 21.42 7.28787 19.55 5.41787C18.6331 4.49197 17.5411 3.75783 16.3376 3.25823C15.134 2.75862 13.8431 2.50355 12.54 2.50787ZM12.55 4.17787C14.75 4.17787 16.81 5.03787 18.37 6.59787C19.1354 7.36338 19.7423 8.27238 20.1558 9.27278C20.5694 10.2732 20.7815 11.3454 20.7801 12.4279C20.7801 16.9679 17.08 20.6579 12.54 20.6579C11.06 20.6579 9.61005 20.2679 8.35005 19.5079L8.05005 19.3379L4.93005 20.1579L5.76005 17.1179L5.56005 16.7979C4.7346 15.4863 4.29772 13.9676 4.30005 12.4179C4.31005 7.87787 8.00005 4.17787 12.55 4.17787ZM9.03005 7.83787C8.87005 7.83787 8.60005 7.89787 8.37005 8.14787C8.15005 8.39787 7.50005 9.00787 7.50005 10.2179C7.50005 11.4379 8.39005 12.6079 8.50005 12.7779C8.64005 12.9479 10.26 15.4479 12.75 16.5079C13.34 16.7779 13.8 16.9279 14.16 17.0379C14.75 17.2279 15.29 17.1979 15.72 17.1379C16.2 17.0679 17.18 16.5379 17.39 15.9579C17.6 15.3779 17.6 14.8879 17.54 14.7779C17.47 14.6779 17.31 14.6179 17.06 14.5079C16.81 14.3679 15.59 13.7679 15.37 13.6879C15.14 13.6079 15 13.5679 14.81 13.8079C14.65 14.0579 14.17 14.6179 14.03 14.7779C13.88 14.9479 13.74 14.9679 13.5 14.8479C13.24 14.7179 12.44 14.4579 11.5 13.6179C10.76 12.9579 10.27 12.1479 10.12 11.8979C10 11.6579 10.11 11.5079 10.23 11.3979C10.34 11.2879 10.5 11.1079 10.6 10.9579C10.73 10.8179 10.77 10.7079 10.85 10.5479C10.93 10.3779 10.89 10.2379 10.83 10.1179C10.77 10.0079 10.27 8.76787 10.06 8.27787C9.86005 7.79787 9.66005 7.85787 9.50005 7.84787C9.36005 7.84787 9.20005 7.83787 9.03005 7.83787Z" fill="currentColor" /> </svg> {{ __('Chat With us') }} </a> </div> </div> </div> </div> </div> <div class="table-responsive mt-5"> <table class="table Invoices_table"> <thead> <tr> <th scope="col">{{ __('Invoice ID') }}</th> <th scope="col">{{ __('Plan') }}</th> <th scope="col">{{ __('Start Date') }}</th> <th scope="col">{{ __('End Date') }}</th> <th scope="col">{{ __('Amount') }}</th> <th scope="col">{{ __('Status') }}</th> <th scope="col">{{ __('Action') }}</th> </tr> </thead> <tbody> @foreach (auth()->user()->plans()->latest('user_plans.created_at')->get() as $plan) <tr> <td>{{ $plan->invoice?->invoice_number }}</td> <td>{{ $plan->title }}</td> <td>{{ $plan->created_at->format('Y-m-d') }}</td> <td>{{ $plan->plan_end_at }}</td> <td>{{ number_format($plan->price, 2) }}</td> <td> @if ($plan->invoice?->is_paid) <div class="pay_status paied_states">{{ __('Paid') }}</div> @else <div class="pay_status pending_states">{{ __('Pending') }}</div> @endif </td> <td> <a target="_blank" href="{{ route('dashboard.billing.print', $plan->id) }}" invoice-id="{{ $plan->id }}" class="invoice_action"> <svg width="20" height="19" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M13.5571 5.93783V3.56283H7.22375V5.93783H5.64042V1.97949H15.1404V5.93783H13.5571ZM15.1404 9.50033C15.3647 9.50033 15.5529 9.42433 15.7049 9.27233C15.8569 9.12033 15.9326 8.93244 15.9321 8.70866C15.9316 8.48488 15.8556 8.29699 15.7041 8.14499C15.5526 7.99299 15.3647 7.91699 15.1404 7.91699C14.9161 7.91699 14.7282 7.99299 14.5768 8.14499C14.4253 8.29699 14.3493 8.48488 14.3488 8.70866C14.3482 8.93244 14.4242 9.12059 14.5768 9.27312C14.7293 9.42565 14.9172 9.50138 15.1404 9.50033ZM13.5571 14.6462V11.4795H7.22375V14.6462H13.5571ZM15.1404 16.2295H5.64042V13.0628H2.47375V8.31283C2.47375 7.63991 2.70466 7.07598 3.16646 6.62103C3.62827 6.16609 4.18903 5.93835 4.84875 5.93783H15.9321C16.605 5.93783 17.1692 6.16556 17.6247 6.62103C18.0801 7.07651 18.3076 7.64044 18.3071 8.31283V13.0628H15.1404V16.2295ZM16.7238 11.4795V8.31283C16.7238 8.08852 16.6478 7.90063 16.4958 7.74916C16.3438 7.59769 16.1559 7.52169 15.9321 7.52116H4.84875C4.62445 7.52116 4.43656 7.59716 4.28509 7.74916C4.13362 7.90116 4.05762 8.08905 4.05709 8.31283V11.4795H5.64042V9.89616H15.1404V11.4795H16.7238Z" fill="black" /> </svg> </a> </td> </tr> @endforeach </tbody> </table> </div> @endif </div> </div> <div id="ll"></div> @endsection @section('js') {{-- <script> $("body").on('click', '.invoice_action', function() { let id = $(this).attr('invoice-id') console.log(id) $.ajax({ url: "{{ route('dashboard.billing.print','') }}" + '/' + id, method: "GET", // processData: false, // contentType: false, success: function(response) {}, error: function(response) { console.log(response) } }); }) </script> --}} @endsection
SAVE
CANCEL