diff --git a/Layout/default/AddressDB/View.php b/Layout/default/AddressDB/View.php index 33814c0ea..2be81de80 100644 --- a/Layout/default/AddressDB/View.php +++ b/Layout/default/AddressDB/View.php @@ -75,6 +75,9 @@ Rimo Operational State rimo_op_state?> + + Rimo User Label + rimo_user_label?> vlan_stag): ?> diff --git a/Layout/default/Preorder/include/preorder-detail.php b/Layout/default/Preorder/include/preorder-detail.php index f3edfdfd8..5dd8a997f 100644 --- a/Layout/default/Preorder/include/preorder-detail.php +++ b/Layout/default/Preorder/include/preorder-detail.php @@ -506,6 +506,9 @@ Building External ID: adb_hausnummer->rimo_id?> + + User Label: + adb_hausnummer->rimo_user_label?> Building Execution State: adb_hausnummer->rimo_ex_state?> diff --git a/db/migrations/20260202101938_adb_hausnummer_add_rimo_user_label.php b/db/migrations/20260202101938_adb_hausnummer_add_rimo_user_label.php new file mode 100644 index 000000000..08b10d5c7 --- /dev/null +++ b/db/migrations/20260202101938_adb_hausnummer_add_rimo_user_label.php @@ -0,0 +1,31 @@ +getEnvironment() == "thetool") { + + } + + if($this->getEnvironment() == "addressdb") { + $table = $this->table("Hausnummer"); + $table->addColumn("rimo_user_label", "string", ["null" => true, "default" => null, "after" => "rimo_op_state", "limit" => 255]); + $table->update(); + } + } + + public function down(): void + { + if($this->getEnvironment() == "thetool") { + + } + + if($this->getEnvironment() == "addressdb") { + + } + } +} diff --git a/scripts/adb-rimo-import/rimo-import.php b/scripts/adb-rimo-import/rimo-import.php index 41205a64f..78dd096b1 100755 --- a/scripts/adb-rimo-import/rimo-import.php +++ b/scripts/adb-rimo-import/rimo-import.php @@ -354,6 +354,14 @@ foreach ($clusters as $cluster_data) { $hausnummer_changed = true; } + if(!$building->userLabel && $hausnummer->rimo_user_label) { + $hausnummer->rimo_user_label = null; + $hausnummer_changed = true; + } elseif($building->userLabel != $hausnummer->rimo_user_label) { + $hausnummer->rimo_user_label = $building->userLabel; + $hausnummer_changed = true; + } + if($hausnummer_changed) { $hausnummer->save(); $hausnummer->resetSaveNesting();