Now showing all Workorders in Preorder detail
This commit is contained in:
@@ -292,7 +292,7 @@
|
||||
</td>
|
||||
|
||||
<?php if($me->is(["Admin", "netowner"])): ?>
|
||||
<td><?php if($preorder->adb_wohneinheit_id && is_object($preorder->adb_wohneinheit->rimo_workorder)):?><i class="fas fa-r" title="Rimo Workorder erstellt"></i><?php endif; ?></td>
|
||||
<td><?php if($preorder->adb_wohneinheit_id && is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)):?><i class="fas fa-r" title="Rimo Workorder erstellt"></i><?php endif; ?></td>
|
||||
<?php endif; ?>
|
||||
<td style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<?php if(!$me->is("preorderfront")): ?>
|
||||
@@ -907,24 +907,29 @@
|
||||
'json');
|
||||
}
|
||||
|
||||
function deleteWorkorder(pid) {
|
||||
console.log("in delete workorder");
|
||||
function deleteWorkorder(pid, wid) {
|
||||
//console.log("in delete workorder");
|
||||
if(!Number.isInteger(pid) || pid < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!Number.isInteger(wid) || wid < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$.post("<?=self::getUrl("Preorder","Api")?>",
|
||||
{
|
||||
'do': "deleteWorkorder",
|
||||
id: pid,
|
||||
wid: wid
|
||||
},
|
||||
function(success) {
|
||||
if(success.status == "OK") {
|
||||
$("#preorder-detail-" + success.result.id + "-workorder td").each(function() {
|
||||
$("#preorder-detail-" + success.result.id + "-workorder-" + success.result.wid + " td").each(function() {
|
||||
$(this).html("<em class='text-monospace'>--gelöscht--</em>");
|
||||
});
|
||||
|
||||
$("#preorder-detail-" + success.result.id + "-workorder-del").remove();
|
||||
$("#preorder-detail-" + success.result.id + "-workorder-" + success.result.wid + "-del").remove();
|
||||
}
|
||||
},
|
||||
'json');
|
||||
|
||||
Reference in New Issue
Block a user