Commit 25db1cba authored by Victor Friboulet's avatar Victor Friboulet
Browse files
parents 0cf396ca 91ff0dd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ function show($id) {

    function showManagementList() {
        $userID = session('user')->US_ID;
        $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH')
        $dives = DivingSession::select('DS_CODE', 'DS_ACTIVE', 'CAR_DIVING_SESSION.DL_ID', 'DS_DATE', 'DL_DEPTH', 'CAR_SCHEDULE', 'DL_NAME', 'DS_MAX_DEPTH' ,'DS_DIVERS_COUNT' , 'DS_MAX_DIVERS')
            ->join('CAR_DIVING_LOCATION', 'CAR_DIVING_SESSION.DL_ID', '=', 'CAR_DIVING_LOCATION.DL_ID')
            ->where('DS_ACTIVE', '=', 1, 'and', 'DS_DATE', '>=', date('Y-m-d'), 'and', 'US_ID_CAR_DIRECT', '=', $userID)
            ->orderBy('DS_DATE', 'asc')
+10 −1
Original line number Diff line number Diff line
@@ -48,6 +48,15 @@ function update(Request $request) {
        return redirect()->route('manage_members');
    }


    function updatePassword(Request $request){
        $user = User::find(session('user')->US_ID);
        if ($user->checkPassword($request->OldPassword)){
            $user->US_PASSWORD = $request->NewPassword;
            $user->save();
        }else{
            return redirect('/error');
        }
        return redirect('/');
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ class User extends Model

    protected $primaryKey = 'US_ID';

    public $timestamps = false;

    /**
     * Check if a given password matches the stored password.
     *
+64 −0
Original line number Diff line number Diff line
  /* Fixer le bouton sur le côté gauche de la page */
  .open-btn {
    display: flex;
    justify-content: flex-start;
  }
  /* Positionnez la forme Popup */
  .login-popup {
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.22);
    width: 75vw;
    height: auto;
    border-radius: 30px;
    margin: auto;
    margin-top: 7em ;
    display: block;
    text-align: center;
    backdrop-filter: blur(5px);
}
  /* Masquez la forme Popup */
  .form-popup {
    display: none;
    position: fixed;
    left: 45%;
    top: 5%;
    transform: translate(-45%, 5%);
    border: 2px solid #666;
    z-index: 9;
    
  }
  /* Styles pour le conteneur de forme */
  .form-container {
    max-width: 600px;
    padding: 20px;
    background-color: #fff;
  }
  /* Largeur complète pour les champs de saisie */
  .form-container input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0 22px 0;
    border: none;
    background: #eee;
  }
  /*Quand les entrées sont concentrées, faites quelque chose */
  .form-container input[type="password"]:focus {
    background-color: #ddd;
    outline: none;
  }
  /* Stylez le bouton de connexion*/
  .form-container .btn {
    background-color: #fabb54;
    color: #fff;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
    opacity: 0.8;
  }
  /* Planez les effets pour les boutons */
  .form-container .btn:hover,
  .open-button:hover {
    opacity: 1;
  }
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
function openForm() {
    document.getElementById("popupForm").style.display = "block";
}

function closeForm() {
    document.getElementById("popupForm").style.display = "none";
}
 No newline at end of file
Loading