{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * Author: Mayeul Akpovi (BeDigit - https://bedigit.com) * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - https://codecanyon.net/licenses/standard --}} @extends('layouts.master') @php $type ??= 'promotion'; $isPromoting ??= true; $isSubscripting ??= false; $apiResult ??= []; $transactions = (array)data_get($apiResult, 'data'); $totalTransactions = (int)data_get($apiResult, 'meta.total', 0); $stats ??= []; $countPromoTransactions = data_get($stats, 'transactions.promotion'); $countSubsTransactions = data_get($stats, 'transactions.subscription'); $isAllTypesOfTransactionExist = ($countPromoTransactions > 0 && $countSubsTransactions > 0); @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
@includeFirst([config('larapen.core.customizedViewPath') . 'account.inc.sidebar', 'account.inc.sidebar'])

{{ t('Transactions') }}

@if ($isAllTypesOfTransactionExist) @endif
@if (!empty($transactions) && $totalTransactions > 0) @foreach($transactions as $key => $transaction) @endforeach @endif
{{ t('ref') }} {{ t('Description') }} {{ t('Payment Method') }} {{ t('amount') }} {{ t('Date') }} {{ t('Status') }}
{{ data_get($transaction, 'id') }} @if ($isPromoting) @php $postUrl = \App\Services\UrlGen::post(data_get($transaction, 'payable')); @endphp {{ t('Listing') }} {{ data_get($transaction, 'payable.title') }} @else {{ t('account') }} {{ data_get($transaction, 'payable.name') }} @endif
{{ t('Package') }} {{ data_get($transaction, 'package.short_name') }} @if ($isSubscripting) @if (data_get($transaction, 'expired') != 1)
{{ t('remaining_listings') }} {{ data_get($transaction, 'remaining_posts') }} @endif @endif
{{ data_get($transaction, 'starting_info') }}
{{ data_get($transaction, 'expiry_info') }}
{{ data_get($transaction, 'paymentMethod.display_name', '--') }} {!! data_get($transaction, 'package.currency.symbol') . data_get($transaction, 'package.price') !!} {!! data_get($transaction, 'created_at_formatted') !!} @php $expiryInfo = data_get($transaction, 'expiry_info'); $tooltip = ' data-bs-toggle="tooltip" title="' . $expiryInfo . '"'; $cssClass = 'bg-' . data_get($transaction, 'css_class_variant'); @endphp {{ data_get($transaction, 'status_info') }}
@endsection @section('after_scripts') @endsection