Tippstart auf Tippable round, Link Roundmail: Tipps@Tippspiel
This commit is contained in:
parent
0abaeb2eba
commit
6aad1a7ab2
13 changed files with 149 additions and 34 deletions
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Roundmail;
|
||||
use App\User;
|
||||
use App\Round;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use App\Mail\RoundmailMailer;
|
||||
|
|
@ -98,7 +99,7 @@ class RoundmailController extends Controller
|
|||
$missingJokerMailList = implode(",",$missingJokerMailList);
|
||||
$adminMailList = implode(",",$adminMailList);
|
||||
|
||||
|
||||
$tippSpielLink="http://hoschis-tippspiel.de/tipps#".Round::getFirstTippableRound()->id;
|
||||
|
||||
$topic="";
|
||||
$mail_message="";
|
||||
|
|
@ -118,7 +119,7 @@ class RoundmailController extends Controller
|
|||
|
||||
|
||||
|
||||
return view('roundmails.show',compact('mail_id','activeMailList','inactiveMailList','missingTippMailList','missingJokerMailList','adminMailList','send_date','user_id','topic', 'mail_message', 'recipients', 'sender_name','viewmode'));
|
||||
return view('roundmails.show',compact('mail_id','activeMailList','inactiveMailList','missingTippMailList','missingJokerMailList','adminMailList','send_date','user_id','topic', 'mail_message', 'recipients', 'sender_name','viewmode','tippSpielLink'));
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -189,4 +190,7 @@ class RoundmailController extends Controller
|
|||
|
||||
}
|
||||
|
||||
public function checkReminder() {
|
||||
Log::info("RoundmailController::checkReminder was triggered");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class TippsController extends Controller
|
|||
|
||||
$rounds = Round::all()->where('season_id', '=', $activeSeason->id);
|
||||
foreach($rounds as $round) {
|
||||
|
||||
$games=Game::all()->where('round_id','=',$round->id);
|
||||
foreach($games as $game) {
|
||||
|
||||
|
|
@ -74,14 +73,9 @@ class TippsController extends Controller
|
|||
|
||||
TippsController::createTipps($user->id); // ggfs. fehlender Tipp Eintraege einfügen
|
||||
|
||||
$lastLockedRoundId=Round::getLastLockedRoundId();
|
||||
|
||||
if ($activeSeason) {
|
||||
$activeSeasonId = Season::getCurrent()->id;
|
||||
$rounds = Round::all()->where('season_id', '=', $activeSeasonId);
|
||||
}
|
||||
|
||||
|
||||
Log::info("REDIRECTING to TIPPS index");
|
||||
$rounds = Round::where('season_id', '=', $activeSeason->id)->get();
|
||||
|
||||
return view('tipps.index', compact('rounds', 'activeSeason', 'user'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue