diff --git a/Layout/default/Cpeprovisioning/Index.php b/Layout/default/Cpeprovisioning/Index.php new file mode 100644 index 000000000..533b5f9c6 --- /dev/null +++ b/Layout/default/Cpeprovisioning/Index.php @@ -0,0 +1,242 @@ + + + +
+
+
+
+ +
+

CPE Provisioning

+
+
+
+ + +
+
+ + + + +
+
+
+

CPE Provisioning

+
+ + $pagination['count']): ?> + + + + + + + + bottom-no-border"> + + + + + + + + + top-no-border"> + + + + + + + + + "> + + + + + +
NetzgebietService PINKundeProduktAccess TypeVLANs
termination_id) ? $product->termination->building->network->name : $product->order->owner->zip." ".$product->order->owner->city?>order->owner->spin?>order->owner->getCompanyOrName()?>product->name?>product->attributes['bras_type']->value?> + termination_id): ?> + Public: termination->building->pop->vlan_public?> + NAT: termination->building->pop->vlan_nat?> + IPv6: termination->building->pop->vlan_ipv6?> + + Public: product->attributes['vlan_default_public']->value?> + NAT: product->attributes['vlan_default_nat']->value?> + IPv6: product->attributes['vlan_default_ipv6']->value?> + + + order->products as $prod) { + if(is_array($prod->product->attributes) && count($prod->product->attributes)) { + if(array_key_exists("hw_only", $prod->product->attributes)) { + if($prod->product->attributes["hw_only"]->value) { + $hw = true; + } + } + if(array_key_exists("voip_chan", $prod->product->attributes)) { + if($prod->product->attributes["voip_chan"]->value) { + $voip = true; + } + } + if(array_key_exists("vot", $prod->product->attributes)) { + if($prod->product->attributes["vot"]->value) { + $vot = true; + } + } + if($hw && $voip_chan) { + break; + } + } + } + ?> + " : ""?> + " : ""?> + " : ""?> + order->note) ? "order->note)."'>" : ""?> +
+ +
+
+ +
+ + +
+ +
+ +
+
+ + /> +
+
+ +
+
+ + /> +
+
+
+
+ + /> +
+
+
+
+ + /> +
+
+
+
+ + /> +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + $pagination['count']): ?> + + + +
+
+ +
+
+ + diff --git a/Layout/default/Order/Index.php b/Layout/default/Order/Index.php index dce3cde61..d1a38b037 100644 --- a/Layout/default/Order/Index.php +++ b/Layout/default/Order/Index.php @@ -263,7 +263,7 @@ ["code" => $order->terminations[0]->building->code, "status_id" => ""]])?>" target="_blank">BNC - + 14.10.2021'); + $('#date-pill-' + id + '-install_date').html('Vorortinstallation: ' + data.order.date + ''); $('#date-pill-' + id + '-install_date').addClass("active"); setTimeout(function() { diff --git a/Layout/default/Producttech/Form.php b/Layout/default/Producttech/Form.php index 9fb1ce737..c44416a57 100644 --- a/Layout/default/Producttech/Form.php +++ b/Layout/default/Producttech/Form.php @@ -11,7 +11,7 @@ -

Produkte

+

Technologien

diff --git a/Layout/default/menu.php b/Layout/default/menu.php index 8fba78213..37ed3ddda 100644 --- a/Layout/default/menu.php +++ b/Layout/default/menu.php @@ -44,6 +44,18 @@ + is(["Admin"])): ?> +
  • + + Netzbetrieb
    +
    + +
  • + + is(["Admin","salespartner"])): ?>
  • diff --git a/application/Cpeprovisioning/CpeprovisioningController.php b/application/Cpeprovisioning/CpeprovisioningController.php new file mode 100644 index 000000000..1084cae1b --- /dev/null +++ b/application/Cpeprovisioning/CpeprovisioningController.php @@ -0,0 +1,62 @@ +needlogin=true; + $me = new User(); + $me->loadMe(); + $this->me = $me; + $this->layout()->set("me",$me); + + if(!$me->is(["Admin", "salespartner"])) { + $this->redirect("Dashboard"); + } + } + + protected function indexAction() { + $this->layout()->setTemplate("Cpeprovisioning/Index"); + $cpeproducts = []; + + /* + * Get orderproducts in need of sending CPE + */ + $orders = OrderModel::search(["finish_date" => null]); + + foreach($orders as $order) { + if($order->finish_after) { + // show at most 4 weeks before finish_after date + $after_ts = Layout::dateToInt($order->finish_after); + if($after_ts > date("U") + (31 * 86400)) { + $this->log->debug("Before 4 weeks before finish_after oid ".$order->id); + continue; + } + } + + foreach($order->products as $orderproduct) { + $product = $orderproduct->product; + + if(is_array($product->attributes) && count($product->attributes)) { + // filter out products without bras_type + if(array_key_exists("bras_type", $product->attributes) && $product->attributes['bras_type']->value) { + $cpeproducts[] = $orderproduct; + } else { + $this->log->debug("no bras_type oid ".$order->id); + continue; + } + } else { + // ignore products without attributes + $this->log->debug("no attributes oid ".$order->id); + continue; + } + + } + } + + //var_dump($cpeproducts);exit; + + $this->layout()->set("products", $cpeproducts); + + } + +} \ No newline at end of file diff --git a/application/Order/OrderController.php b/application/Order/OrderController.php index 47f52186f..96314aae2 100644 --- a/application/Order/OrderController.php +++ b/application/Order/OrderController.php @@ -682,7 +682,7 @@ class OrderController extends mfBaseController { $order->install_date = $date; $order->save(); - $this->returnJson(["status" => "OK", "order" => ['id' => $order_id]]); + $this->returnJson(["status" => "OK", "order" => ['id' => $order_id, 'date' => date('d.m.Y', $date)]]); } protected function deleteAction() { diff --git a/public/assets/css/thetool.css b/public/assets/css/thetool.css index a4e92ec94..3a1c8754e 100644 --- a/public/assets/css/thetool.css +++ b/public/assets/css/thetool.css @@ -278,4 +278,16 @@ td.controls { .order-date-pill.active { border-color: #25b343; background-color: #f0fff0; +} + +.top-no-border td, +.top-no-border th { + border-top: none; + padding-top: 2px; +} + +.bottom-no-border td, +.bottom-no-border th { + border-bottom: none; + padding-bottom: 2px; } \ No newline at end of file