@extends('layouts.main') @section('page-style') @endsection @section('page-plugin') @endsection @section('page-script') @endsection @section('content')

@include('layouts.notifications')
@if(isset($data[0]['achivement_name']))
  {{$data[0]['achivement_name']}}
Status @if ($data[0]['date_start'] < date('Y-m-d H:i:s')) Started @elseif (!is_null($data[0]['date_end']) && strtotime($data[0]['date_end']) < strtotime(date('Y-m-d H:i:s'))) Ended @else Not Started @endif
User Name {{$data[0]['user_name']}}
User Phone {{$data[0]['phone']}}
User Email {{$data[0]['email']}}
Category Achievement {{$data[0]['category_name']}}
Pulished at {{date('d F Y H:i', strtotime($data[0]['publish_start']))}}
Created at {{date('d F Y H:i', strtotime($data[0]['achivement_created_at']))}}
@endif
@foreach ($data as $item)
  {{$item['name']}}
Badge Date
: {{date('d F Y H:i:s', strtotime($item['date']))}}
@if (!is_null($item['id_product']) || !is_null($item['product_total']))
Product Rule
@if (!is_null($item['id_product']))
Product
: {{$item['product']['product_name']}}
@endif @if (!is_null($item['product_total']))
Product Total
: {{$item['product_total']}}
@endif
@endif @if (!is_null($item['id_outlet']) || !is_null($item['different_outlet']))
Outlet Rule
@if (!is_null($item['id_outlet']))
Outlet
: {{$item['outlet']['outlet_name']}}
@endif @if (!is_null($item['different_outlet']))
Outlet Different ?
: {{$item['different_outlet']}} Outlet
@endif
@endif @if (!is_null($item['id_province']) || !is_null($item['different_province']))
Province Rule
@if (!is_null($item['id_province']))
Province
: {{$item['province']['province_name']}}
@endif @if (!is_null($item['different_province']))
Province Different ?
: {{$item['different_province']}} Provice
@endif
@endif @if (!is_null($item['trx_nominal']) || !is_null($item['trx_total']))
Transaction Rule
@if (!is_null($item['trx_nominal']))
Transaction Nominal
: Minimum {{number_format($item['trx_nominal'])}}
@endif
@if (!is_null($item['trx_total']))
Transaction Total
: Minimum {{number_format($item['trx_total'])}}
@endif
@endif
@endforeach
@endsection