Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
5bb05e72f6 | |||
|
daab5a3184 | ||
|
a2135cf4af | ||
|
9daedaedc5 | ||
|
b153558a25 | ||
375463fc77 | |||
a30879a337 |
@ -3,6 +3,7 @@
|
||||
namespace Modules\Usermanager\DataTables;
|
||||
|
||||
use Modules\Usermanager\Entities\User;
|
||||
use Yajra\DataTables\EloquentDataTable;
|
||||
use Yajra\DataTables\Html\Column;
|
||||
use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
@ -18,8 +19,7 @@
|
||||
public function dataTable($query)
|
||||
{
|
||||
|
||||
return datatables()
|
||||
->eloquent($query)
|
||||
return (new EloquentDataTable($query))
|
||||
->filter(function ($query) {
|
||||
$search = request()->get('search');
|
||||
if ($search['value'] !== "") {
|
||||
@ -27,10 +27,19 @@
|
||||
->orWhere('email', 'like', "%" . $search['value'] . "%");
|
||||
}
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->rawColumns(['action','last_login_at'])
|
||||
->addIndexColumn()
|
||||
->editColumn('user', function (User $model) {
|
||||
return view('usermanager::users.users.columns._user', compact('model'));
|
||||
})
|
||||
->editColumn('role', function (User $user) {
|
||||
return ucwords($user->roles->first()?->name);
|
||||
})
|
||||
->editColumn('last_login_at', function (User $user) {
|
||||
return sprintf('<div class="badge badge-light fw-bold">%s</div>', $user->last_login_at ? $user->last_login_at->diffForHumans() : $user->updated_at->diffForHumans());
|
||||
})
|
||||
->addColumn('action', function (User $model) {
|
||||
return view('usermanager::users.users._action', compact('model'));
|
||||
return view('usermanager::users.users.columns._action', compact('model'));
|
||||
});
|
||||
}
|
||||
|
||||
@ -77,7 +86,9 @@
|
||||
{
|
||||
return [
|
||||
Column::make('DT_RowIndex')->title('No')->orderable(false)->searchable(false),
|
||||
Column::make('name')->title(__('Name')),
|
||||
Column::make('user')->addClass('d-flex align-items-center')->name('name'),
|
||||
Column::make('role')->searchable(false),
|
||||
Column::make('last_login_at')->title('Last Login'),
|
||||
Column::make('email'),
|
||||
Column::computed('action')
|
||||
->exportable(false)
|
||||
|
@ -18,6 +18,7 @@
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('avatar')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->datetime('last_login_at')->nullable();
|
||||
$table->string('last_login_ip')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->removeColumn('last_login_at');
|
||||
$table->removeColumn('last_login_ip');
|
||||
});
|
||||
}
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up()
|
||||
: void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->foreignId('directorat_id')->nullable();
|
||||
$table->foreignId('sub_directorat_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down()
|
||||
: void
|
||||
{
|
||||
Schema::withoutForeignKeyConstraints(function () {
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('directorat_id');
|
||||
$table->dropColumn('sub_directorat_id');
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('profile_photo_path', 2048)->nullable()->after('email');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('profile_photo_path');
|
||||
});
|
||||
}
|
||||
};
|
@ -28,7 +28,12 @@
|
||||
return [
|
||||
['name' => 'User'],
|
||||
['name' => 'Role'],
|
||||
['name' => 'Permission']
|
||||
['name' => 'Permission'],
|
||||
['name' => 'system'],
|
||||
['name' => 'master'],
|
||||
['name' => 'document'],
|
||||
['name' => 'setting'],
|
||||
['name' => 'logs']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
{
|
||||
//app()[\Spatie\Permission\PermissionRegistrar::class]->forgetCachedPermissions();
|
||||
|
||||
$data = $this->data();
|
||||
/*$data = $this->data();
|
||||
|
||||
foreach ($data as $value) {
|
||||
$permission = Permission::updateOrCreate([
|
||||
@ -27,7 +27,7 @@
|
||||
'permission_group_id' => $value['group']
|
||||
]);
|
||||
|
||||
$roles = Role::all();
|
||||
$roles = Role::all();
|
||||
foreach ($roles as $role) {
|
||||
if ($role->name == 'administrator') {
|
||||
$role->givePermissionTo($permission);
|
||||
@ -37,22 +37,49 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
$roles = Role::all();
|
||||
foreach ($roles as $role) {
|
||||
$data = $this->data($role->name);
|
||||
foreach ($data as $value) {
|
||||
$permission = Permission::updateOrCreate([
|
||||
'name' => $value['name'],
|
||||
'guard_name' => 'web' // or 'api
|
||||
], [
|
||||
'permission_group_id' => $value['group']
|
||||
]);
|
||||
if($role->name=='ad' && explode('.',$value['name'])[0]=='document'){
|
||||
if($permission->name=='document.read'){
|
||||
$role->givePermissionTo($permission);
|
||||
}
|
||||
} else{
|
||||
$role->givePermissionTo($permission);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function data()
|
||||
public function data($role)
|
||||
{
|
||||
$data = [];
|
||||
$model = [];
|
||||
// list of model permission
|
||||
$model = ['user', 'role', 'permission'];
|
||||
if ($role == 'administrator') {
|
||||
$model = [['id' => 1, 'name' => 'user'], ['id' => 2, 'name' => 'role'], ['id' => 3, 'name' => 'permission'], ['id' => 4, 'name' => 'system'], ['id' => 5, 'name' => 'master'], ['id' => 6, 'name' => 'document'], ['id' => 7, 'name' => 'setting'], ['id' => 8, 'name' => 'logs']];
|
||||
} elseif($role == 'ad'){
|
||||
$model = [['id' => 4, 'name' => 'system'], ['id' => 6, 'name' => 'document'], ['id' => 7, 'name' => 'setting'], ['id' => 8, 'name' => 'logs']];
|
||||
} elseif($role == 'dd'){
|
||||
$model = [['id' => 4, 'name' => 'system'], ['id' => 5, 'name' => 'master'], ['id' => 6, 'name' => 'document'], ['id' => 7, 'name' => 'setting']];
|
||||
} elseif($role == 'eo'){
|
||||
$model = [['id' => 6, 'name' => 'document']];
|
||||
}
|
||||
|
||||
$i = 1;
|
||||
foreach ($model as $value) {
|
||||
foreach ($this->crudActions($value) as $action) {
|
||||
$data[] = ['name' => $action, 'group' => $i];
|
||||
foreach ($this->crudActions($value['name']) as $action) {
|
||||
$data[] = ['name' => $action, 'group' => $value['id']];
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -62,7 +89,7 @@
|
||||
{
|
||||
$actions = [];
|
||||
// list of permission actions
|
||||
$crud = ['create', 'read', 'update', 'delete'];
|
||||
$crud = ['create', 'read', 'update', 'delete','authorize','report'];
|
||||
|
||||
foreach ($crud as $value) {
|
||||
$actions[] = $name . '.' . $value;
|
||||
|
@ -27,7 +27,11 @@
|
||||
{
|
||||
return [
|
||||
['name' => 'administrator'],
|
||||
['name' => 'user'],
|
||||
['name' => 'ad'],
|
||||
['name' => 'dd'],
|
||||
['name' => 'eo'],
|
||||
['name' => 'siskon'],
|
||||
['name' => 'siskon_otorisator']
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -17,24 +17,56 @@
|
||||
*/
|
||||
public function run(Generator $faker)
|
||||
{
|
||||
$roleAdmin = Role::find(1);
|
||||
$roleUser = Role::find(2);
|
||||
$roles = Role::all();
|
||||
|
||||
$user = User::create([
|
||||
'name' => $faker->name,
|
||||
'email' => 'demo@demo.com',
|
||||
'password' => Hash::make('demo'),
|
||||
'email_verified_at' => now(),
|
||||
]);
|
||||
foreach ($roles as $role) {
|
||||
if ($role->name == 'administrator') {
|
||||
$admin = User::create(
|
||||
[//ad dd ao
|
||||
'name' => $faker->name,
|
||||
'email' => 'admin@demo.com',
|
||||
'password' => Hash::make('demo'),
|
||||
'email_verified_at' => now(),
|
||||
]
|
||||
);
|
||||
$admin->assignRole($role);
|
||||
}
|
||||
|
||||
$admin = User::create([
|
||||
'name' => $faker->name,
|
||||
'email' => 'admin@demo.com',
|
||||
'password' => Hash::make('demo'),
|
||||
'email_verified_at' => now(),
|
||||
]);
|
||||
if ($role->name == 'ad') {
|
||||
$admin = User::create(
|
||||
[//ad dd ao
|
||||
'name' => "Associate Director",
|
||||
'email' => '230700',
|
||||
'password' => Hash::make('bagbag'),
|
||||
'email_verified_at' => now(),
|
||||
]
|
||||
);
|
||||
$admin->assignRole($role);
|
||||
}
|
||||
|
||||
$admin->assignRole($roleAdmin,);
|
||||
$user->assignRole($roleUser);
|
||||
if ($role->name == 'dd') {
|
||||
$admin = User::create(
|
||||
[//ad dd ao
|
||||
'name' => "Deputy Director",
|
||||
'email' => '230701',
|
||||
'password' => Hash::make('bagbag'),
|
||||
'email_verified_at' => now(),
|
||||
]
|
||||
);
|
||||
$admin->assignRole($role);
|
||||
}
|
||||
|
||||
if ($role->name == 'eo') {
|
||||
$admin = User::create(
|
||||
[//ad dd ao
|
||||
'name' => "Executive Officer",
|
||||
'email' => '230702',
|
||||
'password' => Hash::make('bagbag'),
|
||||
'email_verified_at' => now(),
|
||||
]
|
||||
);
|
||||
$admin->assignRole($role);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
: LogOptions
|
||||
{
|
||||
return LogOptions::defaults()->logAll()
|
||||
->useLogName('Cetak Label : ');
|
||||
->useLogName('Module : ');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,12 @@
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password'
|
||||
'password',
|
||||
'last_login_at',
|
||||
'last_login_ip',
|
||||
'profile_photo_path',
|
||||
'direktorat_id',
|
||||
'sub_direktorat_id',
|
||||
];
|
||||
|
||||
/**
|
||||
@ -44,5 +49,15 @@
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
'last_login_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function getProfilePhotoUrlAttribute()
|
||||
{
|
||||
if ($this->profile_photo_path) {
|
||||
return asset('storage/' . $this->profile_photo_path);
|
||||
}
|
||||
|
||||
return $this->profile_photo_path;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Providers\RouteServiceProvider;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Modules\Usermanager\Entities\User;
|
||||
use Modules\Usermanager\Http\Requests\LoginRequest;
|
||||
|
||||
class AuthenticatedSessionController extends Controller
|
||||
@ -24,12 +24,16 @@
|
||||
|
||||
$request->session()->regenerate();
|
||||
|
||||
$request->user()->update([
|
||||
'last_login_at' => Carbon::now()->toDateTimeString(),
|
||||
'last_login_ip' => $request->getClientIp()
|
||||
]);
|
||||
|
||||
return redirect()->intended(RouteServiceProvider::HOME);
|
||||
}
|
||||
|
||||
public function storeUsermanager(Request $request)
|
||||
{
|
||||
|
||||
$userArray = [];
|
||||
$id = $request->email;
|
||||
$passwd = $request->password;
|
||||
@ -40,27 +44,20 @@
|
||||
|
||||
$userData = verify_user($id, $passwd, $SERVER_ADDR, $IPUserManager, $portUserManager, $appId);
|
||||
|
||||
|
||||
if (strlen($userData) > 1) {
|
||||
$userRawArray = explode("\t", $userData);
|
||||
|
||||
foreach ($userRawArray as $rkey => $rval) {
|
||||
|
||||
[$key, $val] = explode('=', $rval);
|
||||
$userArray[0][$key] = $val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$user = User::where('email', '=', $request->email)->first();
|
||||
$user = User::where('user_id', '=', $request->email)->first();
|
||||
|
||||
if (!$user) {
|
||||
$user = User::create([
|
||||
'name' => $userArray[0]['NAMA_USER'],
|
||||
'user_id' => $userArray[0]['KD_USER'],
|
||||
'email' => $request->email,
|
||||
'password' => $request->password
|
||||
|
||||
|
||||
'user_id' => $userArray[0]['KD_USER']
|
||||
]);
|
||||
|
||||
switch ($userArray[0]['KD_GROUP']) {
|
||||
@ -121,4 +118,4 @@
|
||||
|
||||
return redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,8 @@
|
||||
'name' => $request->name,
|
||||
'email' => $request->email,
|
||||
'password' => Hash::make($request->password),
|
||||
'last_login_at' => \Illuminate\Support\Carbon::now()->toDateTimeString(),
|
||||
'last_login_ip' => $request->getClientIp()
|
||||
]);
|
||||
|
||||
event(new Registered($user));
|
||||
|
54
Http/Controllers/Auth/SocialiteController.php
Normal file
54
Http/Controllers/Auth/SocialiteController.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Events\Verified;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
|
||||
class SocialiteController extends Controller
|
||||
{
|
||||
public function redirect($provider)
|
||||
{
|
||||
// redirect from social site
|
||||
if (request()->input('state')) {
|
||||
// already logged in
|
||||
// get user info from social site
|
||||
$user = Socialite::driver($provider)->stateless()->user();
|
||||
|
||||
// check for existing user
|
||||
$existingUser = User::where('email', $user->getEmail())->first();
|
||||
|
||||
if ($existingUser) {
|
||||
auth()->login($existingUser, true);
|
||||
|
||||
return redirect()->to('/');
|
||||
}
|
||||
|
||||
$newUser = $this->createUser($user);
|
||||
auth()->login($newUser, true);
|
||||
}
|
||||
|
||||
// request login from social site
|
||||
return Socialite::driver($provider)->redirect();
|
||||
}
|
||||
|
||||
|
||||
function createUser($user)
|
||||
{
|
||||
$user = User::updateOrCreate([
|
||||
'email' => $user->getEmail(),
|
||||
], [
|
||||
'name' => $user->getName(),
|
||||
'password' => '',
|
||||
'avatar' => $user->getAvatar(),
|
||||
]);
|
||||
|
||||
if ($user->markEmailAsVerified()) {
|
||||
event(new Verified($user));
|
||||
}
|
||||
|
||||
return $user;
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => ['required', 'string', 'email'],
|
||||
'email' => ['required', 'string'],
|
||||
'password' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
|
@ -1,69 +0,0 @@
|
||||
<x-auth-layout>
|
||||
|
||||
<!--begin::Form-->
|
||||
<form class="form w-100" novalidate="novalidate" id="kt_sign_in_form" data-kt-redirect-url="/" action="login">
|
||||
@csrf
|
||||
<!--begin::Heading-->
|
||||
<div class="text-center mb-11">
|
||||
<!--begin::Title-->
|
||||
<h1 class="text-dark fw-bolder mb-3">
|
||||
Sign In
|
||||
</h1>
|
||||
<!--end::Title-->
|
||||
|
||||
<!--begin::Subtitle-->
|
||||
<div class="text-gray-500 fw-semibold fs-6">
|
||||
Your Social Campaigns
|
||||
</div>
|
||||
<!--end::Subtitle--->
|
||||
</div>
|
||||
<!--begin::Heading-->
|
||||
|
||||
<!--begin::Input group--->
|
||||
<div class="fv-row mb-8">
|
||||
<!--begin::Email-->
|
||||
<input type="text" placeholder="User ID" name="email" autocomplete="off" class="form-control bg-transparent" value=""/>
|
||||
<!--end::Email-->
|
||||
</div>
|
||||
|
||||
<!--end::Input group--->
|
||||
<div class="fv-row mb-3">
|
||||
<!--begin::Password-->
|
||||
<input type="password" placeholder="Password" name="password" autocomplete="off" class="form-control bg-transparent" value=""/>
|
||||
<!--end::Password-->
|
||||
</div>
|
||||
<!--end::Input group--->
|
||||
|
||||
<!--begin::Wrapper-->
|
||||
<div class="d-flex flex-stack flex-wrap gap-3 fs-base fw-semibold mb-8">
|
||||
<div></div>
|
||||
|
||||
<!--begin::Link-->
|
||||
<a href="/forgot-password" class="link-primary">
|
||||
Forgot Password ?
|
||||
</a>
|
||||
<!--end::Link-->
|
||||
</div>
|
||||
<!--end::Wrapper-->
|
||||
|
||||
<!--begin::Submit button-->
|
||||
<div class="d-grid mb-10">
|
||||
<button type="submit" id="kt_sign_in_submit" class="btn btn-primary">
|
||||
@include('partials/general/_button-indicator', ['label' => 'Sign In'])
|
||||
</button>
|
||||
</div>
|
||||
<!--end::Submit button-->
|
||||
|
||||
<!--begin::Sign up-->
|
||||
<div class="text-gray-500 text-center fw-semibold fs-6">
|
||||
Not a Member yet?
|
||||
|
||||
<a href="/register" class="link-primary">
|
||||
Sign up
|
||||
</a>
|
||||
</div>
|
||||
<!--end::Sign up-->
|
||||
</form>
|
||||
<!--end::Form-->
|
||||
|
||||
</x-auth-layout>
|
@ -5,69 +5,32 @@
|
||||
@csrf
|
||||
<!--begin::Heading-->
|
||||
<div class="text-center mb-11">
|
||||
<img alt="Logo" src="{{ image('logos/logo_agi.png') }}" class="h-150px app-sidebar-logo-default" style="margin-bottom: 100px;" />
|
||||
|
||||
<!--begin::Title-->
|
||||
<h1 class="text-dark fw-bolder mb-3">
|
||||
Sign In
|
||||
</h1>
|
||||
<!--end::Title-->
|
||||
|
||||
<!--begin::Subtitle-->
|
||||
<div class="text-gray-500 fw-semibold fs-6">
|
||||
Aplikasi Konfirmasi Bank
|
||||
</div>
|
||||
<!--end::Subtitle--->
|
||||
</div>
|
||||
<!--begin::Heading-->
|
||||
|
||||
<!--begin::Login options-->
|
||||
<div class="row g-3 mb-9">
|
||||
<!--begin::Col-->
|
||||
<div class="col-md-12">
|
||||
<img class="d-none d-lg-block mx-auto w-150px w-md-50 w-xl-150px mb-10 mb-lg-10" src="{{ image('logos/logo_agi.png') }}" alt=""/>
|
||||
<!--begin::Google link--->
|
||||
{{-- <a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
|
||||
<img alt="Logo" src="{{ image('svg/brand-logos/google-icon.svg') }}" class="h-15px me-3"/>
|
||||
Sign in with Google
|
||||
</a> --}}
|
||||
<!--end::Google link--->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
|
||||
<!--begin::Col-->
|
||||
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Login options-->
|
||||
|
||||
<!--end::Separator-->
|
||||
|
||||
<!--begin::Input group--->
|
||||
<div class="fv-row mb-8">
|
||||
<!--begin::Email-->
|
||||
<input type="text" placeholder="Email" name="email" autocomplete="off" class="form-control bg-transparent" value="demo@demo.com"/>
|
||||
<input type="text" placeholder="User ID" name="email" autocomplete="off" class="form-control bg-transparent" value=""/>
|
||||
<!--end::Email-->
|
||||
</div>
|
||||
|
||||
<!--end::Input group--->
|
||||
<div class="fv-row mb-3">
|
||||
<!--begin::Password-->
|
||||
<input type="password" placeholder="Password" name="password" autocomplete="off" class="form-control bg-transparent" value="demo"/>
|
||||
<input type="password" placeholder="Password" name="password" autocomplete="off" class="form-control bg-transparent" value=""/>
|
||||
<!--end::Password-->
|
||||
</div>
|
||||
<!--end::Input group--->
|
||||
|
||||
<!--begin::Wrapper-->
|
||||
<div class="d-flex flex-stack flex-wrap gap-3 fs-base fw-semibold mb-8">
|
||||
<div></div>
|
||||
|
||||
<!--begin::Link-->
|
||||
{{-- <a href="/forgot-password" class="link-primary">
|
||||
Forgot Password ?
|
||||
</a> --}}
|
||||
<!--end::Link-->
|
||||
</div>
|
||||
<!--end::Wrapper-->
|
||||
|
||||
<!--begin::Submit button-->
|
||||
<div class="d-grid mb-10">
|
||||
<button type="submit" id="kt_sign_in_submit" class="btn btn-primary">
|
||||
@ -75,16 +38,6 @@
|
||||
</button>
|
||||
</div>
|
||||
<!--end::Submit button-->
|
||||
|
||||
<!--begin::Sign up-->
|
||||
{{-- <div class="text-gray-500 text-center fw-semibold fs-6">
|
||||
Not a Member yet?
|
||||
|
||||
<a href="/register" class="link-primary">
|
||||
Sign up
|
||||
</a>
|
||||
</div> --}}
|
||||
<!--end::Sign up-->
|
||||
</form>
|
||||
<!--end::Form-->
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<!--begin::Subtitle-->
|
||||
<div class="text-gray-500 fw-semibold fs-6">
|
||||
Aplikasi Konfirmasi Bank
|
||||
Your Social Campaigns
|
||||
</div>
|
||||
<!--end::Subtitle--->
|
||||
</div>
|
||||
@ -22,23 +22,34 @@
|
||||
<!--begin::Login options-->
|
||||
<div class="row g-3 mb-9">
|
||||
<!--begin::Col-->
|
||||
<div class="col-md-12">
|
||||
<img class="d-none d-lg-block mx-auto w-150px w-md-50 w-xl-150px mb-10 mb-lg-10" src="{{ image('logos/logo_agi.png') }}" alt=""/>
|
||||
<div class="col-md-6">
|
||||
<!--begin::Google link--->
|
||||
{{-- <a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
|
||||
<a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
|
||||
<img alt="Logo" src="{{ image('svg/brand-logos/google-icon.svg') }}" class="h-15px me-3"/>
|
||||
Sign in with Google
|
||||
</a> --}}
|
||||
</a>
|
||||
<!--end::Google link--->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
|
||||
<!--begin::Col-->
|
||||
|
||||
<div class="col-md-6">
|
||||
<!--begin::Google link--->
|
||||
<a href="#" class="btn btn-flex btn-outline btn-text-gray-700 btn-active-color-primary bg-state-light flex-center text-nowrap w-100">
|
||||
<img alt="Logo" src="{{ image('svg/brand-logos/apple-black.svg') }}" class="theme-light-show h-15px me-3"/>
|
||||
<img alt="Logo" src="{{ image('svg/brand-logos/apple-black-dark.svg') }}" class="theme-dark-show h-15px me-3"/>
|
||||
Sign in with Apple
|
||||
</a>
|
||||
<!--end::Google link--->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Login options-->
|
||||
|
||||
<!--begin::Separator-->
|
||||
<div class="separator separator-content my-14">
|
||||
<span class="w-125px text-gray-500 fw-semibold fs-7">Or with email</span>
|
||||
</div>
|
||||
<!--end::Separator-->
|
||||
|
||||
<!--begin::Input group--->
|
||||
@ -61,9 +72,9 @@
|
||||
<div></div>
|
||||
|
||||
<!--begin::Link-->
|
||||
{{-- <a href="/forgot-password" class="link-primary">
|
||||
<a href="/forgot-password" class="link-primary">
|
||||
Forgot Password ?
|
||||
</a> --}}
|
||||
</a>
|
||||
<!--end::Link-->
|
||||
</div>
|
||||
<!--end::Wrapper-->
|
||||
@ -77,13 +88,13 @@
|
||||
<!--end::Submit button-->
|
||||
|
||||
<!--begin::Sign up-->
|
||||
{{-- <div class="text-gray-500 text-center fw-semibold fs-6">
|
||||
<div class="text-gray-500 text-center fw-semibold fs-6">
|
||||
Not a Member yet?
|
||||
|
||||
<a href="/register" class="link-primary">
|
||||
Sign up
|
||||
</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
<!--end::Sign up-->
|
||||
</form>
|
||||
<!--end::Form-->
|
||||
|
@ -2,6 +2,14 @@
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
@section('title')
|
||||
Permissions
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('user.permissions') }}
|
||||
@endsection
|
||||
|
||||
<x-default-layout>
|
||||
<!--begin::Card-->
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
@ -84,6 +92,17 @@
|
||||
<div id="kt_datatable_example_buttons" class="d-none"></div>
|
||||
<!--end::Hide default export buttons-->
|
||||
|
||||
<!--begin::Toolbar-->
|
||||
<div class="d-flex justify-content-end ms-5" data-kt-user-table-toolbar="base">
|
||||
<!--begin::Add user-->
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_user_permissions">
|
||||
{!! getIcon('plus', 'fs-2', '', 'i') !!}
|
||||
Add Permission
|
||||
</button>
|
||||
<!--end::Add user-->
|
||||
</div>
|
||||
<!--end::Toolbar-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
|
@ -2,6 +2,14 @@
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
@section('title')
|
||||
Roles
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('user.roles') }}
|
||||
@endsection
|
||||
|
||||
<x-default-layout>
|
||||
<!--begin::Card-->
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
@ -84,6 +92,17 @@
|
||||
<div id="kt_datatable_example_buttons" class="d-none"></div>
|
||||
<!--end::Hide default export buttons-->
|
||||
|
||||
<!--begin::Toolbar-->
|
||||
<div class="d-flex justify-content-end ms-5" data-kt-user-table-toolbar="base">
|
||||
<!--begin::Add user-->
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_user_roles">
|
||||
{!! getIcon('plus', 'fs-2', '', 'i') !!}
|
||||
Add Role
|
||||
</button>
|
||||
<!--end::Add user-->
|
||||
</div>
|
||||
<!--end::Toolbar-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
|
26
Resources/views/users/users/columns/_user.blade.php
Normal file
26
Resources/views/users/users/columns/_user.blade.php
Normal file
@ -0,0 +1,26 @@
|
||||
@php
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
<!--begin:: Avatar -->
|
||||
<div class="symbol symbol-circle symbol-50px overflow-hidden me-3">
|
||||
<a href="{{ route($route[0].'.'.$route[1].'.show', $model) }}">
|
||||
@if($model->profile_photo_url)
|
||||
<div class="symbol-label">
|
||||
<img src="{{ $model->profile_photo_url }}" class="w-100"/>
|
||||
</div>
|
||||
@else
|
||||
<div class="symbol-label fs-3 {{ app(\App\Actions\GetThemeType::class)->handle('bg-light-? text-?', $model->name) }}">
|
||||
{{ substr($model->name, 0, 1) }}
|
||||
</div>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
<!--end::Avatar-->
|
||||
<!--begin::User details-->
|
||||
<div class="d-flex flex-column">
|
||||
<a href="{{ route($route[0].'.'.$route[1].'.show', $model) }}" class="text-gray-800 text-hover-primary mb-1">
|
||||
{{ $model->name }}
|
||||
</a>
|
||||
<span>{{ $model->email }}</span>
|
||||
</div>
|
||||
<!--begin::User details-->
|
@ -2,6 +2,14 @@
|
||||
$route = explode('.', Route::currentRouteName());
|
||||
@endphp
|
||||
|
||||
@section('title')
|
||||
Users
|
||||
@endsection
|
||||
|
||||
@section('breadcrumbs')
|
||||
{{ Breadcrumbs::render('users') }}
|
||||
@endsection
|
||||
|
||||
<x-default-layout>
|
||||
<!--begin::Card-->
|
||||
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
||||
@ -32,7 +40,6 @@
|
||||
</div>
|
||||
|
||||
<div class="card-toolbar">
|
||||
|
||||
<!--begin::Export dropdown-->
|
||||
<button type="button" class="btn btn-light-primary" data-kt-menu-trigger="click"
|
||||
data-kt-menu-placement="bottom-end">
|
||||
@ -84,6 +91,17 @@
|
||||
<div id="kt_datatable_example_buttons" class="d-none"></div>
|
||||
<!--end::Hide default export buttons-->
|
||||
|
||||
<!--begin::Toolbar-->
|
||||
<div class="d-flex justify-content-end ms-5" data-kt-user-table-toolbar="base">
|
||||
<!--begin::Add user-->
|
||||
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#kt_modal_user_users">
|
||||
{!! getIcon('plus', 'fs-2', '', 'i') !!}
|
||||
Add User
|
||||
</button>
|
||||
<!--end::Add user-->
|
||||
</div>
|
||||
<!--end::Toolbar-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pt-6">
|
||||
|
@ -19,15 +19,7 @@
|
||||
Route::get('login', [AuthenticatedSessionController::class, 'create'])
|
||||
->name('login');
|
||||
|
||||
if (isset($_ENV['METHOD_AUTH'])) {
|
||||
if ($_ENV['METHOD_AUTH'] == 'usermanager') {
|
||||
Route::post('login', [AuthenticatedSessionController::class, 'storeUserManager']);
|
||||
}else {
|
||||
Route::post('login', [AuthenticatedSessionController::class, 'store']);
|
||||
}
|
||||
} else {
|
||||
Route::post('login', [AuthenticatedSessionController::class, 'store']);
|
||||
}
|
||||
Route::post('login', [AuthenticatedSessionController::class, 'store']);
|
||||
|
||||
|
||||
Route::get('forgot-password', [PasswordResetLinkController::class, 'create'])
|
||||
|
19
Routes/breadcrumbs.php
Normal file
19
Routes/breadcrumbs.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Diglactic\Breadcrumbs\Breadcrumbs;
|
||||
use Diglactic\Breadcrumbs\Generator as BreadcrumbTrail;
|
||||
|
||||
Breadcrumbs::for('users', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('home');
|
||||
$trail->push('Users', route('user.users.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('user.roles', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('users');
|
||||
$trail->push('Roles', route('user.roles.index'));
|
||||
});
|
||||
|
||||
Breadcrumbs::for('user.permissions', function (BreadcrumbTrail $trail) {
|
||||
$trail->parent('users');
|
||||
$trail->push('Permissions', route('user.permissions.index'));
|
||||
});
|
Loading…
Reference in New Issue
Block a user