Added minor things to Order; fixed saving patcher in Patching
This commit is contained in:
@@ -76,6 +76,11 @@
|
||||
<input type="text" class="form-control" name="filter[building_street]" id="filter_building_street" value="<?=$filter['building_street']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_partner_number">Partnernummer</label>
|
||||
<input type="text" class="form-control" name="filter[partner_number]" id="filter_partner_number" value="<?=$filter['partner_number']?>" />
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_finish_date">Bestellstatus</label>
|
||||
<select name="filter[finish_date]" id="filter_finish_date" class="form-control">
|
||||
@@ -224,7 +229,7 @@
|
||||
<form method="post" action="<?=self::getUrl("OrderJournal", "save")?>">
|
||||
<input type="hidden" name="order_id" value="<?=$order->id?>" />
|
||||
<input type="hidden" name="s" value="<?=$pagination['start']?>" />
|
||||
<?php foreach($filter as $n => $v): ?>
|
||||
<?php if(is_array($filter) && count($filter)) foreach($filter as $n => $v): ?>
|
||||
<input type="hidden" name="filter[<?=$n?>]" value="<?=$v?>" />
|
||||
<?php endforeach; ?>
|
||||
<textarea name="text" class="form-control mb-2" style="height:120px;"></textarea>
|
||||
@@ -279,7 +284,9 @@
|
||||
<input type="text" class="form-control datepicker" id="vororttermin-<?=$order->id?>" name="vororttermin" value="<?=($order->install_date) ? date("d.m.Y",$order->install_date) : ""?>" placeholder="--.--.----" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-primary" id="vororttermin-button-<?=$order->id?>" type="button" title="Vororttermin speichern" onclick="saveVororttermin(<?=$order->id?>)"><i class="fas fa-save"></i></button>
|
||||
<button class="btn btn-outline-danger ml-1" id="vororttermin-delete-<?=$order->id?>" type="button" title="Vororttermin speichern" onclick="saveVororttermin(<?=$order->id?>, true)"><i class="fas fa-trash"></i></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -555,9 +562,9 @@
|
||||
<form method="post" action="<?=self::getUrl("OrderJournal", "save")?>">
|
||||
<input type="hidden" name="order_id" value="<?=$order->id?>" />
|
||||
<input type="hidden" name="s" value="<?=$pagination['start']?>" />
|
||||
<?php foreach($filter as $n => $v): ?>
|
||||
<?php if(is_array($filter) && count($filter)): foreach($filter as $n => $v): ?>
|
||||
<input type="hidden" name="filter[<?=$n?>]" value="<?=$v?>" />
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; endif; ?>
|
||||
<textarea name="text" class="form-control mb-2" style="height:120px;"></textarea>
|
||||
<button class="btn btn-sm btn-primary" type="submit"><i class="fas fa-save"></i> Speichern</button>
|
||||
</form>
|
||||
@@ -610,6 +617,7 @@
|
||||
<input type="text" class="form-control datepicker" id="vororttermin-<?=$order->id?>" name="vororttermin" value="<?=($order->install_date) ? date("d.m.Y",$order->install_date) : ""?>" placeholder="--.--.----" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-outline-primary" id="vororttermin-button-<?=$order->id?>" type="button" title="Vororttermin speichern" onclick="saveVororttermin(<?=$order->id?>)"><i class="fas fa-save"></i></button>
|
||||
<button class="btn btn-outline-danger ml-1" id="vororttermin-delete-<?=$order->id?>" type="button" title="Vororttermin speichern" onclick="saveVororttermin(<?=$order->id?>, true)"><i class="fas fa-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -790,15 +798,18 @@
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
function saveVororttermin(id) {
|
||||
function saveVororttermin(id, removeDate = false) {
|
||||
date = $('#vororttermin-' + id).val();
|
||||
if(!date) {
|
||||
if(removeDate) {
|
||||
date = "";
|
||||
}
|
||||
/*if(!date) {
|
||||
$('#vororttermin-button-' + id).addClass("btn-danger");
|
||||
$('#vororttermin-button-' + id).removeClass("btn-outline-success");
|
||||
$('#vororttermin-button-' + id).removeClass("btn-outline-primary");
|
||||
$('#vororttermin-' + id).addClass("is-invalid");
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
$.post('<?=self::getUrl("Order", "saveVororttermin")?>',
|
||||
{
|
||||
@@ -815,8 +826,15 @@
|
||||
$('#vororttermin-' + id).addClass("is-valid");
|
||||
$('#vororttermin-' + id).removeClass("is-invalid");
|
||||
|
||||
$('#date-pill-' + id + '-install_date').html('Vorortinstallation: <span class="text-monospace"><span class="text-success">' + data.order.date + '</span></span>');
|
||||
$('#date-pill-' + id + '-install_date').addClass("active");
|
||||
if(data.order.date) {
|
||||
$('#date-pill-' + id + '-install_date').html('Vorortinstallation: <span class="text-monospace"><span class="text-success">' + data.order.date + '</span></span>');
|
||||
$('#date-pill-' + id + '-install_date').addClass("active");
|
||||
} else {
|
||||
$('#date-pill-' + id + '-install_date').removeClass("active");
|
||||
$('#date-pill-' + id + '-install_date').html('Vorortinstallation: <span class="text-monospace"><span class="text-success">--.--.----</span></span>');
|
||||
$('#vororttermin-' + id).val("");
|
||||
}
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
$('#vororttermin-' + id).removeClass("is-valid");
|
||||
|
||||
Reference in New Issue
Block a user