@extends('layouts/contentLayoutMaster') @section('title', 'Transaction') @section('content')

{{ __('locale.transaction') }}

@role('buddy') @endrole
Status:

@if (!@empty($transactions['data']))
    @foreach ($transactions['data'] as $item)
  • {{ \Carbon\Carbon::parse($item->date)->format('d M Y') }} {{$item['invoice_no']}} @switch($item['status']) @case(1) {{ __('locale.waiting_for_payment') }} @break @case(2) @if (Auth::user()->id == $item['user_id']) @endif {{ __('locale.waiting_for_payment') }} @break @case(3) {{ __('locale.waiting_verify_payment') }} @break @case(4) @if (Auth::user()->id == $item['buddy_id']) @endif {{ __('locale.waiting_confirmation') }} @break @case(5) @if (Auth::user()->id == $item['user_id']) @endif {{ __('locale.order_confirmed') }} @break @case(6) @if (in_array($item['id'], $notification['transactions'])) @endif {{ __('locale.canceled') }} @break @case(7) {{ __('locale.ongoing') }} @break @case(8) {{ __('locale.done') }} @break @case(9) {{ __('locale.in_complain') }} @break @endswitch
    @if ($user->id == $item['user_id']) avatar-buddy @else avatar @endif
    @if ( Config::get('app.locale') == 'id') {{ $item['service_name'] }} @else {{ $item['service_name_en'] }} @endif @if ($user->id == $item['user_id']) {{$item['buddy_name']}} @else {{$item['user_name']}} @endif {{\Carbon\Carbon::createFromFormat('H:i:s', $item['start_time'])->format('H:i')}} - {{\Carbon\Carbon::createFromFormat('H:i:s', $item['end_time'])->format('H:i')}} {{$item['duration']}} {{ __('locale.hour') }}, {{$item['participant']}} {{ __('locale.participant') }}
    @if ($item->status == '2')
    {{ __('locale.pay_at') }} {{ \Carbon\Carbon::parse($item->booked_at)->addHour(6)->format('d M Y, H:i') }} WIB
    @endif @if ($item->status == '4')
    {{ __('locale.confirm_at') }} {{ \Carbon\Carbon::parse($item->booked_at)->addHours(12)->format('d M Y, H:i') }} WIB
    @endif @if (($item['status'] == 5 && \Carbon\Carbon::now()->gte(\Carbon\Carbon::parse($item->should_finish_at)->subDay())) || ($item['status'] == 7 && \Carbon\Carbon::now()->gte(\Carbon\Carbon::parse($item->should_finish_at)->subDay())) )
    {{ __('locale.finish_at') }} {{ \Carbon\Carbon::parse($item->should_finish_at)->format('d M Y, H:i') }} WIB
    @endif
    Total {{ number_format($item['total_price'], 0, ',', '.') }}
  • @endforeach
@else
{{ __('locale.transaction_empty') }}
@endif
@endsection @section('page-script') {{-- Page js files --}} @endsection