v1.4.10 - Event, Guide & Menuplan pictures can now be updated and changed correctly (Menuplan is determined when creating, can't change picture later)

There is no longer a second news, when updating an event or such

Added Select2 when chosing roles for users

Removed guide button
This commit is contained in:
Anders
2020-11-26 15:22:59 +01:00
parent baaf0f954d
commit 3bf8329434
11 changed files with 71 additions and 28 deletions
@@ -76,8 +76,6 @@ class MenuPlanController extends Controller
$menuPlan->save();
$menuPlans = MenuPlan::query()->get();
$menuArray = [];
if($request->newsoption == true){
$news = new News();
@@ -177,6 +175,10 @@ class MenuPlanController extends Controller
'<h2 class="ql-align-center"><strong>Torsdag:</strong></h2>'.
'<p class="ql-align-center">'.$menuplan->thursday.'</p>';
$oldResourceID = News::query()->where('arrangement_id', '=', $menuplan->id)->first();
if ($oldResourceID != null)
$news->resource_id = $oldResourceID->resource_id;
NewsController::storeAndGet($news);
}