added new adb dashboard
This commit is contained in:
@@ -34,6 +34,7 @@ class ADBHausnummerModel {
|
||||
public $manual_update_by;
|
||||
public $manual_update_info;
|
||||
public $rimo_id;
|
||||
public $rimo_type;
|
||||
public $rimo_ex_state;
|
||||
public $rimo_op_state;
|
||||
public $rimo_fcp_name;
|
||||
@@ -111,13 +112,15 @@ class ADBHausnummerModel {
|
||||
return $items;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function count($filter) {
|
||||
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
$sql = "SELECT COUNT(*) as cnt FROM (
|
||||
|
||||
|
||||
public static function count($filter, $join_tables = true) {
|
||||
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
|
||||
if ($join_tables) {
|
||||
$sql = "SELECT COUNT(*) as cnt FROM (
|
||||
SELECT Hausnummer.id FROM Hausnummer
|
||||
LEFT JOIN Ortschaft ON (Ortschaft.id = Hausnummer.ortschaft_id)
|
||||
LEFT JOIN Gemeinde ON (Gemeinde.id = Ortschaft.gemeinde_id)
|
||||
@@ -125,21 +128,43 @@ class ADBHausnummerModel {
|
||||
LEFT JOIN Plz ON (Hausnummer.plz_id = Plz.id)
|
||||
LEFT JOIN HausnummerStatusflagValue ON (HausnummerStatusflagValue.hausnummer_id = Hausnummer.id)
|
||||
WHERE $where
|
||||
GROUP BY Hausnummer.id
|
||||
) hn
|
||||
";
|
||||
) hn";
|
||||
} else $sql = "SELECT COUNT(*) as cnt FROM Hausnummer WHERE $where";
|
||||
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
|
||||
$res = $db->query($sql);
|
||||
if($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
return $data->cnt;
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
|
||||
$res = $db->query($sql);
|
||||
if ($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
return $data->cnt;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static function search($filter, $limit = false, $returnDBRessource = false) {
|
||||
|
||||
public static function countHomes($filter) {
|
||||
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
|
||||
$sql = "SELECT COUNT(Wohneinheit.id) as cnt
|
||||
FROM Hausnummer
|
||||
LEFT JOIN Wohneinheit ON (Wohneinheit.hausnummer_id = Hausnummer.id)
|
||||
WHERE $where";
|
||||
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
|
||||
$res = $db->query($sql);
|
||||
if ($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
return $data->cnt;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public static function search($filter, $limit = false, $returnDBRessource = false) {
|
||||
$items = [];
|
||||
$db = FronkDB::singleton(ADDRESSDB_DBHOST, ADDRESSDB_DBUSER, ADDRESSDB_DBPASS, ADDRESSDB_DBNAME);
|
||||
|
||||
@@ -436,6 +461,29 @@ class ADBHausnummerModel {
|
||||
$where .= " AND HausnummerStatusflagValue.flag_id = $status_flag AND HausnummerStatusflagValue.value=1";
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists("rimo_type", $filter)) {
|
||||
$rimo_type = $filter['rimo_type'];
|
||||
$where .= is_array($rimo_type)
|
||||
? " AND Hausnummer.rimo_type IN ('" . implode("', '", $rimo_type) . "')"
|
||||
: " AND Hausnummer.rimo_type = '$rimo_type'";
|
||||
}
|
||||
|
||||
if (array_key_exists("rimo_ex_state", $filter)) {
|
||||
$rimo_ex_state = $filter['rimo_ex_state'];
|
||||
$where .= is_array($rimo_ex_state)
|
||||
? " AND Hausnummer.rimo_ex_state IN ('" . implode("', '", $rimo_ex_state) . "')"
|
||||
: " AND Hausnummer.rimo_ex_state = '$rimo_ex_state'";
|
||||
}
|
||||
|
||||
if (array_key_exists("rimo_op_state", $filter)) {
|
||||
$rimo_op_state = $filter['rimo_op_state'];
|
||||
$where .= is_array($rimo_op_state)
|
||||
? " AND Hausnummer.rimo_op_state IN ('" . implode("', '", $rimo_op_state) . "')"
|
||||
: " AND Hausnummer.rimo_op_state = '$rimo_op_state'";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//var_dump($filter, $where);exit;
|
||||
return $where;
|
||||
|
||||
@@ -22,6 +22,18 @@ class DashboardNewController extends mfBaseController {
|
||||
Helper::renderVue($this, $this->mod, "Dashboard", ["IS_ADMIN" => $this->me->is("Admin") ? "true" : "false"]);
|
||||
}
|
||||
|
||||
protected function adbAction() {
|
||||
if (!$this->me->can("Statistics") || !$this->me->is(["Admin", "netowner", "salespartner"])) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
|
||||
if (!$this->me->is("Admin")) {
|
||||
$this->redirect("Dashboard");
|
||||
}
|
||||
|
||||
Helper::renderVue($this, "DashboardAdb", "Dashboard ADB", ["IS_ADMIN" => $this->me->is("Admin") ? "true" : "false"]);
|
||||
}
|
||||
|
||||
|
||||
protected function getNetOwnerFilterOptionsAction() {
|
||||
$allPreorderCampaigns = PreordercampaignModel::getAll();
|
||||
@@ -43,6 +55,20 @@ class DashboardNewController extends mfBaseController {
|
||||
self::returnJson($netowners);
|
||||
}
|
||||
|
||||
protected function getNetworkFilterOptionsAction() {
|
||||
$netowners = [];
|
||||
$allNetworks = ADBNetzgebietModel::getAll();
|
||||
foreach ($allNetworks as $network) {
|
||||
if (!$this->me->is("Admin") && $network->owner_id != $this->me->address_id) continue;
|
||||
|
||||
if (!in_array($network->id, array_column($netowners, 'value'))) {
|
||||
$netowners[] = ['text' => $network->name, 'value' => $network->id];
|
||||
}
|
||||
}
|
||||
|
||||
self::returnJson($netowners);
|
||||
}
|
||||
|
||||
protected function getCampaignFilterOptionsAction() {
|
||||
$post = json_decode(file_get_contents('php://input'), true);
|
||||
$netowner_ids = isset($post['netOwners']) ? [$post['netOwners']] : [];
|
||||
@@ -460,4 +486,55 @@ class DashboardNewController extends mfBaseController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function getDashboardAddressDBDataAction() {
|
||||
if (!$this->me->is("Admin")) self::sendError("Keine Berechtigung");
|
||||
$baseFilter = [];
|
||||
|
||||
if (!empty($str = $this->request->netzgebiet_id)) $baseFilter["netzgebiet_id"] = $this->request->netzgebiet_id;
|
||||
|
||||
$sum_counts = [
|
||||
"sum" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0]), false),
|
||||
"sum_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0])),
|
||||
"op_state_planned" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Planned"]), false),
|
||||
"op_state_passed" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Passed"]), false),
|
||||
"op_state_connected" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Connected"]), false),
|
||||
];
|
||||
|
||||
$efh_rimo_types = ["residential", "company", "2/3 familienhaus", "public"];
|
||||
|
||||
$efh_counts = [
|
||||
"sum" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => $efh_rimo_types]), false),
|
||||
"sum_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => $efh_rimo_types])),
|
||||
"op_state_planned" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Planned", "rimo_type" => $efh_rimo_types]), false),
|
||||
"op_state_passed" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Passed", "rimo_type" => $efh_rimo_types]), false),
|
||||
"op_state_connected" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Connected", "rimo_type" => $efh_rimo_types]), false),
|
||||
];
|
||||
|
||||
$mph_rimo_types = ["multiple dwellings"];
|
||||
|
||||
$mph_counts = [
|
||||
"sum" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => $mph_rimo_types]), false),
|
||||
"sum_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => $mph_rimo_types])),
|
||||
"op_state_planned" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Planned", "rimo_type" => $mph_rimo_types]), false),
|
||||
"op_state_passed" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Passed", "rimo_type" => $mph_rimo_types]), false),
|
||||
"op_state_connected" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_op_state" => "Connected", "rimo_type" => $mph_rimo_types]), false),
|
||||
];
|
||||
|
||||
$other_types = [
|
||||
"type_greenfield" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "greenfield"]), false),
|
||||
"type_greenfield_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "greenfield"])),
|
||||
"type_transformer_station" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "transformer station"]), false),
|
||||
"type_transformer_station_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "transformer station"])),
|
||||
"type_others" => ADBHausnummerModel::count(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "other"]), false),
|
||||
"type_others_homes" => ADBHausnummerModel::countHomes(array_merge($baseFilter, ["is_deleted" => 0, "rimo_type" => "other"])),
|
||||
];
|
||||
|
||||
self::returnJson([
|
||||
"sum_counts" => $sum_counts,
|
||||
"efh_counts" => $efh_counts,
|
||||
"mph_counts" => $mph_counts,
|
||||
"other_types" => $other_types
|
||||
]);
|
||||
}
|
||||
}
|
||||
29
db/migrations/20250513113800_hausnummer_add_indexes.php
Normal file
29
db/migrations/20250513113800_hausnummer_add_indexes.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class HausnummerAddIndexes extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Hausnummer");
|
||||
$table->addIndex("rimo_type", ["name" => "idx_rimo_type"]);
|
||||
$table->addIndex("rimo_op_state", ["name" => "idx_rimo_op_state"]);
|
||||
$table->addIndex(["rimo_type", "rimo_op_state"], ["name" => "idx_combined_type_state"]);
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Hausnummer");
|
||||
$table->removeIndex(["rimo_type"], ["name" => "idx_rimo_type"]);
|
||||
$table->removeIndex(["rimo_op_state"], ["name" => "idx_rimo_op_state"]);
|
||||
$table->removeIndex(["rimo_type", "rimo_op_state"], ["name" => "idx_combined_type_state"]);
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
93
public/js/pages/DashboardAdb/DashboardAdb.css
Normal file
93
public/js/pages/DashboardAdb/DashboardAdb.css
Normal file
@@ -0,0 +1,93 @@
|
||||
#app {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#topnav {
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.dashboard-container {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.filter-section,
|
||||
.campaign-section {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dashboard-cards {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.dashboard-data-selector {
|
||||
padding-top: 12px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.dashboard-data-selector--no-net-owner {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.dashboard-chart {
|
||||
height: 400px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.dashboard-buttons {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.dashboard-cards {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
.dashboard-cards {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1332px) {
|
||||
.dashboard-cards {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
#app > div.card > div > div > div:nth-child(4) {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.filter-section,
|
||||
.campaign-section {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.dashboard-cards {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
#app > div.card > div > div > div:nth-child(4) {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
|
||||
.dashboard-data-selector {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
186
public/js/pages/DashboardAdb/DashboardAdb.js
Normal file
186
public/js/pages/DashboardAdb/DashboardAdb.js
Normal file
@@ -0,0 +1,186 @@
|
||||
Vue.component('dashboard-location-selector-adb', {
|
||||
template: `
|
||||
<div class="dashboard-data-selector">
|
||||
<tt-select sm row label="Netzgebiet" :value="selectedNetwork" :options="filterOptions.netOwners" @input="$emit('update:selectedNetwork', $event)"/>
|
||||
</div>
|
||||
`,
|
||||
props: {
|
||||
selectedNetwork: {type: String, required: true}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterOptions: {
|
||||
netOwners: []
|
||||
}
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
await this.fetchNetworkFilterOptions();
|
||||
},
|
||||
methods: {
|
||||
async fetchNetworkFilterOptions() {
|
||||
const response = await axios.get(`${window.TT_CONFIG['BASE_PATH']}/DashboardNew/getNetworkFilterOptions`);
|
||||
this.filterOptions.netOwners = [{value: 'all', text: 'Alle'}, ...response.data];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Vue.component('tt-dashboard-display-card', {
|
||||
props: ['header', 'icon', 'text', 'subHeaders', 'color'],
|
||||
computed: {
|
||||
cardHeight() {
|
||||
return `${96 + 25 * this.subHeaders?.length ?? 0}px`;
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="card">
|
||||
<div class="card-body p-0" :style="{ backgroundColor: color }">
|
||||
<div :style="{ height: cardHeight }" class="p-2">
|
||||
<div class="float-right">
|
||||
<i :class="icon" class="text-white widget-icon font-24"></i>
|
||||
</div>
|
||||
<h5 class="text-white font-weight-normal mt-0">{{ header }}</h5>
|
||||
<h3 class="mt-2 text-white">{{ text }}</h3>
|
||||
<div class="text-white font-weight-light tt-dashboard-display-card-sub-header-container">
|
||||
<p v-for="(subHeader, index) in subHeaders" :key="index" class="mb-0">{{ subHeader }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
Vue.component('dashboard-adb-content', {
|
||||
props: ['addressDbData'],
|
||||
template: `
|
||||
<div>
|
||||
<h4 class="mt-4">Gebäude</h4>
|
||||
<div class="dashboard-cards position-relative">
|
||||
<tt-dashboard-display-card
|
||||
header="Gebäude gesamt"
|
||||
icon="fas fa-building"
|
||||
:text="addressDbData.sum_counts.sum"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.sum_counts.sum_homes,
|
||||
'Planned: ' + addressDbData.sum_counts.op_state_planned,
|
||||
'Passed: ' + addressDbData.sum_counts.op_state_passed,
|
||||
'Connected: ' + addressDbData.sum_counts.op_state_connected
|
||||
]"
|
||||
color="#28a745"
|
||||
/>
|
||||
|
||||
<tt-dashboard-display-card
|
||||
header="Einfamilienhäuser gesamt"
|
||||
icon="fas fa-home"
|
||||
:text="addressDbData.efh_counts.sum"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.efh_counts.sum_homes,
|
||||
'Planned: ' + addressDbData.efh_counts.op_state_planned,
|
||||
'Passed: ' + addressDbData.efh_counts.op_state_passed,
|
||||
'Connected: ' + addressDbData.efh_counts.op_state_connected
|
||||
]"
|
||||
color="#17a2b8"
|
||||
/>
|
||||
|
||||
<tt-dashboard-display-card
|
||||
header="Mehrparteienhäuser gesamt"
|
||||
icon="fas fa-city"
|
||||
:text="addressDbData.mph_counts.sum"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.mph_counts.sum_homes,
|
||||
'Planned: ' + addressDbData.mph_counts.op_state_planned,
|
||||
'Passed: ' + addressDbData.mph_counts.op_state_passed,
|
||||
'Connected: ' + addressDbData.mph_counts.op_state_connected
|
||||
]"
|
||||
color="#f5b902"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
<hr>
|
||||
<h4 class="mt-4">Andere Typen</h4>
|
||||
<div class="dashboard-cards position-relative">
|
||||
<tt-dashboard-display-card
|
||||
header="Greenfield"
|
||||
icon="fas fa-leaf"
|
||||
:text="addressDbData.other_types.type_greenfield"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.other_types.type_greenfield_homes
|
||||
]"
|
||||
color="#0bb36c"
|
||||
/>
|
||||
<tt-dashboard-display-card
|
||||
header="Transformatorstationen"
|
||||
icon="fas fa-bolt"
|
||||
:text="addressDbData.other_types.type_transformer_station"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.other_types.type_transformer_station_homes
|
||||
]"
|
||||
color="#007bff"
|
||||
/>
|
||||
<tt-dashboard-display-card
|
||||
header="Andere"
|
||||
icon="fas fa-question-circle"
|
||||
:text="addressDbData.other_types.type_others"
|
||||
:subHeaders="[
|
||||
'Wohneinheiten: ' + addressDbData.other_types.type_others_homes
|
||||
]"
|
||||
color="#6c757d"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
|
||||
Vue.component('dashboard-adb', {
|
||||
template: `
|
||||
<tt-card>
|
||||
<template v-slot:header>
|
||||
<h3>Adressdatenbank Statistiken</h3>
|
||||
</template>
|
||||
<tt-loader v-if="isLoading" style="margin: -5rem -1.5rem -1.5rem;"/>
|
||||
<div class="dashboard-adb">
|
||||
<dashboard-location-selector-adb
|
||||
:selectedNetwork="selectedNetwork"
|
||||
@update:selectedNetwork="selectedNetwork = $event"
|
||||
/>
|
||||
<hr>
|
||||
|
||||
<dashboard-adb-content v-if="!isLoading && addressDbData" :addressDbData="addressDbData"/>
|
||||
</div>
|
||||
</tt-card>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
addressDbData: null,
|
||||
selectedNetwork: 'all',
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
async mounted() {
|
||||
await this.fetchAddressDbData();
|
||||
},
|
||||
methods: {
|
||||
async fetchAddressDbData() {
|
||||
this.isLoading = true;
|
||||
try {
|
||||
// Use the correct API endpoint as specified
|
||||
const netzgebietId = this.selectedNetwork === 'all' ? '' : this.selectedNetwork;
|
||||
const url = `${window.TT_CONFIG['BASE_PATH']}/DashboardNew/getDashboardAddressDBData${netzgebietId ? '?netzgebiet_id=' + netzgebietId : ''}`;
|
||||
|
||||
const response = await axios.get(url);
|
||||
this.addressDbData = response.data;
|
||||
console.log('Address DB data:', this.addressDbData);
|
||||
} catch (error) {
|
||||
console.error('Error fetching address DB data:', error);
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
selectedNetwork() {
|
||||
this.fetchAddressDbData();
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user