Tippstart auf Tippable round, Link Roundmail: Tipps@Tippspiel

This commit is contained in:
Torsten 2017-08-26 15:15:54 +02:00
parent 0abaeb2eba
commit 6aad1a7ab2
13 changed files with 149 additions and 34 deletions

View file

@ -18,8 +18,6 @@ use Illuminate\Contracts\Auth\Guard;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Auth\Passwords\PasswordBroker;
use DB;
use Auth;
use Log;
@ -53,8 +51,9 @@ class UsersController extends Controller
} else {Log::info("No current season");}
$nextRoundName="";
$nextRoundId = Round::getFirstIncompleteRound();
if ($nextRoundId>-1) { $nextRoundName = Round::where('id','=',$nextRoundId)->first()->name; }
$nextRound = Round::getFirstTippableRound();
if ($nextRound) { $nextRoundName = $nextRound->name; }
$user=Auth::user();
$message_text_tipps="";
@ -134,10 +133,7 @@ class UsersController extends Controller
$paid_date_str="";
$val=User::payment_date($user_id, $season_id);
Log::info("UserController:edit => payment_date=".$val);
if ($val) { $paid_date_str=User::toGermanDate($val);}
Log::info("German Date=".$paid_date_str);
return view ('users.edit', compact('user','paid_date_str'));
}
@ -489,4 +485,22 @@ class UsersController extends Controller
);
}
//route: useredit => useredit view
public function useredit($user_id) {
if (Auth::guest()) { return redirect("/"); }
$user=Auth::user();
$paid_date_str="";
$val=User::payment_date($user_id, Season::getCurrent()->id);
if ($val) { $paid_date_str=User::toGermanDate($val);}
return view ('users.useredit', compact('user','paid_date_str'));
}
public function send_reset_links_from_settings() {
if (Auth::guest()) { return redirect("/"); }
$this->sendResetLink(Auth::user());
}
}