Merge branch 'fronkdev2' into 'master'
Preorder AHA Report Download See merge request fronk/thetool!703
This commit is contained in:
81
Layout/default/AddressDB/Statusupdateimport.php
Normal file
81
Layout/default/AddressDB/Statusupdateimport.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("AddressDB")?>">AddressDB</a></li>
|
||||
<li class="breadcrumb-item active">Statusupdateimport</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Statusupdates importieren</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<div class="alert alert-info">
|
||||
<p>
|
||||
<strong>Werden Statusflags importiert, muss die Überschrift im CSV-File vorhanden sein!</strong><br />
|
||||
Statusflags können in beliebiger Reihenfolge angegeben werden, die Positionen müssen aber in Kopfzeile und Datenzeilen übereinstimmen.<br/>
|
||||
Nur zu ändernde Statusflags müssen angeführt werden.<br/>
|
||||
Statusflags können 1 (=gesetzt), 0 (=nicht gesetzt) oder leer sein. Ist das Feld leer, wird der Wert des Flags nicht verändert.
|
||||
</p>
|
||||
</div>
|
||||
<h4 class="header-title mb-2">Statusupdates importieren</h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Preorder", "saveStatusupdateimport")?>" enctype="multipart/form-data">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="statusupdate_csv">Statusupdate CSV</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="file" class="form-control" name="statusupdate_csv" />
|
||||
<small>
|
||||
Format: <span class="text-monospace">addressdb_id;Neuer Status Code;[flag;...]</span><br />
|
||||
Beispiel:<br />
|
||||
<span class="text-monospace">
|
||||
addressdb_id;new_code;141;145;150;200;242<br />
|
||||
1788231;200;1;0;;;
|
||||
</span>
|
||||
</small>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label"></label>
|
||||
<div class="col-lg-10">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="headline" />
|
||||
Erste Zeile enthält Überschrift
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2"></label>
|
||||
<div class="col-lg-10">
|
||||
<button type="submit" class="btn btn-primary">Importieren</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
107
Layout/default/ConstructionConsent/Form.php
Normal file
107
Layout/default/ConstructionConsent/Form.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/header.php"); ?>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?= self::getUrl("Dashboard") ?>"><?= MFAPPNAME_SLUG ?></a></li>
|
||||
<li class="breadcrumb-item"><a href="<?= self::getUrl("Preordercampaign") ?>">Zustimmungserklärungen</a></li>
|
||||
<li class="breadcrumb-item active"><?= ($Action == "add") ? "neu" : "bearbeiten" ?></li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zustimmungserklärung</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card bg-light">
|
||||
<div class="card-body">
|
||||
<h4 class="header-title mb-2">
|
||||
<?= ($Action == "add") ? "Neue " : "" ?>Zustimmungserklärung <?= ($Action == "edit") ? "bearbeiten " : "" ?>
|
||||
</h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?= self::getUrl("Preordercampaign", "save") ?>">
|
||||
<input type="hidden" name="id" value="<?=isset($item) ? $item->id : ""?>"/>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="object_type">Objekttyp *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="object_type" id="object_type">
|
||||
<option value="building" <?=($item->object_type == "building" ? "selected='selected'" : "")?>>Gebäude</option>
|
||||
<option value="street" <?=($item->object_type == "street" ? "selected='selected'" : "")?>>Straße</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="building-search">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="adb_hausnummer_id">Adresse/GST *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="adb_hausnummer_id" id="adb_hausnummer_id">
|
||||
<?php if($item->adb_hausnummer_id): ?>
|
||||
<option value="<?=$item->adb_hausnummer_id?>" selected="selected"><?=$item->adb_hausnummer->plz->plz?> <?=$item->adb_hausnummer->strasse->ortschaft->name?>, <?=$item->adb_hausnummer->strasse->name?> <?=$item->adb_hausnummer->hausnummer?></option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="street-search">
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="adb_strasse_id">Straße *</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name="adb_strasse_id" id="adb_strasse_id">
|
||||
<?php if($item->adb_strasse_id): ?>
|
||||
<option value="<?=$item->adb_strasse_id?>" selected="selected"><?=$item->adb_strasse->gemeinde->name?>, <?=$item->adb_strasse->name?></option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label" for="ez">Grundbuch Einlagezahl</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="ez" id="ez" value="<?=$item->ez?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$('#adb_hausnummer_id').select2({
|
||||
ajax: {
|
||||
url: '<?=self::getUrl("AddressDB", "api", ["do" => "findAddress", "include_gst" => 1])?>',
|
||||
delay: 250,
|
||||
dataType: 'json'
|
||||
},
|
||||
minimumInputLength: 3,
|
||||
placeholder: "Suche nach Straße / Hausnummer / Ort / Grundstücksnummer",
|
||||
allowClear: true
|
||||
});
|
||||
|
||||
$('#adb_hausnummer_id').on('select2:close', function(e) {
|
||||
if(!$('#adb_hausnummer_id').val()) {
|
||||
$('#new-address-toggle').show();
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__) . "/../../$mfLayoutPackage") . "/footer.php"); ?>
|
||||
153
Layout/default/ConstructionConsent/Index.php
Normal file
153
Layout/default/ConstructionConsent/Index.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Zustimmungserklärungen";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item active">Zustimmmungserklärungen</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Zustimmmungserklärungen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3"><i class="fad fa-filter fa-fw"></i> Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("ConstructionConsent")?>">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_object_type">Objektart</label>
|
||||
<select name="filter[object_type]" id="filter_object_type" class="form-control">
|
||||
<option></option>
|
||||
<option value="building" <?=(array_key_exists("object_type", $filter) && $filter["object_type"] == "building") ? "selected='selected'" : ""?>>Gebäude</option>
|
||||
<option value="street" <?=(array_key_exists("object_type", $filter) && $filter["object_type"] == "street") ? "selected='selected'" : ""?>>Straße</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_address">Objektadresse</label>
|
||||
<input type="text" class="form-control" name="filter[address]" id="filter_address" value="<?=(array_key_exists('address', $filter)) ? $filter['address'] : ""?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary"><i class="far fa-search fa-fw"></i> Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("ConstructionConsent", "", ["resetFilter" => 1])?>"><i class="far fa-xmark fa-fw"></i> Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Zustimmmungserklärungen</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-primary" href="<?=self::getUrl("ConstructionConsent", "add")?>"><i class="fas fa-plus"></i> Neue Zustimmungserklärung anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Objekttyp</th>
|
||||
<th>Objektadresse</th>
|
||||
<th title="Grundstücksnummer">GST-Nr.</th>
|
||||
<th title="Grundbuch Einlagezahl">EZ</th>
|
||||
<th>Besitzer</th>
|
||||
<th>Besitzer Adresse</th>
|
||||
<th>Besitzer Kontakt</th>
|
||||
<th>Anfragestatus</th>
|
||||
<th>Anfrageresultat</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($items as $item): ?>
|
||||
<tr>
|
||||
<td><?=__($item->object_type)?></td>
|
||||
<td>
|
||||
<?php if($item->object_type == "street"): ?>
|
||||
<?=$item->adb_strasse->name?>
|
||||
<?=$item->adb_strasse->gemeinde->name?>
|
||||
<?php else: ?>
|
||||
<?=$item->adb_hausnummer->strasse->name?>
|
||||
<?=$item->adb_hausnummer->hausnummer?><?=($item->adb_hausnummer->stiege) ? "/".$item->adb_hausnummer->stiege : ""?><br />
|
||||
<?=$item->adb_hausnummer->plz->plz?>
|
||||
<?=$item->adb_hausnummer->ortschaft->name?><br />
|
||||
<?=$item->adb_hausnummer->strasse->gemeinde->name?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=$item->adb_hausnummer->grund_nr?></td>
|
||||
<td><?=$item->ez?></td>
|
||||
<td><?=$item->owner_name?></td>
|
||||
<td>
|
||||
<?=$item->owner_street?><br />
|
||||
<?=$item->owner_zip?> <?=$item->owner_city?><br />
|
||||
</td>
|
||||
<td>
|
||||
<?php if($item->phone): ?>
|
||||
Tel: <?=$item->phone?><br />
|
||||
<?php endif; ?>
|
||||
<?php if($item->fax): ?>
|
||||
Fax: <?=$item->fax?><br />
|
||||
<?php endif; ?>
|
||||
<?php if($item->email): ?>
|
||||
Email: <?=$item->email?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=$item->status?></td>
|
||||
<td><?=$item->result?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("ConstructionConsent", "view", ["id" => $item->id])?>"><i class="far fa-eyes" title="Anzeigen"></i></a>
|
||||
<?php if(!$item->result): ?>
|
||||
<a href="<?=self::getUrl("ConstructionConsent", "edit", ["id" => $item->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>
|
||||
|
||||
<?php if($item->status == "new"): ?>
|
||||
<a href="<?=self::getUrl("ConstructionConsent", "delete", ["id" => $item->id])?>" onclick="if(!confirm('Zustimmungserklärung wirklich löschen?')) return false;" class="text-danger" title="Löschen"><i class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -830,14 +830,16 @@
|
||||
if(trenches) {
|
||||
trenches.forEach((trench) => {
|
||||
var trench_line = L.polyline(trench, {
|
||||
color: "limegreen"
|
||||
color: "maroon",
|
||||
weight: 7
|
||||
}).addTo(map);
|
||||
});
|
||||
}
|
||||
|
||||
if(home_trench) {
|
||||
var home_line = L.polyline(home_trench, {
|
||||
color: "aqua"
|
||||
color: "blue",
|
||||
weight: 7
|
||||
}).addTo(map);
|
||||
}
|
||||
|
||||
@@ -1041,5 +1043,38 @@
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
async function downloadWorkorderAha(workorder_id) {
|
||||
if(!workorder_id) return false;
|
||||
|
||||
var filename;
|
||||
|
||||
await fetch('<?=self::getUrl("RimoWorkorder", "downloadAha")?>?id=' + workorder_id)
|
||||
.then(resp => {
|
||||
const header = resp.headers.get("Content-disposition");
|
||||
let matches = header.match(/filename=['"]?([^'"]+)/i);
|
||||
filename = matches[1];
|
||||
if(!filename) {
|
||||
window.notify("error", "Fehler beim Download des AH-Blatts");
|
||||
return false;
|
||||
}
|
||||
return resp.blob();
|
||||
})
|
||||
.then(blob => {
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
a.style.display = 'none';
|
||||
a.href = url;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
window.URL.revokeObjectURL(url);
|
||||
window.notify("success", "Download gestartet...");
|
||||
})
|
||||
.catch(() => {
|
||||
window.notify("error", "Fehler beim Download des AH-Blatts");
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
|
||||
@@ -397,9 +397,13 @@
|
||||
|
||||
<div class="col-6">
|
||||
<h3>Workorder</h3>
|
||||
<?php if(is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)): ?>
|
||||
<?php if($preorder->adb_wohneinheit_id && is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)): ?>
|
||||
<?php foreach($preorder->adb_wohneinheit->rimo_workorders as $wo): ?>
|
||||
<h4><?=$wo->rimo_name?></h4>
|
||||
<h4>
|
||||
<?=$wo->rimo_name?>
|
||||
<a href="<?=self::getUrl("RimoWorkorder", "downloadAh", ["id" => $wo->id])?>" onclick="event.preventDefault(); downloadWorkorderAha(<?=$wo->id?>);"><i class="fas fa-fw fa-file-download ml-2"></i> AHA Blatt</a>
|
||||
<small class="text-danger">(beta)</small>
|
||||
</h4>
|
||||
<small id="preorder-detail-<?=$preorder->id?>-workorder-<?=$wo->id?>-del"><a href="#" onclick="if(confirm('Achtung: Löscht die Workorder in thetool, aber NICHT in RIMO!')) return deleteWorkorder(<?=$preorder->id?>, <?=$wo->id?>)" class="text-danger"><i class="far fa-times-circle"></i> Workorder löschen</a></small>
|
||||
<table class="table table-sm table-striped" id="preorder-detail-<?=$preorder->id?>-workorder-<?=$wo->id?>">
|
||||
<tr>
|
||||
|
||||
215
Layout/default/Preordercampaign/Index-new.php
Normal file
215
Layout/default/Preordercampaign/Index-new.php
Normal file
@@ -0,0 +1,215 @@
|
||||
<?php
|
||||
$pagination_baseurl = $this->getUrl($Mod,"Index");
|
||||
$pagination_baseurl_params = ["filter" => $filter];
|
||||
$pagination_entity_name = "Vorbestellkampagnen";
|
||||
?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>"><?=MFAPPNAME_SLUG?></a></li>
|
||||
<li class="breadcrumb-item active">Vorbestellung</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Vorbestellkampagnen</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title mb-3">Filter</h4>
|
||||
|
||||
<form method="get" action="<?=self::getUrl("Preordercampaign")?>">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_netowner">Netzbesitzer</label>
|
||||
<select name="filter[netowner]" id="filter_netowner" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($netowners as $owner): ?>
|
||||
<option value="<?=$owner->id?>" <?=($filter['netowner'] == $owner->id) ? "selected='selected'" : ""?>><?=$owner->getCompanyOrName()?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_name">Name</label>
|
||||
<input type="text" class="form-control" name="filter[name]" id="filter_name" value="<?=$filter['name'] ?? ""?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_area">Gebiet</label>
|
||||
<input type="text" class="form-control" name="filter[area]" id="filter_area" value="<?=$filter['area'] ?? ""?>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row mt-2">
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-primary">Filter anwenden</button>
|
||||
<a class="btn btn-secondary" href="<?=self::getUrl("Preordercampaign")?>">Filter zurücksetzen</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if($me->address_id == 1 || $me->address_id == 4807): // xinon, rml ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="btn btn-purple" href="<?=self::getUrl("PreorderDiscount", "import")?>"><i class="fas fa-tags fa-fw"></i> Gutscheincodes importieren</a>
|
||||
<a class="btn btn-purple ml-1" href="<?=self::getUrl("Preorder", "statusupdateimport")?>"><i class="fas fa-retweet fa-fw"></i> Statusupdates importieren</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Liste aller Vorbestellkampagnen</h4>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<a class="btn btn-primary mb-2" href="<?=self::getUrl("Preordercampaign", "add")?>"><i class="fas fa-plus"></i> Neue Vorbestellkampagne anlegen</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Netzgebiete</th>
|
||||
<th>Name</th>
|
||||
<th>Vorbestellungen</th>
|
||||
<th>Workorders</th>
|
||||
<th>Start</th>
|
||||
<th>Ende</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php foreach($campaigns as $camp): ?>
|
||||
<tr <?=(date('U') >= $camp->from && date('U') <= $camp->to) ? "class='active'" : ""?>>
|
||||
<td class="text-right">
|
||||
<?php if(date('U') >= $camp->from && date('U') <= $camp->to): ?>
|
||||
<span class="fa-stack" title="Vorbestellkampagne aktiv">
|
||||
<i class="fas fa-alarm-clock fa-stack-1x text-success" style="z-index: 20;"></i>
|
||||
<i class="fas fa-circle-check" style="color: Tomato; vertical-align: top; font-size: 0.7em; padding-right:4px; padding-top:4px; z-index: 10;"></i>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<a class="btn btn-sm btn-outline-primary" href="<?=self::getUrl("Preorder", "add", ["preordercampaign_id" => $camp->id])?>"><i class="fas fa-plus" title="Vorbestellung hinzufügen"></i></a>
|
||||
</td>
|
||||
<td><?=$camp->network->name?></td>
|
||||
<td><?=$camp->name?></td>
|
||||
<td>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-1 text-right" style="font-size: 1.5em" title="Bestellungen anzeigen">
|
||||
<a href="<?=self::getUrl("Preorder", "Index", ["filter" => ["preordercampaign_id" => $camp->id]])?>"><i class="fas fa-list-alt"></i></a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<table class="table-sm table-borderless">
|
||||
<tr class="bg-transparent" style="line-height: .6em;">
|
||||
<?php if($camp->total_homes_sd): // automatic value from AdressDB ?>
|
||||
<td class="text-right">EFH:</td>
|
||||
<td class="text-right"><?=$camp->active_preorder_count_sd?> /</td>
|
||||
<td class="text-right"><?=$camp->total_homes_sd?></td>
|
||||
<td>(<?=(round(($camp->active_preorder_count_sd / $camp->total_homes_sd) * 100, 2))?> %)</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr class="bg-transparent" style="line-height: .6em;">
|
||||
<?php if($camp->total_homes_md): // automatic value from AdressdB ?>
|
||||
<td class="text-right">MPH:</td>
|
||||
<td class="text-right"><?=$camp->active_preorder_count_md?> /</td>
|
||||
<td class="text-right"><?=$camp->total_homes_md?></td>
|
||||
<td>(<?=(round(($camp->active_preorder_count_md / $camp->total_homes_md) * 100, 2))?> %)</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
<tr class="bg-transparent" style="line-height: .6em;">
|
||||
<td class="text-right">Gesamt:</td>
|
||||
<td class="text-right"><?=$camp->active_preorder_count?> /</td>
|
||||
<td class="text-right">
|
||||
<?php if($camp->homes_total): // manual value ?>
|
||||
<?=$camp->homes_total?>
|
||||
<?php elseif($camp->total_homes): // automatic value from AdressDB ?>
|
||||
<?=$camp->total_homes?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if($camp->homes_total): // manual value ?>
|
||||
(<?=(round(($camp->active_preorder_count / $camp->homes_total) * 100, 2))?> %)
|
||||
<?php elseif($camp->total_homes): // automatic value from AdressDB ?>
|
||||
(<?=(round(($camp->active_preorder_count / $camp->total_homes) * 100, 2))?> %)
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<?php if($camp->workorder_count): ?>
|
||||
<?=$camp->workorder_count?>
|
||||
<?php else: ?>
|
||||
0
|
||||
<?php endif; ?>
|
||||
/ <?=$camp->active_preorder_count?>
|
||||
</td>
|
||||
<td><?=date('d.m.Y',$camp->from)?></td>
|
||||
<td><?=date('d.m.Y',$camp->to)?></td>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?=self::getUrl("Preordercampaign", "downloadAddonServices", ["preordercampaign_id" => $camp->id])?>" title="Bestellte Zusatzdienste exportieren"><i class="far fa-sunset"></i></a>
|
||||
<a href="<?=self::getUrl("Preordernotification", "Index", ["filter" => ["preordercampaign_id" => $camp->id]])?>" title="Email Aussendungen"><i class="far fa-envelope"></i></a>
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<a href="<?=self::getUrl("Preordercampaign", "edit", ["id" => $camp->id])?>"><i class="far fa-edit" title="Vorbestellkampagne Bearbeiten"></i></a>
|
||||
<a href="<?=self::getUrl("Preordercampaign", "admin", ["id" => $camp->id])?>"><i class="far fa-a" title="Adminfunktionen"></i></a>
|
||||
<a href="<?=self::getUrl("Preordercampaign", "delete", ["id" => $camp->id])?>" class="text-danger" onclick="if(!confirm('Vorbestellkampagne wirklich löschen?')) return false;" title="Vorbestellkampagne Löschen"><i class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -272,3 +272,4 @@
|
||||
</div>
|
||||
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
|
||||
|
||||
@@ -110,10 +110,11 @@
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner"]) && $me->can("Building")): ?><li><a href="<?=self::getUrl("Building")?>"><i class="fas fa-fw fa-city text-info"></i> Objekte & Anschlüsse</a></li><?php endif; ?>
|
||||
<!--<?php if($me->is(["Admin"])): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("ConstructionConsent")?>"><i class="far fa-fw fa-file-signature text-info"></i> Zustimmungserklärungen</a></li><?php endif; ?>-->
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeworker","lineplanner","lineworker"]) && $me->can("Pipework")): ?><li><a href="<?=self::getUrl("Pipework")?>"><i class="fad fa-fw fa-wrench text-info"></i> Tiefbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->can("Linework")): ?><li><a href="<?=self::getUrl("Linework")?>"><i class="fas fa-fw fa-ethernet text-info"></i> Leitungsbau</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","netoperator","lineworker"]) && $me->can("Patching")): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Patching")?>"><i class="fas fa-fw fa-plug text-info"></i> Patchungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","lineplanner","pipeworker","netoperator","lineworker"]) && $me->can("Filestore")): ?><li><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-fw fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","lineplanner","pipeworker","netoperator","lineworker"]) && $me->can("Filestore")): ?><li class="has-sub-submenu"><a href="<?=self::getUrl("Filestore")?>"><i class="fas fa-fw fa-file text-info"></i> Dateiablage</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","pipeplanner","pipeplanner"]) && $me->is("employee")): ?><li><a href="<?=self::getUrl("FiberPlanDispatcher")?>"><i class="fas fa-building-circle-arrow-right text-info"></i> Verteiler und Schächte</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><li><a href="<?=self::getUrl("FiberPlanPipe")?>"><i class="fas fa-pipe text-info pl-1"></i> Rohrverzeichnis</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin","netowner","lineplanner","lineworker"]) && $me->is("employee")): ?><li><a href="<?=self::getUrl("FiberPlanCable")?>"><i class="fa-solid fa-timeline text-info "></i> Kabelverzeichnis</a></li><?php endif; ?>
|
||||
|
||||
Reference in New Issue
Block a user