Merge branch 'fronkdev' into 'master'
Now showing all Workorders in Preorder detail See merge request fronk/thetool!661
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');
|
||||
|
||||
@@ -397,30 +397,33 @@
|
||||
|
||||
<div class="col-6">
|
||||
<h3>Workorder</h3>
|
||||
<?php if(is_object($preorder->adb_wohneinheit->rimo_workorder) && $preorder->adb_wohneinheit->rimo_workorder->id): ?>
|
||||
<small id="preorder-detail-<?=$preorder->id?>-workorder-del"><a href="#" onclick="if(confirm('Achtung: Löscht die Workorder in thetool, aber NICHT in RIMO!')) return deleteWorkorder(<?=$preorder->id?>)" class="text-danger"><i class="far fa-times-circle"></i> Workorder löschen</a></small>
|
||||
<table class="table table-sm table-striped" id="preorder-detail-<?=$preorder->id?>-workorder">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td class="text-monospace"><?=$preorder->adb_wohneinheit->rimo_workorder->rimo_name?></td>
|
||||
</tr><tr>
|
||||
<th>External ID</th>
|
||||
<td class="text-monospace"><?=$preorder->adb_wohneinheit->rimo_workorder->rimo_id?></td>
|
||||
</tr><tr>
|
||||
<th>Status</th>
|
||||
<td><?=$preorder->adb_wohneinheit->rimo_workorder->rimo_status?></td>
|
||||
</tr>
|
||||
<?php if($preorder->adb_wohneinheit->rimo_workorder->rimo_team_name): ?>
|
||||
<tr>
|
||||
<th>Zugewiesen an:</th>
|
||||
<td><?=$preorder->adb_wohneinheit->rimo_workorder->rimo_team_name?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th>Erstellt</th>
|
||||
<td class="text-monospace"><?=(is_object($preorder->adb_wohneinheit->rimo_workorder)) ? date("d.m.Y H:i:s", $preorder->adb_wohneinheit->rimo_workorder->create) : ""?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php if(is_array($preorder->adb_wohneinheit->rimo_workorders) && count($preorder->adb_wohneinheit->rimo_workorders)): ?>
|
||||
<?php foreach($preorder->adb_wohneinheit->rimo_workorders as $wo): ?>
|
||||
<h4><?=$wo->rimo_name?></h4>
|
||||
<small id="preorder-detail-<?=$preorder->id?>-workorder-<?=$wo->id?>-del"><a href="#" onclick="if(confirm('Achtung: Löscht die Workorder in thetool, aber NICHT in RIMO!')) return deleteWorkorder(<?=$preorder->id?>, <?=$wo->id?>)" class="text-danger"><i class="far fa-times-circle"></i> Workorder löschen</a></small>
|
||||
<table class="table table-sm table-striped" id="preorder-detail-<?=$preorder->id?>-workorder-<?=$wo->id?>">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td class="text-monospace"><?=$wo->rimo_name?></td>
|
||||
</tr><tr>
|
||||
<th>External ID</th>
|
||||
<td class="text-monospace"><?=$wo->rimo_id?></td>
|
||||
</tr><tr>
|
||||
<th>Status</th>
|
||||
<td><?=$wo->rimo_status?></td>
|
||||
</tr>
|
||||
<?php if($wo->rimo_team_name): ?>
|
||||
<tr>
|
||||
<th>Zugewiesen an:</th>
|
||||
<td><?=$wo->rimo_team_name?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th>Erstellt</th>
|
||||
<td class="text-monospace"><?=date("d.m.Y H:i:s", $wo->create)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -146,7 +146,15 @@
|
||||
</select>
|
||||
<small>Beschränkt Benutzer auf Netzgebiete. Überschreibt Netzgebiete der Firma. Wenn leer werden Netzgebiete der Firma angezeigt</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="preorderreadonly-container">
|
||||
<label for="preorderreadonly">Preorder Readonly:</label>
|
||||
<select name="preorderreadonly" id="preorderreadonly" class="form-control">
|
||||
<option value="false" <?=(isset($user) && !$user->is("preorderreadonly")) ? "selected='selected'" : ""?>>Read/Write</option>
|
||||
<option value="true" <?=(isset($user) && $user->is("preorderreadonly")) ? "selected='selected'" : ""?>>Readonly</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<h4 class="card-title mb-3">Modulberechtigungen</h4>
|
||||
|
||||
@@ -117,12 +117,6 @@ $pagination_entity_name = "Benutzer";
|
||||
style="text-align: left; letter-spacing: 4px; font-size: 1.1em;">
|
||||
<a href="<?= self::getUrl("User", "edit", ['id' => $user->id]) ?>"
|
||||
title="User bearbeiten"><i class="far fa-edit"></i></a>
|
||||
<?php if ($user->id > 1): ?>
|
||||
<a href="<?= self::getUrl("User", "delete", ['id' => $user->id]) ?>"
|
||||
class="text-danger" title="User löschen"
|
||||
onclick="if(!confirm('Benutzer wirklich löschen?')) return false;"><i
|
||||
class="fas fa-trash"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
Reference in New Issue
Block a user