Merge branch 'fronkdev' into 'master'
importing and displaying Rimo Building userLabel See merge request fronk/thetool!2075
This commit is contained in:
@@ -75,6 +75,9 @@
|
||||
</tr><tr>
|
||||
<th>Rimo Operational State</th>
|
||||
<td><?=$address->rimo_op_state?></td>
|
||||
</tr><tr>
|
||||
<th>Rimo User Label</th>
|
||||
<td><?=$address->rimo_user_label?></td>
|
||||
</tr>
|
||||
<?php if($address->vlan_stag): ?>
|
||||
<tr>
|
||||
|
||||
@@ -506,6 +506,9 @@
|
||||
</tr><tr>
|
||||
<th>Building External ID:</th>
|
||||
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_id?>
|
||||
</tr><tr>
|
||||
<th>User Label:</th>
|
||||
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_user_label?>
|
||||
</tr><tr>
|
||||
<th>Building Execution State:</th>
|
||||
<td class="text-monospace"><?=$preorder->adb_hausnummer->rimo_ex_state?>
|
||||
|
||||
@@ -7,13 +7,14 @@ final class WarehouseCategorySetPrefixes extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$table = $this->table('WarehouseCategory');
|
||||
if (!$table->hasColumn('articleNumberPrefix')) {
|
||||
$table->addColumn('articleNumberPrefix', 'string', ['limit' => 4, 'null' => true, 'after' => 'description'])
|
||||
->update();
|
||||
}
|
||||
|
||||
if ($this->getEnvironment() == "thetool") {
|
||||
$table = $this->table('WarehouseCategory');
|
||||
if (!$table->hasColumn('articleNumberPrefix')) {
|
||||
$table->addColumn('articleNumberPrefix', 'string', ['limit' => 4, 'null' => true, 'after' => 'description'])
|
||||
->update();
|
||||
}
|
||||
|
||||
|
||||
$prefixes = [
|
||||
1 => '1901', // Dienstleistungen
|
||||
3 => '9980', // EStmk Shop
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AdbHausnummerAddRimoUserLabel extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->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") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user