@extends('layouts.app')

@section('content')
<section class="page-header row">
	<h2> {{ $pageTitle }} <small> {{ $pageNote }} </small></h2>
	<ol class="breadcrumb">
		<li><a href="{{ url('') }}"> Dashboard </a></li>
		<li><a href="{{ url('/manage/'.$pageModule) }}"> {{ $pageTitle }} </a></li>
		<li class="active"> View  </li>		
	</ol>
</section>
<div class="page-content row">
	<div class="page-content-wrapper no-margin">
	
	<div class="sbox">
		<div class="sbox-title clearfix">
			<div class="sbox-tools pull-left" >
		   		<a href="{{ ($prevnext['prev'] != '' ? url('/manage/coupons/'.$prevnext['prev'].'?return='.$return ) : '#') }}" class="tips btn btn-sm"><i class="fa fa-arrow-left"></i>  </a>	
				<a href="{{ ($prevnext['next'] != '' ? url('/manage/coupons/'.$prevnext['next'].'?return='.$return ) : '#') }}" class="tips btn btn-sm "> <i class="fa fa-arrow-right"></i>  </a>					
			</div>	

			<div class="sbox-tools" >
				@if($access['is_add'] ==1)
		   		<a href="{{ url('/manage/coupons/'.$id.'/edit?return='.$return) }}" class="tips btn btn-sm  " title="{{ __('core.btn_edit') }}"><i class="fa  fa-pencil"></i></a>
				@endif
				<a href="{{ url('/manage/coupons?return='.$return) }}" class="tips btn btn-sm  " title="{{ __('core.btn_back') }}"><i class="fa  fa-times"></i></a>		
			</div>
		</div>
		<div class="sbox-content">
			<div class="table-responsive">
				<table class="table table-striped " >
					<tbody>	
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('ID', (isset($fields['id']['language'])? $fields['id']['language'] : array())) }}</td>
						<td>{{ $row['id']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Coupon Title', (isset($fields['title']['language'])? $fields['title']['language'] : array())) }}</td>
						<td>{{ $row['title']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Store', (isset($fields['store_id']['language'])? $fields['store_id']['language'] : array())) }}</td>
						<td>{{ SiteHelpers::formatLookUp($row['store_id'],'store_id','1:stores:id:slug') }} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Description', (isset($fields['description']['language'])? $fields['description']['language'] : array())) }}</td>
						<td>{{ $row['description']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Promo Text', (isset($fields['promo_text']['language'])? $fields['promo_text']['language'] : array())) }}</td>
						<td>{{ $row['promo_text']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Link', (isset($fields['link']['language'])? $fields['link']['language'] : array())) }}</td>
						<td>{{ $row['link']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Type', (isset($fields['type']['language'])? $fields['type']['language'] : array())) }}</td>
						<td>{{ $row['type']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Code', (isset($fields['code']['language'])? $fields['code']['language'] : array())) }}</td>
						<td>{{ $row['code']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Brands', (isset($fields['brands']['language'])? $fields['brands']['language'] : array())) }}</td>
						<td>{{ $row['brands']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Tags', (isset($fields['tags']['language'])? $fields['tags']['language'] : array())) }}</td>
						<td>{{ $row['tags']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Cats', (isset($fields['cats']['language'])? $fields['cats']['language'] : array())) }}</td>
						<td>{{ $row['cats']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Is Featured', (isset($fields['is_featured']['language'])? $fields['is_featured']['language'] : array())) }}</td>
						<td>{{ $row['is_featured']}} </td>
						
					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Is Recommended', (isset($fields['is_recommended']['language'])? $fields['is_recommended']['language'] : array())) }}</td>
						<td>{{ $row['is_recommended']}} </td>

					</tr>
					<tr>
						<td width="30%" class="label-view text-right">
							{{ SiteHelpers::activeLang(
								'Coupon Rank',
								isset($fields['coupon_rank']['language'])
									? $fields['coupon_rank']['language']
									: array()
							) }}
						</td>
						<td>
							{{ $row['coupon_rank'] !== null
								? $row['coupon_rank']
								: 'Not Ranked' }}
						</td>
					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Is Exclusive', (isset($fields['is_exclusive']['language'])? $fields['is_exclusive']['language'] : array())) }}</td>
						<td>{{ $row['is_exclusive']}} </td>

					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Verified', (isset($fields['verified']['language'])? $fields['verified']['language'] : array())) }}</td>
						<td>{{ $row['verified'] ? 'Verified' : 'Not Verified' }} </td>

					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Initial Usage Count', (isset($fields['initial_usage_count']['language'])? $fields['initial_usage_count']['language'] : array())) }}</td>
						<td>{{ $row['initial_usage_count'] ?? 0 }} </td>

					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Website Copy Count', (isset($fields['website_copy_count']['language'])? $fields['website_copy_count']['language'] : array())) }}</td>
						<td>{{ $row['website_copy_count'] ?? 0 }} </td>

					</tr>
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Usage Count', (isset($fields['usage_count']['language'])? $fields['usage_count']['language'] : array())) }}</td>
						<td>{{ $row['usage_count'] ?? 0 }} </td>

					</tr>

					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Expiry Date', (isset($fields['expiry_date']['language'])? $fields['expiry_date']['language'] : array())) }}</td>
						<td>{{ date('',strtotime($row['expiry_date'])) }} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Status', (isset($fields['status']['language'])? $fields['status']['language'] : array())) }}</td>
						<td>{{ $row['status']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Views', (isset($fields['clicks']['language'])? $fields['clicks']['language'] : array())) }}</td>
						<td>{{ $row['clicks']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Created At', (isset($fields['created_at']['language'])? $fields['created_at']['language'] : array())) }}</td>
						<td>{{ $row['created_at']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Updated At', (isset($fields['updated_at']['language'])? $fields['updated_at']['language'] : array())) }}</td>
						<td>{{ $row['updated_at']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Created Mode', (isset($fields['created_mode']['language'])? $fields['created_mode']['language'] : array())) }}</td>
						<td>{{ $row['created_mode']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Network Id', (isset($fields['network_id']['language'])? $fields['network_id']['language'] : array())) }}</td>
						<td>{{ $row['network_id']}} </td>
						
					</tr>
				
					<tr>
						<td width='30%' class='label-view text-right'>{{ SiteHelpers::activeLang('Network Coupon Id', (isset($fields['network_coupon_id']['language'])? $fields['network_coupon_id']['language'] : array())) }}</td>
						<td>{{ $row['network_coupon_id']}} </td>
						
					</tr>
				
					</tbody>	
				</table>   

			 	

			</div>
		</div>
	</div>
	</div>
</div>
@stop
