feature: set role previledge access
This commit is contained in:
@@ -11,6 +11,7 @@ use App\Traits\GlobalApiResponse;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
class UsersController extends Controller
|
class UsersController extends Controller
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ class AuthenticatedSessionController extends Controller
|
|||||||
|
|
||||||
// Buat token untuk API
|
// Buat token untuk API
|
||||||
$token = $user->createToken(env('APP_KEY'))->plainTextToken;
|
$token = $user->createToken(env('APP_KEY'))->plainTextToken;
|
||||||
|
|
||||||
// Simpan token di session (bisa digunakan di JavaScript)
|
|
||||||
session(['api_token' => $token]);
|
session(['api_token' => $token]);
|
||||||
|
|
||||||
return redirect()->intended(RouteServiceProvider::HOME);
|
return redirect()->intended(RouteServiceProvider::HOME);
|
||||||
|
|||||||
@@ -4,15 +4,36 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use App\Models\BusinessOrIndustry;
|
use App\Models\BusinessOrIndustry;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class BusinessOrIndustriesController extends Controller
|
class BusinessOrIndustriesController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('business-industries.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
return view('business-industries.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,12 +4,33 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use App\Models\Customer;
|
use App\Models\Customer;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class CustomersController extends Controller
|
class CustomersController extends Controller
|
||||||
{
|
{
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('customers.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('customers.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,15 +6,36 @@ use App\Http\Controllers\Controller;
|
|||||||
use App\Models\Advertisement;
|
use App\Models\Advertisement;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class AdvertisementController extends Controller
|
class AdvertisementController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('data.advertisements.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('data.advertisements.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,15 +5,37 @@ namespace App\Http\Controllers\Data;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\SpatialPlanning;
|
use App\Models\SpatialPlanning;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class SpatialPlanningController extends Controller
|
class SpatialPlanningController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('data.spatialPlannings.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('data.spatialPlannings.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,15 +6,35 @@ use App\Http\Controllers\Controller;
|
|||||||
use App\Models\Tourism;
|
use App\Models\Tourism;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class TourismController extends Controller
|
class TourismController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource
|
* Display a listing of the resource
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('data.tourisms.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
return view('data.tourisms.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,15 +6,35 @@ use App\Http\Controllers\Controller;
|
|||||||
use App\Models\Umkm;
|
use App\Models\Umkm;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class UmkmController extends Controller
|
class UmkmController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('data.umkm.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
return view('data.umkm.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -8,15 +8,36 @@ use Exception;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Request;
|
use Illuminate\Support\Facades\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Http\Request as IndexRequest;
|
||||||
|
|
||||||
class DataSettingController extends Controller
|
class DataSettingController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(IndexRequest $request)
|
||||||
{
|
{
|
||||||
return view("data-settings.index");
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
return view("data-settings.index", compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use Illuminate\Support\Facades\Hash;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Traits\GlobalApiResponse;
|
use App\Traits\GlobalApiResponse;
|
||||||
use Illuminate\Auth\Events\Registered;
|
use Illuminate\Auth\Events\Registered;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class UsersController extends Controller
|
class UsersController extends Controller
|
||||||
{
|
{
|
||||||
@@ -21,9 +22,29 @@ class UsersController extends Controller
|
|||||||
$users = User::all();
|
$users = User::all();
|
||||||
return $this->resSuccess($users);
|
return $this->resSuccess($users);
|
||||||
}
|
}
|
||||||
public function index(){
|
public function index(Request $request){
|
||||||
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
$users = User::paginate();
|
$users = User::paginate();
|
||||||
return view('master.users.index', compact('users'));
|
return view('master.users.index', compact('users', 'creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
public function create(){
|
public function create(){
|
||||||
$roles = Role::all();
|
$roles = Role::all();
|
||||||
|
|||||||
@@ -6,15 +6,36 @@ use App\Http\Requests\MenuRequest;
|
|||||||
use App\Models\Menu;
|
use App\Models\Menu;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class MenusController extends Controller
|
class MenusController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('menus.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('menus.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,15 +5,37 @@ namespace App\Http\Controllers\RequestAssignment;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\PbgTask;
|
use App\Models\PbgTask;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class PbgTaskController extends Controller
|
class PbgTaskController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view('pbg_task.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('pbg_task.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,15 +10,36 @@ use Illuminate\Http\Request;
|
|||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
class RolesController extends Controller
|
class RolesController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
return view("roles.index");
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view("roles.index", compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,7 +13,27 @@ class SyncronizeController extends Controller
|
|||||||
$this->service_simbg = $service_simbg;
|
$this->service_simbg = $service_simbg;
|
||||||
}
|
}
|
||||||
public function index(Request $request){
|
public function index(Request $request){
|
||||||
return view('settings.syncronize.index');
|
$menuId = $request->query('menu_id');
|
||||||
|
$user = Auth::user();
|
||||||
|
$userId = $user->id;
|
||||||
|
|
||||||
|
// Ambil role_id yang dimiliki user
|
||||||
|
$roleIds = DB::table('user_role')
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->pluck('role_id');
|
||||||
|
|
||||||
|
// Ambil data akses berdasarkan role_id dan menu_id
|
||||||
|
$roleAccess = DB::table('role_menu')
|
||||||
|
->whereIn('role_id', $roleIds)
|
||||||
|
->where('menu_id', $menuId)
|
||||||
|
->first();
|
||||||
|
|
||||||
|
// Pastikan roleAccess tidak null sebelum mengakses properti
|
||||||
|
$creator = $roleAccess->allow_create ?? 0;
|
||||||
|
$updater = $roleAccess->allow_update ?? 0;
|
||||||
|
$destroyer = $roleAccess->allow_destroy ?? 0;
|
||||||
|
|
||||||
|
return view('settings.syncronize.index', compact('creator', 'updater', 'destroyer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function syncPbgTask(){
|
public function syncPbgTask(){
|
||||||
|
|||||||
@@ -31,6 +31,11 @@ class BusinessIndustries {
|
|||||||
let tableContainer = document.getElementById(
|
let tableContainer = document.getElementById(
|
||||||
"table-business-industries"
|
"table-business-industries"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
let canDelete = tableContainer.getAttribute("data-destroyer") === "1";
|
||||||
|
|
||||||
// Create a new Grid.js instance only if it doesn't exist
|
// Create a new Grid.js instance only if it doesn't exist
|
||||||
this.table = new Grid({
|
this.table = new Grid({
|
||||||
columns: [
|
columns: [
|
||||||
@@ -50,17 +55,30 @@ class BusinessIndustries {
|
|||||||
{ name: "Created", width: "180px" },
|
{ name: "Created", width: "180px" },
|
||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: (cell) =>
|
formatter: (cell) => {
|
||||||
gridjs.html(`
|
|
||||||
<div class="d-flex justify-content-center gap-2">
|
let buttons = `<div class="d-flex justify-content-center gap-2">`;
|
||||||
|
|
||||||
|
if (canUpdate) {
|
||||||
|
buttons += `
|
||||||
<a href="/data/business-industries/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/data/business-industries/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-business-industry d-inline-flex align-items-center justify-content-center">
|
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-business-industry d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bxs-trash'></i>
|
<i class='bx bxs-trash'></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
`;
|
||||||
`),
|
}
|
||||||
|
|
||||||
|
buttons += `</div>`;
|
||||||
|
|
||||||
|
return gridjs.html(buttons);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ class Customers {
|
|||||||
initTableCustomers() {
|
initTableCustomers() {
|
||||||
let tableContainer = document.getElementById("table-customers");
|
let tableContainer = document.getElementById("table-customers");
|
||||||
// Create a new Grid.js instance only if it doesn't exist
|
// Create a new Grid.js instance only if it doesn't exist
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
let canDelete = tableContainer.getAttribute("data-destroyer") === "1";
|
||||||
this.table = new Grid({
|
this.table = new Grid({
|
||||||
columns: [
|
columns: [
|
||||||
"ID",
|
"ID",
|
||||||
@@ -39,17 +43,31 @@ class Customers {
|
|||||||
"Longitude",
|
"Longitude",
|
||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: (cell) =>
|
formatter: (cell) => {
|
||||||
gridjs.html(`
|
let buttons = "";
|
||||||
<div class="d-flex justify-content-center gap-2">
|
|
||||||
|
if (canUpdate) {
|
||||||
|
buttons += `
|
||||||
<a href="/data/customers/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/data/customers/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-customers d-inline-flex align-items-center justify-content-center">
|
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-customers d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bxs-trash'></i>
|
<i class='bx bxs-trash'></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
`;
|
||||||
`),
|
}
|
||||||
|
|
||||||
|
if (!canUpdate && !canDelete) {
|
||||||
|
buttons = `<span class="text-muted">No Privilege</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return gridjs.html(`<div class="d-flex justify-content-center gap-2">${buttons}</div>`);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ class DataSettings {
|
|||||||
|
|
||||||
initTableDataSettings() {
|
initTableDataSettings() {
|
||||||
let tableContainer = document.getElementById("table-data-settings");
|
let tableContainer = document.getElementById("table-data-settings");
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
let canDelete = tableContainer.getAttribute("data-destroyer") === "1"
|
||||||
// Create a new Grid.js instance only if it doesn't exist
|
// Create a new Grid.js instance only if it doesn't exist
|
||||||
this.table = new Grid({
|
this.table = new Grid({
|
||||||
columns: [
|
columns: [
|
||||||
@@ -40,16 +44,29 @@ class DataSettings {
|
|||||||
name: "Actions",
|
name: "Actions",
|
||||||
width: "120px",
|
width: "120px",
|
||||||
formatter: function (cell) {
|
formatter: function (cell) {
|
||||||
return gridjs.html(`
|
let buttons = "";
|
||||||
<div class="d-flex justify-content-center gap-2">
|
|
||||||
|
if (canUpdate) {
|
||||||
|
buttons += `
|
||||||
<a href="/data-settings/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/data-settings/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
<button class="btn btn-sm btn-red d-inline-flex align-items-center justify-content-center btn-delete-data-settings" data-id="${cell}">
|
<button class="btn btn-sm btn-red d-inline-flex align-items-center justify-content-center btn-delete-data-settings" data-id="${cell}">
|
||||||
<i class='bx bxs-trash'></i>
|
<i class='bx bxs-trash'></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
`;
|
||||||
`);
|
}
|
||||||
|
|
||||||
|
if (!canUpdate && !canDelete) {
|
||||||
|
buttons = `<span class="text-muted">No Privilege</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return gridjs.html(`<div class="d-flex justify-content-center gap-2">${buttons}</div>`);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import "gridjs/dist/gridjs.umd.js";
|
|||||||
import GlobalConfig from "../../global-config.js";
|
import GlobalConfig from "../../global-config.js";
|
||||||
import GeneralTable from "../../table-generator.js";
|
import GeneralTable from "../../table-generator.js";
|
||||||
|
|
||||||
|
// Ambil hak akses dari data-attribute
|
||||||
|
const tableElement = document.getElementById("reklame-data-table");
|
||||||
|
const canUpdate = tableElement.getAttribute("data-updater") === "1";
|
||||||
|
const canDelete = tableElement.getAttribute("data-destroyer") === "1";
|
||||||
|
|
||||||
const dataAdvertisementsColumns = [
|
const dataAdvertisementsColumns = [
|
||||||
"No",
|
"No",
|
||||||
"Nama Wajib Pajak",
|
"Nama Wajib Pajak",
|
||||||
@@ -17,21 +22,39 @@ const dataAdvertisementsColumns = [
|
|||||||
"Kontak",
|
"Kontak",
|
||||||
{
|
{
|
||||||
name: "Actions",
|
name: "Actions",
|
||||||
widht: "120px",
|
width: "120px",
|
||||||
formatter: function(cell, row) {
|
formatter: function(cell, row) {
|
||||||
const id = row.cells[10].data;
|
const id = row.cells[10].data;
|
||||||
const model = "data/advertisements";
|
const model = "data/advertisements";
|
||||||
return gridjs.html(`
|
|
||||||
<div class="d-flex justify-items-end gap-10">
|
let actionButtons = '<div class="d-flex justify-items-end gap-10">';
|
||||||
|
let hasPrivilege = false;
|
||||||
|
|
||||||
|
// Tampilkan tombol Edit jika user punya akses update
|
||||||
|
if (canUpdate) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-warning me-2 btn-edit"
|
<button class="btn btn-warning me-2 btn-edit"
|
||||||
data-id="${id}"
|
data-id="${id}"
|
||||||
data-model="${model}">
|
data-model="${model}">
|
||||||
<i class='bx bx-edit' ></i></button>
|
<i class='bx bx-edit'></i>
|
||||||
|
</button>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tampilkan tombol Delete jika user punya akses delete
|
||||||
|
if (canDelete) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-red btn-delete"
|
<button class="btn btn-red btn-delete"
|
||||||
data-id="${id}">
|
data-id="${id}">
|
||||||
<i class='bx bxs-trash' ></i></button>
|
<i class='bx bxs-trash'></i>
|
||||||
</div>
|
</button>`;
|
||||||
`);
|
}
|
||||||
|
|
||||||
|
actionButtons += '</div>';
|
||||||
|
|
||||||
|
// Jika tidak memiliki akses, tampilkan teks "No Privilege"
|
||||||
|
return gridjs.html(hasPrivilege ? actionButtons : '<span class="text-muted">No Privilege</span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ import "gridjs/dist/gridjs.umd.js";
|
|||||||
import GlobalConfig from "../../global-config.js";
|
import GlobalConfig from "../../global-config.js";
|
||||||
import GeneralTable from "../../table-generator.js";
|
import GeneralTable from "../../table-generator.js";
|
||||||
|
|
||||||
|
// Ambil hak akses dari data-attribute
|
||||||
|
const tableElement = document.getElementById("spatial-planning-data-table");
|
||||||
|
const canUpdate = tableElement.getAttribute("data-updater") === "1";
|
||||||
|
const canDelete = tableElement.getAttribute("data-destroyer") === "1";
|
||||||
|
|
||||||
const dataSpatialPlanningColumns = [
|
const dataSpatialPlanningColumns = [
|
||||||
"No",
|
"No",
|
||||||
"Nama",
|
"Nama",
|
||||||
@@ -19,18 +24,35 @@ const dataSpatialPlanningColumns = [
|
|||||||
formatter: function (cell, row) {
|
formatter: function (cell, row) {
|
||||||
const id = row.cells[8].data;
|
const id = row.cells[8].data;
|
||||||
const model = "data/spatial-plannings";
|
const model = "data/spatial-plannings";
|
||||||
return gridjs.html(`
|
|
||||||
<div class="d-flex justify-items-end gap-10">
|
let actionButtons = '<div class="d-flex justify-items-end gap-10">';
|
||||||
|
let hasPrivilege = false;
|
||||||
|
|
||||||
|
// Tampilkan tombol Edit jika user punya akses update
|
||||||
|
if (canUpdate) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-warning me-2 btn-edit"
|
<button class="btn btn-warning me-2 btn-edit"
|
||||||
data-id="${id}"
|
data-id="${id}"
|
||||||
data-model="${model}">
|
data-model="${model}">
|
||||||
<i class='bx bx-edit'></i></button>
|
<i class='bx bx-edit'></i>
|
||||||
|
</button>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tampilkan tombol Delete jika user punya akses delete
|
||||||
|
if (canDelete) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-red btn-delete"
|
<button class="btn btn-red btn-delete"
|
||||||
data-id="${id}">
|
data-id="${id}">
|
||||||
<i class='bx bxs-trash'></i></button>
|
<i class='bx bxs-trash'></i>
|
||||||
</div>
|
</button>`;
|
||||||
`);
|
}
|
||||||
|
|
||||||
|
actionButtons += '</div>';
|
||||||
|
|
||||||
|
// Jika tidak memiliki akses, tampilkan teks "No Privilege"
|
||||||
|
return gridjs.html(hasPrivilege ? actionButtons : '<span class="text-muted">No Privilege</span>');
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,6 +6,12 @@ import GeneralTable from "../../table-generator.js";
|
|||||||
import L from "leaflet";
|
import L from "leaflet";
|
||||||
import "leaflet/dist/leaflet.css";
|
import "leaflet/dist/leaflet.css";
|
||||||
|
|
||||||
|
// Ambil hak akses dari data-attribute
|
||||||
|
const tableElement = document.getElementById("tourisms-data-table");
|
||||||
|
const canView = "1";
|
||||||
|
const canUpdate = tableElement.getAttribute("data-updater") === "1";
|
||||||
|
const canDelete = tableElement.getAttribute("data-destroyer") === "1";
|
||||||
|
|
||||||
const dataTourismsColumns = [
|
const dataTourismsColumns = [
|
||||||
"No",
|
"No",
|
||||||
"Nama Perusahaan",
|
"Nama Perusahaan",
|
||||||
@@ -27,23 +33,45 @@ const dataTourismsColumns = [
|
|||||||
const long = row.cells[9].data;
|
const long = row.cells[9].data;
|
||||||
const lat = row.cells[10].data;
|
const lat = row.cells[10].data;
|
||||||
const model = "data/tourisms";
|
const model = "data/tourisms";
|
||||||
return gridjs.html(`
|
|
||||||
<div class="d-flex justify-items-end gap-10">
|
let actionButtons = '<div class="d-flex justify-items-end gap-10">';
|
||||||
|
let hasPrivilege = false;
|
||||||
|
|
||||||
|
// Tampilkan tombol View jika user punya akses view
|
||||||
|
if (canView) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
|
<button class="btn btn-info me-2 btn-view"
|
||||||
|
data-long="${long}" data-lat="${lat}" data-district="${district}">
|
||||||
|
<i class='bx bx-map'></i>
|
||||||
|
</button>`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tampilkan tombol Edit jika user punya akses update
|
||||||
|
if (canUpdate) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-warning me-2 btn-edit"
|
<button class="btn btn-warning me-2 btn-edit"
|
||||||
data-id="${id}"
|
data-id="${id}"
|
||||||
data-model="${model}">
|
data-model="${model}">
|
||||||
<i class='bx bx-edit'></i></button>
|
<i class='bx bx-edit'></i>
|
||||||
|
</button>`;
|
||||||
<button class="btn btn-info me-2 btn-view"
|
}
|
||||||
data-long="${long}" data-lat="${lat}" data-district="${district}">
|
|
||||||
<i class='bx bx-map'></i></button>
|
|
||||||
|
|
||||||
|
// Tampilkan tombol Delete jika user punya akses delete
|
||||||
|
if (canDelete) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-red btn-delete"
|
<button class="btn btn-red btn-delete"
|
||||||
data-id="${id}">
|
data-id="${id}">
|
||||||
<i class='bx bxs-trash'></i></button>
|
<i class='bx bxs-trash'></i>
|
||||||
</div>
|
</button>`
|
||||||
`);
|
}
|
||||||
},
|
|
||||||
|
actionButtons += '</div>';
|
||||||
|
// Jika tidak memiliki akses, tampilkan teks "No Privilege"
|
||||||
|
return gridjs.html(hasPrivilege ? actionButtons : '<span class="text-muted">No Privilege</span>');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ import "gridjs/dist/gridjs.umd.js";
|
|||||||
import GlobalConfig from "../../global-config.js";
|
import GlobalConfig from "../../global-config.js";
|
||||||
import GeneralTable from "../../table-generator.js";
|
import GeneralTable from "../../table-generator.js";
|
||||||
|
|
||||||
|
// Ambil hak akses dari data-attribute
|
||||||
|
const tableElement = document.getElementById("umkm-data-table");
|
||||||
|
const canUpdate = tableElement.getAttribute("data-updater") === "1";
|
||||||
|
const canDelete = tableElement.getAttribute("data-destroyer") === "1";
|
||||||
|
|
||||||
const dataUMKMColumns = [
|
const dataUMKMColumns = [
|
||||||
"No",
|
"No",
|
||||||
"Nama Usaha",
|
"Nama Usaha",
|
||||||
@@ -29,17 +34,35 @@ const dataUMKMColumns = [
|
|||||||
formatter: function(cell, row) {
|
formatter: function(cell, row) {
|
||||||
const id = row.cells[19].data;
|
const id = row.cells[19].data;
|
||||||
const model = "data/umkm";
|
const model = "data/umkm";
|
||||||
return gridjs.html(`
|
|
||||||
<div class="d-flex justify-items-end gap-10">
|
let actionButtons = '<div class="d-flex justify-items-end gap-10">';
|
||||||
|
let hasPrivilege = false;
|
||||||
|
|
||||||
|
// Tampilkan tombol Edit jika user punya akses update
|
||||||
|
if (canUpdate) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-warning me-2 btn-edit"
|
<button class="btn btn-warning me-2 btn-edit"
|
||||||
data-id="${id}"
|
data-id="${id}"
|
||||||
data-model="${model}">
|
data-model="${model}">
|
||||||
<i class='bx bx-edit' ></i></button>
|
<i class='bx bx-edit'></i>
|
||||||
|
</button>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tampilkan tombol Delete jika user punya akses delete
|
||||||
|
if (canDelete) {
|
||||||
|
hasPrivilege = true;
|
||||||
|
actionButtons += `
|
||||||
<button class="btn btn-red btn-delete"
|
<button class="btn btn-red btn-delete"
|
||||||
data-id="${id}">
|
data-id="${id}">
|
||||||
<i class='bx bxs-trash' ></i></button>
|
<i class='bx bxs-trash'></i>
|
||||||
</div>
|
</button>`;
|
||||||
`);
|
}
|
||||||
|
|
||||||
|
actionButtons += '</div>';
|
||||||
|
|
||||||
|
// Jika tidak memiliki akses, tampilkan teks "No Privilege"
|
||||||
|
return gridjs.html(hasPrivilege ? actionButtons : '<span class="text-muted">No Privilege</span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ class UsersTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initTableUsers() {
|
initTableUsers() {
|
||||||
|
let tableContainer = document.getElementById(
|
||||||
|
"table-users"
|
||||||
|
);
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
new Grid({
|
new Grid({
|
||||||
columns: [
|
columns: [
|
||||||
"ID",
|
"ID",
|
||||||
@@ -20,14 +26,18 @@ class UsersTable {
|
|||||||
"Roles",
|
"Roles",
|
||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: (cell) =>
|
formatter: (cell) =>{
|
||||||
gridjs.html(`
|
if (!canUpdate) {
|
||||||
|
return gridjs.html(`<span class="text-muted">No Privilege</span>`);
|
||||||
|
}
|
||||||
|
return gridjs.html(`
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<a href="/master/users/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/master/users/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
`),
|
`);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ class Menus {
|
|||||||
initTableMenus() {
|
initTableMenus() {
|
||||||
let tableContainer = document.getElementById("table-menus");
|
let tableContainer = document.getElementById("table-menus");
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
let canDelete = tableContainer.getAttribute("data-destroyer") === "1";
|
||||||
if (this.table) {
|
if (this.table) {
|
||||||
// If table exists, update its data instead of recreating
|
// If table exists, update its data instead of recreating
|
||||||
this.table
|
this.table
|
||||||
@@ -68,18 +71,33 @@ class Menus {
|
|||||||
"Sort Order",
|
"Sort Order",
|
||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: (cell) =>
|
formatter: (cell) => {
|
||||||
gridjs.html(`
|
let buttons = `<div class="d-flex justify-content-center align-items-center gap-2">`;
|
||||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
|
||||||
|
if (canUpdate) {
|
||||||
|
buttons += `
|
||||||
<a href="/menus/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/menus/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
<button data-id="${cell}"
|
`;
|
||||||
class="btn btn-red btn-sm btn-delete-menu d-inline-flex align-items-center justify-content-center">
|
}
|
||||||
|
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
|
<button data-id="${cell}" class="btn btn-red btn-sm btn-delete-menu d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bxs-trash'></i>
|
<i class='bx bxs-trash'></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
`;
|
||||||
`),
|
}
|
||||||
|
|
||||||
|
if (!canUpdate && !canDelete) {
|
||||||
|
buttons += `<span class="text-muted">No Privilege</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttons += `</div>`;
|
||||||
|
|
||||||
|
return gridjs.html(buttons);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ class PbgTasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initTableRequestAssignment() {
|
initTableRequestAssignment() {
|
||||||
|
let tableContainer = document.getElementById("table-pbg-tasks");
|
||||||
|
|
||||||
|
// Pastikan kontainer kosong sebelum merender ulang Grid.js
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
new Grid({
|
new Grid({
|
||||||
columns: [
|
columns: [
|
||||||
"ID",
|
"ID",
|
||||||
@@ -24,13 +29,24 @@ class PbgTasks {
|
|||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: function (cell) {
|
formatter: function (cell) {
|
||||||
|
let tableContainer = document.getElementById("table-pbg-tasks");
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
|
||||||
|
if (!canUpdate) {
|
||||||
|
return gridjs.html(`
|
||||||
|
<span class="text-muted">No Privilege</span>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
return gridjs.html(`
|
return gridjs.html(`
|
||||||
<div class="d-flex justify-content-center align-items-center gap-2">
|
<div class="d-flex justify-content-center align-items-center gap-2">
|
||||||
<a href="/pbg-task/${cell}" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">Detail</a
|
<a href="/pbg-task/${cell}" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
|
Detail
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
`);
|
`);
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
search: {
|
search: {
|
||||||
server: {
|
server: {
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ class Roles {
|
|||||||
|
|
||||||
initTableRoles() {
|
initTableRoles() {
|
||||||
let tableContainer = document.getElementById("table-roles");
|
let tableContainer = document.getElementById("table-roles");
|
||||||
|
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
let canUpdate = tableContainer.getAttribute("data-updater") === "1";
|
||||||
|
let canDelete = tableContainer.getAttribute("data-destroyer") === "1";
|
||||||
// Create a new Grid.js instance only if it doesn't exist
|
// Create a new Grid.js instance only if it doesn't exist
|
||||||
this.table = new gridjs.Grid({
|
this.table = new gridjs.Grid({
|
||||||
columns: [
|
columns: [
|
||||||
@@ -35,20 +39,36 @@ class Roles {
|
|||||||
"Description",
|
"Description",
|
||||||
{
|
{
|
||||||
name: "Action",
|
name: "Action",
|
||||||
formatter: (cell) =>
|
formatter: (cell) => {
|
||||||
gridjs.html(`
|
let buttons = `<div class="d-flex justify-content-center gap-2">`;
|
||||||
<div class="d-flex justify-content-center gap-2">
|
|
||||||
|
if (canUpdate) {
|
||||||
|
buttons += `
|
||||||
<a href="/roles/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/roles/${cell}/edit" class="btn btn-yellow btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bx-edit'></i>
|
<i class='bx bx-edit'></i>
|
||||||
</a>
|
</a>
|
||||||
<a href="/roles/role-menu/${cell}" class="btn btn-primary btn-sm d-inline-flex align-items-center justify-content-center">
|
<a href="/roles/role-menu/${cell}" class="btn btn-primary btn-sm d-inline-flex align-items-center justify-content-center">
|
||||||
Role Menu
|
Role Menu
|
||||||
</a>
|
</a>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canDelete) {
|
||||||
|
buttons += `
|
||||||
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-role d-inline-flex align-items-center justify-content-center">
|
<button data-id="${cell}" class="btn btn-sm btn-red btn-delete-role d-inline-flex align-items-center justify-content-center">
|
||||||
<i class='bx bxs-trash'></i>
|
<i class='bx bxs-trash'></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
`;
|
||||||
`),
|
}
|
||||||
|
|
||||||
|
if (!canUpdate && !canDelete) {
|
||||||
|
buttons += `<span class="text-muted">No Privilege</span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttons += `</div>`;
|
||||||
|
|
||||||
|
return gridjs.html(buttons);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pagination: {
|
pagination: {
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ class GeneralTable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
const tableContainer = document.getElementById(this.tableId);
|
||||||
|
|
||||||
|
// Kosongkan container sebelum render ulang
|
||||||
|
tableContainer.innerHTML = "";
|
||||||
|
|
||||||
const table = new Grid({
|
const table = new Grid({
|
||||||
columns: this.columns,
|
columns: this.columns,
|
||||||
search: this.options.search || {
|
search: this.options.search || {
|
||||||
@@ -40,7 +45,7 @@ class GeneralTable {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
table.render(document.getElementById(this.tableId));
|
table.render(tableContainer);
|
||||||
this.handleActions();
|
this.handleActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,14 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('business-industries.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Upload</a>
|
<a href="{{ route('business-industries.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Upload</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-business-industries"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-business-industries"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,10 +15,15 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('customers.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto me-3">Create</a>
|
<a href="{{ route('customers.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto me-3">Create</a>
|
||||||
<a href="{{ route('customers.upload')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Upload</a>
|
<a href="{{ route('customers.upload')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Upload</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-customers"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-customers"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -15,9 +15,14 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('data-settings.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
<a href="{{ route('data-settings.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-data-settings"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-data-settings"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-end gap-10 pb-3">
|
<div class="d-flex justify-content-end gap-10 pb-3">
|
||||||
|
@if ($creator)
|
||||||
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/advertisements">
|
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/advertisements">
|
||||||
<i class='bx bxs-file-plus'></i>
|
<i class='bx bxs-file-plus'></i>
|
||||||
Create</button>
|
Create</button>
|
||||||
@@ -23,9 +24,13 @@
|
|||||||
<i class='bx bx-upload' ></i>
|
<i class='bx bx-upload' ></i>
|
||||||
Bulk Create
|
Bulk Create
|
||||||
</button>
|
</button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="reklame-data-table"></div>
|
<div id="reklame-data-table"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-end gap-10 pb-3">
|
<div class="d-flex justify-content-end gap-10 pb-3">
|
||||||
|
@if ($creator)
|
||||||
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/spatial-plannings">
|
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/spatial-plannings">
|
||||||
<i class='bx bxs-file-plus'></i>
|
<i class='bx bxs-file-plus'></i>
|
||||||
Create</button>
|
Create</button>
|
||||||
@@ -21,9 +22,13 @@
|
|||||||
<i class='bx bx-upload' ></i>
|
<i class='bx bx-upload' ></i>
|
||||||
Bulk Create
|
Bulk Create
|
||||||
</button>
|
</button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="spatial-planning-data-table"></div>
|
<div id="spatial-planning-data-table"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-end gap-10 pb-3">
|
<div class="d-flex justify-content-end gap-10 pb-3">
|
||||||
|
@if ($creator)
|
||||||
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/tourisms">
|
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/tourisms">
|
||||||
<i class='bx bxs-file-plus'></i>
|
<i class='bx bxs-file-plus'></i>
|
||||||
Create</button>
|
Create</button>
|
||||||
@@ -21,9 +22,13 @@
|
|||||||
<i class='bx bx-upload' ></i>
|
<i class='bx bx-upload' ></i>
|
||||||
Bulk Create
|
Bulk Create
|
||||||
</button>
|
</button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="tourisms-data-table"></div>
|
<div id="tourisms-data-table"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="d-flex justify-content-end gap-10 pb-3">
|
<div class="d-flex justify-content-end gap-10 pb-3">
|
||||||
|
@if ($creator)
|
||||||
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/umkm">
|
<button class="btn btn-success me-2 width-lg btn-create" data-model="data/umkm">
|
||||||
<i class='bx bxs-file-plus'></i>
|
<i class='bx bxs-file-plus'></i>
|
||||||
Create</button>
|
Create</button>
|
||||||
@@ -21,9 +22,13 @@
|
|||||||
<i class='bx bx-upload' ></i>
|
<i class='bx bx-upload' ></i>
|
||||||
Bulk Create
|
Bulk Create
|
||||||
</button>
|
</button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="umkm-data-table"></div>
|
<div id="umkm-data-table"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,58 +16,49 @@
|
|||||||
<ul class="navbar-nav" id="navbar-nav">
|
<ul class="navbar-nav" id="navbar-nav">
|
||||||
<li class="menu-title">Menu</li>
|
<li class="menu-title">Menu</li>
|
||||||
|
|
||||||
@foreach ($menus as $menu)
|
@php
|
||||||
<li class="nav-item">
|
// Fungsi rekursif untuk menampilkan menu bertingkat dengan indentasi
|
||||||
<!-- parent menu -->
|
function renderMenu($menus, $depth = 0) {
|
||||||
@if ($menu->parent_id == null)
|
foreach ($menus as $menu) {
|
||||||
<a class="nav-link menu-arrow" href="#sidebar-{{$menu->id}}" data-bs-toggle="collapse" role="button"
|
$collapseId = "sidebar-" . $menu->id; // Unique ID untuk Bootstrap Collapse
|
||||||
aria-expanded="true" aria-controls="sidebar-{{$menu->id}}">
|
$hasChildren = $menu->children->count() > 0; // Cek apakah punya anak
|
||||||
|
$marginLeft = $depth * 10; // Set jarak margin berdasarkan level
|
||||||
|
|
||||||
|
echo '<li class="nav-item" style="margin-left: ' . $marginLeft . 'px;">';
|
||||||
|
|
||||||
|
// Menu utama / anak (dengan dropdown jika punya anak)
|
||||||
|
echo '<a class="nav-link ' . ($hasChildren ? 'menu-arrow' : '') . '"
|
||||||
|
href="' . ($hasChildren ? "#$collapseId" : ($menu->url ? (Route::has($menu->url) ? route($menu->url, ['menu_id' => $menu->id]) : $menu->url . '?menu_id=' . $menu->id) : '#')) . '"
|
||||||
|
' . ($hasChildren ? 'data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="' . $collapseId . '"' : '') . '>
|
||||||
<span class="nav-icon">
|
<span class="nav-icon">
|
||||||
<iconify-icon icon="{{$menu->icon}}"></iconify-icon>
|
<iconify-icon icon="' . $menu->icon . '"></iconify-icon>
|
||||||
</span>
|
</span>
|
||||||
<span class="nav-text">{{$menu->name}}</span>
|
<span class="nav-text">' . $menu->name . '</span>
|
||||||
</a>
|
</a>';
|
||||||
@endif
|
// Jika menu punya anak, buat sub-menu
|
||||||
<!-- children menu foreach -->
|
if ($hasChildren) {
|
||||||
@if ($menu->children->count() > 0)
|
echo '<div class="collapse" id="' . $collapseId . '">
|
||||||
<div class="collapse" id="sidebar-{{$menu->id}}">
|
<ul class="nav sub-navbar-nav">';
|
||||||
<ul class="nav sub-navbar-nav">
|
renderMenu($menu->children, $depth + 1); // Rekursi dengan level lebih dalam
|
||||||
@foreach ( $menu->children as $child)
|
echo '</ul></div>';
|
||||||
<li class="sub-nav-item">
|
}
|
||||||
<a class="sub-nav-link" href="{{ $child->url ? (Route::has($child->url) ? route($child->url) : $child->url) : '#' }}">
|
|
||||||
{{ $child->name }}
|
echo '</li>';
|
||||||
</a>
|
}
|
||||||
</li>
|
}
|
||||||
@endforeach
|
@endphp
|
||||||
</ul>
|
|
||||||
</div>
|
@php
|
||||||
@endif
|
// Tampilkan hanya menu dengan parent_id NULL (menu utama)
|
||||||
</li>
|
renderMenu($menus->where('parent_id', null));
|
||||||
@endforeach
|
@endphp
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Efek Bintang -->
|
||||||
<div class="animated-stars">
|
<div class="animated-stars">
|
||||||
|
@for ($i = 0; $i < 20; $i++)
|
||||||
<div class="shooting-star"></div>
|
<div class="shooting-star"></div>
|
||||||
<div class="shooting-star"></div>
|
@endfor
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
<div class="shooting-star"></div>
|
|
||||||
</div>
|
</div>
|
||||||
@@ -13,11 +13,16 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('users.create') }}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">
|
<a href="{{ route('users.create') }}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">
|
||||||
Create
|
Create
|
||||||
</a>
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-users"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-users"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,10 +16,15 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('menus.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
<a href="{{ route('menus.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="table-menus"></div>
|
<div id="table-menus"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,9 +13,14 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end">
|
<div class="d-flex flex-wrap justify-content-end">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('pbg-task.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
<a href="{{ route('pbg-task.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-pbg-tasks"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-pbg-tasks"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,9 +16,14 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
<div class="d-flex flex-wrap justify-content-end align-items-center mb-2">
|
||||||
|
@if ($creator)
|
||||||
<a href="{{ route('roles.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
<a href="{{ route('roles.create')}}" class="btn btn-success btn-sm d-block d-sm-inline w-auto">Create</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div id="table-roles"
|
||||||
|
data-updater="{{ $updater }}"
|
||||||
|
data-destroyer="{{ $destroyer }}">
|
||||||
</div>
|
</div>
|
||||||
<div id="table-roles"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,10 +13,12 @@
|
|||||||
<div class="card w-100">
|
<div class="card w-100">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="d-flex flex-wrap justify-content-end gap-2">
|
<div class="d-flex flex-wrap justify-content-end gap-2">
|
||||||
|
@if ($creator)
|
||||||
<button type="button" class="btn btn-success btn-sm d-block d-sm-inline w-auto" id="btn-sync-submit">
|
<button type="button" class="btn btn-success btn-sm d-block d-sm-inline w-auto" id="btn-sync-submit">
|
||||||
<span id="spinner" class="spinner-border spinner-border-sm me-1 d-none" role="status" aria-hidden="true"></span>
|
<span id="spinner" class="spinner-border spinner-border-sm me-1 d-none" role="status" aria-hidden="true"></span>
|
||||||
Sync SIMBG
|
Sync SIMBG
|
||||||
</button>
|
</button>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div id="table-import-datasources"></div>
|
<div id="table-import-datasources"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user