<!DOCTYPE html>
<html lang="en-US">
	<head>
		<meta charset="utf-8">
	</head>
	<body>
		<h2>A new task ({!! ucwords($data->type) !!}) has been created for {!! $data->client->name !!}.</h2>

		<div>
			<?php
				switch ($data->type) {
					case 'repair':
						echo 'Task ID <a href="'. URL::to('tasks/repairs/' . $data->id) .'">'. $data->id .'</a> / Repair';
						break;

					case 'order':
						echo 'Task ID <a href="'. URL::to('tasks/orders/' . $data->id) .'">'. $data->id .'</a> / Order';
						break;

					case 'sale_lead':
						echo 'Task ID <a href="'. URL::to('tasks/sale-lead/' . $data->id) .'">'. $data->id .'</a> / Sale Lead';
						break;

					default:
						echo 'Task ID <a href="'. URL::to('tasks/'.$data->type.'/' . $data->id) .'">'. $data->id .'</a> / '. ucwords($data->type);
						break;
				}

			?>

			<br>
			<h4>Title: {!! $data->title !!}</h4>
			<h4>Booked in by: {!! $data->creator->name !!}</h4>
			@if ( $data->assigned_to )
				<h4>Assigned to: {!! $data->user->name !!}</h4>
			@endif
			<h5>Problem: {!! $data->problem !!}</h5>
		</div>
	</body>
</html>