-
-
-
+
+
+
\ No newline at end of file
diff --git a/Layout/default/menu.php b/Layout/default/menu.php
index 4ac0041c7..b2a321c0f 100644
--- a/Layout/default/menu.php
+++ b/Layout/default/menu.php
@@ -59,40 +59,40 @@
- is(["Admin"])): ?>
+ is(["Admin", "netowner", "salespartner"]) && ($me->is("employee") || $me->can(["Fibu", "Billing", "Preorderpricing", "Preorderbilling"]))): ?>
@@ -196,14 +206,13 @@
diff --git a/application/PreorderProduct/PreorderProductController.php b/application/PreorderProduct/PreorderProductController.php
index 970fdbbed..b91695625 100644
--- a/application/PreorderProduct/PreorderProductController.php
+++ b/application/PreorderProduct/PreorderProductController.php
@@ -67,7 +67,7 @@ class PreorderProductController extends mfBaseController {
foreach($r->netoperators as $netoperator_id => $product_data) {
$netoperator = new Address($netoperator_id);
if(!$netoperator->id) {
- $this->layout()->setFlash("Betzbetreiber nicht gefunden", "error");
+ $this->layout()->setFlash("Netzbetreiber nicht gefunden", "error");
$this->layout()->redirect("PreorderProduct");
}
foreach($product_data as $product_id => $price_data) {
@@ -75,7 +75,7 @@ class PreorderProductController extends mfBaseController {
$product = new PreorderProduct($product_id);
if(!$product->id) {
$this->layout()->setFlash("Produkt $product_id nicht gefunden", "error");
- $this->layout()->redirect("PreorderProduct");
+ $this->layout()->redirect("PreorderProduct","",[], "product-".$netoperator_id);
}
// create new PreorderProductPrice
@@ -97,7 +97,7 @@ class PreorderProductController extends mfBaseController {
if(!$price_data["start_date"]) {
$this->layout()->setFlash("Von-datum fehlt bei Produkt '".$product->name."' für '".$netoperator->getCompanyOrName()."'", "error");
- $this->redirect("PreorderProduct");
+ $this->redirect("PreorderProduct","",[], "product-".$netoperator_id."-".$product_id);
} else {
try {
$start_date = new DateTime("@" . $this->dateToTimestamp(trim($price_data["start_date"])));
@@ -105,7 +105,7 @@ class PreorderProductController extends mfBaseController {
$price->start_date = $start_date->format("Y-m-d");
} catch(Exception $e) {
$this->layout()->setFlash("Fehler im Von-datum bei Produkt '".$product->name."' für '".$netoperator->getCompanyOrName()."'", "error");
- $this->redirect("PreorderProduct");
+ $this->redirect("PreorderProduct","",[], "product-".$netoperator_id."-".$product_id);
}
}
if(trim($price_data["end_date"])) {
@@ -115,7 +115,7 @@ class PreorderProductController extends mfBaseController {
$price->end_date = $end_date->format("Y-m-d");
} catch(Exception $e) {
$this->layout()->setFlash("Fehler im Bis-Datum bei Produkt '".$product->name."' für '".$netoperator->getCompanyOrName()."'", "error");
- $this->redirect("PreorderProduct");
+ $this->redirect("PreorderProduct","",[], "product-".$netoperator_id."-".$product_id);
}
}
@@ -147,7 +147,7 @@ class PreorderProductController extends mfBaseController {
$campaign = new Preordercampaign($campaign_id);
if(!$campaign->id) {
$this->layout()->setFlash("Ungültige Kampagne bei Produkt '".$product->name."' für '".$netoperator->getCompanyOrName()."'", "error");
- $this->layout()->redirect("PreorderProduct");
+ $this->layout()->redirect("PreorderProduct","",[], "product-".$netoperator_id."-".$product_id);
}
$price_campaign = PreorderProductPriceCampaign::create([
"preorderproductprice_id" => $price->id,
@@ -160,7 +160,7 @@ class PreorderProductController extends mfBaseController {
}
$this->layout()->setFlash("Neue Preise erflgreich gespeichert", "success");
- $this->redirect("PreorderProduct");
+ $this->redirect("PreorderProduct","",[], "product-".$netoperator_id."-".$product_id);
}
}
\ No newline at end of file
diff --git a/application/User/UserController.php b/application/User/UserController.php
index 5d61ef44d..8b7a1a2fb 100644
--- a/application/User/UserController.php
+++ b/application/User/UserController.php
@@ -242,6 +242,10 @@ class UserController extends mfBaseController
$user->permissions->canCpeshipping = "false";
$user->permissions->canVoipnumbering = "false";
$user->permissions->canPreorder = "false";
+ $user->permissions->canPreorderpricing = "false";
+ $user->permissions->canPreorderpricingReadonly = "false";
+ $user->permissions->canPreorderbilling = "false";
+ $user->permissions->canPreorderbillingReadonly = "false";
$user->permissions->canOrder = "false";
$user->permissions->canBilling = "false";
$user->permissions->canFibu = "false";
diff --git a/db/migrations/20250225151428_add_preorderbilling_permissions.php b/db/migrations/20250225151428_add_preorderbilling_permissions.php
new file mode 100644
index 000000000..a0fcc041a
--- /dev/null
+++ b/db/migrations/20250225151428_add_preorderbilling_permissions.php
@@ -0,0 +1,37 @@
+getEnvironment() == "thetool") {
+ $table = $this->table("WorkerPermission");
+ $table->addColumn("canPreorderpricing", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorder"]);
+ $table->addColumn("canPreorderpricingReadonly", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderpricing"]);
+ $table->addColumn("canPreorderbilling", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderpricingReadonly"]);
+ $table->addColumn("canPreorderbillingReadonly", "enum", ["values" => 'false,true', "default" => "false", "after" => "canPreorderbilling"]);
+ $table->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+
+ public function down(): void
+ {
+ if($this->getEnvironment() == "thetool") {
+ $this->table("WorkerPermission")->removeColumn("canPreorderpricing")->update();
+ $this->table("WorkerPermission")->removeColumn("canPreorderpricingReadonly")->update();
+ $this->table("WorkerPermission")->removeColumn("canPreorderbilling")->update();
+ $this->table("WorkerPermission")->removeColumn("canPreorderbillingReadonly")->update();
+ }
+
+ if($this->getEnvironment() == "addressdb") {
+
+ }
+ }
+}
diff --git a/public/assets/css/thetool.css b/public/assets/css/thetool.css
index 49edbc532..d15ae87d5 100644
--- a/public/assets/css/thetool.css
+++ b/public/assets/css/thetool.css
@@ -203,6 +203,10 @@ h1, h2, h3, h4, h5, h6 {
border-bottom: 1px solid #eee;
}
+.submenu .border-top {
+ border-top: 1px solid #eee !important;
+}
+
.sub-submenu {
padding-left: 12px !important;
}