#42 - wip
This commit is contained in:
		@@ -29,9 +29,7 @@ class GoogleController extends Controller
 | 
			
		||||
        } catch (ModelNotFoundException) {
 | 
			
		||||
            return redirect()
 | 
			
		||||
                ->route("login")
 | 
			
		||||
                ->withErrors([
 | 
			
		||||
                    "oauth" => __("User does not exist."),
 | 
			
		||||
                ]);
 | 
			
		||||
                ->with("error", __("User does not exist."));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $auth->guard()->login($user, true);
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ class HolidayController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("holidays.index")
 | 
			
		||||
            ->with("success", __("Holiday has been created"));
 | 
			
		||||
            ->with("success", __("Holiday has been created."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function edit(Holiday $holiday): Response
 | 
			
		||||
@@ -51,7 +51,7 @@ class HolidayController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("holidays.index")
 | 
			
		||||
            ->with("success", __("Holiday has been updated"));
 | 
			
		||||
            ->with("success", __("Holiday has been updated."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function destroy(Holiday $holiday): RedirectResponse
 | 
			
		||||
@@ -60,6 +60,6 @@ class HolidayController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("holidays.index")
 | 
			
		||||
            ->with("success", __("Holiday has been deleted"));
 | 
			
		||||
            ->with("success", __("Holiday has been deleted."));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,6 @@ class SelectYearPeriodController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->back()
 | 
			
		||||
            ->with("success", __("Selected year period has been changed"));
 | 
			
		||||
            ->with("success", __("Selected year period has been changed."));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ class UserController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("users.index")
 | 
			
		||||
            ->with("success", __("User has been created"));
 | 
			
		||||
            ->with("success", __("User has been created."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function edit(User $user): Response
 | 
			
		||||
@@ -64,7 +64,7 @@ class UserController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("users.index")
 | 
			
		||||
            ->with("success", __("User has been updated"));
 | 
			
		||||
            ->with("success", __("User has been updated."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function destroy(User $user): RedirectResponse
 | 
			
		||||
@@ -73,7 +73,7 @@ class UserController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("users.index")
 | 
			
		||||
            ->with("success", __("User has been deleted"));
 | 
			
		||||
            ->with("success", __("User has been deleted."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function restore(User $user): RedirectResponse
 | 
			
		||||
@@ -82,6 +82,6 @@ class UserController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("users.index")
 | 
			
		||||
            ->with("success", __("User has been restored"));
 | 
			
		||||
            ->with("success", __("User has been restored."));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,6 +35,6 @@ class VacationLimitController extends Controller
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->back()
 | 
			
		||||
            ->with("success", __("Vacation limits have been updated"));
 | 
			
		||||
            ->with("success", __("Vacation limits have been updated."));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -93,7 +93,8 @@ class VacationRequestController extends Controller
 | 
			
		||||
        $stateManager->markAsCreated($vacationRequest);
 | 
			
		||||
 | 
			
		||||
        return redirect()
 | 
			
		||||
            ->route("vacation.requests.index");
 | 
			
		||||
            ->route("vacation.requests.show", $vacationRequest)
 | 
			
		||||
            ->with("success", __("Vacation request has been created."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function reject(
 | 
			
		||||
@@ -102,7 +103,8 @@ class VacationRequestController extends Controller
 | 
			
		||||
    ): RedirectResponse {
 | 
			
		||||
        $stateManager->reject($vacationRequest);
 | 
			
		||||
 | 
			
		||||
        return redirect()->back();
 | 
			
		||||
        return redirect()->back()
 | 
			
		||||
            ->with("success", __("Vacation request has been rejected."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function cancel(
 | 
			
		||||
@@ -111,7 +113,8 @@ class VacationRequestController extends Controller
 | 
			
		||||
    ): RedirectResponse {
 | 
			
		||||
        $stateManager->cancel($vacationRequest);
 | 
			
		||||
 | 
			
		||||
        return redirect()->back();
 | 
			
		||||
        return redirect()->back()
 | 
			
		||||
            ->with("success", __("Vacation request has been canceled."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function acceptAsTechnical(
 | 
			
		||||
@@ -120,7 +123,8 @@ class VacationRequestController extends Controller
 | 
			
		||||
    ): RedirectResponse {
 | 
			
		||||
        $stateManager->acceptAsTechnical($vacationRequest);
 | 
			
		||||
 | 
			
		||||
        return redirect()->back();
 | 
			
		||||
        return redirect()->back()
 | 
			
		||||
            ->with("success", __("Vacation request has been accepted."));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function acceptAsAdministrative(
 | 
			
		||||
@@ -129,6 +133,7 @@ class VacationRequestController extends Controller
 | 
			
		||||
    ): RedirectResponse {
 | 
			
		||||
        $stateManager->acceptAsAdministrative($vacationRequest);
 | 
			
		||||
 | 
			
		||||
        return redirect()->back();
 | 
			
		||||
        return redirect()->back()
 | 
			
		||||
            ->with("success", __("Vacation request has been accepted."));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user