-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[REWE] Show informations about markets
- Loading branch information
1 parent
784a6b7
commit ea373d0
Showing
6 changed files
with
120 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
database/migrations/2020_12_30_011718_add_user_shop_index_to_rewe_bons.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class AddUserShopIndexToReweBons extends Migration { | ||
|
||
public function up(): void { | ||
Schema::table('rewe_bons', function(Blueprint $table) { | ||
$table->index(['user_id', 'shop_id']); | ||
}); | ||
} | ||
|
||
|
||
public function down(): void { | ||
Schema::table('rewe_bons', function(Blueprint $table) { | ||
$table->dropIndex(['user_id', 'shop_id']); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
@extends('layout.app') | ||
|
||
@section('title') REWE Markt {{$shop->id}} in {{$shop->zip}} {{$shop->city}} @endsection | ||
|
||
@section('content') | ||
<div class="row"> | ||
<div class="col-md-7"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th>Zeitpunkt</th> | ||
<th>Kasse</th> | ||
<th>Zahlungsmethode</th> | ||
<th>Betrag</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach($history as $receipt) | ||
<tr> | ||
<td>{{$receipt->timestamp_bon->format('d.m.Y H:i')}}</td> | ||
<td>{{$receipt->cashregister_nr}}</td> | ||
<td>{{$receipt->paymentmethod}}</td> | ||
<td>{{number_format($receipt->total, 2, ",", ".")}} €</td> | ||
<td><a href="{{ route('rewe_receipt', [$receipt->id]) }}">Details</a></td> | ||
</tr> | ||
@endforeach | ||
</tbody> | ||
</table> | ||
{{$history->links()}} | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-md-5"> | ||
<div class="card"> | ||
<div class="card-body" style="font-size: 16px;"> | ||
<h2>Einkaufsfreunde</h2> | ||
@if($countOther == 0) | ||
<p>Du bist bisher <b>der einzige KStats-Nutzer</b>, welcher in diesem REWE-Markt einkaufen war! | ||
</p> | ||
@elseif($countOther > 1) | ||
<p>Du hast <b>einen</b> Einkaufsfreund, denn neben dir hat <b>ein weiterer KStats-Nutzer</b> in | ||
diesem | ||
REWE-Markt eingekauft.</p> | ||
@else | ||
<p>Dieser REWE-Markt scheint beliebt zu sein. Neben dir haben hier bereits <b>{{$countOther}} | ||
andere KStats-Nutzer</b> eingekauft!</p> | ||
@endif | ||
</div> | ||
</div> | ||
|
||
<div class="card"> | ||
<div class="card-body"> | ||
<h2>{{$shop->name}}</h2> | ||
{{$shop->address}}<br/> | ||
{{$shop->zip}} {{$shop->city}}<br/> | ||
<hr/> | ||
@isset($shop->phone) | ||
{{$shop->phone}}<br/> | ||
@endisset | ||
@isset($shop->opening_hours) | ||
{{$shop->opening_hours}}<br/> | ||
@endisset | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
@endsection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters