@extends('templates.sheet-master')

@section('content')

	<div class="options hidden-print">
		<div class="btn-group">
			<span class="btn btn-success" onClick="if (window.self) window.print()">Print</span>
			<a class="btn btn-danger" href="{!! URL::action('App\Modules\Bookings\RepairsController@getIndex', $repair['id']) !!}" target="_self">Back</a>
		</div>
	</div>

	<div class="row" align='bottom'>
	<!-- Task problem-->
		<div class="col-xs-8">
			<div class="bs-callout bs-callout-danger" id="repair-description" style="margin-bottom: 5px;">
				@if($repair->client->tasks()->count() <= 1)
					<h4>This is your first time, where have you been?</h4>
				@else
					<h4>Welcome back {!! $repair->client->first_name !!}!</h4>
				@endif
				<p><strong>{!! $repair['title'] !!}</strong></p>
				<p>
					<div class="wrapper">{!! $repair->formatedProblemLimited !!}</div>
				</p>
			</div>

			<hr style="margin: 10px 0;" />

            <h4>Terms and Conditions</h4>
			You agree to the following terms and conditions by leaving your machine with us:<br><br>
			<ol id="terms-of-service">

				<li>
                    A fee is charged for booking in and diagnostic. The amount is confirmed with Front Desk and yourself, depending upon the service you have opted for.  <strong>This is non-refundable and is non-deductible.</strong> Following this, you will receive a non-obligation quote as confirmation.
                </li>
                <li>
                    By signing this document you agree to authorise us to <strong>proceed with a repair where the labour cost is up to £{{ Config::get('settings.repair_labour') }}.</strong> If the job will cost more than this further authorisation will be requested from you before beginning work. If you do not agree to us carrying out work automatically please tick here <input type="checkbox" style="margin:2px 0 0 5px; float: left; position: absolute;">
				</li>

				<li>
                    <strong>WE WILL NOT be held responsible for the loss of data.</strong> It is your responsibility to ensure you have <strong>working </strong>backups of your data before the job is started. <strong>If you do not currently have a working backup of your data or you are worried that it may be lost, please discuss this with the Front Desk at booking.</strong>
					<br/>
                </li>

				<li>
					We cannot guarantee that your current external devices will be compatible with newer hardware or software. Please inform Front Desk or bring in any external devices you have and we will confirm their compatibility with your device.
				</li>

				<li>
					If a re-install of your operating system is conducted, it is your responsibility to bring in the product keys or account information for any licensed software such as Microsoft Office, Adobe Photoshop, Adobe Creative Cloud, etc.
				</li>

				<li>
					Once you have been informed that your machine is ready for collection, we will hold the machine for 30 days without fee. After the initial 30 days have passed you will be charged a <strong>£{{ Config::get('settings.storage_fee') }} per day </strong>storage fee for up to an <strong>additional</strong> 30 days.<br> After we hold your machine for 60 days in total (once you have been informed your machine/device is ready to collect) <strong>you agree that your device is now forfeit and agree for it to be sold by us to recover our costs if left uncollected. </strong>
                    <br>
                    <br>
                    <strong>You also provide your acceptance of the storage fee if collecting between 30 and 60 days, and agree to settle the outstanding amount before we release the machine.</strong>

				</li>
				<li>
					You agree to allow us to use ONLY your name and email address for our mailing list in order to receive up to date information and offers from Computer Assistance. You may opt out of this at anytime by letting a member of staff you wish to not be contacted, or by unsubscribing directly on any email received from us. Computer Assistance values your privacy and will never share or sell your information with any third-party without your explicit permission and request.
				</li>
			</ol>
			<p class="mg-20"><strong>Signed ............................................ Date  {!! date("d/m/Y") !!} </strong></p>
		</div>

		<div class="col-xs-4">

			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title"><i class="fa fa-fw fa-paperclip"></i> Confirmation Sheet</h4>
				</div>
				<table class="table">
					<tbody>
						<tr><th>Number:</th>   <th style="text-align:right">{{ $repair['id'] }}</th></tr>
						<tr><td>Job Pin:</td>  <td align='right'>{{ $repair['pin']? $repair['pin']: 8950 }}</td></tr>
						<tr><td>Date:</td>     <td align='right'>{{ date("d M Y", strtotime($repair['created_at'])) }}</td></tr>
					</tbody>
				</table>
			</div>

			<p class="text-center"><b>Check the status of your job by calling our automated system on: 01865451177</b> . Or by using our new mobile app and scanning the QR code below.</p>
			<div class="panel panel-defaults">
			{!! QrCode::size(100)->generate($repair['id'] . '-' . $repair['pin']); !!}
			</div>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title"><i class="fa fa-desktop fa-fw"></i> Devices</h4>
				</div>
				<div class="panel-body">
						@foreach ($repair['devices'] as $device)
							<strong><i class="{!! $device->icon !!}"></i> {!! $device->name !!} @if($device->serial_number) ({!! $device->serial_number !!}) @endif </strong> - PSU: {!! $device['psu']? 'Yes' : 'No' !!}  Case: {!! $device['case']? 'Yes' : 'No' !!} <br/>
						@endforeach
				</div>
			</div>

			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title"><i class="fa fa-info-circle"></i> Special Offers</h4>
				</div>
				<div class="panel-body">
					<ul class="fa-ul">
						<li><i class="fa-li fa fa-caret-right"></i> Ask to have ESET Antivirus added to your computer for only £29.</li>
						<li><i class="fa-li fa fa-caret-right"></i> Protect your data with our full backup options. Ask us now for a tailored solution.</li>
						<li><i class="fa-li fa fa-caret-right"></i> Computer long in the tooth? Let us give you a great deal on a new PC, Laptop or Mac.</li>
					</ul>
				</div>
			</div>

			<p class="text-center">"{!! $quotes[rand(0, count($quotes) - 1)] !!}"</p>

		</div>
	</div>

	<div class="row">

		<!-- Support box-->
		<div class="col-xs-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					<h4 class="panel-title"><i class="fa fa-support"></i> Support </h4>
				</div>
				<div class="panel-body text-justify">

					We want you to be happy: If you have problems when you get home we have a talented and friendly team of remote support technicians ready to dial in and fix problems over the internet.<br/>

					We can setup printers, emails and any other software issues that you don’t need to bring the computer back in for. Give us a call as it can save you time, effort and money!

				</div>
			</div>
		</div>

	</div>



	<div class="text-right">Thank you for choosing Computer Assistance. <i class="fa fa-smile-o fa-2x"></i></div>

@stop

@section('js')
	@parent

	<script type="text/javascript">
		// $(document).ready(function() {
		// 	var autoHeight = function() {
		// 		$('#description-col .panel').css({
		// 			'min-height': $('#summary-col').height()
		// 		});
		// 	};

		// 	autoHeight();
		// 	$(window).on("resize", autoHeight);
		// });
	</script>
@stop
