|
|
@ -8,6 +8,7 @@ use Illuminate\Support\Facades\Hash; |
|
|
|
|
|
|
|
|
|
|
|
use App\Models\User; |
|
|
|
use App\Models\User; |
|
|
|
use App\Models\Role; |
|
|
|
use App\Models\Role; |
|
|
|
|
|
|
|
use App\Models\Company; |
|
|
|
use Illuminate\Http\JsonResponse; |
|
|
|
use Illuminate\Http\JsonResponse; |
|
|
|
use Illuminate\Support\Facades\Password; |
|
|
|
use Illuminate\Support\Facades\Password; |
|
|
|
use Illuminate\Validation\ValidationException; |
|
|
|
use Illuminate\Validation\ValidationException; |
|
|
@ -58,6 +59,10 @@ class AuthController extends Controller |
|
|
|
|
|
|
|
|
|
|
|
$dataRole = Role::find($user->role_id); |
|
|
|
$dataRole = Role::find($user->role_id); |
|
|
|
$dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id); |
|
|
|
$dataHierarchy = $this->getDataHierarchy($user->divisi_id, $user->id); |
|
|
|
|
|
|
|
$configApp = Company::where('id', $user->company_id)->first(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($configApp) |
|
|
|
|
|
|
|
$user->configApp = $configApp; |
|
|
|
|
|
|
|
|
|
|
|
if ($dataRole) |
|
|
|
if ($dataRole) |
|
|
|
$user->role = $dataRole; |
|
|
|
$user->role = $dataRole; |
|
|
|