Merge branch 'fronkdev' into 'master'
Preorder API Update & Added adb_netzgebiet_id to Network/Form See merge request fronk/thetool!153
This commit is contained in:
@@ -39,10 +39,10 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<a href="https://thetool.xinon.at/xfarm/" class="btn btn-primary" target="_blank"><i class="far fa-arrows-to-circle fa-fw"></i> AR-Merge / Fibu Konten Import</a>
|
||||
<a href="<?=self::getUrl("Address", "exportBmd")?>" class="ml-2 btn btn-outline-primary"><i class="fas fa-down-from-dotted-line fa-fw"></i> Inkrementellen BMD-Export starten</a>
|
||||
<a href="<?=self::getUrl("Address", "exportBmd")?>" class="ml-2 btn btn-outline-primary" onclick="if(!confirm('Wirklich inkrementellen BMD-Export starten?')) return false;"><i class="fas fa-down-from-dotted-line fa-fw"></i> Inkrementellen BMD-Export starten</a>
|
||||
<?php if($last_bmd_export): ?><small>Letzter Export: <?=date("d.m.Y H:i", $last_bmd_export)?></small><?php endif; ?>
|
||||
|
||||
<a href="<?=self::getUrl("Address", "exportBmd", ["type" => "full"])?>" class="btn btn-outline-danger float-right"><i class="fas fa-down-from-line fa-fw"></i> Vollen BMD-Export starten</a>
|
||||
<a href="<?=self::getUrl("Address", "exportBmd", ["type" => "full"])?>" class="btn btn-outline-danger float-right" onclick="if(!confirm('Wirklich vollständigen BMD-Export starten?')) return false;"><i class="fas fa-down-from-line fa-fw"></i> Vollen BMD-Export starten</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="sytemowner_action_status">Workorder Filter (Admins)</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="sytemowner_action_status" id="sytemowner_action_status">
|
||||
<select class="form-control" name="sytemowner_action_status" id="sytemowner_action_status">
|
||||
<option></option>
|
||||
<option value="pipework_needed" <?=($network->sytemowner_action_status == "pipework_needed") ? "selected='selected'" : ""?>>Tiefbau ausständig</option>
|
||||
<option value="building_connected" <?=($network->sytemowner_action_status == "building_connected") ? "selected='selected'" : ""?>>Tiefbau erledigt</option>
|
||||
@@ -61,6 +61,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="adb_netzgebiet_id">ADB Netzgebiet</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="select2 form-control " name="adb_netzgebiet_id" id="adb_netzgebiet_id">
|
||||
<option></option>
|
||||
<?php foreach(ADBNetzgebietModel::getAll() as $adbn): ?>
|
||||
<option value="<?=$adbn->id?>" <?=($network->adb_netzgebiet_id == $adbn->id) ? "selected='selected'" : ""?>><?=$adbn->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -93,11 +106,14 @@
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#parent_id").select2({
|
||||
$("#adb_netzgebiet_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#owner_id").select2({
|
||||
allowClear: true,
|
||||
placeholder: ""
|
||||
});
|
||||
$("#addresstypes").select2();
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace thetool\Api\Modules;
|
||||
namespace application\Api\v1\Modules;
|
||||
|
||||
class ApiControllerModule {
|
||||
protected $log;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace thetool\Api\Modules\Preorder;
|
||||
use thetool\Api\Modules;
|
||||
//namespace thetool\Api\Modules\Preorder;
|
||||
namespace application\Api\v1\Modules\Preorder;
|
||||
use application\Api\v1\Modules;
|
||||
|
||||
require_once(APPDIR."/Api/v1/Modules/ApiControllerModule.php");
|
||||
|
||||
@@ -15,9 +16,9 @@ class Activation extends Modules\ApiControllerModule {
|
||||
}
|
||||
|
||||
/*
|
||||
* GET /preorder/:code/clientInstallationFinished
|
||||
* POST /preorder/:code/serviceActivated
|
||||
*/
|
||||
public function serviceActivated($code) {
|
||||
public function setServiceActive($code) {
|
||||
$code = trim($code);
|
||||
if(!$code) {
|
||||
return \mfResponse::NotFound(["message" => "Preorder not found"]);
|
||||
@@ -41,9 +42,9 @@ class Activation extends Modules\ApiControllerModule {
|
||||
return \mfResponse::NotFound(["message" => "Preorder not found"]);
|
||||
}
|
||||
|
||||
// set status to 200
|
||||
if($preorder->status->code < 200) {
|
||||
$new_status = \PreorderstatusModel::getFirst(["code" => 200]);
|
||||
// set status to 500
|
||||
if($preorder->status->code < 500) {
|
||||
$new_status = \PreorderstatusModel::getFirst(["code" => 500]);
|
||||
if(!$new_status) {
|
||||
return \mfResponse::InternalServerError();
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace thetool\Api\Modules\Preorder;
|
||||
use thetool\Api\Modules;
|
||||
namespace application\Api\v1\Modules\Preorder;
|
||||
use application\Api\v1\Modules;
|
||||
|
||||
require_once(APPDIR."/Api/v1/Modules/ApiControllerModule.php");
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
require_once(APPDIR."/Api/v1/Modules/Preorder/Cif.php");
|
||||
require_once(APPDIR."/Api/v1/Modules/Preorder/Activation.php");
|
||||
|
||||
use thetool\Api\Modules;
|
||||
use application\Api\v1\Modules;
|
||||
|
||||
class PreorderApicontroller extends mfBaseApicontroller {
|
||||
//private $filter_gemeinde_ids = [];
|
||||
@@ -27,10 +27,13 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
}
|
||||
|
||||
protected function registerRoutes() {
|
||||
|
||||
/*
|
||||
* TODO: Load Api Modules automatically in mfBaseApiController
|
||||
*/
|
||||
$modules = [];
|
||||
$moduleNames = ["Cif", "Activation"];
|
||||
foreach($moduleNames as $moduleName) {
|
||||
$classname = "thetool\Api\Modules\Preorder\\".$moduleName;
|
||||
foreach(["Cif", "Activation"] as $moduleName) {
|
||||
$classname = "application\\Api\\v1\\Modules\\Preorder\\".$moduleName;
|
||||
$modules[$moduleName] = new $classname([
|
||||
"get" => $this->get,
|
||||
"post" => $this->post,
|
||||
@@ -46,10 +49,12 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
$this->addRoute("/preorder/customerInstallationFeedback", [$modules["Cif"], "getCifData"], "GET");
|
||||
$this->addRoute("/preorder/customerInstallationFeedback", [$modules["Cif"], "userSetCif"], "POST");
|
||||
|
||||
$this->addRoute("/preorder/:code", "getPreorder", "GET");
|
||||
$this->addRoute("/preorder/:code", "cancelPreorder", "DELETE");
|
||||
$this->addRoute("/preorder/:code/clientInstallationFinished", [$modules["Cif"], "providerSetCif"], "GET");
|
||||
$this->addRoute("/preorder/:code/serviceActivated", [$modules["Activation"], "setServiceActive"], "POST");
|
||||
$this->addRoute("/preorder/:code", "getPreorder", "GET");
|
||||
$this->addRoute("/preorder/:code", "cancelPreorder", "DELETE");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -75,6 +75,7 @@ class NetworkController extends mfBaseController {
|
||||
$data['owner_id'] = $r->owner_id;
|
||||
$data['name'] = $r->name;
|
||||
$data['note'] = $r->note;
|
||||
$data['adb_netzgebiet_id'] = $r->adb_netzgebiet_id;
|
||||
|
||||
if($r->sytemowner_action_status) {
|
||||
$data['sytemowner_action_status'] = $r->sytemowner_action_status;
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class AddressdbNetzgebietAddRimoId extends AbstractMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
$table = $this->table("Netzgebiet");
|
||||
$table->addColumn("rimo_id", "string", ["null" => true, "default" => null, "limit" => 255, "after" => "extref"]);
|
||||
$table->update();
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if($this->getEnvironment() == "thetool") {
|
||||
|
||||
}
|
||||
|
||||
if($this->getEnvironment() == "addressdb") {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user