Merge branch 'fronkdev' into 'master'
Added Citycom Data to Preorder detail See merge request fronk/thetool!1662
This commit is contained in:
@@ -7,8 +7,12 @@
|
|||||||
<ul class="nav nav-tabs order-tab">
|
<ul class="nav nav-tabs order-tab">
|
||||||
<li class="nav-item"><a class="nav-link active" href="#preorder-detail-<?=$preorder->id?>-detail" data-toggle="tab" aria-expanded="false">Bestellung</a></li>
|
<li class="nav-item"><a class="nav-link active" href="#preorder-detail-<?=$preorder->id?>-detail" data-toggle="tab" aria-expanded="false">Bestellung</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-address" data-toggle="tab" aria-expanded="false">Adressdetails</a></li>
|
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-address" data-toggle="tab" aria-expanded="false">Adressdetails</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-flags" data-toggle="tab" aria-expanded="false">Status</a></li>
|
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-flags" data-toggle="tab" aria-expanded="false">Status</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-rimo" data-toggle="tab" aria-expanded="false">RIMO</a></li>
|
<?php if($preorder->campaign->fulfillment != "citycom_oan"): ?>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-rimo" data-toggle="tab" aria-expanded="false">RIMO</a></li>
|
||||||
|
<?php else: ?>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-citycom-oan" data-toggle="tab" aria-expanded="false">Citycom OAN</a></li>
|
||||||
|
<?php endif; ?>
|
||||||
<?php if($preorder->adb_hausnummer->borderpoint_lat && $preorder->adb_hausnummer->borderpoint_long): ?>
|
<?php if($preorder->adb_hausnummer->borderpoint_lat && $preorder->adb_hausnummer->borderpoint_long): ?>
|
||||||
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-map" data-toggle="tab" aria-expanded="false" onclick="loadBorderpointMap(<?=$preorder->id?>)">Übergabepunkt</a></li>
|
<li class="nav-item"><a class="nav-link" href="#preorder-detail-<?=$preorder->id?>-map" data-toggle="tab" aria-expanded="false" onclick="loadBorderpointMap(<?=$preorder->id?>)">Übergabepunkt</a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
@@ -430,6 +434,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php if($preorder->campaign->fulfillment != "citycom_oan"): ?>
|
||||||
<div id="preorder-detail-<?=$preorder->id?>-rimo" class="tab-pane">
|
<div id="preorder-detail-<?=$preorder->id?>-rimo" class="tab-pane">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@@ -564,68 +569,126 @@
|
|||||||
<p>Kein FCP zugewiesen</p>
|
<p>Kein FCP zugewiesen</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="row col">
|
<div class="row col">
|
||||||
<h3>
|
<h3>
|
||||||
Patchposition
|
Patchposition
|
||||||
<?php if($preorder->adb_wohneinheit_id): ?>
|
<?php if($preorder->adb_wohneinheit_id): ?>
|
||||||
<small id="preorder-detail-<?=$preorder->id?>-patchposition-edit"><a href="#" onclick="togglePortdata(<?=$preorder->id?>); return false;"><i class="fas fa-pencil"></i> Bearbeiten</a></small>
|
<small id="preorder-detail-<?=$preorder->id?>-patchposition-edit"><a href="#" onclick="togglePortdata(<?=$preorder->id?>); return false;"><i class="fas fa-pencil"></i> Bearbeiten</a></small>
|
||||||
<span id="preorder-detail-<?=$preorder->id?>-patchposition-controls" class="hidden">
|
<span id="preorder-detail-<?=$preorder->id?>-patchposition-controls" class="hidden">
|
||||||
<button type="button" class="btn btn-sm btn-primary" onclick="savePortdata(<?=$preorder->id?>)"><i class="fas fa-check"></i></button>
|
<button type="button" class="btn btn-sm btn-primary" onclick="savePortdata(<?=$preorder->id?>)"><i class="fas fa-check"></i></button>
|
||||||
<button type="button" class="btn btn-sm btn-secondary" onclick="togglePortdata(<?=$preorder->id?>)"><i class="fas fa-times"></i></button>
|
<button type="button" class="btn btn-sm btn-secondary" onclick="togglePortdata(<?=$preorder->id?>)"><i class="fas fa-times"></i></button>
|
||||||
</span>
|
</span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</h3>
|
</h3>
|
||||||
<table class="table table-sm table-striped" id="preorder-detail-<?=$preorder->id?>-patchposition">
|
<table class="table table-sm table-striped" id="preorder-detail-<?=$preorder->id?>-patchposition">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Equipment Name:</th>
|
<th>Equipment Name:</th>
|
||||||
<td>
|
<td>
|
||||||
<span id="preorder-detail-<?=$preorder->id?>-patchposition-string"><?=$preorder->adb_wohneinheit->getPatchEqString()?></span>
|
<span id="preorder-detail-<?=$preorder->id?>-patchposition-string"><?=$preorder->adb_wohneinheit->getPatchEqString()?></span>
|
||||||
<table class="row hidden" id="preorder-detail-<?=$preorder->id?>-patchposition-data-form">
|
<table class="row hidden" id="preorder-detail-<?=$preorder->id?>-patchposition-data-form">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Cluster:</td>
|
<th>Cluster:</th>
|
||||||
<td><input type="text" class="form-control" name="patch_cluster"
|
<td><input type="text" class="form-control" name="patch_cluster"
|
||||||
data-default="<?=($preorder->adb_wohneinheit->patch_cluster) ? $preorder->adb_wohneinheit->patch_cluster : $preorder->adb_hausnummer->netzgebiet->extref?>"
|
data-default="<?=($preorder->adb_wohneinheit->patch_cluster) ? $preorder->adb_wohneinheit->patch_cluster : $preorder->adb_hausnummer->netzgebiet->extref?>"
|
||||||
/></td>
|
/></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Shelf:</th>
|
<th>Shelf:</th>
|
||||||
<td><input type="text" class="form-control" name="patch_shelf"
|
<td><input type="text" class="form-control" name="patch_shelf"
|
||||||
data-default="<?=$preorder->adb_wohneinheit->patch_shelf?>"
|
data-default="<?=$preorder->adb_wohneinheit->patch_shelf?>"
|
||||||
/></td>
|
/></td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
<th>Module:</th>
|
<th>Module:</th>
|
||||||
<td><input type="text" class="form-control" name="patch_module"
|
<td><input type="text" class="form-control" name="patch_module"
|
||||||
data-default="<?=$preorder->adb_wohneinheit->patch_module?>"
|
data-default="<?=$preorder->adb_wohneinheit->patch_module?>"
|
||||||
/></td>
|
/></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Equipment Port:</th>
|
<th>Equipment Port:</th>
|
||||||
<td>
|
<td>
|
||||||
<span id="preorder-detail-<?=$preorder->id?>-patchposition-port"><?=$preorder->adb_wohneinheit->patch_port?></span>
|
<span id="preorder-detail-<?=$preorder->id?>-patchposition-port"><?=$preorder->adb_wohneinheit->patch_port?></span>
|
||||||
<table class="row hidden" id="preorder-detail-<?=$preorder->id?>-patchposition-port-form">
|
<table class="row hidden" id="preorder-detail-<?=$preorder->id?>-patchposition-port-form">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Port:</td>
|
<th>Port:</th>
|
||||||
<td><input type="text" class="form-control" name="patch_port" data-default="<?=$preorder->adb_wohneinheit->patch_port?>" /></td>
|
<td><input type="text" class="form-control" name="patch_port" data-default="<?=$preorder->adb_wohneinheit->patch_port?>" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if($preorder->campaign->fulfillment == "citycom_oan"): ?>
|
||||||
|
<div id="preorder-detail-<?=$preorder->id?>-citycom-oan" class="tab-pane">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="card-header bg-info text-white pl-2 pr-2 pt-1 pb-1">Citycom OAN</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<h3>Services</h3>
|
||||||
|
<table class="table table-sm table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>stag</th>
|
||||||
|
<th>ctag</th>
|
||||||
|
<th>Typ</th>
|
||||||
|
<th>External ID</th>
|
||||||
|
<th>External State</th>
|
||||||
|
</tr>
|
||||||
|
<?php if(is_array($preorder->ctags) && count($preorder->ctags)): ?>
|
||||||
|
<?php foreach($preorder->ctags as $ctag): ?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-monospace"><?=$ctag->stag?></td>
|
||||||
|
<td class="text-monospace"><?=$ctag->ctag?></td>
|
||||||
|
<td class="text-monospace"><?=$ctag->service_type?></td>
|
||||||
|
<td class="text-monospace"><?=htmlentities($ctag->ext_id)?></td>
|
||||||
|
<td class="text-monospace"><?=htmlentities($ctag->ext_status)?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<h3>ONT</h3>
|
||||||
|
<table class="table table-sm table-striped">
|
||||||
|
<tr>
|
||||||
|
<th>SN</th>
|
||||||
|
<td class="text-monospace"><?=($preorder->citycomoan) ? $preorder->citycomoan->ont_sn : ""?></td>
|
||||||
|
</tr><tr>
|
||||||
|
<th>FSAN</th>
|
||||||
|
<td class="text-monospace"><?=($preorder->citycomoan) ? $preorder->citycomoan->ont_gpid : ""?></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div id="preorder-detail-<?=$preorder->id?>-flags" class="tab-pane">
|
<div id="preorder-detail-<?=$preorder->id?>-flags" class="tab-pane">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|||||||
@@ -140,6 +140,9 @@
|
|||||||
<option value="rimo" <?= ($campaign->fulfillment == "rimo") ? "selected='selected'" : "" ?>>
|
<option value="rimo" <?= ($campaign->fulfillment == "rimo") ? "selected='selected'" : "" ?>>
|
||||||
RIMO
|
RIMO
|
||||||
</option>
|
</option>
|
||||||
|
<option value="citycom_oan" <?= ($campaign->fulfillment == "citycom_oan") ? "selected='selected'" : "" ?>>
|
||||||
|
Citycom OAN
|
||||||
|
</option>
|
||||||
<option value="thirdparty" <?= ($campaign->fulfillment == "thirdparty") ? "selected='selected'" : "" ?>>
|
<option value="thirdparty" <?= ($campaign->fulfillment == "thirdparty") ? "selected='selected'" : "" ?>>
|
||||||
Drittsystem
|
Drittsystem
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class SnoppCitycom extends Modules\ApiControllerModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($preorder->campaign->name == "Citycom - Graz") {
|
if($preorder->campaign->fulfillment == "citycom_oan") {
|
||||||
$data["product_name"] = "Estmk Greenstream OAN $bb_down/$bb_up";
|
$data["product_name"] = "Estmk Greenstream OAN $bb_down/$bb_up";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ class Preorder extends mfBaseModel {
|
|||||||
private $attribute = [];
|
private $attribute = [];
|
||||||
private $logistics;
|
private $logistics;
|
||||||
private $history;
|
private $history;
|
||||||
|
private $citycomoan; // ONT data
|
||||||
|
private $ctags; // network-keyed array of Ctags
|
||||||
|
|
||||||
protected function beforeUpdate($data) {
|
protected function beforeUpdate($data) {
|
||||||
if(!array_key_exists("edit_by", $data)) {
|
if(!array_key_exists("edit_by", $data)) {
|
||||||
@@ -1555,6 +1557,20 @@ class Preorder extends mfBaseModel {
|
|||||||
return ADBRimoFcp::get($this->adb_hausnummer->fcp_id);
|
return ADBRimoFcp::get($this->adb_hausnummer->fcp_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($name == "citycomoan") {
|
||||||
|
$ccoan = PreorderCitycomOan::getFirst(["preorder_id" => $this->id]);
|
||||||
|
if(!$ccoan) return null;
|
||||||
|
$this->citycomoan = $ccoan;
|
||||||
|
return $this->citycomoan;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($name == "ctags") {
|
||||||
|
$ctags = PreorderCtag::searchActive(["preorder_id" => $this->id]);
|
||||||
|
if(!$ctags) return null;
|
||||||
|
$this->ctags = $ctags;
|
||||||
|
return $this->ctags;
|
||||||
|
}
|
||||||
|
|
||||||
if($name == "editor") {
|
if($name == "editor") {
|
||||||
$this->editor = new User($this->edit_by);
|
$this->editor = new User($this->edit_by);
|
||||||
return $this->editor;
|
return $this->editor;
|
||||||
|
|||||||
@@ -236,6 +236,8 @@ class PreordercampaignController extends mfBaseController {
|
|||||||
$data['fulfillment'] = "thirdparty";
|
$data['fulfillment'] = "thirdparty";
|
||||||
} elseif($r->fulfillment == "rimo") {
|
} elseif($r->fulfillment == "rimo") {
|
||||||
$data['fulfillment'] = "rimo";
|
$data['fulfillment'] = "rimo";
|
||||||
|
} elseif($r->fulfillment == "citycom_oan") {
|
||||||
|
$data['fulfillment'] = "citycom_oan";
|
||||||
} else {
|
} else {
|
||||||
$data['fulfillment'] = "thetool";
|
$data['fulfillment'] = "thetool";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class PreordercampaignAddFulfillmentCitycomOan extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
$table = $this->table("Preordercampaign");
|
||||||
|
$table->changeColumn("fulfillment", "enum", ["null" => false, "default" => "thetool", "values" => ['thetool', 'thirdparty', 'rimo', 'citycom_oan']]);
|
||||||
|
$table->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user