Added Callcenter Stats
This commit is contained in:
165
Layout/default/Callcenterstats/Index.php
Normal file
165
Layout/default/Callcenterstats/Index.php
Normal file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
/**
|
||||
* @var string $mfLayoutPackage
|
||||
*
|
||||
* @var CallcenterIdentity[] $identities
|
||||
* @var string[] $selected_identities
|
||||
* @var DateTime $from
|
||||
* @var DateTime $to
|
||||
*/
|
||||
?>
|
||||
<?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">Callcenter Auswertung</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">Callcenter Auswertung</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 col-xl-5">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-header mb-2">Callcenter Auswertung</h4>
|
||||
|
||||
<form class="form-horizontal" method="post" action="<?=self::getUrl("Callcenterstats") ?>">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label">Identität(en)</label>
|
||||
<div class="col-lg-10">
|
||||
<select name="identities[]" id="identities" multiple="multiple" class="form-control select2">
|
||||
<?php foreach($identities as $ident): ?>
|
||||
<option value="<?=$ident->number?>" data-color="<?=$ident->color?>" <?=($selected_identities && in_array($ident->number, $selected_identities) ? "selected='selected'" : "")?>><?=$ident->name?> - <?=$ident->display?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<small><a href="#" onclick="selectColors(['green','pink']); return false;"><i class="fas fa-plus"></i> ESTMK</a></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label">Zeitraum von:</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control datepicker" name="from" value="<?=$from->format("d.m.Y")?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-lg-2 col-form-label">Zeitraum bis:</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control datepicker" name="to" value="<?=$to->format("d.m.Y")?>"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-lg-2"></div>
|
||||
<div class="col-lg-10">
|
||||
<input type="submit" class="btn btn-primary" name="run" value="Auswerten" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?php if(isset($in) || isset($out)): ?>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<h4 class="text-right">Eingehend</h4>
|
||||
<?php if(isset($out)): ?>
|
||||
<table class="table table-sm table-striped">
|
||||
<tr>
|
||||
<th class="text-right">Anzahl eingehende Calls:</th>
|
||||
<td class="text-monospace text-right"><?=$out["count"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Sekunden gesamt:</th>
|
||||
<td class="text-monospace text-right"><?=$out["seconds"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Verrechenbare Minuten:</th>
|
||||
<td class="text-monospace text-right"><?=$out["billable"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Kosten:</th>
|
||||
<td class="text-monospace text-right">€ <?=$out["cost"]?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<h4 class="text-right">Ausgehend</h4>
|
||||
<?php if(isset($in)): ?>
|
||||
<table class="table table-sm table-striped">
|
||||
<tr>
|
||||
<th class="text-right">Anzahl ausgehende Calls:</th>
|
||||
<td class="text-monospace text-right"><?=$in["count"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right"h>Sekunden gesamt:</th>
|
||||
<td class="text-monospace text-right"><?=$in["seconds"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Verrechenbare Minuten:</th>
|
||||
<td class="text-monospace text-right"><?=$in["billable"]?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-right">Kosten:</th>
|
||||
<td class="text-monospace text-right">€ <?=$in["cost"]?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(".select2").select2({closeOnSelect: false});
|
||||
$(".datepicker").datepicker({
|
||||
language: 'de',
|
||||
format: "dd.mm.yyyy",
|
||||
showWeekDays: true,
|
||||
todayBtn: 'linked',
|
||||
autoclose: true,
|
||||
orientation: "bottom"
|
||||
});
|
||||
|
||||
function selectColors(colors = []) {
|
||||
var pattern = "(" + colors.join("|") + ")";
|
||||
|
||||
$("#identities option").each(function(i, elem) {
|
||||
var c = $(elem).data("color");
|
||||
if(c.match(pattern)) {
|
||||
$(elem).attr("selected", "selected");
|
||||
$(elem).change();
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -113,10 +113,11 @@
|
||||
<li><a href="<?=self::getUrl("PreorderBilling")?>"><i class="far fa-fw fa-cash-register text-info"></i> Vorbestellkampagnen Verrechnung</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if($me->isAdmin() || !empty(json_decode((new WorkerFlag($me->id, "constructionConsent_projects"))->value() ?? '[]'))): ?>
|
||||
<li><a href="<?=self::getUrl("ConstructionConsentProject")?>"><i class="far fa-fw fa-clipboard-question text-info"></i> Zustimmungserklärungen</a></li>
|
||||
<li class="border-top"><a href="<?=self::getUrl("ConstructionConsentProject")?>"><i class="far fa-fw fa-clipboard-question text-info"></i> Zustimmungserklärungen</a></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($me->is(["Admin"])): ?><li class="border-top"><a href="<?=self::getUrl("MailtemplateDispatch")?>"><i class="far fa-fw fa-envelope text-info"></i> Emailaussendungen</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin"])): ?><li class="border-top"><a href="<?=self::getUrl("Callcenterstats")?>"><i class="fas fa-fw fa-phone-office text-info"></i> Callcenter Auswertung</a></li><?php endif; ?>
|
||||
<?php if($me->is(["Admin"])): ?><li class="border-top"><a href="<?=self::getUrl("AssetManagement")?>"><i class="far fa-fw fa-clipboard-list text-info"></i> Asset Management</a></li><?php endif; ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user