add link in potential dashboard
This commit is contained in:
@@ -3,12 +3,14 @@
|
|||||||
namespace App\Http\Controllers\Dashboards;
|
namespace App\Http\Controllers\Dashboards;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\Menu;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class PotentialsController extends Controller
|
class PotentialsController extends Controller
|
||||||
{
|
{
|
||||||
public function inside_system(){
|
public function inside_system(){
|
||||||
return view('dashboards.potentials.inside_system');
|
$menus = Menu::all();
|
||||||
|
return view('dashboards.potentials.inside_system', compact('menus'));
|
||||||
}
|
}
|
||||||
public function outside_system(){
|
public function outside_system(){
|
||||||
return view('dashboards.potentials.outside_system');
|
return view('dashboards.potentials.outside_system');
|
||||||
|
|||||||
@@ -168,6 +168,13 @@ document.addEventListener("DOMContentLoaded", async function (e) {
|
|||||||
await new DashboardPotentialInsideSystem().init();
|
await new DashboardPotentialInsideSystem().init();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function handleCircleClick(element) {
|
||||||
|
const url = element.getAttribute("data-url") || "#";
|
||||||
|
if (url !== "#") {
|
||||||
|
window.location.href = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function resizeDashboard() {
|
function resizeDashboard() {
|
||||||
let targetElement = document.getElementById("lack-of-potential-wrapper");
|
let targetElement = document.getElementById("lack-of-potential-wrapper");
|
||||||
let dashboardElement = document.getElementById(
|
let dashboardElement = document.getElementById(
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
@props(['title' => 'title component', 'visible_data' => false, 'data_count' => '', 'visible_data_type' => false,
|
@props(['title' => 'title component', 'visible_data' => false, 'data_count' => '', 'visible_data_type' => false,
|
||||||
'data_type' => '','style' => '', 'size' => '', 'line' => [], 'data_id' => ''])
|
'data_type' => '','style' => '', 'size' => '', 'data_id' => '', 'document_url' => '#'])
|
||||||
|
|
||||||
@section('css')
|
@section('css')
|
||||||
@vite(['resources/scss/components/_custom_circle.scss'])
|
@vite(['resources/scss/components/_custom_circle.scss'])
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
<div class="custom-circle-wrapper {{ $size }}" style="{{ $style }}">
|
<div class="custom-circle-wrapper {{ $size }}" style="{{ $style }}" data-url="{{ $document_url }}" onclick="handleCircleClick(this)">
|
||||||
<div class="custom-circle-content">
|
<div class="custom-circle-content">
|
||||||
<p class="custom-circle-text">{{ $title }}</p>
|
<p class="custom-circle-text">{{ $title }}</p>
|
||||||
@if ($visible_data === "true")
|
@if ($visible_data === "true")
|
||||||
@@ -14,17 +14,5 @@
|
|||||||
@if ($visible_data_type === "true")
|
@if ($visible_data_type === "true")
|
||||||
<div class="custom-circle-data-type">{{ $data_type }}</div>
|
<div class="custom-circle-data-type">{{ $data_type }}</div>
|
||||||
@endif
|
@endif
|
||||||
@if (!empty($lines))
|
|
||||||
<svg class="absolute w-full h-full" viewBox="0 0 100 100" preserveAspectRatio="none">
|
|
||||||
@foreach ($lines as $line)
|
|
||||||
<line
|
|
||||||
x1="{{ $line['x1'] }}" y1="{{ $line['y1'] }}"
|
|
||||||
x2="{{ $line['x2'] }}" y2="{{ $line['y2'] }}"
|
|
||||||
stroke="{{ $line['color'] ?? 'black' }}"
|
|
||||||
stroke-width="{{ $line['width'] ?? 2 }}"
|
|
||||||
/>
|
|
||||||
@endforeach
|
|
||||||
</svg>
|
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,11 +21,20 @@
|
|||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<div id="lack-of-potential-fixed-container" class="" style="width:1400px;height:770px;position:relative;margin:auto;z-index:1;">
|
<div id="lack-of-potential-fixed-container" class="" style="width:1400px;height:770px;position:relative;margin:auto;z-index:1;">
|
||||||
<div style="position: absolute; top: 200px; left: 50px;">
|
<div style="position: absolute; top: 200px; left: 50px;">
|
||||||
<x-custom-circle title="Restoran" size="small" style="background-color: #0e4753;" visible_data="true" data_id="restoran-count" data_count="0" />
|
<x-custom-circle title="Restoran" size="small" style="background-color: #0e4753;"
|
||||||
|
visible_data="true" data_id="restoran-count" data_count="0"
|
||||||
|
document_url="{{ route('web-spatial-plannings.index', ['menu_id' => $menus->where('url','web-spatial-plannings.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
<div class="square dia-top-left-bottom-right" style="top:30px;left:50px;width:150px;height:120px;"></div>
|
<div class="square dia-top-left-bottom-right" style="top:30px;left:50px;width:150px;height:120px;"></div>
|
||||||
<x-custom-circle title="PBB Bangunan" visible_data="true" data_id="pbb-bangunan-count" data_count="0" size="small" style="background-color: #0e4753;" />
|
<x-custom-circle title="PBB Bangunan" visible_data="true" data_id="pbb-bangunan-count"
|
||||||
|
data_count="0" size="small" style="background-color: #0e4753;"
|
||||||
|
document_url="{{ route('web-spatial-plannings.index', ['menu_id' => $menus->where('url','web-spatial-plannings.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
<div class="square" style="width:150px;height:2px;background-color:black;left:50px;top:150px;"></div>
|
<div class="square" style="width:150px;height:2px;background-color:black;left:50px;top:150px;"></div>
|
||||||
<x-custom-circle title="Reklame" visible_data="true" data_id="reklame-count" data_count="0" size="small" style="background-color: #0e4753;" />
|
<x-custom-circle title="Reklame" visible_data="true" data_id="reklame-count"
|
||||||
|
data_count="0" size="small" style="background-color: #0e4753;"
|
||||||
|
document_url="{{ route('web-advertisements.index', ['menu_id' => $menus->where('url','web-advertisements.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
<div class="square dia-top-right-bottom-left" style="top:140px;left:50px;width:150px;height:120px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:140px;left:50px;width:150px;height:120px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -33,9 +42,12 @@
|
|||||||
<div class="square dia-top-right-bottom-left" style="top:-100px;left:30px;width:150px;height:120px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:-100px;left:30px;width:150px;height:120px;"></div>
|
||||||
<div class="square dia-top-left-bottom-right" style="top:-100px;left:120px;width:120px;height:120px;"></div>
|
<div class="square dia-top-left-bottom-right" style="top:-100px;left:120px;width:120px;height:120px;"></div>
|
||||||
<x-custom-circle title="BAPENDA" size="small" style="float:left;background-color: #234f6c;" />
|
<x-custom-circle title="BAPENDA" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
<x-custom-circle title="PDAM" visible_data="true" data_id="pdam-count" data_count="0" visible_data_type="true" data_type="Pelanggan" size="small" style="float:left;background-color: #234f6c;" />
|
<x-custom-circle title="PDAM" visible_data="true" data_id="pdam-count"
|
||||||
<x-custom-circle title="KECAMATAN" size="small" style="float:left;background-color: #234f6c;" />
|
visible_data_type="true" data_type="Pelanggan"
|
||||||
|
size="small" style="float:left;background-color: #234f6c;position: absolute;margin-left: 99px;"
|
||||||
|
document_url="{{ route('customers', ['menu_id' => $menus->where('url','customers')->first()->id]) }}"
|
||||||
|
/>
|
||||||
|
<x-custom-circle title="KECAMATAN" size="small" style="float:left;background-color: #234f6c;position: absolute;margin-left: 198px;" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position: absolute; top: 0px; left: 270px;">
|
<div style="position: absolute; top: 0px; left: 270px;">
|
||||||
@@ -44,7 +56,7 @@
|
|||||||
<div class="square dia-top-right-bottom-left" style="top:350px;left:70px;width:120px;height:120px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:350px;left:70px;width:120px;height:120px;"></div>
|
||||||
<x-custom-circle title="Rumah Tinggal" size="small" style="background-color: #234f6c;margin:auto;" />
|
<x-custom-circle title="Rumah Tinggal" size="small" style="background-color: #234f6c;margin:auto;" />
|
||||||
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
||||||
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:150px;" />
|
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:150px;position: absolute;" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position: absolute; top: 650px; left: 110px;">
|
<div style="position: absolute; top: 650px; left: 110px;">
|
||||||
@@ -52,11 +64,17 @@
|
|||||||
<div class="square dia-top-right-bottom-left" style="top:-110px;left:90px;width:150px;height:170px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:-110px;left:90px;width:150px;height:170px;"></div>
|
||||||
<div class="square dia-top-left-bottom-right" style="top:-110px;left:230px;width:150px;height:170px;"></div>
|
<div class="square dia-top-left-bottom-right" style="top:-110px;left:230px;width:150px;height:170px;"></div>
|
||||||
<div class="square dia-top-left-bottom-right" style="top:-110px;left:260px;width:200px;height:180px;"></div>
|
<div class="square dia-top-left-bottom-right" style="top:-110px;left:260px;width:200px;height:180px;"></div>
|
||||||
<x-custom-circle title="Villa" size="small" style="float:left;background-color: #234f6c;" visible_data="true" data_id="villa-count" data_count="0" />
|
<x-custom-circle title="Villa" size="small" style="float:left;background-color: #234f6c;"
|
||||||
|
visible_data="true" data_id="villa-count" data_count="0"
|
||||||
|
document_url="{{ route('web-tourisms.index', ['menu_id' => $menus->where('url','web-tourisms.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
<x-custom-circle title="Pabrik" size="small" style="float:left;background-color: #234f6c;" />
|
<x-custom-circle title="Pabrik" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
<x-custom-circle title="Jalan Protocol" size="small" style="float:left;background-color: #234f6c;" />
|
<x-custom-circle title="Jalan Protocol" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
<x-custom-circle title="Ruko" size="small" style="float:left;background-color: #234f6c;" />
|
<x-custom-circle title="Ruko" size="small" style="float:left;background-color: #234f6c;" />
|
||||||
<x-custom-circle title="Pariwisata" size="small" style="float:left;background-color: #234f6c; margin-right: 20px;" visible_data="true" data_id="pariwisata-count" data_count="0" />
|
<x-custom-circle title="Pariwisata" size="small" style="float:left;background-color: #234f6c; margin-right: 20px;"
|
||||||
|
visible_data="true" data_id="pariwisata-count" data_count="0"
|
||||||
|
document_url="{{ route('web-tourisms.index', ['menu_id' => $menus->where('url','web-tourisms.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
<div class="square" style="width:150px;height:2px;background-color:black;left:350px;top:50px;"></div>
|
<div class="square" style="width:150px;height:2px;background-color:black;left:350px;top:50px;"></div>
|
||||||
<x-custom-circle title="DISBUDPAR" size="small" style="background-color: #3a968b;" />
|
<x-custom-circle title="DISBUDPAR" size="small" style="background-color: #3a968b;" />
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +93,10 @@
|
|||||||
'style' => 'margin-left:180px;top:-20px;'
|
'style' => 'margin-left:180px;top:-20px;'
|
||||||
])
|
])
|
||||||
@endcomponent
|
@endcomponent
|
||||||
<x-custom-circle title="Tata Ruang" size="large" style="background-color: #da6635;float:left;margin-left:250px;" visible_data="true" data_id="tata-ruang-count" data_count="0" />
|
<x-custom-circle title="Tata Ruang" size="large" style="background-color: #da6635;float:left;margin-left:250px;"
|
||||||
|
visible_data="true" data_id="tata-ruang-count" data_count="0"
|
||||||
|
document_url="{{ route('web-spatial-plannings.index', ['menu_id' => $menus->where('url','web-spatial-plannings.index')->first()->id]) }}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position: absolute; top: 310px; left: 1150px;">
|
<div style="position: absolute; top: 310px; left: 1150px;">
|
||||||
@@ -102,7 +123,10 @@
|
|||||||
|
|
||||||
<div style="position: absolute; top: 50px; left: 1100px;">
|
<div style="position: absolute; top: 50px; left: 1100px;">
|
||||||
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
<x-custom-circle title="Non Usaha" size="large" style="background-color: #3a968b;margin-top:20px;" />
|
||||||
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:260px;" visible_data="true" data_id="tata-ruang-usaha-count" data_count="0" />
|
<x-custom-circle title="USAHA" size="large" style="background-color: #627c8b;margin-top:260px;"
|
||||||
|
visible_data="true" data_id="tata-ruang-usaha-count" data_count="0"
|
||||||
|
document_url="{!! route('pbg-task.index', ['filter' => 'business', 'menu_id' => $menus->where('url','pbg-task.index')->first()->id]) !!}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'outside-system-non-business',
|
'document_id' => 'outside-system-non-business',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
'style' => 'top:10px;'
|
'style' => 'top:10px;',
|
||||||
|
'document_url' => route('pbg-task.index', ['menu_id' => 13, 'filter' => 'non-business'])
|
||||||
])
|
])
|
||||||
@endcomponent
|
@endcomponent
|
||||||
<div class="square dia-top-right-bottom-left" style="top:10px;left:180px;width:230px;height:120px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:10px;left:180px;width:230px;height:120px;"></div>
|
||||||
@@ -37,7 +38,8 @@
|
|||||||
'document_type' => 'Berkas',
|
'document_type' => 'Berkas',
|
||||||
'document_id' => 'outside-system-business',
|
'document_id' => 'outside-system-business',
|
||||||
'visible_small_circle' => true,
|
'visible_small_circle' => true,
|
||||||
'style' => 'top:300px;'
|
'style' => 'top:300px;',
|
||||||
|
'document_url' => route('pbg-task.index', ['menu_id' => 13, 'filter' => 'business'])
|
||||||
])
|
])
|
||||||
@endcomponent
|
@endcomponent
|
||||||
<div class="square dia-top-right-bottom-left" style="top:320px;left:170px;width:200px;height:100px;"></div>
|
<div class="square dia-top-right-bottom-left" style="top:320px;left:170px;width:200px;height:100px;"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user