Added views for indexing all people and showing a single one.
Added a method to get all (sub-)bookings associated with a person-target.
This commit is contained in:
@@ -6,5 +6,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class PersonTarget extends Model
|
class PersonTarget extends Model
|
||||||
{
|
{
|
||||||
//
|
/*
|
||||||
|
* Get all bookings associated with a target.
|
||||||
|
*
|
||||||
|
* @return Illuminate\Database\Eloquent\Collection
|
||||||
|
*/
|
||||||
|
public function getBookings()
|
||||||
|
{
|
||||||
|
return $this->hasMany('\App\SubBooking')->get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
<td>{{ $person->email }}</td>
|
<td>{{ $person->email }}</td>
|
||||||
<td>{{ $person->mobile }}</td>
|
<td>{{ $person->mobile }}</td>
|
||||||
<td>{{ $person->phone }}</td>
|
<td>{{ $person->phone }}</td>
|
||||||
<td></td>
|
<td>
|
||||||
|
<a href='/people/{{ $person-> id }}'>Anzeigen</a>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<h2>Stammdaten</h2>
|
||||||
|
<table border='1'>
|
||||||
|
<tr>
|
||||||
|
<td>ID</td>
|
||||||
|
<td>{{ $person->id }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Anrede</td>
|
||||||
|
<td>{{ $person->title }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Name / Firma</td>
|
||||||
|
<td>{{ $person->name_or_company }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Vorname</td>
|
||||||
|
<td>{{ $person->surname }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Straße</td>
|
||||||
|
<td>{{ $person->street }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Postleitzahl</td>
|
||||||
|
<td>{{ $person->postal_code }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Ort</td>
|
||||||
|
<td>{{ $person->city }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>E-Mail</td>
|
||||||
|
<td>{{ $person->email }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Telefon</td>
|
||||||
|
<td>{{ $person->phone }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mobil</td>
|
||||||
|
<td>{{ $person->mobile }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Geburtstage</td>
|
||||||
|
<td>{{ $person->date_of_birth }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
<h2>Konto<h2>
|
||||||
|
<table border='1'>
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<th>Datum</th>
|
||||||
|
<th>Zweck</th>
|
||||||
|
<th>Soll</th>
|
||||||
|
<th>Ist</th>
|
||||||
|
</tr>
|
||||||
|
@foreach ($targets as $target)
|
||||||
|
<tr>
|
||||||
|
<td>></>
|
||||||
|
<td>{{ $target->date }}</td>
|
||||||
|
<td>{{ $target->reference }}</td>
|
||||||
|
<td>{{ $target->amount }}</td>
|
||||||
|
<tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user