Contractjournal finished & Started Contractconfig Hooks for Provisioning Workflow

This commit is contained in:
Frank Schubert
2023-02-24 15:50:28 +01:00
parent aa373b5f4e
commit 3210981994
21 changed files with 562 additions and 279 deletions

View File

@@ -192,7 +192,7 @@
<?php if(is_array($address->contracts) && count($address->contracts)): ?>
<ul class="list-group list-group-flush">
<?php foreach($address->contracts as $contract): ?>
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> [<?=$contract->matchcode?>]</a> (<?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : ""?>)</li>
<li class="list-group-item"><a href="<?=self::getUrl("Contract", "View", ["id" => $contract->id])?>"><?=$contract->product_name?> [<?=$contract->matchcode?>]</a> <span class='text-secondary'><?=($contract->finish_date) ? "Fertigstellung: ".date('d.m.Y', $contract->finish_date) : "in Herstellung"?></span></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>

View File

@@ -354,9 +354,33 @@
});
$('#product_id').on("autocomplete.select", function(evt, item) {
if(item && item.value === 0) {
$('#product_id').autoComplete('set', null);
if(item) {
if(item.value === 0) {
$('#product_id').autoComplete('set', null);
return;
}
product_id = item.value;
$.get("<?=self::getUrl("Product","api")?>", {
do: "getProduct",
"product_id": product_id
},
function(success) {
if(success.status != "OK") return;
p = success.result.product;
$("#price").val(p.price);
$("#price_setup").val(p.price_setup);
$("#price_nne").val(p.price_nne);
$("#price_nbe").val(p.price_nbe);
$("#billing_delay").val(p.billing_delay);
$("#billing_period").val(p.billing_period);
},
"json"
);
}
});
// product autocomplete

View File

@@ -224,32 +224,84 @@
<div class="row justify-content-center">
<div class="col-8">
<table class="table table-striped table-sm">
<table class="table table-striped table-sm journal">
<?php foreach($contract->journals as $j): ?>
<tr>
<td style="white-space: nowrap" class="text-monospace"><?=date("d.m.Y H:i", $j->create)?> (<?=$j->creator?>)</td>
<td style="width: 100%">
<?php if($j->type == "text"):?>
<?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 128)?>
<?php elseif($j->type == "phone"): ?>
<i class="fas fa-phone text-white bg-warning p-1"></i> <?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 128)?>
<?php elseif($j->type == "file"): ?>
<?php if($j->type == "text" || $j->type == "phone"):?>
<td><i class="fas <?=($j->type == "text") ? "fa-align-left bg-success" : "fa-phone bg-success"?> text-white p-1"></i></td>
<?php if(strlen($j->text) > 120): ?>
<td style="width: 100%" class="pointer" onclick="toggleTruncatedJournalText(<?=$j->id?>)">
<span id="truncated-<?=$j->id?>"><i class="fas fa-caret-right"></i> <?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 120)?></span>
<span id="fulltext-<?=$j->id?>" class="hidden"><?=nl2br(htmlentities($j->text))?></span>
</td>
<?php else: ?>
<td style="width: 100%">
<?=str_replace(["\n", "\r", "\t"]," ", $j->text)?>
</td>
<?php endif; ?>
</td>
<?php elseif($j->type == "file"): ?>
<td><i class="fas fa-download bg-primary text-white p-1"></i></td>
<td style="width: 100%">
<?php if($j->text): ?>
<?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 128)?><br />
<?php endif; ?>
<a class="text-monospace" href="<?=self::getUrl("File", "download", ["id" => $j->contractfile->file_id])?>"> <i class="fas fa-download"></i> <?=$j->contractfile->name?></a>
<?php elseif($j->type == "created_from"): ?>
<?php if($j->value == "manual"): ?>
<em>Vertrag manuell angelegt.</em>
<?php endif; ?>
<a class="text-monospace" href="<?=self::getUrl("File", "download", ["id" => $j->contractfile->file_id])?>"><?=$j->contractfile->name?></a>
</td>
<?php elseif($j->type == "created_from"): ?>
<td><i class="fas fa-cogs text-secondary pl-1"></i></td>
<td style="width: 100%">
<?php if($j->value == "manual"): ?>
<em>Vertrag manuell angelegt</em>
<?php endif; ?>
</td>
</td>
<?php elseif($j->type == "link"): ?>
<?php $link = new Contract($j->value); ?>
<td><i class="fas fa-link text-secondary pl-1"></i></td>
<td style="width: 100%"><em>Verknüpfung mit <a href="<?=self::getUrl("Contract", "view", ['contract_id' => $link->id])?>"><?=$link->id?> - <?=$link->product_name?> [<?=$link->matchcode?>]</a> erstellt</em></td>
<?php endif; ?>
<td style="white-space: nowrap">
<a href="<?=self::getUrl("Contractjournal", "edit", ["journal_id" => $j->id])?>" title="Journaleintrag bearbeiten"><i class="fas fa-edit"></i></a>
</td>
</tr>
<?php endforeach; ?>
<tr>
<td colspan="4">
<div class="ml-3"><button type="button" class="btn btn-sm btn-info" onclick="$('#new-journal').toggle()"><i class="fas fa-plus"></i> Journaleintrag hinzufügen</button></div>
<div id="new-journal" class="card-body hidden border-top mt-2">
<form method="post" action="<?=self::getUrl("Contractjournal", "save")?>" enctype="multipart/form-data">
<input type="hidden" name="contract_id" value="<?=$contract->id?>">
<label for="new_journal_type" class="form-label">Typ</label>
<select name="type" id="new_journal_type" class="form-control mb-2">
<option value="phone">Telefongespräch</option>
<option value="text">Kommentar</option>
<option value="file">Dateiupload</option>
</select>
<label for="new_journal_text" class="form-label">Text</label>
<textarea name="text" id="new_journal_text" class="form-control mb-2" style="height:120px;"></textarea>
<div id="new-journal-file-container" class="hidden">
<label for="new_journal_file" class="form-label">Dateianhang</label>
<input type="file" name="journal_file" id="new_journal_file" class="form-control mb-2" />
</div>
<button class="btn btn-sm btn-primary" type="submit"><i class="fas fa-save mr-1"></i> Speichern</button>
</form>
</div>
</td>
</tr>
</table>
</div>
</div>
@@ -257,11 +309,11 @@
</div>
<?php endif; ?>
<?php if((is_array($contract->linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?>
<div class="card border-top-success">
<div class="card-body">
<h4>Verknüpfte Verträge <small><a href="<?=self::getUrl("Contract", "add", ["origin_contract_id" => $contract->id])?>"><i class="fas fa-plus"></i>Neuen Contract anlegen</a></small></h4>
<?php if((is_array($contract->linkFrom) && count($contract->linkFrom)) || (is_array($contract->linkTo) && count($contract->linkTo))): ?>
<table class="table table-striped table-sm table-bordered table-hover">
<tr>
<th>Kunde</th>
@@ -307,9 +359,10 @@
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<div class="card">
<div class="card-body">
@@ -321,4 +374,21 @@
</div>
</div>
<script>
$(document).ready(function () {
$('#new_journal_type').change(function() {
if($('#new_journal_type').val() == "file") {
$('#new-journal-file-container').show();
} else {
$('#new-journal-file-container').hide();
}
});
});
function toggleTruncatedJournalText(id) {
$("#truncated-" + id).toggle();
$("#fulltext-" + id).toggle();
}
</script>
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>

View File

@@ -27,7 +27,7 @@
</div>
</div>
<div class="card">
<div class="card border-top-success">
<div class="card-body">
<h3 class="text-center mb-3"><?=$contract->product_name?> (<?=$contract->id?>)</h3>
@@ -53,7 +53,7 @@
</div>
<div class="card">
<div class="card border-top-info">
<div class="card-body">
<h4 class="text-center mb-3">Konfiguration bearbeiten</h4>
<?php if(is_array($groups) && count($groups)): ?>

View File

@@ -45,163 +45,181 @@
</div>
<?php if(is_array($configgroups) && count($configgroups)): ?>
<div class="row">
<?php foreach($configgroups as $group): ?>
<h4>Gruppe <?=$group->name?> <small><a href="#" onclick="$('#item-form-<?=$group->id?>').toggle()"><i class="fas fa-plus"></i> Neues Element erstellen</a></small></h4>
<div class="card hidden" id="item-form-<?=$group->id?>">
<div class="card-body">
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
<input type="hidden" name="group_id" value="<?=$group->id?>" />
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
<div class="row col">
<h5>Neues Config Element</h5>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="item_new_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
<input type="text" class="form-control" id="item_new_name" name="name" value="" />
<div class="col-6 border pb-1">
<h4><?=$group->name?> <small><a href="#" onclick="$('#item-form-<?=$group->id?>').toggle(); return false;"><i class="fas fa-plus"></i> Neues Element erstellen</a></small></h4>
<div class="card hidden" id="item-form-<?=$group->id?>">
<div class="card-body">
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
<input type="hidden" name="group_id" value="<?=$group->id?>" />
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
<div class="row col">
<h5>Neues Config Element</h5>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_new_type">Datentyp</label>
<select class="form-control" id="item_new_type" name="type" onchange='toggleTypedata("new")'>
<option value="string">String</option>
<option value="int">Ganzzahl</option>
<option value="decimal">Dezimalzahl</option>
<option value="enum">Auswahl</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" id="typedata_new">
<div class="enum hidden">
<label for="item_new_data">Auswahldaten (1 Element pro Zeile)</label>
<textarea class="form-control" style="height: 128px" id="item_new_data" name="data"></textarea>
</div>
<div class="pattern">
<label for="item_new_pattern">Regex Pattern</label>
<input type="text" class="form-control" id="item_new_pattern" name="pattern" value="" />
</div>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="form-group">
<label for="item_new_displayname">Anzeigename</label>
<input type="text" class="form-control" id="item_new_displayname" name="displayname" value="" />
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_new_description">Beschreibung</label>
<input type="text" class="form-control" id="item_new_description" name="description" value="" />
</div>
</div>
</div>
<div class="form-group row">
<div class="col">
<input type="submit" class="btn btn-primary" value="Speichern" />
</div>
</div>
</div>
</form>
</div>
</div>
<?php if(is_array($group->items) && count($group->items)): ?>
<?php $i = 0; foreach($group->items as $item): ?>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action" onclick="$('#item-edit-<?=$item->id?>').toggle()"><span class="text-monospace text-pink"><?=$item->name?></span> - <?=$item->displayname?> [<?=$item->type?>]</a>
<div class="card hidden" id="item-edit-<?=$item->id?>">
<div class="card-body">
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
<input type="hidden" name="item_id" value="<?=$item->id?>" />
<input type="hidden" name="group_id" value="<?=$group->id?>" />
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
<div class="row">
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
<input type="text" class="form-control" id="item_<?=$item->id?>_name" name="name" value="<?=$item->name?>" />
</div>
<div class="row">
<div class="col-md-1">
<div class="form-group">
<label for="item_new_<?=$item->id?>_order">Sortierung</label>
<input type="text" class="form-control" id="item_new_<?=$item->id?>_order" name="order" value="" />
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_type">Datentyp</label>
<select class="form-control" id="item_<?=$item->id?>_type" name="type" onchange="toggleTypedata(<?=$item->id?>)">
<option value="string" <?=($item->type == "string") ? "selected='selected'" : ""?>>String</option>
<option value="int" <?=($item->type == "int") ? "selected='selected'" : ""?>>Ganzzahl</option>
<option value="decimal" <?=($item->type == "decimal") ? "selected='selected'" : ""?>>Dezimalzahl</option>
<option value="enum" <?=($item->type == "enum") ? "selected='selected'" : ""?>>Auswahl</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" id="typedata_<?=$item->id?>">
<div class="enum <?=($item->type != "enum") ? "hidden" : ""?>">
<label for="item_<?=$item->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
<textarea class="form-control" style="height: 128px" id="item_<?=$item->id?>_data" name="data"><?=$item->typedata?></textarea>
</div>
<div class="pattern <?=($item->type != "string") ? "hidden" : ""?>">
<label for="item_<?=$item->id?>_pattern">Regex Pattern</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_pattern" name="pattern" value="<?=$item->pattern?>" />
</div>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_displayname">Anzeigename</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_displayname" name="displayname" value="<?=$item->displayname?>" />
</div>
<div class="col-md-3">
<div class="form-group">
<label for="item_new_<?=$group->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
<input type="text" class="form-control" id="item_new_<?=$group->id?>_name" name="name" value="" />
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_description">Beschreibung</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_description" name="description" value="<?=$item->description?>" />
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_new_<?=$group->id?>_type">Datentyp</label>
<select class="form-control" id="item_new_<?=$group->id?>_type" name="type" onchange='toggleTypedata("new_<?=$group->id?>"); return false;'>
<option value="string">String</option>
<option value="int">Ganzzahl</option>
<option value="decimal">Dezimalzahl</option>
<option value="enum">Auswahl</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" id="typedata_new_<?=$group->id?>">
<div class="enum hidden">
<label for="item_new_<?=$group->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
<textarea class="form-control" style="height: 128px" id="item_new_<?=$group->id?>_data" name="data"></textarea>
</div>
<div class="pattern">
<label for="item_new_pattern">Regex Pattern</label>
<input type="text" class="form-control" id="item_new_<?=$group->id?>_pattern" name="pattern" value="" />
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-11 float-left">
<input type="submit" class="btn btn-primary" value="Speichern" />
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="form-group">
<label for="item_new_<?=$group->id?>_displayname">Anzeigename</label>
<input type="text" class="form-control" id="item_new_<?=$group->id?>_displayname" name="displayname" value="" />
</div>
<div class="col-md-1 float-right">
<small><a class="text-danger" href="<?=self::getUrl("Contractconfig", "deleteItem", ['id' => $item->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_new_<?=$group->id?>_description">Beschreibung</label>
<input type="text" class="form-control" id="item_new_<?=$group->id?>_description" name="description" value="" />
</div>
</div>
</div>
<div class="form-group row">
<div class="col">
<input type="submit" class="btn btn-primary" value="Speichern" />
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
<?php $i++; endforeach; ?>
<?php endif; ?>
<?php $i++; endforeach; ?>
<?php if(is_array($group->items) && count($group->items)): ?>
<?php $i = 0; foreach($group->items as $item): ?>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action bg-soft-warning" onclick="$('#item-edit-<?=$item->id?>').toggle(); return false;"><i class="fas fa-caret-right pr-1"></i> <?=($item->order) ? $item->order : ""?> <span class="text-monospace bg-purple text-white ml-1 p-1"><?=$item->name?></span> - <?=$item->displayname?> [<?=$item->type?>]</a>
<div class="card hidden" id="item-edit-<?=$item->id?>">
<div class="card-body">
<form method="post" action="<?=self::getUrl("ContractconfigItem", "save")?>">
<input type="hidden" name="item_id" value="<?=$item->id?>" />
<input type="hidden" name="group_id" value="<?=$group->id?>" />
<div class="p-2 <?=($i % 2 == 0) ? "bg-light" : ""?>">
<div class="row">
</div>
<div class="row">
<div class="col-md-1">
<div class="form-group">
<label for="item_<?=$item->id?>_order">Sortierung</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_order" name="order" value="<?=$item->order?>" />
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="item_<?=$item->id?>_name">Name <small class="text-monospace">[a-z0-9._-]</small></label>
<input type="text" class="form-control" id="item_<?=$item->id?>_name" name="name" value="<?=$item->name?>" />
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_type">Datentyp</label>
<select class="form-control" id="item_<?=$item->id?>_type" name="type" onchange="toggleTypedata(<?=$item->id?>)">
<option value="string" <?=($item->type == "string") ? "selected='selected'" : ""?>>String</option>
<option value="int" <?=($item->type == "int") ? "selected='selected'" : ""?>>Ganzzahl</option>
<option value="decimal" <?=($item->type == "decimal") ? "selected='selected'" : ""?>>Dezimalzahl</option>
<option value="enum" <?=($item->type == "enum") ? "selected='selected'" : ""?>>Auswahl</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="form-group" id="typedata_<?=$item->id?>">
<div class="enum <?=($item->type != "enum") ? "hidden" : ""?>">
<label for="item_<?=$item->id?>_data">Auswahldaten (1 Element pro Zeile)</label>
<textarea class="form-control" style="height: 128px" id="item_<?=$item->id?>_data" name="data"><?=$item->typedata?></textarea>
</div>
<div class="pattern <?=($item->type != "string") ? "hidden" : ""?>">
<label for="item_<?=$item->id?>_pattern">Regex Pattern</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_pattern" name="pattern" value="<?=$item->pattern?>" />
</div>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_displayname">Anzeigename</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_displayname" name="displayname" value="<?=$item->displayname?>" />
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="item_<?=$item->id?>_description">Beschreibung</label>
<input type="text" class="form-control" id="item_<?=$item->id?>_description" name="description" value="<?=$item->description?>" />
</div>
</div>
</div>
<div class="form-group row">
<div class="col-md-11 float-left">
<input type="submit" class="btn btn-primary" value="Speichern" />
</div>
<div class="col-md-1 float-right">
<small><a class="text-danger" href="<?=self::getUrl("Contractconfig", "deleteItem", ['id' => $item->id])?>" onclick="if(!confirm('Attribut wirklich löschen?')) return false;"><i class="fas fa-trash-alt"></i> löschen</a></small>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<?php $i++; endforeach; ?>
<?php endif; ?>
</div>
<?php $i++; endforeach; ?>
</div>
<?php else: ?>
<i>Keine Configgruppen gefunden</i>
<?php endif; ?>

View File

@@ -7,11 +7,11 @@
<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("Voicenumberblock")?>">Rufnummernblöcke</a></li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voicenumberblock")?>#block_id=<?=$number->block->id?>"><?=$number->block->number_first?> - <?=$number->block->number_last?></a></li>
<li class="breadcrumb-item active"><?=$number->getFullNumber()?> bearbeiten</li>
<li class="breadcrumb-item"><a href="<?=self::getUrl("Voicenumberblock")?>#block_id=<?=$number->block->id?>"><?=$number->block->first?> - <?=$number->block->last?></a></li>
<li class="breadcrumb-item active"><?=$number->number?> bearbeiten</li>
</ol>
</div>
<h4 class="page-title">Rufnummer <?=$number->getFullNumber()?></h4>
<h4 class="page-title">Rufnummer <?=$number->number?></h4>
</div>
</div>
</div>
@@ -116,10 +116,10 @@
<select name="disabled_reason" class="form-control">
<option></option>
<option value="ported_out" <?=($number->disabled_reason == "ported_out") ? "selected='selected'" : ""?>>Zu neuem Provider portiert</option>
<option value="ported_back">Zum Anker zurückportiert</option>
<option value="reserved">Reserviert</option>
<option value="legacy">Legacy</option>
<option value="damaged">Kaputt</option>
<option value="ported_back" <?=($number->disabled_reason == "ported_back") ? "selected='selected'" : ""?>>Zum Anker zurückportiert</option>
<option value="reserved" <?=($number->disabled_reason == "reserved") ? "selected='selected'" : ""?>>Reserviert</option>
<option value="legacy" <?=($number->disabled_reason == "legacy") ? "selected='selected'" : ""?>>Legacy</option>
<option value="damaged" <?=($number->disabled_reason == "damaged") ? "selected='selected'" : ""?>>Kaputt</option>
</select>
</div>
</div>

View File

@@ -110,9 +110,9 @@
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->name?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->countrycode?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->areacode?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->base?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getFirst()?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->getLast()?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->short_prefix?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->first?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->last?></td>
<td onclick="toggleBlock(<?=$block->id?>)"><?=$block->comment?></td>
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
<a href="<?=self::getUrl("Voicenumberblock", "edit", ["id" => $block->id])?>"><i class="far fa-edit" title="Bearbeiten"></i></a>

View File

@@ -3,7 +3,7 @@
?>
<div class="card">
<div class="card-body">
<h4 class="header-title">Rufnummern <?=$block->countrycode?><?=$block->areacode?><?=$block->getFirst()?> - <?=$block->countrycode?><?=$block->areacode?><?=$block->getLast()?></h4>
<h4 class="header-title">Rufnummern <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_first?> - <?=$block->countrycode?> <?=$block->areacode?> <?=$block->short_last?></h4>
<table class="table table-striped table-sm">
<tr>
<th>Nummer</th>
@@ -14,10 +14,10 @@
<th>Entsperrung</th>
<th></th>
</tr>
<?php $i = 0; foreach(range($block->getFirst(), $block->getLast()) as $number): ?>
<?php $num = null; $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block_id, 'number' => ($block->number_prepend_zero) ? "0$number" : $number]) ?>
<?php $i = 0; foreach(range($block->first, $block->last) as $number): ?>
<?php $num = VoicenumberModel::getFirst(['voicenumberblock_id' => $block_id, 'number' => $number]) ?>
<tr>
<td><?=$block->countrycode?> <?=$block->areacode?> <?=($block->number_prepend_zero) ? "0" : ""?><?=$number?></td>
<td><?=$number?></td>
<td>
<?php if($num->active): ?>
<span class="text-success"><i class="fas fa-check"></i></span>