Added banking edit to players edit form
This commit is contained in:
parent
29cc34590d
commit
b41a8f4051
5 changed files with 47 additions and 3 deletions
|
|
@ -462,6 +462,18 @@ class UsersController extends Controller
|
||||||
$user->gets_reminders=false;
|
$user->gets_reminders=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request()->has('iban')) {
|
||||||
|
$user->iban = request('iban');
|
||||||
|
}
|
||||||
|
if (request()->has('blz')) {
|
||||||
|
$user->blz=request('blz');
|
||||||
|
}
|
||||||
|
if (request()->has('bankname')) {
|
||||||
|
$user->bankname=request('bankname');
|
||||||
|
}
|
||||||
|
if (request()->has('kontonr')) {
|
||||||
|
$user->kontonr=request('kontonr');
|
||||||
|
}
|
||||||
Log::info("Setting gets_reminders to: " . request('gets_reminders'));
|
Log::info("Setting gets_reminders to: " . request('gets_reminders'));
|
||||||
$user->save();
|
$user->save();
|
||||||
return redirect('/');
|
return redirect('/');
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,13 @@ class Quota extends Model
|
||||||
|
|
||||||
$quota->save();
|
$quota->save();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
public static function getQuota($quota_name) {
|
public static function getQuota($quota_name) {
|
||||||
|
$season_id=Season::getCurrent()->id;
|
||||||
$quota=Quota::all()->where('season_id','=', $season_id)->where('name','=', $quota_name)->first();
|
$quota=Quota::all()->where('season_id','=', $season_id)->where('name','=', $quota_name)->first();
|
||||||
return $quota['prc'];
|
return $quota['prc'];
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
public static function getQuotas() {
|
public static function getQuotas() {
|
||||||
$season_id = Season::getCurrent()->id;
|
$season_id = Season::getCurrent()->id;
|
||||||
$quotas=Quota::all()->where('season_id','=', $season_id);
|
$quotas=Quota::all()->where('season_id','=', $season_id);
|
||||||
|
|
|
||||||
|
|
@ -71,5 +71,15 @@ class Season extends Model
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function hasGreenShirtGame($seasonId=-1) {
|
||||||
|
$season=null;
|
||||||
|
if ($seasonId==-1) {
|
||||||
|
$season = Season::getCurrent();
|
||||||
|
if (!$season) return false;
|
||||||
|
$seasonId=$season->id;
|
||||||
|
}
|
||||||
|
$quota=Quota::getQuota("Gruenes Trikot");
|
||||||
|
return $quota>0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,9 @@
|
||||||
<div id="dropdown_info" class="dropdown-content">
|
<div id="dropdown_info" class="dropdown-content">
|
||||||
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/show_payouts">Quoten</a>
|
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/show_payouts">Quoten</a>
|
||||||
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a>
|
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/payout#playerid_{{Auth::user()->id}}">Geldrangliste</a>
|
||||||
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/gshirt_ranking">Grünes Trikot</a>
|
@if (App\Season::hasGreenShirtGame())
|
||||||
|
<a style="font-weight:normal; font-color: blue; font-size: 22px;" href="/users/gshirt_ranking">Grünes Trikot</a>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,25 @@
|
||||||
<input type="text" class="form-control" id="lastname" name="lastname" value="{{ $user->lastname }}" readonly>
|
<input type="text" class="form-control" id="lastname" name="lastname" value="{{ $user->lastname }}" readonly>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label style="float:left; width:150px" for="lastname">IBAN:</label>
|
||||||
|
<input type="text" class="form-control" id="iban" name="iban" value="{{ $user->iban }}" required>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label style="float:left; width:150px" for="bankname">Bankname:</label>
|
||||||
|
<input type="text" class="form-control" id="bankname" name="bankname" value="{{ $user->bankname }}" required>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label style="float:left; width:150px" for="blz">BLZ:</label>
|
||||||
|
<input type="text" class="form-control" id="blz" name="blz" value="{{ $user->blz }}" required>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label style="float:left; width:150px" for="kontonr">Kontonummer:</label>
|
||||||
|
<input type="text" class="form-control" id="kontonr" name="kontonr" value="{{ $user->kontonr }}" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p> </p>
|
<p> </p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue