Changeset ec7b69d for app


Ignore:
Timestamp:
11/29/21 23:10:44 (3 years ago)
Author:
beratkjufliju <kufliju@…>
Branches:
master
Children:
79aa35c
Parents:
dbc5976
Message:

added confirmation modal on userSettings

Location:
app/Http/Controllers/Dashboard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/Dashboard/FoldersController.php

    rdbc5976 rec7b69d  
    233233        $folder = Folder::find($id);
    234234
    235         $existingFolders = Folder::where(['department_id' => $folder->department->id, 'name' => $folder->name, 'arch_id' => $folder->arch_id])->count();
    236 
    237         if($existingFolders > 1 && $folder->version == 1) {
    238             Alert::flash($folder->name . " has versions", "error");
     235        $existingFolders = Folder::where(['department_id' => $folder->department->id, 'name' => $folder->name, 'arch_id' => $folder->arch_id]);
     236
     237        if($existingFolders->count() > 1 && $folder->version == 1 || $folder->version < $existingFolders->pluck('version')->max()) {
     238            Alert::flash($folder->name . " has newer versions", "error");
    239239            return redirect()->back();
    240240        }
  • app/Http/Controllers/Dashboard/SettingsController.php

    rdbc5976 rec7b69d  
    4343    }
    4444
    45     public function updatePassword(UsernameSettingsRequest $request)
     45    public function updatePassword(PasswordSettingsRequest $request)
    4646    {
    4747            $user = auth()->user();
Note: See TracChangeset for help on using the changeset viewer.