Finished sending of Preordernotifications

This commit is contained in:
Frank Schubert
2023-01-26 22:01:09 +01:00
parent b8d7bd3956
commit fe26e8f2bc
9 changed files with 288 additions and 81 deletions

View File

@@ -73,10 +73,10 @@
<label class="col-lg-2 col-form-label" for="type">Bestelltyp</label>
<div class="col-lg-10">
<select class="form-control select2" name="type[]" id="type" multiple="multiple">
<option value="interest" <?=(array_key_exists("type", $notification->filter) && in_array("interest", $notification->filter["type"])) ? "selected='selected'" : ""?>>Interessensbekundung</option>
<option value="provision" <?=(array_key_exists("type", $notification->filter) && in_array("provision", $notification->filter["type"])) ? "selected='selected'" : ""?>>Vorsorgeanschluss</option>
<option value="order" <?=(array_key_exists("type", $notification->filter) && in_array("order", $notification->filter["type"])) ? "selected='selected'" : ""?>>Vollanschluss</option>
<option value="reorder" <?=(array_key_exists("type", $notification->filter) && in_array("reorder", $notification->filter["type"])) ? "selected='selected'" : ""?>>Nachbestellung</option>
<option value="interest" <?=($notification && array_key_exists("type", $notification->filter) && in_array("interest", $notification->filter["type"])) ? "selected='selected'" : ""?>>Interessensbekundung</option>
<option value="provision" <?=($notification && array_key_exists("type", $notification->filter) && in_array("provision", $notification->filter["type"])) ? "selected='selected'" : ""?>>Vorsorgeanschluss</option>
<option value="order" <?=($notification && array_key_exists("type", $notification->filter) && in_array("order", $notification->filter["type"])) ? "selected='selected'" : ""?>>Vollanschluss</option>
<option value="reorder" <?=($notification && array_key_exists("type", $notification->filter) && in_array("reorder", $notification->filter["type"])) ? "selected='selected'" : ""?>>Nachbestellung</option>
</select>
</div>
</div>
@@ -85,11 +85,11 @@
<label class="col-lg-2 col-form-label" for="connection_type">Anschlusstyp</label>
<div class="col-lg-10">
<select class="form-control select2" name="connection_type[]" id="connection_type" multiple="multiple">
<option value="single-dwelling" <?=(array_key_exists("connection_type", $notification->filter) && in_array("single-dwelling", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Einfamilienhaus</option>
<option value="multi-dwelling" <?=(array_key_exists("connection_type", $notification->filter) && in_array("multi-dwelling", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Mehrfamilienhaus</option>
<option value="apartment-building" <?=(array_key_exists("connection_type", $notification->filter) && in_array("apartment-building", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Mehrparteienhaus</option>
<option value="apartment" <?=(array_key_exists("connection_type", $notification->filter) && in_array("apartment", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Wohneinheit in Mehrparteienhaus</option>
<option value="business" <?=(array_key_exists("connection_type", $notification->filter) && in_array("business", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Gewerbebetrieb</option>
<option value="single-dwelling" <?=($notification && array_key_exists("connection_type", $notification->filter) && in_array("single-dwelling", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Einfamilienhaus</option>
<option value="multi-dwelling" <?=($notification && array_key_exists("connection_type", $notification->filter) && in_array("multi-dwelling", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Mehrfamilienhaus</option>
<option value="apartment-building" <?=($notification && array_key_exists("connection_type", $notification->filter) && in_array("apartment-building", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Mehrparteienhaus</option>
<option value="apartment" <?=($notification && array_key_exists("connection_type", $notification->filter) && in_array("apartment", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Wohneinheit in Mehrparteienhaus</option>
<option value="business" <?=($notification && array_key_exists("connection_type", $notification->filter) && in_array("business", $notification->filter['connection_type'])) ? "selected='selected'" : ""?>>Gewerbebetrieb</option>
</select>
</div>
</div>
@@ -212,7 +212,8 @@
<div class="form-group row">
<label class="col-lg-2"></label>
<div class="col-lg-10">
<button type="submit" class="btn btn-primary">Speichern</button>
<button type="submit" name="return" value="form" class="btn btn-primary mr-1">Speichern</button>
<button type="submit" name="return" value="index" class="btn btn-primary">Speichern und zur Übersicht</button>
</div>
</div>

View File

@@ -89,7 +89,16 @@
</tr>
<?php foreach($notifications as $notification): ?>
<tr>
<td class="text-center"><?=($notification->sent_date) ? date('d.m.Y', $notification->sent_date) : "<i class='fas fa-remove text-danger' title='Noch nicht versendet'></i>"?></td>
<td class="text-center">
<?php if($notification->send_start && $notification->send_finish): ?>
<i class='fas fa-check text-success' title='Versand erfolgreich abgeschlossen'></i>
<?php elseif($notification->send_start && !$notification->send_finish): ?>
<i class='fas fa-loader text-info' title='Versand gestartet'></i>
<?php elseif(!$notification->send_start && !$notification->send_finish): ?>
<i class='fas fa-remove text-danger' title='Noch nicht versendet'></i>
<?php endif; ?>
<?=($notification->sent_date) ? date('d.m.Y', $notification->sent_date) : ""?>
</td>
<td><?=$notification->campaign->name?></td>
<td><?=$notification->subject?></td>
<td title="Anzahl berechnet am <?=date('d.m.Y H:i', $notification->edit)?>"><?=($notification->recipient_count) ? $notification->recipient_count : ""?></td>