add dashboard, fix get data scraping, fix table
This commit is contained in:
@@ -64,3 +64,7 @@ AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
SIMBG_HOST="xxxxxx"
|
||||
SIMBG_EMAIL="xxxxxx"
|
||||
SIMBG_PASSWORD="xxxxx"
|
||||
29
app/Helpers/ApiResponse.php
Normal file
29
app/Helpers/ApiResponse.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
class ApiResponse
|
||||
{
|
||||
/**
|
||||
* Create a new class instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public static function successResponse($data, $message = null){
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'message' => $message,
|
||||
'data' => $data
|
||||
]);
|
||||
}
|
||||
|
||||
public static function errorResponse($message, $statusCode = 400){
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'message' => $message,
|
||||
], $statusCode);
|
||||
}
|
||||
}
|
||||
72
app/Http/Controllers/Api/DashboardController.php
Normal file
72
app/Http/Controllers/Api/DashboardController.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PbgTask;
|
||||
use App\Models\PbgTaskRetributions;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function businnessDocument(Request $request){
|
||||
$businessData = DB::table('pbg_task')
|
||||
->leftJoin('pbg_task_retributions', 'pbg_task.uuid', '=', 'pbg_task_retributions.pbg_task_uid')
|
||||
->select(
|
||||
DB::raw('COUNT(DISTINCT pbg_task.id) as task_count'),
|
||||
DB::raw('SUM(pbg_task_retributions.nilai_retribusi_bangunan) as total_retribution')
|
||||
)
|
||||
->where(function ($query) {
|
||||
$query->where("pbg_task.function_type", "NOT LIKE", "sebagai tempat usaha%")
|
||||
->orWhereNull("pbg_task.function_type");
|
||||
})
|
||||
->first();
|
||||
$taskCount = $businessData->task_count;
|
||||
$taskTotal = $businessData->total_retribution;
|
||||
$result = [
|
||||
"count" => $taskCount,
|
||||
"series" => [$taskCount],
|
||||
"total" => $taskTotal
|
||||
];
|
||||
return ApiResponse::successResponse($result, "Successfully count businness doucument");
|
||||
}
|
||||
public function nonBusinnessDocument(Request $request){
|
||||
$businessData = DB::table('pbg_task')
|
||||
->leftJoin('pbg_task_retributions', 'pbg_task.uuid', '=', 'pbg_task_retributions.pbg_task_uid')
|
||||
->select(
|
||||
DB::raw('COUNT(DISTINCT pbg_task.id) as task_count'),
|
||||
DB::raw('SUM(pbg_task_retributions.nilai_retribusi_bangunan) as total_retribution')
|
||||
)
|
||||
->where(function ($query) {
|
||||
$query->where("pbg_task.function_type", "LIKE", "sebagai tempat usaha%");
|
||||
})
|
||||
->first();
|
||||
$taskCount = $businessData->task_count;
|
||||
$taskTotal = $businessData->total_retribution;
|
||||
$result = [
|
||||
"count" => $taskCount,
|
||||
"series" => [$taskCount],
|
||||
"total" => $taskTotal
|
||||
];
|
||||
return ApiResponse::successResponse($result, "Successfully count not businness doucument");
|
||||
}
|
||||
public function allTaskDocuments(){
|
||||
$query = DB::table('pbg_task')
|
||||
->leftJoin('pbg_task_retributions', 'pbg_task.uuid', '=', 'pbg_task_retributions.pbg_task_uid')
|
||||
->select(
|
||||
DB::raw('COUNT(DISTINCT pbg_task.id) as task_count'),
|
||||
DB::raw('SUM(pbg_task_retributions.nilai_retribusi_bangunan) as total_retribution')
|
||||
)
|
||||
->first();
|
||||
$taskCount = $query->task_count;
|
||||
$taskTotal = $query->total_retribution;
|
||||
$result = [
|
||||
"count" => $taskCount,
|
||||
"series" => [$taskCount],
|
||||
"total" => $taskTotal
|
||||
];
|
||||
return ApiResponse::successResponse($result, "Successfully count all tasks documents");
|
||||
}
|
||||
}
|
||||
24
app/Http/Controllers/Api/UsersController.php
Normal file
24
app/Http/Controllers/Api/UsersController.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Auth\LoginRequest;
|
||||
use App\Models\User;
|
||||
use Hash;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UsersController extends Controller
|
||||
{
|
||||
public function login(LoginRequest $request){
|
||||
$user = User::where('email', $request->email)->first();
|
||||
|
||||
if(!$user || !Hash::check($request->password, $user->password)){
|
||||
return response(['message' => 'Invalid credentials'], 401);
|
||||
}
|
||||
|
||||
$token = $user->createToken($_ENV['APP_KEY'])->plainTextToken;
|
||||
|
||||
return response(['user' => $user, 'token' => $token], 200);
|
||||
}
|
||||
}
|
||||
13
app/Http/Controllers/Dashboards/BigDataController.php
Normal file
13
app/Http/Controllers/Dashboards/BigDataController.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Dashboards;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class BigDataController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('dashboards.bigdata');
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ class HomeController extends Controller
|
||||
{
|
||||
public function index(Request $request){
|
||||
if(Auth::check()){
|
||||
return view('index');
|
||||
return view('home.index');
|
||||
}else{
|
||||
return view('auth.signin');
|
||||
}
|
||||
|
||||
70
app/Http/Controllers/Master/UsersController.php
Normal file
70
app/Http/Controllers/Master/UsersController.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Master;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rules;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Events\Registered;
|
||||
|
||||
class UsersController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
$users = User::paginate(20);
|
||||
return view('master.users.index', compact('users'));
|
||||
}
|
||||
public function create(){
|
||||
return view('master.users.create');
|
||||
}
|
||||
public function store(Request $request){
|
||||
$request->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||
'firstname' => ['required', 'string', 'max:255'],
|
||||
'lastname' => ['required', 'string', 'max:255'],
|
||||
'position' => ['required', 'string', 'max:255']
|
||||
]);
|
||||
|
||||
dd($request);
|
||||
|
||||
$user = User::create([
|
||||
'name' => $request->name,
|
||||
'email' => $request->email,
|
||||
'password' => Hash::make($request->password),
|
||||
'firstname' => $request->firstname,
|
||||
'lastname' => $request->lastname,
|
||||
'position' => $request->position
|
||||
]);
|
||||
|
||||
return redirect()->route('master.users')->with('success','Successfully registered');
|
||||
}
|
||||
public function show($id){
|
||||
$user = User::find($id);
|
||||
return view('master.users.show', compact('user'));
|
||||
}
|
||||
public function edit($id){
|
||||
$user = User::find($id);
|
||||
return view('master.users.edit', compact('user'));
|
||||
}
|
||||
public function update(Request $request, $id){
|
||||
$user = User::find($id);
|
||||
$validate = $request->validate([
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'confirmed', Rules\Password::defaults()],
|
||||
'firstname' => ['required', 'string', 'max:255'],
|
||||
'lastname' => ['required', 'string', 'max:255'],
|
||||
'position' => ['required', 'string', 'max:255']
|
||||
]);
|
||||
$user->update($validate);
|
||||
return redirect()->route('master.users')->with('success', 'Successfully');
|
||||
}
|
||||
public function destroy($id){
|
||||
$user = User::find($id);
|
||||
$user->delete();
|
||||
return redirect()->route('master.users')->with('success','Successfully deleted');
|
||||
}
|
||||
}
|
||||
17
app/Http/Controllers/Settings/SettingsController.php
Normal file
17
app/Http/Controllers/Settings/SettingsController.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('settings.general.index');
|
||||
}
|
||||
|
||||
public function create(){
|
||||
return view('settings.general.create');
|
||||
}
|
||||
}
|
||||
39
app/Http/Controllers/Settings/SyncronizeController.php
Normal file
39
app/Http/Controllers/Settings/SyncronizeController.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\ServiceSIMBG;
|
||||
use Illuminate\Http\Request;
|
||||
use Exception;
|
||||
class SyncronizeController extends Controller
|
||||
{
|
||||
public function index(Request $request){
|
||||
return view('settings.syncronize.index');
|
||||
}
|
||||
|
||||
public function syncPbgTask(){
|
||||
$res = (new ServiceSIMBG())->syncTaskList();
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function syncronizeTask(Request $request){
|
||||
$res = (new ServiceSIMBG())->syncTaskList();
|
||||
return redirect()->back()->with('success', 'Processing completed successfully');
|
||||
}
|
||||
|
||||
public function getUserToken(){
|
||||
$res = (new ServiceSIMBG())->getToken();
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function syncIndexIntegration($uuid){
|
||||
$res = (new ServiceSIMBG())->syncIndexIntegration($uuid);
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function syncTaskDetailSubmit($uuid){
|
||||
$res = (new ServiceSIMBG())->syncTaskDetailSubmit($uuid);
|
||||
return $res;
|
||||
}
|
||||
}
|
||||
36
app/Models/PbgTask.php
Normal file
36
app/Models/PbgTask.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PbgTask extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'pbg_task';
|
||||
protected $fillable = [
|
||||
'uuid',
|
||||
'name',
|
||||
'owner_name',
|
||||
'application_type',
|
||||
'application_type_name',
|
||||
'condition',
|
||||
'registration_number',
|
||||
'document_number',
|
||||
'address',
|
||||
'status',
|
||||
'status_name',
|
||||
'slf_status',
|
||||
'slf_status_name',
|
||||
'function_type',
|
||||
'consultation_type',
|
||||
'due_date',
|
||||
'land_certificate_phase',
|
||||
'task_created_at'
|
||||
];
|
||||
|
||||
public function retributions(){
|
||||
return $this->hasOne(PbgTaskRetributions::class, 'pbg_task_uid', 'uuid');
|
||||
}
|
||||
}
|
||||
24
app/Models/PbgTaskIndexIntegrations.php
Normal file
24
app/Models/PbgTaskIndexIntegrations.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PbgTaskIndexIntegrations extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "pbg_task_index_integrations";
|
||||
|
||||
protected $fillable = [
|
||||
'pbg_task_uid',
|
||||
'indeks_fungsi_bangunan',
|
||||
'indeks_parameter_kompleksitas',
|
||||
'indeks_parameter_permanensi',
|
||||
'indeks_parameter_ketinggian',
|
||||
'faktor_kepemilikan',
|
||||
'indeks_terintegrasi',
|
||||
'total',
|
||||
];
|
||||
}
|
||||
24
app/Models/PbgTaskPrasarana.php
Normal file
24
app/Models/PbgTaskPrasarana.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PbgTaskPrasarana extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = "pbg_task_prasarana";
|
||||
|
||||
protected $fillable = [
|
||||
'pbg_task_uid',
|
||||
'prasarana_id',
|
||||
'prasarana_type',
|
||||
'building_type',
|
||||
'total',
|
||||
'quantity',
|
||||
'unit',
|
||||
'index_prasarana',
|
||||
];
|
||||
}
|
||||
38
app/Models/PbgTaskRetributions.php
Normal file
38
app/Models/PbgTaskRetributions.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PbgTaskRetributions extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = "pbg_task_retributions";
|
||||
|
||||
protected $fillable = [
|
||||
'detail_id',
|
||||
'detail_created_at',
|
||||
'detail_updated_at',
|
||||
'detail_uid',
|
||||
'luas_bangunan',
|
||||
'indeks_lokalitas',
|
||||
'wilayah_shst',
|
||||
'kegiatan_id',
|
||||
'kegiatan_name',
|
||||
'nilai_shst',
|
||||
'indeks_terintegrasi',
|
||||
'indeks_bg_terbangun',
|
||||
'nilai_retribusi_bangunan',
|
||||
'nilai_prasarana',
|
||||
'created_by',
|
||||
'pbg_document',
|
||||
'underpayment',
|
||||
'skrd_amount',
|
||||
'pbg_task_uid'
|
||||
];
|
||||
|
||||
public function task(){
|
||||
return $this->belongsTo(PbgTask::class, 'pbg_task_uid', 'uuid');
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,12 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||
use HasFactory, Notifiable;
|
||||
use HasFactory, Notifiable, HasApiTokens;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
@@ -21,6 +22,9 @@ class User extends Authenticatable
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
'firstname',
|
||||
'lastname',
|
||||
'position'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
73
app/ServiceClient.php
Normal file
73
app/ServiceClient.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
use App\Helpers\ApiResponse;
|
||||
use GuzzleHttp\Client;
|
||||
use Exception;
|
||||
class ServiceClient
|
||||
{
|
||||
private $client;
|
||||
private $baseUrl;
|
||||
private $headers;
|
||||
/**
|
||||
* Create a new class instance.
|
||||
*/
|
||||
public function __construct($baseUrl = '', $headers = [])
|
||||
{
|
||||
$this->client = new Client();
|
||||
$this->baseUrl = $baseUrl;
|
||||
$this->headers = array_merge(
|
||||
[
|
||||
'Accept' => 'application/json',
|
||||
'Content-Type' => 'application/json'
|
||||
],
|
||||
$headers
|
||||
);
|
||||
}
|
||||
|
||||
public function makeRequest($url, $method = 'GET', $body = null, $headers = []){
|
||||
try {
|
||||
|
||||
$headers = array_merge($this->headers, $headers);
|
||||
|
||||
$options = [
|
||||
'headers' => $headers,
|
||||
];
|
||||
|
||||
if ($body) {
|
||||
$options['json'] = $body; // Guzzle akan mengonversi array ke JSON
|
||||
}
|
||||
|
||||
$response = $this->client->request($method, $this->baseUrl . $url, $options);
|
||||
|
||||
$resultResponse = json_decode($response->getBody(), true);
|
||||
return ApiResponse::successResponse($resultResponse, "Successfully fetched data");
|
||||
} catch (Exception $e) {
|
||||
return ApiResponse::errorResponse($e->getMessage(), $e->getCode());
|
||||
}
|
||||
}
|
||||
|
||||
// Fungsi untuk melakukan permintaan GET
|
||||
public function get($url, $headers = [])
|
||||
{
|
||||
return $this->makeRequest($url, 'GET', null, $headers);
|
||||
}
|
||||
|
||||
// Fungsi untuk melakukan permintaan POST
|
||||
public function post($url, $body, $headers = [])
|
||||
{
|
||||
return $this->makeRequest($url, 'POST', $body, $headers);
|
||||
}
|
||||
|
||||
// Fungsi untuk melakukan permintaan PUT
|
||||
public function put($url, $body, $headers = [])
|
||||
{
|
||||
return $this->makeRequest($url, 'PUT', $body, $headers);
|
||||
}
|
||||
|
||||
// Fungsi untuk melakukan permintaan DELETE
|
||||
public function delete($url, $headers = [])
|
||||
{
|
||||
return $this->makeRequest($url, 'DELETE', null, $headers);
|
||||
}
|
||||
}
|
||||
278
app/ServiceSIMBG.php
Normal file
278
app/ServiceSIMBG.php
Normal file
@@ -0,0 +1,278 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use App\Helpers\ApiResponse;
|
||||
use App\Models\PbgTaskIndexIntegrations;
|
||||
use App\Models\PbgTaskPrasarana;
|
||||
use App\Models\PbgTaskRetributions;
|
||||
use Exception;
|
||||
use App\Models\PbgTask;
|
||||
class ServiceSIMBG
|
||||
{
|
||||
private $email;
|
||||
private $password;
|
||||
/**
|
||||
* Create a new class instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->email = $_ENV['SIMBG_EMAIL'];
|
||||
$this->password = $_ENV['SIMBG_PASSWORD'];
|
||||
}
|
||||
|
||||
public function getToken(){
|
||||
$clientHelper = new ServiceClient($_ENV['SIMBG_HOST']);
|
||||
$url = "api/user/v1/auth/login/";
|
||||
$body = [
|
||||
'email' => $this->email,
|
||||
'password' => $this->password,
|
||||
];
|
||||
|
||||
$res = $clientHelper->post($url, $body);
|
||||
if(!$res->original['success']){
|
||||
return null;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function syncIndexIntegration($uuid)
|
||||
{
|
||||
$clientHelper = new ServiceClient($_ENV['SIMBG_HOST']);
|
||||
$url = "api/pbg/v1/detail/" . $uuid . "/retribution/indeks-terintegrasi/";
|
||||
$resToken = $this->getToken();
|
||||
|
||||
if (!isset($resToken) || empty($resToken->original['data']['token']['access'])) {
|
||||
// Log error
|
||||
\Log::error("Token not retrieved for syncIndexIntegration", ['uuid' => $uuid]);
|
||||
return null;
|
||||
}
|
||||
|
||||
$apiToken = $resToken->original['data']['token']['access'];
|
||||
$headers = [
|
||||
'Authorization' => "Bearer " . $apiToken,
|
||||
];
|
||||
|
||||
$res = $clientHelper->get($url, $headers);
|
||||
|
||||
if (empty($res->original['success']) || !$res->original['success']) {
|
||||
// Log error
|
||||
\Log::error("API response indicates failure", ['url' => $url, 'uuid' => $uuid]);
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = $res->original['data']['data'] ?? null;
|
||||
if (!$data) {
|
||||
\Log::error("No valid data returned from API", ['url' => $url, 'uuid' => $uuid]);
|
||||
return null;
|
||||
}
|
||||
|
||||
PbgTaskIndexIntegrations::updateOrCreate(
|
||||
['pbg_task_uid' => $uuid],
|
||||
[
|
||||
'indeks_fungsi_bangunan' => $data['indeks_fungsi_bangunan'] ?? null,
|
||||
'indeks_parameter_kompleksitas' => $data['indeks_parameter_kompleksitas'] ?? null,
|
||||
'indeks_parameter_permanensi' => $data['indeks_parameter_permanensi'] ?? null,
|
||||
'indeks_parameter_ketinggian' => $data['indeks_parameter_ketinggian'] ?? null,
|
||||
'faktor_kepemilikan' => $data['faktor_kepemilikan'] ?? null,
|
||||
'indeks_terintegrasi' => $data['indeks_terintegrasi'] ?? null,
|
||||
'total' => $data['total'] ?? null,
|
||||
]
|
||||
);
|
||||
|
||||
// Log success
|
||||
\Log::info("syncIndexIntegration completed successfully", ['uuid' => $uuid]);
|
||||
}
|
||||
|
||||
|
||||
public function syncTaskList()
|
||||
{
|
||||
$clientHelper = new ServiceClient($_ENV['SIMBG_HOST']);
|
||||
$resToken = $this->getToken();
|
||||
|
||||
if (!isset($resToken) || empty($resToken->original['data']['token']['access'])) {
|
||||
\Log::error("Token not retrieved for syncTaskList");
|
||||
return ApiResponse::errorResponse("Failed to retrieve token", 401);
|
||||
}
|
||||
|
||||
$apiToken = $resToken->original['data']['token']['access'];
|
||||
$queryParams = http_build_query([
|
||||
'page' => 1,
|
||||
'size' => 20,
|
||||
'sort' => 'ASC',
|
||||
'type' => 'task',
|
||||
]);
|
||||
|
||||
$url = "api/pbg/v1/list/?" . $queryParams;
|
||||
$headers = ['Authorization' => "Bearer " . $apiToken];
|
||||
|
||||
$initialResponse = $clientHelper->get($url, $headers);
|
||||
if (empty($initialResponse->original['data']['total_page'])) {
|
||||
\Log::error("Invalid response: no total_page", ['response' => $initialResponse->original]);
|
||||
return ApiResponse::errorResponse("Invalid response from API", 400);
|
||||
}
|
||||
|
||||
$totalPage = $initialResponse->original['data']['total_page'];
|
||||
$savedCount = 0;
|
||||
$failedCount = 0;
|
||||
|
||||
for ($currentPage = 1; $currentPage <= $totalPage; $currentPage++) {
|
||||
$queryParams = http_build_query([
|
||||
'page' => $currentPage,
|
||||
'size' => 20,
|
||||
'sort' => 'ASC',
|
||||
'type' => 'task',
|
||||
]);
|
||||
|
||||
$url = "api/pbg/v1/list/?" . $queryParams;
|
||||
$response = $clientHelper->get($url, $headers);
|
||||
|
||||
if (empty($response->original['data']['data'])) {
|
||||
\Log::warning("No data found on page", ['page' => $currentPage]);
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($response->original['data']['data'] as $item) {
|
||||
try {
|
||||
$taskCreatedAt = isset($item['created_at'])
|
||||
? \Carbon\Carbon::parse($item['created_at'])->format('Y-m-d H:i:s')
|
||||
: null;
|
||||
PbgTask::updateOrCreate(
|
||||
[
|
||||
'uuid' => $item['uid'],
|
||||
],
|
||||
[
|
||||
'name' => $item['name'],
|
||||
'owner_name' => $item['owner_name'],
|
||||
'application_type' => $item['application_type'],
|
||||
'application_type_name' => $item['application_type_name'],
|
||||
'condition' => $item['condition'],
|
||||
'registration_number' => $item['registration_number'],
|
||||
'document_number' => $item['document_number'],
|
||||
'address' => $item['address'],
|
||||
'status' => $item['status'],
|
||||
'status_name' => $item['status_name'],
|
||||
'slf_status' => $item['slf_status'] ?? null,
|
||||
'slf_status_name' => $item['slf_status_name'] ?? null,
|
||||
'function_type' => $item['function_type'],
|
||||
'consultation_type' => $item['consultation_type'],
|
||||
'due_date' => $item['due_date'],
|
||||
'land_certificate_phase' => $item['land_certificate_phase'],
|
||||
'task_created_at' => $taskCreatedAt,
|
||||
]
|
||||
);
|
||||
|
||||
// Synchronize additional details
|
||||
$this->syncIndexIntegration($item['uid']);
|
||||
$this->syncTaskDetailSubmit($item['uid']);
|
||||
$savedCount++;
|
||||
} catch (Exception $e) {
|
||||
\Log::error("Failed to process task", [
|
||||
'error' => $e->getMessage(),
|
||||
'task' => $item,
|
||||
]);
|
||||
$failedCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$result = [
|
||||
"savedCount" => $savedCount,
|
||||
"failedCount" => $failedCount,
|
||||
];
|
||||
|
||||
\Log::info("syncTaskList completed", $result);
|
||||
|
||||
return ApiResponse::successResponse(json_encode($result), "Successfully saved");
|
||||
}
|
||||
|
||||
|
||||
public function syncTaskDetailSubmit($uuid)
|
||||
{
|
||||
$clientHelper = new ServiceClient($_ENV['SIMBG_HOST']);
|
||||
$resToken = $this->getToken();
|
||||
|
||||
if (!isset($resToken) || empty($resToken->original['data']['token']['access'])) {
|
||||
// Log error
|
||||
\Log::error("Token not retrieved for syncTaskDetailSubmit");
|
||||
return null;
|
||||
}
|
||||
|
||||
$apiToken = $resToken->original['data']['token']['access'];
|
||||
$url = "api/pbg/v1/detail/" . $uuid . "/retribution/submit/";
|
||||
$headers = [
|
||||
'Authorization' => "Bearer " . $apiToken,
|
||||
];
|
||||
|
||||
$res = $clientHelper->get($url, $headers);
|
||||
|
||||
if (empty($res->original['success']) || !$res->original['success']) {
|
||||
// Log error
|
||||
\Log::error("API response indicates failure", ['url' => $url, 'uuid' => $uuid]);
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = $res->original['data']['data'] ?? [];
|
||||
if (empty($data)) {
|
||||
\Log::error("No data returned from API", ['url' => $url, 'uuid' => $uuid]);
|
||||
return null;
|
||||
}
|
||||
|
||||
$detailCreatedAt = isset($data['created_at'])
|
||||
? \Carbon\Carbon::parse($data['created_at'])->format('Y-m-d H:i:s')
|
||||
: null;
|
||||
|
||||
$detailUpdatedAt = isset($data['updated_at'])
|
||||
? \Carbon\Carbon::parse($data['updated_at'])->format('Y-m-d H:i:s')
|
||||
: null;
|
||||
|
||||
PbgTaskRetributions::updateOrCreate(
|
||||
['detail_id' => $data['id']],
|
||||
[
|
||||
'detail_uid' => $data['uid'] ?? null,
|
||||
'detail_created_at' => $detailCreatedAt ?? null,
|
||||
'detail_updated_at' => $detailUpdatedAt ?? null,
|
||||
'luas_bangunan' => $data['luas_bangunan'] ?? null,
|
||||
'indeks_lokalitas' => $data['indeks_lokalitas'] ?? null,
|
||||
'wilayah_shst' => $data['wilayah_shst'] ?? null,
|
||||
'kegiatan_id' => $data['kegiatan']['id'] ?? null,
|
||||
'kegiatan_name' => $data['kegiatan']['name'] ?? null,
|
||||
'nilai_shst' => $data['nilai_shst'] ?? null,
|
||||
'indeks_terintegrasi' => $data['indeks_terintegrasi'] ?? null,
|
||||
'indeks_bg_terbangun' => $data['indeks_bg_terbangun'] ?? null,
|
||||
'nilai_retribusi_bangunan' => $data['nilai_retribusi_bangunan'] ?? null,
|
||||
'nilai_prasarana' => $data['nilai_prasarana'] ?? null,
|
||||
'created_by' => $data['created_by'] ?? null,
|
||||
'pbg_document' => $data['pbg_document'] ?? null,
|
||||
'underpayment' => $data['underpayment'] ?? null,
|
||||
'skrd_amount' => $data['skrd_amount'] ?? null,
|
||||
'pbg_task_uid' => $uuid,
|
||||
]
|
||||
);
|
||||
|
||||
$prasaranaData = $data['prasarana'] ?? [];
|
||||
if (is_array($prasaranaData) && count($prasaranaData) > 0) {
|
||||
foreach ($prasaranaData as $item) {
|
||||
PbgTaskPrasarana::updateOrCreate(
|
||||
[
|
||||
'pbg_task_uid' => $uuid,
|
||||
'prasarana_id' => $item['id'] ?? null,
|
||||
],
|
||||
[
|
||||
'pbg_task_uid' => $uuid,
|
||||
'prasarana_type' => $item['prasarana_type'] ?? null,
|
||||
'building_type' => $item['building_type'] ?? null,
|
||||
'total' => $item['total'] ?? null,
|
||||
'quantity' => $item['quantity'] ?? null,
|
||||
'unit' => $item['unit'] ?? null,
|
||||
'index_prasarana' => $item['index_prasarana'] ?? null,
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
\Log::info("syncTaskDetailSubmit completed successfully", ['uuid' => $uuid]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
// $middleware->redirectGuestsTo('/auth/signin');
|
||||
})
|
||||
->withExceptions(function (Exceptions $exceptions) {
|
||||
$exceptions->render(function (HttpException $exception){
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"guzzlehttp/guzzle": "^7.9",
|
||||
"laravel/framework": "^11.31",
|
||||
"laravel/sanctum": "^4.0",
|
||||
"laravel/tinker": "^2.9"
|
||||
|
||||
2
composer.lock
generated
2
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "f60f8b6e279e6de64f92f6b9fb420141",
|
||||
"content-hash": "7bb7c3b4b4eb50972252c4683f797104",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
|
||||
34
config/cors.php
Normal file
34
config/cors.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your settings for cross-origin resource sharing
|
||||
| or "CORS". This determines what cross-origin operations may execute
|
||||
| in web browsers. You are free to adjust these settings as needed.
|
||||
|
|
||||
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||
|
|
||||
*/
|
||||
|
||||
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
||||
|
||||
'allowed_methods' => ['*'],
|
||||
|
||||
'allowed_origins' => ['*'],
|
||||
|
||||
'allowed_origins_patterns' => [],
|
||||
|
||||
'allowed_headers' => ['*'],
|
||||
|
||||
'exposed_headers' => [],
|
||||
|
||||
'max_age' => 0,
|
||||
|
||||
'supports_credentials' => false,
|
||||
|
||||
];
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('firstname');
|
||||
$table->string('lastname');
|
||||
$table->string('position');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('firstname');
|
||||
$table->dropColumn('lastname');
|
||||
$table->dropColumn('position');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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::create('pbg_task', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('owner_name')->nullable();
|
||||
$table->string('application_type')->nullable();
|
||||
$table->string('application_type_name')->nullable();
|
||||
$table->string('condition')->nullable();
|
||||
$table->string('registration_number')->nullable();
|
||||
$table->string('document_number')->nullable();
|
||||
$table->string('address')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->string('status_name')->nullable();
|
||||
$table->string('slf_status')->nullable();
|
||||
$table->string('slf_status_name')->nullable();
|
||||
$table->string('function_type')->nullable();
|
||||
$table->string('consultation_type')->nullable();
|
||||
$table->date('due_date')->nullable();
|
||||
$table->boolean('land_certificate_phase')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pbg_task');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('pbg_task', function (Blueprint $table){
|
||||
$table->timestamp('task_created_at')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('pbg_task', function (Blueprint $table){
|
||||
$table->dropColumn('task_created_at');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,45 @@
|
||||
<?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::create('pbg_task_retributions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('detail_id')->nullable();
|
||||
$table->timestamp('detail_created_at')->nullable();
|
||||
$table->timestamp('detail_updated_at')->nullable();
|
||||
$table->string('detail_uid')->nullable();
|
||||
$table->decimal('luas_bangunan')->nullable();
|
||||
$table->decimal('indeks_lokalitas', 10,4)->nullable();
|
||||
$table->string('wilayah_shst')->nullable();
|
||||
$table->integer('kegiatan_id')->nullable();
|
||||
$table->string('kegiatan_name')->nullable();
|
||||
$table->decimal('nilai_shst')->nullable();
|
||||
$table->decimal('indeks_terintegrasi')->nullable();
|
||||
$table->decimal('indeks_bg_terbangun')->nullable();
|
||||
$table->decimal('nilai_retribusi_bangunan')->nullable();
|
||||
$table->decimal('nilai_prasarana')->nullable();
|
||||
$table->integer('created_by')->nullable();
|
||||
$table->integer('pbg_document')->nullable();
|
||||
$table->integer('underpayment')->nullable();
|
||||
$table->decimal('skrd_amount')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pbg_task_retributions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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::create('pbg_task_prasarana', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('pbg_task_uid')->nullable();
|
||||
$table->integer('prasarana_id')->nullable();
|
||||
$table->string('prasarana_type')->nullable();
|
||||
$table->string('building_type')->nullable();
|
||||
$table->decimal('total')->nullable();
|
||||
$table->decimal('quantity')->nullable();
|
||||
$table->string('unit')->nullable();
|
||||
$table->decimal('index_prasarana')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pbg_task_prasarana');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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::create('pbg_task_index_integrations', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('pbg_task_uid')->nullable();
|
||||
$table->string('indeks_fungsi_bangunan')->nullable();
|
||||
$table->string('indeks_parameter_kompleksitas')->nullable();
|
||||
$table->string('indeks_parameter_permanensi')->nullable();
|
||||
$table->string('indeks_parameter_ketinggian')->nullable();
|
||||
$table->string('faktor_kepemilikan')->nullable();
|
||||
$table->string('indeks_terintegrasi')->nullable();
|
||||
$table->decimal('total')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('pbg_task_index_integrations');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('pbg_task_retributions', function (Blueprint $table) {
|
||||
$table->string('pbg_task_uid')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('pbg_task_retributions', function (Blueprint $table) {
|
||||
$table->dropColumn('pbg_task_uid');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('pbg_task_retributions', function (Blueprint $table) {
|
||||
$table->decimal('nilai_shst', 20,2)->nullable()->change();
|
||||
$table->decimal('nilai_retribusi_bangunan', 20,2)->nullable()->change();
|
||||
$table->decimal('indeks_terintegrasi', 20,15)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('pbg_task_retributions', function (Blueprint $table) {
|
||||
$table->decimal('nilai_shst', 20,2)->nullable()->change();
|
||||
$table->decimal('nilai_retribusi_bangunan',20,2)->nullable()->change();
|
||||
$table->decimal('indeks_terintegrasi',20,15)->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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('pbg_task_prasarana', function (Blueprint $table) {
|
||||
$table->decimal('total', 20,2)->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('pbg_task_prasarana', function (Blueprint $table) {
|
||||
$table->decimal('total',20,2)->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -22,6 +22,9 @@ class DatabaseSeeder extends Seeder
|
||||
'email' => 'user@demo.com',
|
||||
'email_verified_at' => now(),
|
||||
'password' => Hash::make('password'),
|
||||
'firstname' => 'John',
|
||||
'lastname' => 'Doe',
|
||||
'position' => 'crusial',
|
||||
'remember_token' => Str::random(10),
|
||||
]);
|
||||
}
|
||||
|
||||
BIN
public/images/dputr-kab-bandung.png
Normal file
BIN
public/images/dputr-kab-bandung.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
BIN
public/images/dputr.ico
Normal file
BIN
public/images/dputr.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 264 KiB |
BIN
public/images/logo-dputr.png
Normal file
BIN
public/images/logo-dputr.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -26,4 +26,4 @@
|
||||
window.innerWidth <= 1140
|
||||
? e.setAttribute("data-sidebar-size", "hidden")
|
||||
: e.setAttribute("data-sidebar-size", config.menu.size));
|
||||
})();
|
||||
})();
|
||||
868
resources/js/dashboards/bigdata.js
Normal file
868
resources/js/dashboards/bigdata.js
Normal file
@@ -0,0 +1,868 @@
|
||||
import ApexCharts from "apexcharts";
|
||||
|
||||
import jsVectorMap from "jsvectormap/dist/jsvectormap.js";
|
||||
import 'jsvectormap/dist/maps/world-merc.js';
|
||||
import 'jsvectormap/dist/maps/world.js';
|
||||
import GlobalConfig, {addThousandSeparators} from '../global-config.js';
|
||||
|
||||
class BigData {
|
||||
init(){
|
||||
this.initChartKekuranganPotensi();
|
||||
this.initChartTargetPAD();
|
||||
this.initChartUsaha();
|
||||
this.initChartNonUsaha();
|
||||
}
|
||||
|
||||
initChartTargetPAD() {
|
||||
console.log("api host : " + GlobalConfig.apiHost);
|
||||
fetch(`${GlobalConfig.apiHost}/api/all-task-documents`)
|
||||
.then(response => {
|
||||
if(!response.ok){
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const seriesData = data.data.series;
|
||||
document.getElementById("countTargetPAD").innerText = `${data.data.count} Berkas`;
|
||||
document.getElementById("totalTargetPAD").innerText = `Rp.${addThousandSeparators(data.data.total)}`;
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: seriesData
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart12"), options1).render();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("error fetching chart dara : ", error);
|
||||
});
|
||||
}
|
||||
|
||||
initChartUsaha(){
|
||||
fetch(`${GlobalConfig.apiHost}/api/business-documents`)
|
||||
.then(response => {
|
||||
if(!response.ok){
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const seriesData = data.data.series;
|
||||
document.getElementById("countBusinessDocuments").innerText = `${data.data.count} Berkas`;
|
||||
document.getElementById("totalBusinessDocuments").innerText = `Rp.${addThousandSeparators(data.data.total)}`;
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: seriesData
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chartBusinessDocuments"), options1).render();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("error fetching chart dara : ", error);
|
||||
});
|
||||
}
|
||||
|
||||
initChartNonUsaha(){
|
||||
fetch(`${GlobalConfig.apiHost}/api/non-business-documents`)
|
||||
.then(response => {
|
||||
if(!response.ok){
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
const seriesData = data.data.series;
|
||||
document.getElementById("countNonUsaha").innerText = `${data.data.count} Berkas`;
|
||||
document.getElementById("totalNonUsaha").innerText = `Rp.${addThousandSeparators(data.data.total)}`;
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: seriesData
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chartNonUsaha"), options1).render();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("error fetching chart dara : ", error);
|
||||
});
|
||||
}
|
||||
|
||||
initChartKekuranganPotensi(){
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [80, 100, 50, 30, 90]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart01"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [87, 54, 4, 76, 31, 95, 70, 92, 53, 9, 6]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart02"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [41, 42, 35, 42, 6, 12, 13, 22, 42, 94, 95]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart03"), options1).render();
|
||||
|
||||
// var options1 = {
|
||||
// chart: {
|
||||
// type: 'area',
|
||||
// height: 50,
|
||||
// sparkline: {
|
||||
// enabled: true
|
||||
// }
|
||||
// },
|
||||
// series: [{
|
||||
// data: [8, 41, 40, 48, 77, 35, 0, 77, 63, 100, 71]
|
||||
// }],
|
||||
// stroke: {
|
||||
// width: 2,
|
||||
// curve: 'smooth'
|
||||
// },
|
||||
// markers: {
|
||||
// size: 0
|
||||
// },
|
||||
// colors: ["#7e67fe"],
|
||||
// tooltip: {
|
||||
// fixed: {
|
||||
// enabled: false
|
||||
// },
|
||||
// x: {
|
||||
// show: false
|
||||
// },
|
||||
// y: {
|
||||
// title: {
|
||||
// formatter: function (seriesName) {
|
||||
// return ''
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// marker: {
|
||||
// show: false
|
||||
// }
|
||||
// },
|
||||
// fill: {
|
||||
// opacity: [1],
|
||||
// type: ['gradient'],
|
||||
// gradient: {
|
||||
// type: "vertical",
|
||||
// // shadeIntensity: 1,
|
||||
// inverseColors: false,
|
||||
// opacityFrom: 0.5,
|
||||
// opacityTo: 0,
|
||||
// stops: [0, 100]
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
// new ApexCharts(document.querySelector("#chart04"), options1).render();
|
||||
|
||||
// var options1 = {
|
||||
// chart: {
|
||||
// type: 'area',
|
||||
// height: 50,
|
||||
// sparkline: {
|
||||
// enabled: true
|
||||
// }
|
||||
// },
|
||||
// series: [{
|
||||
// data: [80, 100, 50, 30, 90]
|
||||
// }],
|
||||
// stroke: {
|
||||
// width: 2,
|
||||
// curve: 'smooth'
|
||||
// },
|
||||
// markers: {
|
||||
// size: 0
|
||||
// },
|
||||
// colors: ["#7e67fe"],
|
||||
// tooltip: {
|
||||
// fixed: {
|
||||
// enabled: false
|
||||
// },
|
||||
// x: {
|
||||
// show: false
|
||||
// },
|
||||
// y: {
|
||||
// title: {
|
||||
// formatter: function (seriesName) {
|
||||
// return ''
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// marker: {
|
||||
// show: false
|
||||
// }
|
||||
// },
|
||||
// fill: {
|
||||
// opacity: [1],
|
||||
// type: ['gradient'],
|
||||
// gradient: {
|
||||
// type: "vertical",
|
||||
// // shadeIntensity: 1,
|
||||
// inverseColors: false,
|
||||
// opacityFrom: 0.5,
|
||||
// opacityTo: 0,
|
||||
// stops: [0, 100]
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
// new ApexCharts(document.querySelector("#chart05"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [87, 54, 4, 76, 31, 95, 70, 92, 53, 9, 6]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart06"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [41, 42, 35, 42, 6, 12, 13, 22, 42, 94, 95]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart07"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [8, 41, 40, 48, 77, 35, 0, 77, 63, 100, 71]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart08"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [80, 100, 50, 30, 90]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart09"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [87, 54, 4, 76, 31, 95, 70, 92, 53, 9, 6]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart10"), options1).render();
|
||||
|
||||
var options1 = {
|
||||
chart: {
|
||||
type: 'area',
|
||||
height: 50,
|
||||
sparkline: {
|
||||
enabled: true
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
data: [41, 42, 35, 42, 6, 12, 13, 22, 42, 94, 95]
|
||||
}],
|
||||
stroke: {
|
||||
width: 2,
|
||||
curve: 'smooth'
|
||||
},
|
||||
markers: {
|
||||
size: 0
|
||||
},
|
||||
colors: ["#7e67fe"],
|
||||
tooltip: {
|
||||
fixed: {
|
||||
enabled: false
|
||||
},
|
||||
x: {
|
||||
show: false
|
||||
},
|
||||
y: {
|
||||
title: {
|
||||
formatter: function (seriesName) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
marker: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
fill: {
|
||||
opacity: [1],
|
||||
type: ['gradient'],
|
||||
gradient: {
|
||||
type: "vertical",
|
||||
// shadeIntensity: 1,
|
||||
inverseColors: false,
|
||||
opacityFrom: 0.5,
|
||||
opacityTo: 0,
|
||||
stops: [0, 100]
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
new ApexCharts(document.querySelector("#chart11"), options1).render();
|
||||
|
||||
// var options1 = {
|
||||
// chart: {
|
||||
// type: 'area',
|
||||
// height: 50,
|
||||
// sparkline: {
|
||||
// enabled: true
|
||||
// }
|
||||
// },
|
||||
// series: [{
|
||||
// data: [8, 41, 40, 48, 77, 35, 0, 77, 63, 100, 71]
|
||||
// }],
|
||||
// stroke: {
|
||||
// width: 2,
|
||||
// curve: 'smooth'
|
||||
// },
|
||||
// markers: {
|
||||
// size: 0
|
||||
// },
|
||||
// colors: ["#7e67fe"],
|
||||
// tooltip: {
|
||||
// fixed: {
|
||||
// enabled: false
|
||||
// },
|
||||
// x: {
|
||||
// show: false
|
||||
// },
|
||||
// y: {
|
||||
// title: {
|
||||
// formatter: function (seriesName) {
|
||||
// return ''
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// marker: {
|
||||
// show: false
|
||||
// }
|
||||
// },
|
||||
// fill: {
|
||||
// opacity: [1],
|
||||
// type: ['gradient'],
|
||||
// gradient: {
|
||||
// type: "vertical",
|
||||
// // shadeIntensity: 1,
|
||||
// inverseColors: false,
|
||||
// opacityFrom: 0.5,
|
||||
// opacityTo: 0,
|
||||
// stops: [0, 100]
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
|
||||
// new ApexCharts(document.querySelector("#chart12"), options1).render();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
new BigData().init();
|
||||
});
|
||||
12
resources/js/global-config.js
Normal file
12
resources/js/global-config.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const GlobalConfig = {
|
||||
apiHost: 'http://localhost:8000'
|
||||
};
|
||||
|
||||
export default GlobalConfig;
|
||||
|
||||
export function addThousandSeparators(number, fractionDigits = 2) {
|
||||
return new Intl.NumberFormat('en-US', {
|
||||
minimumFractionDigits: fractionDigits,
|
||||
maximumFractionDigits: fractionDigits,
|
||||
}).format(number);
|
||||
}
|
||||
23
resources/js/settings/syncronize/syncronize.js
Normal file
23
resources/js/settings/syncronize/syncronize.js
Normal file
@@ -0,0 +1,23 @@
|
||||
class SyncronizeTask {
|
||||
init(){
|
||||
this.onSyncSubmit();
|
||||
}
|
||||
onSyncSubmit(){
|
||||
const form = document.getElementById("sync-form");
|
||||
if(form){
|
||||
form.addEventListener("submit", function (event) {
|
||||
event.preventDefault(); // Prevent the default form submission
|
||||
|
||||
const button = document.getElementById("btn-sync-submit");
|
||||
if (button) {
|
||||
button.disabled = true;
|
||||
button.innerText = "Processing...";
|
||||
}
|
||||
form.submit();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
new SyncronizeTask().init();
|
||||
});
|
||||
128
resources/js/tables/common-table.js
Normal file
128
resources/js/tables/common-table.js
Normal file
@@ -0,0 +1,128 @@
|
||||
import { Grid } from "gridjs/dist/gridjs.umd.js";
|
||||
import gridjs from 'gridjs/dist/gridjs.umd.js'
|
||||
import 'gridjs/dist/gridjs.umd.js'
|
||||
import GlobalConfig from "../global-config";
|
||||
|
||||
class CommonTable {
|
||||
init() {
|
||||
// this.CommonTableInit();
|
||||
this.CommonTableInitWithFetchApi();
|
||||
}
|
||||
|
||||
CommonTableInit() {
|
||||
new Grid({
|
||||
columns: [
|
||||
{
|
||||
name: 'ID',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html('<span class="fw-semibold">' + cell + '</span>');
|
||||
})
|
||||
},
|
||||
"Name",
|
||||
{
|
||||
name: 'Email',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html('<a href="">' + cell + '</a>');
|
||||
})
|
||||
},
|
||||
"Position", "Company", "Country",
|
||||
{
|
||||
name: 'Actions',
|
||||
width: '120px',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html(`
|
||||
<div class="d-flex justify-items-end gap-10">
|
||||
<a href="#" class="text-primary text-decoration-underline me-2">Details</a>
|
||||
<a href="#" class="text-warning text-decoration-underline me-2">Update</a>
|
||||
<a href="#" class="text-danger text-decoration-underline">Delete</a>
|
||||
</div>
|
||||
`);
|
||||
})
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
limit: 10
|
||||
},
|
||||
sort: true,
|
||||
search: true,
|
||||
data: [
|
||||
["11", "Alice", "alice@example.com", "Software Engineer", "ABC Company", "United States"],
|
||||
["12", "Bob", "bob@example.com", "Product Manager", "XYZ Inc", "Canada"],
|
||||
["13", "Charlie", "charlie@example.com", "Data Analyst", "123 Corp", "Australia"],
|
||||
["14", "David", "david@example.com", "UI/UX Designer", "456 Ltd", "United Kingdom"],
|
||||
["15", "Eve", "eve@example.com", "Marketing Specialist", "789 Enterprises", "France"],
|
||||
["11", "Alice", "alice@example.com", "Software Engineer", "ABC Company", "United States"],
|
||||
["12", "Bob", "bob@example.com", "Product Manager", "XYZ Inc", "Canada"],
|
||||
["13", "Charlie", "charlie@example.com", "Data Analyst", "123 Corp", "Australia"],
|
||||
["14", "David", "david@example.com", "UI/UX Designer", "456 Ltd", "United Kingdom"],
|
||||
["15", "Eve", "eve@example.com", "Marketing Specialist", "789 Enterprises", "France"],
|
||||
["11", "Alice", "alice@example.com", "Software Engineer", "ABC Company", "United States"],
|
||||
["12", "Bob", "bob@example.com", "Product Manager", "XYZ Inc", "Canada"],
|
||||
["13", "Charlie", "charlie@example.com", "Data Analyst", "123 Corp", "Australia"],
|
||||
["14", "David", "david@example.com", "UI/UX Designer", "456 Ltd", "United Kingdom"],
|
||||
["15", "Eve", "eve@example.com", "Marketing Specialist", "789 Enterprises", "France"],
|
||||
["11", "Alice", "alice@example.com", "Software Engineer", "ABC Company", "United States"],
|
||||
["12", "Bob", "bob@example.com", "Product Manager", "XYZ Inc", "Canada"],
|
||||
["13", "Charlie", "charlie@example.com", "Data Analyst", "123 Corp", "Australia"],
|
||||
["14", "David", "david@example.com", "UI/UX Designer", "456 Ltd", "United Kingdom"],
|
||||
["15", "Eve", "eve@example.com", "Marketing Specialist", "789 Enterprises", "France"],
|
||||
["16", "Frank", "frank@example.com", "HR Manager", "ABC Company", "Germany"],
|
||||
["17", "Grace", "grace@example.com", "Financial Analyst", "XYZ Inc", "Japan"],
|
||||
["18", "Hannah", "hannah@example.com", "Sales Representative", "123 Corp", "Brazil"],
|
||||
["19", "Ian", "ian@example.com", "Software Developer", "456 Ltd", "India"],
|
||||
["20", "Jane", "jane@example.com", "Operations Manager", "789 Enterprises", "China"]
|
||||
]
|
||||
}).render(document.getElementById("common-table"));
|
||||
}
|
||||
|
||||
CommonTableInitWithFetchApi(){
|
||||
fetch(`${GlobalConfig.apiHost}/users`)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
console.log("check log response");
|
||||
console.log(data.data);
|
||||
new Grid({
|
||||
columns: [
|
||||
{
|
||||
name: 'id',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html('<span class="fw-semibold">' + cell + '</span>');
|
||||
})
|
||||
},
|
||||
"name",
|
||||
{
|
||||
name: 'email',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html('<a href="">' + cell + '</a>');
|
||||
})
|
||||
},
|
||||
"position", "firstname", "lastname",
|
||||
{
|
||||
name: 'Actions',
|
||||
width: '120px',
|
||||
formatter: (function (cell) {
|
||||
return gridjs.html(`
|
||||
<div class="d-flex justify-items-end gap-10">
|
||||
<a href="#" class="text-primary text-decoration-underline me-2">Details</a>
|
||||
<a href="#" class="text-warning text-decoration-underline me-2">Update</a>
|
||||
<a href="#" class="text-danger text-decoration-underline">Delete</a>
|
||||
</div>
|
||||
`);
|
||||
})
|
||||
},
|
||||
],
|
||||
pagination: {
|
||||
limit: 10
|
||||
},
|
||||
sort: true,
|
||||
search: true,
|
||||
data: data.data
|
||||
}).render(document.getElementById("common-table"));
|
||||
})
|
||||
.catch((error) => console.error("Error fetching data: " + error));
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
new CommonTable().init();
|
||||
});
|
||||
@@ -13,11 +13,11 @@ class="authentication-bg"
|
||||
<div class="card-body p-5">
|
||||
<div class="text-center">
|
||||
<div class="mx-auto mb-4 text-center auth-logo">
|
||||
<a href="{{ route('any', 'index') }}" class="logo-dark">
|
||||
<a href="{{ route('home', 'index') }}" class="logo-dark">
|
||||
<img src="/images/logo-dark.png" height="32" alt="logo dark">
|
||||
</a>
|
||||
|
||||
<a href="{{ route('any', 'index') }}" class="logo-light">
|
||||
<a href="{{ route('home', 'index') }}" class="logo-light">
|
||||
<img src="/images/logo-light.png" height="28" alt="logo light">
|
||||
</a>
|
||||
</div>
|
||||
@@ -27,7 +27,7 @@ class="authentication-bg"
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form action="{{ route('any', 'index') }}" class="mt-4">
|
||||
<form action="{{ route('', 'index') }}" class="mt-4">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="example-name">Name</label>
|
||||
<input type="name" id="example-name" name="example-name"
|
||||
|
||||
209
resources/views/dashboards/bigdata.blade.php
Normal file
209
resources/views/dashboards/bigdata.blade.php
Normal file
@@ -0,0 +1,209 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Dashboards'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Dashboards', 'subtitle' => 'SIBEDAS'])
|
||||
|
||||
<div class="row">
|
||||
<!-- Card 1 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Total Potensi Berkas</p>
|
||||
<h5 class="text-dark mt-2 mb-0">2432 Pemohon</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.24.416.920.070</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart01"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 2 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Berkas Terverifikasi</p>
|
||||
<h5 class="text-dark mt-2 mb-0">1572 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.17.522.994.118</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart02"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 3 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Berkas Belum Terverifikasi</p>
|
||||
<h5 class="text-dark mt-2 mb-0">860 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.6.893.925.952</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart03"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 4 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Non Usaha</p>
|
||||
<h5 class="text-dark mt-2 mb-0" id="countNonUsaha"></h5>
|
||||
<h3 class="text-dark mt-2 mb-0" id="totalNonUsaha"></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chartNonUsaha"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Card 5 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Usaha</p>
|
||||
<h5 class="text-dark mt-2 mb-0" id="countBusinessDocuments"></h5>
|
||||
<h3 class="text-dark mt-2 mb-0" id="totalBusinessDocuments"></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chartBusinessDocuments"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 6 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Berproses Di Dinas Teknis</p>
|
||||
<h5 class="text-dark mt-2 mb-0">171 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.1.973.666.055</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart06"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 7 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Berproses Di DPMPTSP</p>
|
||||
<h5 class="text-dark mt-2 mb-0">23 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.1.086.206.621</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart07"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 8 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Realisasi Terbit PBG</p>
|
||||
<h5 class="text-dark mt-2 mb-0">1378 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.14.463.121.442</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart08"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Card 5 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Progres Manual</p>
|
||||
<h5 class="text-dark mt-2 mb-0">85 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.1.479.160.749</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart09"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 6 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Perkiraan Potensi PBG Dari Tata Ruang</p>
|
||||
<h5 class="text-dark mt-2 mb-0">5 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.1.898.364.080</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart10"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 7 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Perkiraan Potensi PBG Dari Tata Ruang</p>
|
||||
<h5 class="text-dark mt-2 mb-0">18 Berkas</h5>
|
||||
<h3 class="text-dark mt-2 mb-0">Rp.3.076.196.000</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart11"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Card 8 -->
|
||||
<div class="col-md-6 col-xl-3">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p class="text-muted mb-0 text-truncate">Target PAD</p>
|
||||
<h5 class="text-dark mt-2 mb-0" id="countTargetPAD"></h5>
|
||||
<h3 class="text-dark mt-2 mb-0" id="totalTargetPAD"></h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart12"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/dashboards/bigdata.js'])
|
||||
@endsection
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Darkone', 'subtitle' => 'Dashboard'])
|
||||
@include('layouts.partials/page-title', ['title' => 'Home', 'subtitle' => 'Dashboard'])
|
||||
|
||||
<div class="row">
|
||||
<!-- Card 1 -->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="col-12 text-center">
|
||||
<script>
|
||||
document.write(new Date().getFullYear())
|
||||
</script> © Darkone by StackBros.
|
||||
</script> © DPUTR Kabupaten Bandung
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<!-- Sidebar Logo -->
|
||||
<div class="logo-box">
|
||||
<a href="{{ route('home') }}" class="logo-dark">
|
||||
<img src="/images/logo-sm.png" class="logo-sm" alt="logo sm">
|
||||
<img src="/images/logo-dark.png" class="logo-lg" alt="logo dark">
|
||||
<img src="/images/dputr-kab-bandung.png" class="logo-sm" alt="logo sm">
|
||||
<img src="/images/dputr-kab-bandung.png" class="logo-lg" alt="logo dark">
|
||||
</a>
|
||||
|
||||
<a href="{{ route('home') }}" class="logo-light">
|
||||
<img src="/images/logo-sm.png" class="logo-sm" alt="logo sm">
|
||||
<img src="/images/logo-light.png" class="logo-lg" alt="logo light">
|
||||
<img src="/images/dputr-kab-bandung.png" class="logo-sm" alt="logo sm">
|
||||
<img src="/images/dputr-kab-bandung.png" class="logo-lg" alt="logo light">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<div class="collapse" id="sidebarDashboard">
|
||||
<ul class="nav sub-navbar-nav">
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home' ) }}">Dashboard 1</a>
|
||||
<a class="sub-nav-link" href="{{ route ('dashboards.bigdata' ) }}">SIBEDAS</a>
|
||||
</li>
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home' ) }}">Dashboard 2</a>
|
||||
@@ -41,45 +41,18 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-arrow" href="#sidebarAuthentication" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="sidebarAuthentication">
|
||||
<span class="nav-icon">
|
||||
<iconify-icon icon="mingcute:user-3-line"></iconify-icon>
|
||||
</span>
|
||||
<span class="nav-text"> Authentication </span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarAuthentication">
|
||||
<ul class="nav sub-navbar-nav">
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('login') }}">Sign In</a>
|
||||
</li>
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('register') }}">Sign Up</a>
|
||||
</li>
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('password.request' ) }}">Forgot Password</a>
|
||||
</li>
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home') }}">Lock Screen</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-arrow" href="#sidebarDataMaster" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="sidebarDataMaster">
|
||||
<span class="nav-icon">
|
||||
<!-- <iconify-icon icon="mingcute:slider"></iconify-icon> -->
|
||||
<i class='bx bx-cylinder'></i>
|
||||
<iconify-icon icon="mingcute:cylinder-line"></iconify-icon>
|
||||
</span>
|
||||
<span class="nav-text">Master</span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarDataMaster">
|
||||
<ul class="nav sub-navbar-nav">
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home' ) }}">Users</a>
|
||||
<a class="sub-nav-link" href="{{ route ('master.users' ) }}">Users</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -89,19 +62,17 @@
|
||||
<a class="nav-link menu-arrow" href="#sidebarSettings" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="sidebarSettings">
|
||||
<span class="nav-icon">
|
||||
<!-- <iconify-icon icon="injection"></iconify-icon> -->
|
||||
<!-- <box-icon name='slider-alt'></box-icon> -->
|
||||
<i class='bx bx-slider-alt'></i>
|
||||
<iconify-icon icon="mingcute:settings-6-line"></iconify-icon>
|
||||
</span>
|
||||
<span class="nav-text">Settings</span>
|
||||
</a>
|
||||
<div class="collapse" id="sidebarSettings">
|
||||
<ul class="nav sub-navbar-nav">
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home' ) }}">General Settings</a>
|
||||
<a class="sub-nav-link" href="{{ route ('settings.general' ) }}">General</a>
|
||||
</li>
|
||||
<li class="sub-nav-item">
|
||||
<a class="sub-nav-link" href="{{ route ('home' ) }}">Sync Data</a>
|
||||
<a class="sub-nav-link" href="{{ route ('settings.syncronize' ) }}">Syncronize</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -112,7 +83,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="animated-stars">
|
||||
<!-- <div class="animated-stars">
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
@@ -133,4 +104,4 @@
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
<div class="shooting-star"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
@@ -1,13 +1,14 @@
|
||||
<!-- Title Meta -->
|
||||
<meta charset="utf-8" />
|
||||
<title>{{ $subtitle}} | Darkone - Dark Admin & UI Kit Template</title>
|
||||
<title>{{ $subtitle}} | DPUTR</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Darkone: An advanced, fully responsive admin dashboard template packed with features to streamline your analytics and management needs." />
|
||||
<meta name="author" content="StackBros" />
|
||||
<meta name="keywords" content="Darkone, admin dashboard, responsive template, analytics, modern UI, management tools" />
|
||||
<meta name="description" content="DPUTR Dashboard App" />
|
||||
<meta name="author" content="DPUTR" />
|
||||
<meta name="keywords" content="DPUTR, PUTR, dinas pekerjaan umum dan tata ruang, kabupaten bandung" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<!-- App favicon -->
|
||||
<link rel="shortcut icon" href="/images/favicon.ico">
|
||||
<link rel="shortcut icon" href="/images/dputr.ico">
|
||||
54
resources/views/master/users/create.blade.php
Normal file
54
resources/views/master/users/create.blade.php
Normal file
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Users'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Users', 'subtitle' => 'Create'])
|
||||
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{route('master.users.store')}}" method="POST">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="name">Name</label>
|
||||
<input type="name" id="name" name="name"
|
||||
class="form-control" placeholder="Enter your name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="email">Email</label>
|
||||
<input type="email" id="email" name="email"
|
||||
class="form-control" placeholder="Enter your email" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="password">Password</label>
|
||||
<input type="text" id="password" class="form-control" name="password"
|
||||
placeholder="Enter your password" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="firstname">Firstname</label>
|
||||
<input type="text" id="firstname" class="form-control" name="firstname"
|
||||
placeholder="Enter your firstname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="lastname">Lastname</label>
|
||||
<input type="text" id="lastname" class="form-control" name="lastname"
|
||||
placeholder="Enter your lastname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="position">Position</label>
|
||||
<input type="text" id="position" class="form-control" name="position"
|
||||
placeholder="Enter your position" required>
|
||||
</div>
|
||||
<!-- username, firstname, lastname, position -->
|
||||
<button type="submit" class="btn btn-outline-success width-lg">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@endsection
|
||||
54
resources/views/master/users/edit.blade.php
Normal file
54
resources/views/master/users/edit.blade.php
Normal file
@@ -0,0 +1,54 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Users'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Users', 'subtitle' => 'Create'])
|
||||
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form action="{{ route('master.users.update')}}">
|
||||
@csrf
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="name">Name</label>
|
||||
<input type="name" id="name" name="name"
|
||||
class="form-control" placeholder="Enter your name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="email">Email</label>
|
||||
<input type="email" id="email" name="email"
|
||||
class="form-control" placeholder="Enter your email" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="password">Password</label>
|
||||
<input type="text" id="password" class="form-control" name="password"
|
||||
placeholder="Enter your password" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="firstname">Firstname</label>
|
||||
<input type="text" id="firstname" class="form-control" name="firstname"
|
||||
placeholder="Enter your firstname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="lastname">Lastname</label>
|
||||
<input type="text" id="lastname" class="form-control" name="lastname"
|
||||
placeholder="Enter your lastname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="position">Position</label>
|
||||
<input type="text" id="position" class="form-control" name="position"
|
||||
placeholder="Enter your position" required>
|
||||
</div>
|
||||
<!-- username, firstname, lastname, position -->
|
||||
<button type="submit" class="btn btn-outline-success width-lg">Update</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@endsection
|
||||
25
resources/views/master/users/index.blade.php
Normal file
25
resources/views/master/users/index.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Master'])\
|
||||
|
||||
@section('css')
|
||||
@vite(['node_modules/gridjs/dist/theme/mermaid.min.css'])
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Master', 'subtitle' => 'Users'])
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-end pb-3">
|
||||
<a href="{{ route('master.users.create')}}" class="btn btn-outline-success width-lg">Create</a>
|
||||
</div>
|
||||
{{$users}}
|
||||
<div>
|
||||
<div id="common-table"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/tables/common-table.js'])
|
||||
@endsection
|
||||
49
resources/views/master/users/show.blade.php
Normal file
49
resources/views/master/users/show.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Users'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Users', 'subtitle' => 'Create'])
|
||||
|
||||
<div class="row d-flex justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-name">Name</label>
|
||||
<input type="name" id="user-name" name="user-name"
|
||||
class="form-control" placeholder="Enter your name" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-email">Email</label>
|
||||
<input type="email" id="user-email" name="user-email"
|
||||
class="form-control" placeholder="Enter your email" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-password">Password</label>
|
||||
<input type="text" id="user-password" class="form-control"
|
||||
placeholder="Enter your password" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-firstname">Firstname</label>
|
||||
<input type="text" id="user-firstname" class="form-control"
|
||||
placeholder="Enter your firstname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-lastname">Lastname</label>
|
||||
<input type="text" id="user-lastname" class="form-control"
|
||||
placeholder="Enter your lastname" required>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="user-position">Position</label>
|
||||
<input type="text" id="user-position" class="form-control"
|
||||
placeholder="Enter your position" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@endsection
|
||||
31
resources/views/settings/general/create.blade.php
Normal file
31
resources/views/settings/general/create.blade.php
Normal file
@@ -0,0 +1,31 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Create User'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Se', 'subtitle' => 'Syncronize'])
|
||||
|
||||
<div class="row">
|
||||
<div class="columns-md">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form>
|
||||
<div class="mb-3">
|
||||
<label for="keyInput" class="form-label">Key</label>
|
||||
<input type="text" id="simpleinput" class="form-control">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="valueInput" class="form-label">Value</label>
|
||||
<input type="text" id="simpleinput" class="form-control">
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-success width-lg">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/tables/common-table.js'])
|
||||
@endsection
|
||||
24
resources/views/settings/general/index.blade.php
Normal file
24
resources/views/settings/general/index.blade.php
Normal file
@@ -0,0 +1,24 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Syncronize'])
|
||||
|
||||
@section('css')
|
||||
@vite(['node_modules/gridjs/dist/theme/mermaid.min.css'])
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Settings', 'subtitle' => 'Syncronize'])
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify-content-end pb-3">
|
||||
<button type="button" class="btn btn-outline-success width-lg">Create</button>
|
||||
</div>
|
||||
<div>
|
||||
<div id="common-table"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/tables/common-table.js'])
|
||||
@endsection
|
||||
20
resources/views/settings/syncronize/index.blade.php
Normal file
20
resources/views/settings/syncronize/index.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
@extends('layouts.vertical', ['subtitle' => 'Syncronize'])
|
||||
|
||||
@section('content')
|
||||
|
||||
@include('layouts.partials/page-title', ['title' => 'Settings', 'subtitle' => 'Syncronize'])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-xl-12 d-flex justify-content-end">
|
||||
<form action="{{route('settings.sync')}}" method="post" id="sync-form">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-success width-lg" id="btn-sync-submit">Sync SIMBG</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('scripts')
|
||||
@vite(['resources/js/settings/syncronize/syncronize.js'])
|
||||
@endsection
|
||||
@@ -1,8 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Api\DashboardController;
|
||||
use App\Http\Controllers\Api\UsersController;
|
||||
use App\Http\Controllers\Settings\SyncronizeController;
|
||||
use App\Models\PbgTask;
|
||||
use App\Models\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/user', function (Request $request) {
|
||||
return $request->user();
|
||||
})->middleware('auth:sanctum');
|
||||
|
||||
Route::group(['middleware' => 'auth:scantum'], function (){
|
||||
|
||||
});
|
||||
Route::controller(DashboardController::class)->group(function(){
|
||||
Route::get('/business-documents','businnessDocument');
|
||||
Route::get('/non-business-documents','nonBusinnessDocument');
|
||||
Route::get('/all-task-documents', 'allTaskDocuments');
|
||||
});
|
||||
|
||||
Route::post('/login', [UsersController::class, 'login'])->name('api.user.login');
|
||||
|
||||
Route::get('/sync-task', [SyncronizeController::class, 'syncPbgTask'])->name('api.task');
|
||||
Route::get('/get-user-token', [SyncronizeController::class, 'getUserToken'])->name('api.task.token');
|
||||
Route::get('/get-index-integration-retribution/{uuid}', [SyncronizeController::class, 'syncIndexIntegration'])->name('api.task.inntegration');
|
||||
Route::get('/sync-task-submit/{uuid}', [SyncronizeController::class, 'syncTaskDetailSubmit'])->name('api.task.submit');
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Auth\AuthenticatedSessionController;
|
||||
use App\Http\Controllers\Dashboards\BigDataController;
|
||||
use App\Http\Controllers\Home\HomeController;
|
||||
use App\Http\Controllers\RoutingController;
|
||||
use App\Http\Controllers\Master\UsersController;
|
||||
use App\Http\Controllers\Settings\SettingsController;
|
||||
use App\Http\Controllers\Settings\SyncronizeController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
require __DIR__ . '/auth.php';
|
||||
@@ -16,5 +18,37 @@ require __DIR__ . '/auth.php';
|
||||
|
||||
// auth
|
||||
Route::group(['middleware' => 'auth'], function(){
|
||||
|
||||
// landing page
|
||||
Route::get('', [HomeController::class, 'index'])->name('home');
|
||||
|
||||
//dashboards
|
||||
Route::group(['prefix' => '/dashboards'], function(){
|
||||
Route::get('/bigdata', [BigDataController::class, 'index'])->name('dashboards.bigdata');
|
||||
});
|
||||
|
||||
// settings
|
||||
Route::group(['prefix' => '/settings'], function(){
|
||||
Route::get('/syncronize', [SyncronizeController::class, 'index'])->name('settings.syncronize');
|
||||
Route::get('/general', [SettingsController::class, 'index'])->name('settings.general');
|
||||
Route::post('/syncronize', [SyncronizeController::class, 'syncronizeTask'])->name('settings.sync');
|
||||
});
|
||||
|
||||
// masters
|
||||
Route::group(['prefix' => '/master'], function (){
|
||||
// Route::controller(UsersController::class)->group(function(){
|
||||
// Route::get('/users', 'index')->name('master.users');
|
||||
// Route::get('/users/create', 'create')->name('master.users.create');
|
||||
// Route::post('/users/store', 'store')->name('master.users.store');
|
||||
// Route::get('/users/edit/{id}', 'edit')->name('master.users.edit');
|
||||
// Route::put('/users/update/{id}', 'edit')->name('master.users.edit');
|
||||
// });
|
||||
Route::get('/users', [UsersController::class, 'index'])->name('master.users');
|
||||
Route::get('/users/create', [UsersController::class, 'create'])->name('master.users.create');
|
||||
Route::post('/users/store', [UsersController::class, 'store'])->name('master.users.store');
|
||||
Route::get('/users/edit/{id}', [UsersController::class, 'edit'])->name('master.users.edit');
|
||||
Route::put('/users/update', [UsersController::class, 'update'])->name('master.users.update');
|
||||
Route::delete('/users/delete/{id}', [UsersController::class, 'delete'])->name('master.users.delete');
|
||||
Route::delete('/users/show/{id}', [UsersController::class, 'show'])->name('master.users.show');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user