@extends('admin.layouts.master') @section('content')

{{ trans('app.gift_cards') }}

@can('create', \App\Models\GiftCard::class) {{-- {{ trans('app.bulk_import') }} --}} {{ trans('app.add_gift_card') }} @endcan
@foreach ($valid_cards as $card) @endforeach
{{ trans('app.name') }} {{ trans('app.value') }} {{ trans('app.activation_time') }} {{ trans('app.expiry_time') }} {{ trans('app.option') }}
{{ trans('app.image') }} {{ $card->name }} @if ($card->isInUse()) {{ trans('app.in_use') }} @endif {{ get_formated_currency($card->value, 2, config('system_settings.currency.id')) }} {{ $card->activation_time ? $card->activation_time->toDayDateTimeString() : '' }} {{ $card->expiry_time ? $card->expiry_time->toDayDateTimeString() : '' }} @can('view', $card)   @endcan @can('update', $card)   @endcan @can('delete', $card) {!! Form::open(['route' => ['admin.promotion.giftCard.trash', $card->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

{{ trans('app.invalid_cards') }}

@foreach ($invalid_cards as $card) @endforeach
{{ trans('app.name') }} {{ trans('app.pin_code') }} {{ trans('app.serial_number') }} {{ trans('app.value') }} {{ trans('app.expiry_time') }} {{ trans('app.option') }}
{{ $card->name }} @if (!$card->hasRemaining()) {{ trans('app.used') }} @endif {{ $card->pin_code }} {{ $card->serial_number }} {{ get_formated_currency($card->value, 2, config('system_settings.currency.id')) }} {{ $card->expiry_time->toDayDateTimeString() }} @can('view', $card)   @endcan @can('update', $card)   @endcan @can('delete', $card) {!! Form::open(['route' => ['admin.promotion.giftCard.trash', $card->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.trash'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan

{{ trans('app.trash') }}

@foreach ($trashes as $trash) @endforeach
{{ trans('app.name') }} {{ trans('app.serial_number') }} {{ trans('app.value') }} {{ trans('app.deleted_at') }} {{ trans('app.option') }}
{{ $trash->name }} {{ $trash->serial_number }} @if ($trash->expiry_time < \Carbon\Carbon::now()) ({{ trans('app.invalid') }}) @endif {{ get_formated_currency($trash->value, 2, config('system_settings.currency.id')) }} {{ $trash->deleted_at->diffForHumans() }} @can('delete', $trash)   {!! Form::open(['route' => ['admin.promotion.giftCard.destroy', $trash->id], 'method' => 'delete', 'class' => 'data-form']) !!} {!! Form::button('', ['type' => 'submit', 'class' => 'confirm ajax-silent', 'title' => trans('app.delete_permanently'), 'data-toggle' => 'tooltip', 'data-placement' => 'top']) !!} {!! Form::close() !!} @endcan
@endsection